0% found this document useful (0 votes)
77 views14 pages

What's New at MAINFRAMES 360: Creating and Assembling CICS Maps

This document discusses various aspects of creating and working with CICS maps, including: 1) The essential elements of a CICS map are fields, which are defined using DFHMDF macros and have attribute bytes that define characteristics like intensity and protection. 2) Maps are assembled to create both physical and symbolic maps, with the symbolic map containing corresponding COBOL variables. 3) Various BMS macros like DFHMSD, DFHMDI, and DFHMDF are used to define the mapset, individual maps, and fields within a map. 4) Maps need to be installed in CICS using CEDA before they can be displayed using the CICS SEND MAP command.

Uploaded by

Sai Krishnas
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views14 pages

What's New at MAINFRAMES 360: Creating and Assembling CICS Maps

This document discusses various aspects of creating and working with CICS maps, including: 1) The essential elements of a CICS map are fields, which are defined using DFHMDF macros and have attribute bytes that define characteristics like intensity and protection. 2) Maps are assembled to create both physical and symbolic maps, with the symbolic map containing corresponding COBOL variables. 3) Various BMS macros like DFHMSD, DFHMDI, and DFHMDF are used to define the mapset, individual maps, and fields within a map. 4) Maps need to be installed in CICS using CEDA before they can be displayed using the CICS SEND MAP command.

Uploaded by

Sai Krishnas
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

This Blog

This Blog

 
 
 

 
Linked From Here

What’s new at MAINFRAMES 360


