Invoking CICS commands from Smalltalk
The following example displays the format by which you can invoke a CICS command with cascading options:
| result ridfldValue record |
result := CICS readnext
file: 'MYFILE';
ridfld: 'TIM ';
keylength: 3;
generic;
exec.
ridfldValue := result ridfld.
record := result set copyStringFrom: 0 to: 80.
Each option in a CICS command can be categorized as one of the following:
Input
In Smalltalk, the input options are setter methods in the CICSxxxx classes, where xxxx represents the CICS command. An application supplies the options to CICS, the value of which will affect the outcome of the command.
In the example above, the input options are file, ridfld, keylength, and generic, which is a switch. All input messages are implemented as either a zero-argument or a one-argument message, depending on whether the command option as specified by CICS is defined to accept input data.
Output
In Smalltalk, the output options are getter methods in the CICSxxxxResult classes, where xxxx represents the CICS command. CICS returns the option as a result of the running of the command. All output messages are implemented as zero-argument messages.
In the example above, the output options are ridfld and set, which are assigned to ridfldValue and record, respectively.
Input/output
An input/output option is one that has both a setter method to a CICSxxxx class and a getter method to a CICSxxxxResult class. An application supplies the option to CICS, and CICS might modify the option during the running of the command.
In the example above, the ridfld option is both an input option and an output option. The application supplies data in the option and CICS returns a modification of that data.
Last modified date: 07/08/2019