Version 4.2.6
 —  Editors  —

Locking of Source Objects

Natural provides locking mechanisms that prevent concurrent updating of Natural source objects. These mechanisms allow the locking of source objects that are edited in a local mainframe environment and/or in a SPoD (Natural Single Point of Development) environment connected to a mainframe server.

You can activate or deactivate different object locking mechanisms by using the profile parameter SLOCK (see also the Parameter Reference):

The principles of object locking with profile parameter SLOCK=PRE set in a local environment are described in the following sections.


Source Editing

The sources of the following types of Natural object are locked while they are being edited with the appropriate Natural editor:

When you invoke a Natural editor, the source contained in the source work area will be locked. If the source object you want to edit has already been locked by another user (as indicated by an appropriate message), the source can be displayed in the editor but without an object name at the top of the screen. If you modify the source and want to keep the modifications, you have to save the source as a new source object with a new name.

Note:
Reading in a source into the source work area by using the READ command does not lock the source object. A source object is only locked when you invoke the Natural editor.

Top of page

Saving Objects

You cannot save (SAVE and STOW commands) a source that is being locked by another user.

Top of page

Unlocking Objects

A locked source object contained in the source work area is unlocked when you do any of the following:

You can use the UNLOCK system command (see the System Commands documentation) to view locked source objects or unlock them if required.

Top of page

Moving, Deleting, Renaming and Replacing Objects

Object locking is also considered when using the system command DELETE or RENAME, the Object Handler or the utilities SYSMAIN, SYSTRANS or NATLOAD/NATUNLD.

When you move, delete, rename or replace a source object, the locking state of the object is checked:

Restrictions

The utilities SYSRPC, SYSPARM and SYSERR do not support object locking.

Top of page