This command is used for local unlocking of Natural source objects in a Natural mainframe environment.
It is used to view source objects that are locked and to unlock them if required. 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.
Notes:
UNLOCK
                          system command, the profile parameter SLOCK must be set to
                          PRE. 
                  WRKSIZE
                          of profile parameter SORT. 
                  This document covers the following topics:
For further information, refer to
                      Locking of Source
                         Objects in the Editors documentation
                      and profile parameter SLOCK in the
                      Parameter Reference. 
               
See also Object Naming Conventions in the Using Natural documentation.
If the system command UNLOCK is used without
                       parameters, a screen
                       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]
                         |  
                               
                     |
 [USER
                                    locked-by]
                         | 
                                
                               
                     |
 [DATE
                                    locked-on
                                    [locked-on2]]
                                    
                         |  
                               
                     
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 | * | 
                           
  |  
                               
                     ||||||||||||||||||||||||||||||
library-name | 
                                
                                
                        A8 | * | The name of the library where the locked object is in. Asterisk notation (*) can be used. | ||||||||||||||||||||||||||||||
dbid |  
                                
                        A5 | current database ID | The database ID of the defined library. Specify
                                    asterisk (*) or in format N5. 
                                    
                            When asterisk notation
                                        (*) is used, only the current   |  
                               
                     ||||||||||||||||||||||||||||||
fnr |  
                                
                        A5 | current file number | The file number of the defined library. Specify
                                    asterisk (*) or in format N5. 
                                    
                            When asterisk notation
                                        (*) is used, only the current   |  
                               
                     ||||||||||||||||||||||||||||||
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   |  
                               
                     ||||||||||||||||||||||||||||||
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   |  
                               
                     ||||||||||||||||||||||||||||||
locked-by | 
                                
                                
                        A8 | current user ID 
                                     
                                     
                            or asterisk (*) with batch mode and security flag "F"  |  
                                
                         The 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
                                           |  
                               
                     ||||||||||||||||||||||||||||||
locked-on2 |  
                                
                        A8 | ||||||||||||||||||||||||||||||||
Note:
Locking can also be enabled locally on a mainframe server based on
                          Natural for Mainframes. 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.
                  
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 screen with an error message will appear.
In the following cases, the locked objects found are listed
                       on the
                       screen where they can be unlocked using the line command
                       U (see below):
               
if you used asterisk notation (*) or ">" (where applicable),
if you did not specify a specific object name.
Note:
When asterisk notation (*) is used for object type and
                          library, the locked DDMs have also to be listed by scanning the current
                          FDIC system file.
                  
The unlock list provides the following function keys:
| PF1 | Help | Invoke help. | 
| PF3 | Exit | Return to unlock list. | 
| PF6 | -- | Top of list. | 
| PF7 | - | Page backward. | 
| PF8 | + | Page forward. | 
| PF9 | ++ | End of list. | 
| PF10 | < | First part of information (type, library, database ID, file number). | 
| PF11 | > | Second part of information (locked by, locked on). | 
| PF12 | Cancel | Cancels the UNLOCK
                                      command.
                         |  
                                 
                     
| U | In the Cmd column of the
                                      unlock list, you can enter the command U in a single
                                      line or in multiple lines to unlock the corresponding object(s). Successful
                                      unlocking is indicated by an "unlocked" message in
                                      the Message column. 
                         |  
                                 
                     
If no error occurred, all locked objects found are unlocked and a corresponding message appears.