READ command
Reads a record from a file on a local or a remote system. In Smalltalk, the parameters of the READ command are contained in two classes: CICSRead and CICSReadResult.
See CICS Application Programming Reference for the syntax of the command and a description of its parameters.
Defined instance methods
Parameters supplied to CICS in CICSRead
 
Parameter
Instance method
Mode
Type
Notes/exceptions
EQUAL
equal
Input
Switch
 
FILE(filename)
file:
Input
Fixed(8)
 
GENERIC
generic
Input
Switch
 
GTEQ
gteq
Input
Switch
 
KEYLENGTH(data-value)
keylength:
Input
Binary 16
 
RBA
rba
Input
Switch
 
RIDFLD(data-area)
ridfld:
Input
Variable
 
RRN
rrn
Input
Switch
 
SYSID(systemname)
sysid:
Input
Fixed(4)
 
UPDATE
update
Input
Switch
 
Parameters returned by CICS in CICSReadResult
 
Parameter
Instance method
Mode
Type
Notes/exceptions
LENGTH(data-area)
length
Output
Binary 16
 
RESP
resp
Output
Fixed(2)
Inherited from CICSResult.
RESP2
resp2
Output
Fixed(2)
Inherited from CICSResult.
SET(ptr-ref)
set
Output
Variable
 
Examples
Example 1
Reads from a file and assigns SET result.
| result x |
result := CICS read
file: 'KSDSF2';
keylength: 20;
ridfld: ('Record' abrPadWithBlanks: 20);
exec.
x := result set.
Example 2
Assuming that in class CICSRecord, a subclass of OsPtr, the following instance method exists:
name
^self copyStringFrom: 0 to: 19.
This reads the first record in the file and inspects the name:
| result key y |
key := ' '.
result := CICS read
file: 'KSDS';
ridfld: key;
generic;
gteq;
keylength: 4;
exec.
y := result set as: CICSRecord.
y name inspect.
Last modified date: 07/09/2019