OpenTP1 Version 7 Programming Reference COBOL Language
CBLDCTAM('ERS '/'ERSR'/'ZRS '/'ZRSR') - Delete 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(398). 02 data-name-J PIC S9(9) COMP. 02 FILLER PIC X(2). 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('ERS '/'ERSR'/'ZRS '/'ZRSR') deletes a record indicated as a key value from a TAM table. The record to be deleted can be saved in the buffer. However, if the program that deletes TAM table record returns with an error, the buffer contents cannot be ensured.
When a record is to be deleted, lock in tables must be enabled with lock for update processing.
If the program that deletes 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 an attempt is made to delete a TAM table which was acquired under lock for reference processing before this statement was called, lock for update processing is enabled. (Lock for reference processing is not regained.)
Data areas whose values are set in the UAP
data-name-A
Specify the TAM ID. The TAM service does not reference the value specified here.
data-name-C
Specify the name of the TAM table of the record to be deleted. 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 buffer length of 32767 bytes or less if the record to be deleted is to be saved. The buffer length must be equal to or greater than the record length. The setting here is valid only when VALUE 'ZRSR' is specified for data-name-E.
data-name-J
Specify a buffer length in the range from 1 to 32767 bytes if the record to be deleted is to be saved. The buffer length must be equal to or greater than the record length. The setting here is valid only when VALUE 'ZRSR' is specified for data-name-E.
data-name-E
Specify one of the following request codes:
VALUE 'ERS ' or VALUE 'ZRS ': The record to be deleted is not saved.
VALUE 'ERSR' or VALUE 'ZRSR': The record to be deleted is saved.
data-name-F
Specify the key value with the length of the key area of the record to be deleted.
data-name-G
If the record to be deleted is to be saved, specify the buffer for storing the record. The setting here is invalid if VALUE 'ERS' or VALUE 'ZRS' (the record to be deleted is not saved) is specified for data-name-E.
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 areas whose values are returned from OpenTP1
data-name-B
A status code of 5 digits is returned.
data-name-G
If VALUE 'ERSR' or VALUE 'ZRSR' is specified and record deletion is normally completed, the deleted record is saved.
Status codes
Status code | Explanation |
---|---|
00000 | The record was deleted normally. |
01701 | The table name specified for data-name-C is invalid. |
01702 | The key value specified for data-name-F is invalid. |
01704 | The value specified for data-name-G is invalid. |
01705 | The buffer length specified for data-name-D or J is too short. |
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 descriptor state. |
01728 | The TAM table is in descriptor 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. |
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. |
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 deleting 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 delete a record from the TAM table has no access permission. |
Notes
If the process used to delete all records in a hash-formatted TAM table involves repetitions of a sequence that calls for finding a target record using the first-retrieval method and deleting the found record, the CPU load may become high. To delete all records, use the following procedure:
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.