Customer Information Control System

Ritesh Dubal Merrill Lynch USA

Agenda for Day 2
1. 2. 3. 4. 5. 6. Different ways of initiating a transaction. Structure of CICS-COBOL programs. Steps involved in developing CICS-COBOL programs. BMS and its functions. BMS Macros. Development and execution of mapsets.

Different Ways of Initiating a Transaction
1. By submitting a JCL. Runs SIP which uses SIT. 2. By a transaction identifier entered at the terminal. 3. By a transaction identifier associated with a terminal for pseudo-conversation. 4. By the START command which initiates for transaction specified in the parameter. 5. By Automatic Task Initiation (ATI). 6. By an Aid key associated with the transaction in PCT.

Structure of a CICS Program (1 of 2)
A CICS - COBOL program is COBOL program embedding CICS commands for DB/DC operations. 1. Only PROGRAM-ID is mandatory in the IDENTIFICATION DIVISION. 2. No ENVIRONMENT DIVISION. (Why?) 3. No FILE SECTION in the DATA DIVISION. (Why?) 4. No file related verbs such as OPEN, START, READ, WRITE, REWRITE, DELETE, CLOSE, etc,. (Why?)

Structure of a CICS Program (2 of 2)
5. No verbs requesting GETMAIN such as ACCEPT, DISPLAY, SORT STRING, UNSTRING, EXAMINE, INSPECT, EXHIBIT, etc.,

6. No verbs requesting system services such as STOP RUN, COUNT, etc.,

7. A called program can not have CICS commands or inhibited COBOL statements.

CICS Command Format
EXEC CICS function option 1 (argument 1) option 2 (argument 2) . . . . . . . . . . . . . END-EXEC

Basic CICS Commands (1 of 2)
EXEC CICS SEND [TEXT] FROM (dataname) LENGTH (length-of-dataname) [ERASE] [FREEKB] [ALARM] END-EXEC

EXEC CICS RECEIVE INTO (data-name) LENGTH (length-of-dataname) END-EXEC

Basic CICS Commands (1 of 2)
EXEC CICS SEND CONTROL CURSOR (data-value) ... END-EXEC EXEC CICS RETURN END-EXEC

CICS Hello World Program Development (1 of 3)
Step 1. Open a tso session. Step 2. Create a new PDS. Step 3. Code the following program in a new member.

CICS Hello World Program Development (2 of 3)
Step 4. Compile the program using the macro “TRNGCICS”.

CICS Hello World Program Development (3 of 3)
Step 5. Open a CICS Session. Step 6. Install the program using the command CEMT SET PROG(program-name) NEW. Step 7. Associate a transaction-id with the program in PCT. Note that transaction-ids are unique in the system.

Execution the Hello World Program (1 of 2)
Step1: Open an EP Client session for Mainframe, type CICS3 and hit ENTER key. Enter your User id and Password and press the ENTER Key.

Execution the Hello World Program (1 of 2)
Step 2: You’ll find a blank screen as shown below. Type the transaction-id. To Sign off, you can use the transaction CESF logoff.

What about JCL for CICS Program?

JCL is not required to run a CICS application program It is prepared for the CICS job itself by the system’s administrator. Once CICS job starts, this job is considered as one CICS region, under which more than application program can be executed simultaneously.

BMS
Basic Mapping Support (BMS) is a standard facility available in CICS that allows development and manipulation of formatted screens. The primary objective of BMS is to free the application programs from the burden of dealing with NMDS.

Functions of BMS
1. Removal of device dependent code from the application programs by placing them in the map.

. Removal of constant information like titles, labels, etc from the application programs by placing them in the map. 3. Removal of format dependent code from the application programs. 4. Construction of NMDS required to produce the desired screen. 5. Providing text handling capability.

Map and Mapset
A Map is a representation of one screen format. It is a program written in assembly language. A Mapset is a collection of one or more maps coded and linkedited together. It is a program written in Assembly Language.

Sample Formatted Screen

SCR1

MAIN MENU

DATE: 14/11/2001 TIME: 10:15:15

1. EMPLOYEE RECORD MAINTENANCE 2. EMPLOYEE DETAILS BROWSE 3. EXIT SELECTION : - (1/2/3) Your Choice Please F1 – Help F3 – Exit ENTER - Process

Physical Map and Symbolic Map (1 of 2)
1. Physical Map: Contains the executables to do each of the following. (a) Build the screen, with all the titles and labels in the proper places on the screen and with proper attributes. (b) Merge the data from the application program in the proper places on the screen. (c) Extract the data for the application program when the screen is received.