(Updates May '11)...
- We are a cosmopolitan community of 400 members, from around the globe.
- Working on writing and publishing articles on CICS.
- Special article on "How do I learn Mainframe Programming"

Sunday, May 8, 2011


Creating and Assembling CICS Maps
Q. What are the essential elements of a CICS Map?
Organic Chemistry involves the study of complex Carbon-compounds, that are made up
simple elements like Carbon, Hydrogen, Nitrogen, Oxygen and combine to form bonds.
Maps are like Organic compounds, they consist of several elements, which form bond
result in a nice, user-friendly interface. Every CICS Map consists of elementary
Field(s). A field is any data-item on the CICS Map. Fields meant for Input, where
user can type some data, are called Data-Entry Fields. Fields that are used to dis
Titles, Labels or Captions, Alert Messages are Display-Only Fields.
 
Q. What are Attribute Bytes?
Every Field on the CICS Screen has Characteristics or Attributes. Attributes contr
look-and-feel as well as the behavior of the field. This attribute information is
in one Extra Byte. As you may see in the below diagram, each field is preceded by
Attribute-Byte. In fact, a field doesn't end, unless the next Attribute-Byte comes
Take a look at the picture below.

One field ends, when next field's Attribute Bytes comes in. What happens in the ca
the Data-Entry Field? Had the Data-Entry Field been followed successively by anoth
field, it's attribute byte would have ended the Data-Entry field. But, there’s no
that succeeds the Data-Entry Field on the same line. So, the Data-Entry field woul
extend all the way upto the next line, where the Attribute-Byte of the Caption Fie
'Name and Address . . . :' is encountered. To avoid this, you would have explicitl
a Closing Attribute Byte after the Data-Entry Field.
Q. How to code the Attribute Byte?
There are three important parameters you can control, using the Attribute Byte –
Intensity, Protection and Shift.

The Intensity relates to the appearance of a field. NORM stands for Normal Intensi
for Bright Intensity. DRK Dark helps to hide characters, by darkening them, like w
type Passwords.

The Protection allows/dis-allows the user-entry of data into a Field. PROT stands
protected, and implies that this field is a Display-Only Field. UNPROT stands for
protected and implies that this field allows data-entry. A Skip-Field defined by A
a special type of a protected field, where automatically skips the cursor to the n
protected field.

The Shift Attribute determines whether the keyboard is in Alphanumeric Shift or Nu


Shift. If you code NUM, it turns the Numeric Lock ON, so the user can only enter N
Digits 0-9.

The Attribute-Byte contains 8-Bits of Data. The first seven bits store the Intensi
Protection and Shift Information. The Last bit of the Attribute-Byte is called Mod
Data Tag(MDT). If the MDT contains Bit 0, it means data in this field has not chan
the MDT Bit contains 1, it means data was modified.
Q. What are the important BMS Macros that you code to create a new Map?
The important BMS Macros that you must learn to code, to design and create a compl
are -

Q. How to code the DFHMSD Macro, to define a new Mapset?


A Mapset is a collection of Maps. To define a New Mapset, you must code the DFHMSD
The Syntax of the DFHMSD Macro is shown below -
First of all, you should assign a unique-name to your Mapset. I have chosen the na
'INQSET1' for my Mapset, which contains the Customer Inquiry Map.

The TYPE Parameter what happens when this BMS Map Source Code, is Assembled. A
TYPE=&SYSPARM means both a Physical Map and Symbolic Map will be generated. TYPE=D
generates only a Symbolic Map. TYPE=MAP generates only a Physical Map.

The LANG Parameter indicates the Language, in which the Symbolic Map Variables are
generated. Since, later you are gonna write a Program in COBOL, to process the Use
Inputs from this Map, I have coded LANG=COBOL.

The MODE Parameter is usually coded as INOUT, so that the Symbolic Map will includ
Input(I) and Output(O) COBOL Variables.

The TERM Parameter is the type of terminal. For the Customer Inquiry Screen, I hav
TERM=ALL.

The CTRL Parameter is used to specify the Control Options used by all the Maps in
Mapset. You may also specify the Control Options separately for each Map(Screen) i
Mapset, by coding the CTRL Parameter on each DFHMDI Macro. Control Options used
frequently are FREEKB. When a Map is displayed on the Screen, by default the Keybo
in a Locked State, and you'd have to press RESET Key, to type any inputs. To avoid
Keyboard Lock, you'd code a CTRL=FREEKB. ALARM is another Control Option. It cause
Beep Sound to be played when the Map is displayed on the screen.

The DSATTS(Symbolic Map) and MAPATTS(Physical Map) parameters are used to specify
Extended Attributes will be supported. Extended Attributes include Color of the Fi
whether its highlighted or not.

The TIOAPFX Parameter causes a 12-bytes Filler Item to be included at the beginnin
the Symbolic Map. As a thumb-rule, you must always specify TIOAPFX=YES for COBOL M
Q. How to code the DFHMDI Macro, to define a New Map?
To define a new Map within a Mapset, you must code the DFHMDI Macro. The general s
of the DFHMDI Macro is shown below -

First, assign a unique name to you map. I have assigned the Name 'INQMAP1' to the
Customer Inquiry Map.

The SIZE specifies the size of the Map, in terms of number of rows and Columns. Th
standard size of most maps are 24 Rows x 80 Columns.

The LINE parameter specifies the Row-Number where the Map actually starts. I have
LINE=01 for my map.

The COLUMN parameter specifies the Column-Number where the Map starts. I have code
COLUMN=01 for my map.

Q. How to code the DFHMDF Macro, to define a new field on the Map?
The DFHMDF Macro is used to define the a new field on the Map. You must code one D
Macro for each field on the Map. What really happens is, when you code a DFHMDF Ma
creates and Attribute Byte. As I've said before, for the Data-Entry Field, you'll
explicitly code a closing attribute-byte, so for the Data-Entry field, I am going
two DFHMDF Macros.

The general syntax of the DFHMDF Macro is shown below -


First, code a label or Field-Name, if you'd like to process this field in the COBO
Program. For example, whatever the user enters in the '______' field, needs to be
processed by the COBOL Program, so I have named this field CUSTNO.

The POS Parameter specifies the co-ordinates in terms of row-no. and col-no. of th
Field. For example, if you want to define the field
'Customer Number. . . . .' on the Row No. 5 and Column 1, you should code
POS=(05,01).

The LENGTH Parameter specifies the length of the Data in Field. For example for th
'CUSTINQ1', the data contains 8 characters, so I should code LENGTH=08. This will
actually occupy
9 Screen Positions = 8 Data Characters + 1 Attribute Byte.

The next ATTRB Parameter is used to specify the Attributes of the Field. Some othe
options in the ATTRB Parameter include IC(Initial Cursor). IC Option in the ATTRB
Parameter, indicates that the cursor should be placed at the start of this field,
the map is displayed on the screen. The FSET Option of the ATTRB Parameter causes
to be turned on.

The COLOR Parameter lets you specify a Color for your field.
The PICIN and PICOUT Parameters lets you specify PICTURE Clauses for the Input and
Cobol variables in the Symbolic Map.

Here is the complete BMS Macro Source Code for the Customer Inquiry Screen, with a
DFHMSD, DFHMDI and DFHMDF Macros.

Q. How to assemble CICS Maps? What are Physical and Symbolic Maps?
The CICS Map Source Code containing the BMS Macros must be Assembled and Link-Edit
a Load Module. A CICS Map is also a Program. To run Programs, you must compile the
Program into a Load Module. Like-wise, to run a CICS Map and see what it looks lik
the Terminal Screen, you must Assemble the Map Source Code into a Load Module. Thi
Module is called Physical Map.

On the other hand, a Symbolic Map or DSECT is obtained when you assemble the CICS
Source Code with DSECT Option. A Symbolic Map contains a List of COBOL Variables
corresponding to the different fields on the screen.

I have written a Assemble-Link Job to run the assemble CICS Map Source Code into P
Map and Symbolic Map respectively. You should change the parameter values in the J
Stream, to suit your needs and then run the Job.

Q. How do you define and Install the Map in CICS?


To display and see the output of your Map on the Terminal Emulator, CICS Software
to pick up your Physical Map(Load Module) from the Disk and load it into the Main
Storage. To help CICS Software find your Load Module, you must add the appropriate
entries in the CICS Tables.

First, use the CEDA Transaction define a new mapset.

Enter the Mapset Name INQSET1, with Group-name MYGROUP.

Second, use the CEDA Transaction to install the mapset.


Enter the Mapset name as INQSET1.

Enter the Group-name as MYGROUP.

In a similar fashion, you need to DEFINE and INSTALL your Program INQSET1. Remembe
ultimately a MAP is also a Program. So, you need to
CEDA DEFINE PROGRAM and CEDA INSTALL PROGRAM.
Q. How to display the Map on the CICS Terminal?
Whenever you want to send anything to the CICS Terminal, you can use the special C
Command SEND MAP. CICS provides a set of commands to you, called the Terminal Cont
Commands. When you want to send data to any terminal, you can use the CICS Command
MAP. On the same lines, when you want to receive data from the terminal, you can u
CICS Command RECEIVE MAP.

We want display the Map INQMAP1, within the Mapset INQSET1. Type the command CECI
MAP('INQMAP1') MAPSET('INQSET1') and hit Enter.

You should get a warning message, "About to Execute Command". Hit Enter once more.

After you press Enter, you should be able to see the Output of your Map on the CIC
Terminal.
Note :

Here is the complete BMS Macro Source Code for the Customer Inquiry
Screen, with all the DFHMSD, DFHMDI and DFHMDF Macros.
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
        PRINT  NOGEN
INQSET1 DFHMSD TYPE=&SYSPARM,                                          X
               LANG=COBOL,                                             X
               MODE=INOUT,                                             X
               TERM=ALL,                                               X
               DSATTS=COLOR,                                           X
               CTRL=FREEKB,                                            X
               STORAGE=AUTO,                                           X
               TIOAPFX=YES
INQMAP1 DFHMDI SIZE=(24,80),                                           X
               LINE=1,                                                 X
               COLUMN=1
        DFHMDF POS=(1,1),                                              X
               LENGTH=8,                                               X
               ATTRB=(NORM,PROT),                                      X
               COLOR=TURQUOISE,                                        X
               INITIAL='CUSTINQ1'
        DFHMDF POS=(1,32),                                             X
               LENGTH=16,                                              X
               ATTRB=(NORM,PROT),                                      X
               COLOR=TURQUOISE,                                        X
               INITIAL='Customer Inquiry'
TRANSID DFHMDF POS=(1,76),                                             X
               LENGTH=04,                                              X
               ATTRB=(NORM,PROT),                                      X
               COLOR=TURQUOISE,                                        X
               INITIAL='INQ1'
        DFHMDF POS=(3,01),                                             X
               LENGTH=42,                                              X
               ATTRB=(NORM,PROT),                                      X
               COLOR=TURQUOISE,                                        X
               INITIAL='Type a customer number. Then press ENTER.'
        DFHMDF POS=(5,01),                                             X
               LENGTH=24,                                              X
               ATTRB=(NORM,PROT),                                      X
               COLOR=TURQUOISE,                                        X
               INITIAL='Customer number. . . . .'
CUSTNO  DFHMDF POS=(5,26),                                             X
               LENGTH=06,                                              X
               ATTRB=(NORM,UNPROT),                                    X
               COLOR=TURQUOISE,                                        X
               INITIAL='______'
        DFHMDF POS=(5,33),                                             X
               LENGTH=01,                                              X
               ATTRB=ASKIP
        DFHMDF POS=(7,01),                                             X
               LENGTH=24,                                              X
               ATTRB=(NORM,PROT),                                      X
               COLOR=TURQUOISE,                                        X
               INITIAL='Name and Address . . . :'
LNAME   DFHMDF POS=(7,26),                                             X
               LENGTH=30,                                              X
               ATTRB=(NORM,PROT),                                      X
               COLOR=TURQUOISE
FNAME   DFHMDF POS=(8,26),                                             X
               LENGTH=20,                                              X
               ATTRB=(NORM,PROT),                                      X
               COLOR=TURQUOISE
ADDR    DFHMDF POS=(9,26),                                             X
               LENGTH=30,                                              X
               ATTRB=(NORM,PROT),                                      X
               COLOR=TURQUOISE
CITY    DFHMDF POS=(10,26),                                            X
               LENGTH=20,                                              X
               ATTRB=(NORM,PROT),                                      X
               COLOR=TURQUOISE
STATE   DFHMDF POS=(10,47),                                            X
               LENGTH=02,                                              X
               ATTRB=(NORM,PROT),                                      X
               COLOR=TURQUOISE
ZIPCODE DFHMDF POS=(10,50),                                            X
               LENGTH=10,                                              X
               ATTRB=(NORM,PROT),                                      X
               COLOR=TURQUOISE
MESSAGE DFHMDF POS=(23,01),                                            X
               LENGTH=79,                                              X
               ATTRB=(BRT,PROT),                                       X
               COLOR=TURQUOISE
        DFHMDF POS=(24,01),                                            X
               LENGTH=20,                                              X
               ATTRB=(NORM,PROT),                                      X
               COLOR=TURQUOISE,                                        X
               INITIAL='PF3=Exit PF12=Cancel'
        DFHMSD TYPE=FINAL
               END
 
I have written a Assemble-Link Job to run the assemble CICS Map Source
Code into Physical Map and Symbolic Map respectively. You should
change the parameter values in the JCL Stream, to suit your needs and
then run the Job.

//AGY0157A JOB A123,'BIN-7 QUASAR',CLASS=A,MSGCLASS=Y,NOTIFY=&SYSUID


//*===================================================================
=
//*                       BMS MAP ASSEMBLER                          
|
//* Note : This JOB creates a PHYSICAL Map(Load Module) and          
|
//*        a SYMBOLIC Map (DSECT) From BMS Macro Source.            
|
//*                                                                  
|
//*            Parameter Value                      Description      
|
//*            ________ ____________________  _______________________
|
//         SET CICSPRFX='CICSTS23.CICS'       CICS Libraries Prefix  
|
//         SET  LOADLIB='SYSFAN.CICS.LOAD'    CICS Load Library      
|
//         SET  DSCTLIB='SYSFAN.CICS.SDFHMAC' Symbolic Map Library  
|
//         SET   SRCLIB='AGY0157.CICS.MAPLIB' Map Source Library    
|
//         SET   MAPSET='INQSET1'             Mapset Name            
|
//         SET   SYSLIB='SYS1.MACLIB'         Additional MAC Library
|
//*===================================================================
=
//ASMMAP  EXEC PGM=ASMA90,REGION=2048K,
//             PARM='SYSPARM(MAP),DECK,NOOBJECT'
//SYSPRINT DD SYSOUT=*
//SYSLIB   DD DSN=&CICSPRFX..SDFHMAC,DISP=SHR
//         DD DSN=&SYSLIB,DISP=SHR
//SYSUT1   DD UNIT=SYSDA,SPACE=(CYL,(5,5))
//SYSUT2   DD UNIT=SYSDA,SPACE=(CYL,(5,5))
//SYSUT3   DD UNIT=SYSDA,SPACE=(CYL,(5,5))
//SYSPUNCH DD DSN=&&MAP,DISP=(,PASS),UNIT=SYSDA,
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=400),
//            SPACE=(400,(50,50))
//SYSIN    DD DSN=&SRCLIB(&MAPSET),DISP=SHR
//LINKMAP  EXEC PGM=IEWL,PARM=('LIST,LET,XREF,RMODE(ANY)',
//            'AMODE(31)')
//SYSPRINT DD SYSOUT=*
//SYSLMOD  DD DSN=&LOADLIB(&MAPSET),DISP=SHR
//SYSUT1   DD UNIT=SYSDA,SPACE=(1024,(20,20))
//SYSLIN   DD DSN=&&MAP,DISP=(OLD,DELETE)
//ASMDSCT EXEC PGM=ASMA90,REGION=2048K,
//             PARM='SYSPARM(DSECT),DECK,NOOBJECT'
//SYSPRINT DD SYSOUT=*
//SYSLIB   DD DSN=&CICSPRFX..SDFHMAC,DISP=SHR
//         DD DSN=&SYSLIB,DISP=SHR
//SYSUT1   DD UNIT=SYSDA,SPACE=(CYL,(5,5))
//SYSUT2   DD UNIT=SYSDA,SPACE=(CYL,(5,5))
//SYSUT3   DD UNIT=SYSDA,SPACE=(CYL,(5,5))
//SYSPUNCH DD DSN=&DSCTLIB(&MAPSET),DISP=OLD
//SYSIN    DD DSN=&SRCLIB(&MAPSET),DISP=SHR

You might also like