ILE COBOL statements
These topics describe considerations you should be aware of when using ILE COBOL statements to access remote VSAM data sets.
ILE COBOL OPEN statement
When accessing remote CICS® files, the ILE COBOL OPEN statement must use the open modes that are specified in the following table.
Table 1. Use ILE COBOL programming language to open a CICS file ILE COBOL open mode VSAM data set organization ESDS RRDS KSDS VSAM Path Input X X X X Output E E E E Input/Output X X X E Extend X – – – Where:
- X
- Shows the open mode is allowed.
- E
- Shows the open mode is allowed by ILE COBOL programming language but that the open fails when accessing the VSAM data set. A message occurs on an iSeries™ server.
- –
- Shows the open mode is not applicable.
ILE COBOL READ statement
- The PRIOR phrase and the LAST phrase are not supported by CICS/DDM when accessing a VSAM path. It is supported when accessing a VSAM KSDS.
- Because the RELATIVE file organization can only be used to open a VSAM RRDS, it is not possible to access records by relative record number or to have the relative record number returned from the remote file unless the remote file is a VSAM RRDS.
ILE COBOL WRITE statement
- The WRITE statement does not work when the ILE COBOL program is running on an iSeries server and the file was opened with a RELATIVE file organization.
- The WRITE statement does not work when writing a record to a VSAM KSDS and the data set already contains a record with the same key value.
- Because the input/output and output open modes cannot be used to open a VSAM path, it is not possible to write records to a VSAM path. Instead, the application program must write the record by using the base data set of the VSAM path.
ILE COBOL REWRITE statement
- The REWRITE statement does not work when rewriting the record of a VSAM KSDS and the key value of the record is changed.
- Because the input/output open mode cannot be used to open a VSAM path, it is not possible to rewrite records in a VSAM path. Instead, the application program must rewrite the record by using the base data set of the VSAM path.
ILE COBOL START statement
- The START statement does work if the open mode is INPUT.
ILE COBOL DELETE statement
- Because the sequential file organization must be used to open a VSAM ESDS, it is not possible to delete records in a VSAM ESDS.
- Because the input/output open mode cannot be used to open a VSAM path, it is not possible to delete records in a VSAM path. Instead, the application program must delete the record by using the base data set of the VSAM path. However, if the base data set of the VSAM path is a VSAM ESDS, the DELETE does not work.
Parent topic:
ILE COBOL considerations