READ
| COBOL |
Java |
| EXEC CICS READ |
ibmCics.read |
Syntax
ibmCics.read(new ReadOptions()
.fileName(<Filename>)
[.into(<Into>)]
.ridFld(<Ridfld>)
[.setPointer(<SetPointer>)]
[.keyLength(<Keylength>)]
[.generic(true)]
[.length(<Length>)]
[.keySpec(<KeySpec>)]
[.readOption(<ReadOption>)]
[.update(true)]
[.noHandle(true)]
[.pointerToVariable(<PointerToVariable>)]
);
Parameters
- <Filename>
- The name of the file to read records from.
- <Into>
- The data area into which the record retrieved from the data set is to be written.
- <Ridfld>
- The record identification field.
- <SetPointer>
- Pointer variable containing the address of the record to retrieve.
- <Keylength>
- Optional length of the record key.
- generic
- Optional Boolean. Set to true when the search key is a generic key, default is false.
- <Length>
- Optional length of the target data area.
- <KeySpec>
- Optional key specification string, valid values are: 'RBA', 'RRN' or 'XRBA'.
- ReadOption
- Optional read option of the enum CicsReadOption type. Allowed values are DEFAULT, EQUAL or GTEQ.
- update
- Optional Boolean. Set to true to allow updating of the record instead of read only access.
- noHandle
- Optional Boolean. If set to true, exceptions created by this command will be ignored.
- <PointerToVariable>
- Optional variable. If set, the value will be updated to the address of the retrieved record.
Examples
| COBOL |
Java |
EXEC CICS
READ
FILE('INVOICES')
INTO(WS-INVOICES)
RIDFLD(WS-RIDFLD)
KEYLENGTH(18)
END-EXEC.
|
ibmCics.read(new ReadOptions()
.fileName("INVOICES")
.into(locDef.ws_Invoices)
.ridFld(locDef.ws_Ridfld)
.keyLength(18)
);
|