Symbolic map variables
Summary
Symbolic map consists all named fields specified with DFHMDF in map definition along with the programming language equalent declaration. Each named field is sub divided into 5 different variables.
If developer coding the BMS macros manually, then the symbolic map layout should also create manually. If the map created using tools like SDF II, the symbolic map gets generated automatically from the map layout.
The 5 variables also created automatically for every field during the Symbolic map generation. The sub divided variables for the named field are -
- Input Variable
- Output Variable
- Field Variable
- Length Variable
- Attribute Variable
Input Variable -
Input variable carries the information entered by the user to the application program. Input variable mainly used for validation and processing purpose in the application program.
Input variable declared along with the length field in symbolic map.Input variable can be declared with the length from 1 through 80 bytes. Input variable allowed maximum length declaration is equal to the one row length in the map.
Example -
IF PASSWRDI GREATER THAN SPACES
.
.
END-IF.
Output Variable -
Output variable carries the information from application program to screen. Output variable used to display the text on the screen sent from application program.
Output variable declared along with the length field in symbolic map. Output variable mostly used to display static message to screen or the error message on screen when any error occurred.
Output variable can be declared with the length from 1 through 80 bytes. Output variable allowed maximum length declaration is equal to the one row length in the map.
Example -
MOVE “ENTER..” TO PASSWRDO.
Field Variable -
Field variable is a flag variable. Field variable used to identify whether the field is modified or not.
Field variable has X’00’ when the field not modified and X’80’ when field not modified but cleared the screen.
Field variable used to verify the unprotected fields data is modified or not during the screen data validation.
Example -
IF PASSWRDF EQUAL X'00'
MOVE PASSWRDI TO WS-PASSWORD
END-IF.
Length Variable -
Length variable used to provide the length of the data entered by the user. Length variable is a 2-byte field.
Length variable can be used to refresh the field. Length variable also used to place the cursor at the particular field during the runtime by passing -1 to the length variable.
No other value except -1 allowed to length variable. Moving -1 to the length variable is called as “Dynamic cursor positioning”.
Example -
MOVE -1 TO PASSWRDL.
Attribute Variable -
Attribute variable used to highlight, protect, unprotect, brighten the field during the runtime. Attribute variable have MDT information.
Attribute variable is of 1-byte length. Attribute variable has the attribute of the field. Let us discuss the importance of the variables with an example.
Example -
Below one is the simple BMS MAP creation with password field.
0 67 141516 212223 72
CICSGRP DFHMSD TYPE=MAP/DSECT/&SYSPARM, -
MODE=IN/OUT/INOUT, -
LANG=COBOL/ PL/I /ASSEMBLER, -
CNTL= (FREEKB, PRINT, FSET), -
TIOAPFX=YES
CICSPAS DFHMDI SIZE= (24, 80), -
POS= (0, 0), -
ATTRIBUTE= (BLUE, DM or BR)
PASSTXT DFHMDF INITIAL=’PASS:----------‘, -
LENGTH=10, -
POS= (12, 13), -
ATTRIBUTE= (PINK, BR)
PASSWRD DFHMDF PICIN= ‘X(8)’, -
POS= (12, 20), -
ATTRIBUTE= (PROT or UNPROT, IC, ASKIP)
CICSGRP DFHMSD TYPE= FINAL
END
The symbolic map copybook for the above map is -
01 CICSPASI.
02 FILLER PIC X(12). -- TIOAPFX=YES creates this 12 byte filler
02 FILLER PIC X(2).
02 PASSWRDL PIC S9(4) COMP.
02 PASSWRDF PIC X.
02 FILLER REDEFINES PASSWRDF.
03 PASSWRDA PIC X.
02 PASSWRDI PIC X(08).
01 CICSPASO REDEFINES CICSPASI.
02 FILLER PIC X(12). -- TIOAPFX=YES creates this 12 byte filler
02 FILLER PIC X(6).
02 PASSWRDO PIC X(08).
The five different symbolic variables for PASSWRD field are -
- PASSWRDI
- PASSWRDO
- PASSWRDF
- PASSWRDL
- PASSWRDA