Physical Map and Symbolic Map (2 of 2)

2. Symbolic Map: Defines the map fields in the appropriate language used to store the variable data referenced by the application programs.

BMS Macros

1. DFHMSD ( MapSet Definition ) 2. DFHMDI ( Map DefInition ) 3. DFHMDF ( Map Defined Field )

DFHMSD Macro and its Parameters
MMYXXY DFHMSD TYPE=DSECT/MAP/&SYSPARM/FINAL, MODE=IN/OUT/INOUT, LANG=ASM/COBOL/PL1, STORAGE=AUTO/BASE=name, CTRL=(PRINT,FREEKB,ALARM,FRSET), MAPATTS=(COLOR,HIGHLIGHT,.......), TERM=terminal type, HIGHLIGHT=OFF/BLINK/REVERSE/UNDERLINE, TIOAPFX=YES/NO Note: For each parameter, you have to choose one of the options available. The underlined options are defaults values.

DFHMSD Macro – TYPE Parameter
TYPE=DSECT/MAP/&SYSPARM/FINAL TYPE governs whether the assembly produces the physical map or the symbolic description or both. 1. DSECT: Creates the Symbolic map. 2. MAP: Creates Physical map.

3. &SYSPARM: Creates both symbolic & physical maps. 4. FINAL: Mapset definition ends. No more map related commands later.

DFHMSD Macro – MODE Parameter

MODE=IN/OUT/INOUT TYPE specifies whether the map is used for receiving data or sending data or both to the terminal 1. IN : For receiving data. 2. OUT: For sending data. 3. INOUT: For both receiving and sending data.

DFHMSD Macro – LANG Parameter
LANG=ASM/COBOL/PL1 LANG specifies the language in which the application program will be coded so that an appropriate symbolic map may be generated. 1. ASM: For assembly language. 2. COBOL: For COmmon Business Oriented Language. 3. PL1: For Programming Language 1.

DFHMSD Macro – STORAGE Parameter
STORAGE=AUTO/BASE=name STORAGE specifies the storage locations can be re-used or not. 1. AUTO: Every map in the mapset has it’s own storage area. This is ideal for beginners. 2. BASE= MAP1. This causes an amount of memory necessary for MAP1 to be allocated for entire mapset. All other maps are overlaid in this area. If you use this option, you have to take care of storing the required data in the map area, the map area, before receiving the next map.

DFHMSD Macro – CTRL Parameter
CTRL=(PRINT, FREEKB, ALARM, FRSET) Control parameter defines the screen and keyboard control information that you want to send along with a map. 1. PRINT: Map must be sent to the printer. 2. FREEKB: Free the keyboard. 3. ALARM: Alarm (beep) when map is sent to the user. 4. FSET/FRSET: Set/Re-set MDT tag.

DFHMSD Macro – TERM Parameter

TERM=terminal type, SUFFIX=n This decides the terminal type, on which the screen is to be displayed. We must code TERM=3270.

DFHMSD Macro – TIOAPFX Parameter

TIOAPFX=YES/NO This decides whether command level CICS or macro level CICS is being utilized respectively. We are using command level CICS. Hence code TIOAPFX=YES.

DFHMSD Macro – CTRL Parameter
MMYXXY DFHMSD TYPE=&SYSPARM, MODE=INOUT, LANG=COBOL, STORAGE=AUTO, CTRL=(FREEKB,FRSET), TERM=3270, TIOAPFX=YES DFHMSD TYPE=FINAL END X X X X X X

Break

DFHMDI Macro and its Parameters
MAPNAME DFHMDI SIZE=(LINE,COLUMN), LINE=Line number, COLUMN=Column number, CTRL=(PRINT,FREEKB,ALARM,FRSET), TIOAPFX=YES/NO Note: CTRL and TIOAPFX are either coded either at the mapset level or at the map level but not at the map level.

Consolidated Mapset
MMLXXY DFHMSD TYPE=&SYSPARM, MODE=INOUT, LANG=COBOL, STORAGE=AUTO, CTRL=(FREEKB,FRSET), TERM=3270, TIOAPFX=YES MAPNAME DFHMDI SIZE=(24,80), LINE=01, COLUMN=01 DFHMSD TYPE=FINAL END X X X X X X X X

DFHMDF Macro and its Parameters
Fieldname DFHMDF POS=(line,column), LENGTH=number, INITIAL=‘text’, JUSTIFY=(LEFT/RIGHT,BLANK/ZERO), ATTRB=(ASKIP/PROT/UNPROT,NUM, BRT/NORM/DRK, IC, FSET), PICIN=‘value’, PICOUT=‘value’, MAPATTS=(COLOR,HIGHLIGHT,.......), X X X X X X X X

