AMT Help Files
Home Development Command Translation CICS Commands READPREV

READPREV

COBOL Java
EXEC CICS READPREV ibmCics.readPrev

Syntax

ibmCics.readPrev(new ReadPrevOptions()
  .fileName(<Filename>)
  [.into(<Into>)]
  .ridFld(<Ridfld>)
  [.setPointer(<SetPointer>)]
  [.keyLength(<Keylength>)]
  [.generic(true)]
  [.length(<Length>)]
  [.keySpec(<KeySpec>)]
  [.readOption(<ReadOption>)]
  [.update(true)]
  [.noHandle(true)]
  [.pointerToVariable(<PointerToVariable>)]
);

Parameter(s)

<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 retrieved record.
<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.

Example(s)

COBOL Java
EXEC CICS
    READPREV
          FILE('INVPATH')
          INTO(INVOICE-RECORD)
          RIDFLD(CM-CUSTOMER-NUMBER)
END-EXEC.
                
ibmCics.readPrev(new ReadPrevOptions()
  .fileName("INVPATH")
  .into(locDef.invoice_Record)
  .ridFld(locDef.cm_Customer_Number)
);
                

Contents

 Go to top