What's New at MAINFRAMES 360: Creating and Assembling CICS Maps
What's New at MAINFRAMES 360: Creating and Assembling CICS Maps
This Blog
Linked From Here
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 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 -
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 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.
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.