Presentation is loading. Please wait.

Presentation is loading. Please wait.

CICS Basic Commands COBOL programming statements.

Similar presentations


Presentation on theme: "CICS Basic Commands COBOL programming statements."— Presentation transcript:

1 CICS Basic Commands COBOL programming statements

2 Basic CICS Commands Send and Receive commands used to communicate simple messages and receive non-formatted data from the terminal user. Return is used to terminate and application and give control back to the calling program or CICS. When control given back to CICS task is terminated.

3 Working with Maps Symbolic map contains: A 12-byte TIOA (Terminal Input/Output Area) prefix. An input area redefined by the output area. For Input Functions following fields are meaningful: L – Half word binary field length of data F – 1 byte field with X’80’ if the Erase EOF key is pressed. If this is case ‘L’ will contain zeroes. I – The actual data entered by the operator For Output Functions A – A 1 byte field that contains the attribute byte O – The actual data you want to send to the terminal Typically, first CICS command in program is SEND MAP.

4 Output Mapping – Send Map

5 Send Map Alternatives Three ways to specify what to put on the screen: Symbolic Map only or Physical Map only or Both Physical and Symbolic Map No dataonly/maponly option specified Initial map needs to merge Physical and Symbolic map together for display

6 Send Map with Dataonly option Uses only the symbolic description map fields. Used when map has already been sent to the screen and you want to change or add information to it. BMS will use the data you put in the symbolic area. might want to highlight data areas with errors

7 Send Map with Maponly option Uses the physical map only. Physical map has in it the field headings, all the attribute bytes and the location of where all information is to be placed. NO information from the symbolic map is sent.

8 Send Map Notes Before building your map for output make sure to initialize map storage area to nulls. Do this to be sure there is no data left by a previous task and used by mistake. Nulls are not transmitted on a Send Map. If variable name used for Map and Mapset, the FROM option is required.

9 Input Mapping – Receive Map

10 Receive Map Used to take in information from the TIOA into working storage. User presses one of the AID keys, signaling a request to send data to CICS. Updates 2 EIB fields: EIBCPOSN – relative cursor position EIBAID – value representing key pressed by user.

11 Receive Map Notes Coding variables in the map and mapset name, INTO option required. For all Receive Map commands, check for the MAPFAIL condition. MAPFAIL means no data was transmitted back to program because: Operator did not key data into fields or Operator pressed the Clear key.

12 Return command RETURN command returns controls to program at previous logical level. If program at level 1 then control goes to CICS and task terminates. To end task, but continue pseudoconversational application, you must code TRANSID on the Return command.

13 Return command EXEC CICS RECEIVE INTO (data-area) LENGTH (data-area) RESP (data-area) END EXEC oRESP option in the command tells CICS that you will handle errors in your program logic and can be used on many commands.

14 Return Command Notes The LENGTH option specifies the maximum data length your program is prepared to accept. CICS places the actual length received in the LENGTH data area, and it truncates the message to the maximum specified. Program sets LENGTH before execution. CICS sets after execution.

15 DFHAID and DFHBMSCA CICS supplied copybooks DFHAID declares AID constants for determining which key was pressed. DFHBMSCA declares constants needed to alter field attribute bytes. This copybook may be replaced with one that has more descriptive constant names.

16 Communication Area

17 Execution Interface Block EIB code block inserted into the Linkage Section of the program by CICS EIB fields provide information about the current task EIBCALEN Specifies length of the data passed to program in communication area If EIBCALEN = zero then program is being executed the first time If EIBCALEN > zero then move the DFHCOMMAREA in linkage section to COMMUNICATION-AREA in working storage as first step in program.


Download ppt "CICS Basic Commands COBOL programming statements."

Similar presentations


Ads by Google