COBOL Manual for TNS and TNS/R Programs
Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
9-271
UNSTRING
•
File-Status Data Item
If file-name has an associated file-status data item, execution of the
UNLOCKRECORD statement always assigns an appropriate I-O status code as its
value. The status “00” reports a successful UNLOCKRECORD operation.
Whenever the statement terminates with an I-O status code greater than or equal
to “30,” execution of the UNLOCKRECORD failed. The possible I-O status codes
for an unsuccessful UNLOCKRECORD operation are:
•
Disk Files Only
The UNLOCKRECORD statement has no effect unless the file specified is a disk
file.
•
Key of Reference, File Position Indicator, and Record Area
The key of reference, the file position indicator, and the record area are not
affected by the execution of an UNLOCKRECORD statement, whether it
succeeded or not.
UNSTRING
UNSTRING partitions a data item (the source) into strings of consecutive characters
and stores those strings into other data items (the results). You can determine the
partitioning in two ways:
•
Use the size of the result data items.
•
Use the presence of specific character sequences in the source (like spaces in a
person’s name or commas and decimal points in an edited number).
When the statement executes, it stores these into data items of your choice:
•
Each part
•
For each part, the delimiter that ended that part (optional) and the number of
characters stored (optional)
•
A count of the parts stored (optional)
•
A character-count pointer to specify where in the item the unstring operation
terminates (optional)
I-O Status Code Unsuccessful UNLOCKFILE Operation
“30” The unlock operation failed due to non-COBOL causes. The record
might or might not now be unlocked.
“42” The file was not open.