OpenTP1 Version 7 Programming Reference COBOL Language
CBLDCTAM('MFY '/'MFYS'/'STR '/'WFY '/'WFYS'/'YTR ') - Update/add a TAM table record
Format
PROCEDURE DIVISION specification
CALL 'CBLDCTAM' USING unique-name-1 unique-name-2 unique-name-3 unique-name-4 |
DATA DIVISION specification
01 unique-name-1. 02 data-name-A PIC X(4). 02 data-name-B PIC X(5). 02 FILLER PIC X(3). 02 data-name-C PIC X(32). 02 FILLER PIC X(68). 02 data-name-D PIC S9(4) COMP. 02 FILLER PIC X(2). 02 data-name-J PIC S9(9) COMP. 02 FILLER PIC X(392). 01 unique-name-2. 02 data-name-E PIC X(4). 02 FILLER PIC X(3). 02 data-name-I PIC X(1). 01 unique-name-3. 02 data-name-F PIC X(m). 01 unique-name-4. 02 data-name-G PIC X(n). |
Description
CBLDCTAM('MFY '/'MFYS'/'STR '/'WFY '/'WFYS'/'YTR ') updates/adds a record indicated with a key value in/to a TAM table.
If a TAM table is open under lock in records, lock in records is enabled with lock for update processing as explained below.
However, if table nonlock mode is specified as the access-time table lock mode in the TAM service definition, tables whose access type is reference or update without addition or deletion, their lock cannot be enabled.
If the program that updates/adds TAM table record returns with an error, all the resources specified in this program are released, and the status before this program was called is regained. However, if a TAM table which was acquired under lock for reference processing before this program was called is updated/added, lock for update processing is enabled. (Lock for reference processing is not regained.)
The key value storage location in the data to be updated/added and the key area length are as specified in the tamcre command used for creation of a TAM table file.
The data part has a key value if the key value is assigned to the data part (the -s option not specified in the tamcre command) when a TAM table file is created. Therefore, an error is returned if the key value specified in the program that updates/adds TAM table record is not found in the data to be updated/added. The data part has no key value if no key value is assigned to the data part (the -s option specified in the tamcre command). In this case, no check is made on the contents of the data to be updated/added.
Data areas whose values are set in the UAP
data-name-A
Specify the TAM ID. The TAM service does not reference this value.
data-name-C
Specify the name of the TAM table whose record is to be updated/added. The name can be specified with up to 32 characters. If the specified name comprises less than 32 characters, pad the remaining portion with space.
data-name-D
Specify a data length in the range from 1 to 32767 bytes for the data to be updated or added. The data length must be equal to or greater than the record length. The setting here is valid only when VALUE 'MFY ', VALUE 'MFYS' or VALUE 'STR ' is specified for data-name-E.
data-name-J
Specify a data length of 32768 bytes or more for the data to be updated or added. The data length must be equal to or greater than the record length. The setting here is valid only when VALUE 'WFY ', VALUE'WFYS' or VALUE 'YTR ' is specified for data-name-E.
data-name-E
Specify one of the following request codes:
VALUE 'MFY ', VALUE 'WFY ': Record updating only
VALUE 'MFYS', VALUE 'WFYS': Record updating or addition
VALUE 'STR ', VALUE 'YTR ': Record addition only
data-name-F
Specify the key value with the length of the key area of the record to be updated/added.
data-name-G
Specify the data area (buffer) to/in which the record is updated/added.
data-name-I
Specify whether to wait for release from lock with one of the following values. The value specified for data-name-I is valid when 2 is specified for tam_cbl_level in the TAM service definition.
VALUE 'W': Wait for release from lock
VALUE 'N': Error return without waiting for release from lock
If 0 or 1 is specified for tam_cbl_level in the TAM service definition, specifying a value for data-name-I is unnecessary.
Data area whose value is returned from OpenTP1
data-name-B
A status code of 5 digits is returned.
Status codes
Status code | Explanation |
---|---|
00000 | The TAM table record was updated/added normally. |
01701 | The TAM table name specified for data-name-C is invalid. |
01702 | The key value specified for data-name-F is invalid. |
01706 | The value specified for data-name-G is invalid. |
01707 | The value specified for data-name-D or J is invalid. |
01708 | The value specified for data-name-E or I is invalid. |
01709 | The table specified for data-name-C is not a TAM table. |
01710 | The TAM table has not been defined. |
01720 | The TAM service is being terminated. |
01721 | The sequence of accessing the TAM table is invalid. |
The resource manager registration of the object file for control of transactions having a linkage with the UAP is invalid. Alternatively, there is no linkage between the object file for control of transactions and the UAP. | |
atomic_update=N (nontransaction attribute) is specified in the user service definition of the UAP which called CBLDCTAM. | |
01723 | The TAM table was deleted. |
01724 | The TAM table was not loaded. |
01727 | The TAM table is in logical shutdown state. |
01728 | The TAM table is in shutdown state due to an error. |
01730 | Execution is impossible in the access mode of the TAM table specified in the TAM service definition. |
01731 | The specified record does not exist. |
01735 | The record cannot be added because the key value specified for data-name-F exists in the TAM table. |
01736 | A lock error occurred. If you specified 0 in the tam_cbl_level operand of the TAM service definition, or if you specified 2 in the tam_cbl_level operand and set W in data-name-I, the resource could not be acquired because the wait time specified in the lock service definition reached timeout. |
01737 | A deadlock occurred. |
01760 | The version of the TAM library linked to the UAP does not allow the UAP to operate with the current TAM table. |
01761 | The version of the TAM library linked to the UAP does not allow the UAP to operate with the current OpenTP1 file service. |
01762 | The version of the TAM library linked to the UAP does not allow the UAP to operate with the current TAM service. |
01763 | The TAM table has no free record. |
01764 | The record has been damaged. |
01765 | The number of transactions exceeds the maximum number of transactions which can be managed by the TAM service. |
01766 | The number of open character special files exceeds the specified limit. |
01767 | The access permission for special files has not been granted. |
01768 | The access permission for TAM files has not been granted. |
01769 | The memory became insufficient. |
01770 | An input/output error occurred. |
01771 | A transaction service error occurred. |
01772 | The opening TAM file is protected by the security facility. No ACL exists for the file. |
01773 | The accessing TAM file is protected by the security facility. The UAP attempting to update or add a record to the TAM table has no access permission. |
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.