How to generate symbolic map variables in CICS

This is beautiful feature of CICS online transaction server. For online transactions you need a screen, so that user will interact with the system to get required information.

CICS provides all the facilities to develop maps.

During development you need to write physical map in a specified library for development. Read more on symbolic and physical maps here.

When you compile the physical map by using any mainframe tools like Changeman, Endevor, IBM-debugger etc., it creates symbolic map.

The point is your program needs always symbolic map. The physical map is for CICS internal use and you no need to worry about this.

I am giving here best two physical map sample code, also how symbolic maps create and look like.

Example code…

Map1 (Physical Map)

FILE02  DFHMSD TYPE=&SYSPARM,                                          X
MODE=INOUT,                                             X
TIOAPFX=YES,                                            X
STORAGE=AUTO,                                           X
LANG=COBOL,                                             X
CTRL=(FRSET,FREEKB)
FILE1   DFHMDI SIZE=(24,80),LINE=1,COLUMN=1
DFHMDF INITIAL='EMP DETAIL',POS=(1,35),LENGTH=10,ATTRB=ASKIP
DFHMDF INITIAL='ENTER EMP NO :',POS=(06,11),LENGTH=14,         X
ATTRB=PROT
EID1    DFHMDF POS=(06,26),LENGTH=4,ATTRB=(UNPROT,IC),                 X
INITIAL='____'
MSG1    DFHMDF POS=(10,11),LENGTH=18,ATTRB=UNPROT
FILE02  DFHMSD TYPE=FINAL
END

Also read: CICS online Quiz to refresh quickly

Symbolic map for map1(Map name):

01  FILE1I.
02  FILLER PIC            PIC X(12).
02  EID1L    COMP         PIC S9(4).
02  EID1F    PICTURE      PIC X(01).
02  FILLER REDEFINES EID1F.
03 EID1A              PIC X(01).
02  EID1I                 PIC X(04).
02  MSG1L    COMP         PIC S9(04).
02  MSG1F    PICTURE X.
02  FILLER REDEFINES MSG1F.
03 MSG1A    PICTURE X.
02  MSG1I  PIC X(18).
01  FILE1O REDEFINES FILE1I.
02  FILLER PIC X(12).
02  FILLER PICTURE X(3).
02  EID1O  PIC X(4).
02  FILLER PICTURE X(3).
02  MSG1O  PIC X(18).
 

Symbolic map in CICS

Example code…

Physical map2:

FILE01  DFHMSD TYPE=&SYSPARM,                                          X
MODE=INOUT,                                             X
TIOAPFX=YES,                                            X
STORAGE=AUTO,                                           X
LANG=COBOL,                                             X
CTRL=(FRSET,FREEKB)
FILE    DFHMDI SIZE=(24,80),LINE=1,COLUMN=1
DFHMDF INITIAL='EMP DETAIL',POS=(1,35),LENGTH=10,ATTRB=ASKIP
DFHMDF INITIAL='EMP ID    :',POS=(03,11),LENGTH=11,ATTRB=ASKIP
EID     DFHMDF POS=(03,24),LENGTH=4,ATTRB=(UNPROT,IC),                 X
INITIAL='____'
DFHMDF INITIAL='EMP NAME  :',POS=(05,11),LENGTH=11,ATTRB=ASKIP
ENAME   DFHMDF POS=(05,24),LENGTH=10,ATTRB=UNPROT,                     X
INITIAL='__________'
DFHMDF INITIAL='EMP SALARY:',POS=(07,11),                      X
LENGTH=11,ATTRB=PROT
ESAL    DFHMDF POS=(07,24),ATTRB=(UNPROT,NUM),                         X
LENGTH=05,                                              X
INITIAL='_____'
MSG     DFHMDF POS=(10,11),LENGTH=18,ATTRB=UNPROT
FILE01  DFHMSD TYPE=FINAL
END

Symbolic map for map2(Map name):

01  FILEI.
02  FILLER PIC X(12).
02  EIDL    COMP  PIC  S9(4).
02  EIDF    PICTURE X.
02  FILLER REDEFINES EIDF.
03 EIDA    PICTURE X.
02  EIDI  PIC X(4).
02  ENAMEL    COMP  PIC  S9(4).
02  ENAMEF    PICTURE X.
02  FILLER REDEFINES ENAMEF.
03 ENAMEA    PICTURE X.
02  ENAMEI  PIC X(10).
02  ESALL    COMP  PIC  S9(4).
02  ESALF    PICTURE X.
02  FILLER REDEFINES ESALF.
03 ESALA    PICTURE X.
02  ESALI  PIC X(5).
02  MSGL    COMP  PIC  S9(4).
02  MSGF    PICTURE X.
02  FILLER REDEFINES MSGF.
03 MSGA    PICTURE X.
02  MSGI  PIC X(18).
01  FILEO REDEFINES FILEI.
02  FILLER PIC X(12).
02  FILLER PICTURE X(3).
02  EIDO  PIC X(4).
02  FILLER PICTURE X(3).
02  ENAMEO  PIC X(10).
02  FILLER PICTURE X(3).
02  ESALO  PIC X(5).
02  FILLER PICTURE X(3).
02  MSGO  PIC X(18).

Training available to learn CICS

Action item-A great CICS online training is available. Subscribe to get instant knowledge on this. Before subscribe try some sample videos.

CICS: basics for beginners
CICS: basics for beginners

Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.

Comments are closed.