Using the CICS command-level interface

CICS® TS provides a set of commands to access the CICS transaction server. The format of a CICS command is:
EXEC CICS function [option[(arg)]]...;
In the following CICS command, the function is SEND TEXT. This function has 4 options: FROM, LENGTH, RESP and RESP2. In this case, each of the options takes one argument.
EXEC CICS SEND TEXT FROM(mymsg)
                    LENGTH(mymsglen)
                    RESP(myresp)
                    RESP2(myresp2);

For further information on the EXEC CICS interface and a list of available CICS TS functions, refer to CICS Transaction Server for z/OS.

When you are designing and coding your CICS TS application, remember the following:
  • The EXEC CICS command and options should be in uppercase. The arguments follow general C or C++ conventions.
  • Before any EXEC CICS command is issued, the EXEC Interface Block (EIB) must be addressed by the EXEC CICS ADDRESS EIB command.
  • z/OS® XL C/C++ does not support the use of EXEC CICS commands in macros.
The example program in Figure 1 (CCNGCI1) shows the use of several EXEC CICS commands to perform various tasks.
 1 
Initialize the CICS interface
 2 
Access the storage passed from the caller
 3 
Handle unexpected abends
 4  and  7 
I/O to RRDS files
 5  and  6 
Requesting and formatting time