Version 6.3.8 for Windows
 —  System Commands  —

UNLOCK

This command is used for unlocking

It is used to view source objects or documentation objects that are locked and to unlock them if need be. This command is recommended for use by the Natural administrator only. However, the administrator can enable the use of this command for each user profile in Natural Security.

This document covers the following topics:

For further information, see Unlocking Objects Manually in the Remote Development Using SPoD documentation.

See also Object Naming Conventions in the Using Natural Studio documentation.


Unlocking Natural Objects

If the system command UNLOCK is used without parameters, a dialog appears where you can enter the parameters.

UNLOCK

The following shows the direct command syntax for unlocking Natural objects.

UNLOCK [NATURAL] [OBJECT] object-name
  [TYPE object-type]
  [LIBRARY library-name]
  [DBID dbid] [FNR fnr]
  [PASSWORD password] [CIPHER cipher]
  [APPLICATION application-name]
  [USER locked-by]
  [DATE locked-on [locked-on2]]

Top of page

Unlocking Documentation Objects

The following shows the direct command syntax for unlocking documentation objects.

UNLOCK DOCUMENT [OBJECT] object-name
  [TYPE object-type]
  [USER locked-by]
  [DATE locked-on [locked-on2]]

Top of page

Parameter Descriptions

The object name must be defined in each case. If any of the other parameters is not specified, the corresponding default value will be used.

Parameter Format/Length Default Value Description
object-name A33 * The name of the object to be unlocked. Asterisk notation (*) or ">" can be used.
object-type A1 *
Natural object types:

In place of object-type, you may specify one of the object type codes shown below or an asterisk (*).

P Program
4 Class
N Subprogram
S Subroutine
7 Function
8 Adapter
C Copycode
H Helproutine
T Text
3 Dialog
M Map
L Local Data Area
G Global Data Area
A Parameter Data Area
V DDM (View)
X Application
A2 *
Documentation object types:

User-defined short descriptions for documentation object types or an asterisk (*).

library-name A8 * Name of the library where the locked object is in. Asterisk notation (*) can be used.
dbid A5 current database ID Database ID of the defined library. Specify asterisk (*) or in format N5.

On mainframe servers with parameter SLOCK=PRE, the following applies: When asterisk notation (*) is used, only the current FNAT, FUSER and FDIC files are scanned.

fnr A5 current file number File number of the defined library. Specify asterisk (*) or in format N5.

On mainframe servers with parameter SLOCK=PRE, the following applies: When asterisk notation (*) is used, only the current FNAT, FUSER and FDIC files are scanned.

password A8 blank If used, the password for the specified system file (dbid and fnr).

Needs not to be specified, when the dbid and fnr of the current FNAT or FUSER is used.

This parameter is available only in a mainframe remote development environment and when profile parameter SLOCK=PRE has been set in the mainframe environment.

cipher A8 blank If used, the cipher key for the specified system file (dbid and fnr).

Needs not to be specified, when the dbid and fnr of the current FNAT or FUSER is used.

This parameter is available only in a mainframe remote development environment and when profile parameter SLOCK=PRE has been set in the mainframe environment.

application-name A32 blank If used, the name of the application to which the locked object belongs.

If you specify a blank, all locked objects, irrespective of whether they are linked to an application or not, are listed in a results window where they can be unlocked manually.

locked-by A8 current user ID ID of the user who caused the object to be locked. Asterisk notation (*) can be used.

If Natural Security is used, it can be changed only if the security unlock flag is set to "F" (forced unlock) in the Natural Security user profile.

locked-on A10 blank The two date parameters are available to provide for the different date formats:

2005-09-28 (date format according to the DTFORM profile parameter)
2005-09-28 11:27:20
Today
Today + nnnn
Today - nnnn
Yesterday

locked-on2 A8

Note:
Locking can also be enabled locally on a mainframe server based on Natural for Mainframes Version 4.2 or above. In this case, the following limitations apply: The application-name cannot be used as a selection criterion. For dbid and fnr, the current FNAT and FUSER system files are searched if asterisk notation (*) is used.

Top of page

Parameter Processing and Display of Objects Found

If the parameter(s) specified is (are) valid and a complete object name is specified and if the corresponding object is found and it was locked by the current user, this object is unlocked immediately and a corresponding message is displayed. This applies under the condition that the object name is specified directly without using asterisk notation (*) and the current user tries to unlock his own locked records.

If any of the parameters specified is invalid or if no objects are found, the unlock dialog with an error message box will appear.

In the following cases, the locked objects found are listed in a results window where they can be unlocked manually:

If the object type of a documentation object is not unique, look into the hidden column next to the object type for the internal object types.

For further information on the results window, see Unlocking Objects Manually in the Remote Development Using SPoD documentation.

Top of page