HIGHLIGHT=OFF/BLINK/REVERSE/UNDERLINE

Complete Mapset
MBLXXY DFHMSD TYPE=&SYSPARM, CTRL=(FREEKB,FRSET),LANG=COBOL, STORAGE=AUTO, TERM=3270, MODE=INOUT,TIOAPFX=YES MAINMAP DFHMDI SIZE=(24,80), LINE=01, COLUMN=01 DFHMDF POS=(12,19), LENGTH=36, INITIAL=‘MAIN MENU’, ATTRB=(PROT,NORM) DFHMSD TYPE=FINAL END X X X X X X X X

Modified Data Tag (MDT)
 This is flag in the attribute.  Every field in the map has an attribute associated with it.  Attribute stores data relevant to the field like - color, intensity, modified or not etc.  MDT tag in the attribute, identifies whether data in the field needs to be transferred to the system or not. (The idea behind calling it a modified data tag is that - only modified data will be transferred, not the unchanged data.)

Attribute byte of a Field
Protection and Shift Inten sity M D T

0
Bit Positions 0 and 1 2 and 3

1

2
Functions

3

4

5

6

7

Protection and Shift

4 and 5

Intensity

6 7

Modified Data Tag

Bit Settings Determined by contents of bits 2 - 7 00 = Unprotected Alphanumeric 01 = Unprotected Numeric 10 = Protected Stop 11 = Protected Skip 00 = Normal 01 = Normal 10 = Bright 11 = No-display ( Dark ) Must be Zero Always 0 = Field has not been modified 1 = Field has been modified

When is MDT set on?
 Generally, for all fields, MDT is OFF - initially.  When user modifies the contents in a field, the MDT tag is automatically set.  Program may modify the attribute byte in the symbolic map, before sending the screen to the user, and set MDT.  Data is transferred from all fields where MDT is ON (set).  If MDT is OFF (Reset), data from that field is not transferred to the system.

General Guidelines for coding DFHMDF Macro
1. For all constant fields, specify ASKIP. 2. For all variable fields where user can enter data, specify UNPROT and code a skipper or stopper field at the end. 3. For all variable fields where user can not enter data, specify PROT and code a skipper or stopper field at the end. 4. Skipper is a single byte field with ASKIP as ATTRB. 5. Stopper is a single byte field with PROT as ATTRB.

Mapset Coding Rules (1 of 2)
1. Code the mapset, map and field names in column 1. 2. Code the macro name (DFHMSD, DFHMDI and DFHMDF) in columns 9 through 14. (END goes in columns 9, 10 and 11). 3. Code the parameters in columns 16 through 71. 4. Separate the parameters by one comma (no space). 5. To improve readability, code each parameter on a separate line.

Mapset Coding Rules (2 of 2)
6. If a parameter requires more than one line, then code as much as you can in one line and simply continue from column 16 in the next line. 7. An exception to Rule 6 is the INITIAL parameter. Code INITIAL , = sign, opening quote and at least one character in the first line and continue the string in columns 16 through 71 in the succeeding lines. 8. Use ‘x’ as the continuation character in column 72. 9. Enclose INTIAL values within quotes. If you need the quote symbol then type two quotes together. Do the same for & symbol also.

CICS Command for Formatted Input
EXEC CICS SEND MAP(map-name) MAPSET(mapset-name) [DATAONLY] [MAPONLY] [CURSOR(position)] [ERASE / ERASEUP ] [PRINT] [FREEKB] [ALARM] [FRSET] END-EXEC

CICS Command for Formatted Output

EXEC CICS RECEIVE MAP(map-name) MAPSET(mapset-name) INTO(ws-data-area) FROM(ws-data-area) LENGTH(data-value) END-EXEC

Positioning a Cursor

1. Using the IC option in the mapset. 2. Using the CURSOR option in the SEND MAP. 3. Using the length attribute of the field with SEND MAP.

Sample Mapset development
1. Create a new PDS. 2. Open a new member and code the mapset. 3. Save the mapset and assemble it using the macro “trngbms”.

4. Open a CICS session. 5. Install the mapset using the command
CEMT SET PROG(mapset-name) NEW.

6. Send the required map to the screen using the command
CECI SEND MAP(map-name) MAPSET(mapset-name) ERASE FREEKB.

Sign up to vote on this title
UsefulNot useful