Accessing CICS services using Smalltalk
A Smalltalk transaction within CICS reacts the same way as a C or COBOL transaction. Therefore, the same rules that apply to the C and COBOL languages also apply to the Smalltalk programming language. Because Smalltalk runs as a CICS application, the standard EXEC CICS commands are available to a Smalltalk developer.
Each of the CICS commands, located in application CICSPlatformFunctions, can be found in two classes, with the following naming convention (where xxxx is the name of the CICS command):
CICSxxxx
CICSxxxxResult
The CICS command options are mapped to Smalltalk setter and getter methods. All setter methods are in CICSxxxx classes, and all getter methods are in CICSxxxxResult classes. After running a CICS command, using the CICSxxxx class, you can obtain returned information using the CICSxxxxResult classes.
To invoke CICS commands, use the standard syntax found in the CICS Application Programming Guide. Smalltalk's changes to the standard syntax are as follows:
All CICS commands and command options must be lowercase.
The CICS commands are implemented as class methods on the CICS class.
Each CICS command creates an object which accepts one or more command option messages (which can be cascaded).
The last CICS command option must be exec.
CICS command options are either zero-argument messages, called switches in this document, or one-argument messages.
Replace the parenthesis after the option with a colon and a semicolon after the option specification (for cascading).
Standard CICS syntax:
EXEC CICS DELETE
FILE('MASTVSAM')
RIDFLD(ACCTNO)
KEYLENGTH(LEN)
Smalltalk syntax:
CICS delete
file: 'MASTVSAM';
ridfld: acctno;
keylength: len;
exec.
Output fields are accessed with messages sent to the result of a CICS call:
All commands have resp and resp2 methods so that you can test for successful command processing.
Other output getters are available to complete the CICS syntax of a particular command. For example, a file READ has set and ridfld getter methods.
Appendix B, CICS Smalltalk classes describes the CICS commands using their corresponding CICSxxxx and CICSxxxxResult classes.
Last modified date: 07/09/2019