Command title |
Open for Write |
Description |
This command loads into the specified TSR a copy of a specified generation of a specified table—the status of the table is opened for write. |
COBOL syntax |
|
C syntax |
|
Parameters |
PASSWORD (OPTIONAL)—if the table has a write password then the correct write password must be supplied in the PASSWORD parameter. If the table has only a read password defined, then the write password defaults to the read password, and it must be supplied for the OW command to succeed. GENERATION (OPTIONAL)—if an earlier generation of the table is required instead of the current generation, then the GENERATION parameter must be supplied. It may be specified as a relative generation (negative number) or an absolute generation (positive number); zero may be used to designate the current generation. If GENERATION is given, and the table has no password, a dummy PASSWORD parameter must be specified as a placeholder in the parameter list. |
Explanation |
The table is located by searching through a list of libraries. Refer to OR for more details on the conditions for the search through the library list. When a table is found in a library, the table definition is retrieved, an appropriate area is allocated in the TSR, and the table is loaded into that area. Subsequent space requirements due to table expansion are satisfied from the TSR and space is limited by the TSR size. In a multi-user environment, if you want to control the user(s) or transactions that perform updates after the OW command, place a value in the LOCK-LATCH field when using the OW command. Only the update commands, that have the same value in the LOCK-LATCH field are authorized to perform the update (see 9. LOCK-LATCH (8 bytes)). |
Return value |
ERROR 0003 occurs when the table is already open for write. ERROR 0008 occurs when the table is found on a regular library but there is no matching generation number. ERROR 0009 occurs when the table is not found. ERROR 0030 occurs when an incorrect PASSWORD is used. ERROR 0033 occurs when a later generation exists on the library than the one already loaded in the TSR. ERROR 0072 occurs when the table is already open for write in another region. ERROR 0086 occurs when an open is made on an Alternate Index and the Data Table is already opened via a link to a VTS-TSR. |
Notes |
|
Exceptions |
None |
See also |
Modify Library Search Order (ML)—for information on the library search list |