Symbolic Map


A symbolic map consists of all named fields specified with DFHMDF in the map definition, along with the programming language equivalent declaration. Each named field has five different extensions (in some compilers, those are seven with extended types), which are called symbolic variables for the named field. These symbolic variables are created automatically during the symbolic map generation.

The sub-divided variables for the named field are -

  • Input Variable (Extension: I)
  • Output Variable (Extension: O)
  • Field Variable (Extension: F)
  • Length Variable (Extension: L)
  • Attribute Variable (Extension: A)
  • Extended Color Variable (Extension: C)
  • Extended Highlight Variable (Extension: H)

1. Input Variable -

  • The input variable carries the information entered by the user to the application program for validation and processing purposes.
  • The input variable can be declared with a length from 1 through 80 bytes.
  • The maximum length declaration allowed for the input variable is equal to one row in the map.

Scenario - Validating the data in the NAME field.

EXEC CICS
	RECEIVE MAP
	..
END-EXEC.

IF  NAMEI GREATER THAN SPACES
	...
END-IF.

2. Output Variable -

  • The output variable is used to display the text on the screen sent from the application program.
  • The output variable can be declared with a length from 1 through 80 bytes.
  • The maximum length allowed for the output variable declaration is equal to the length of one row in the map.

Scenario - Send "HELLO WORLD" to the NAME field.

MOVE "HELLO WORLD" TO NAMEO.
EXEC CICS
	SEND MAP
	..
END-EXEC.

3. Field Variable -

  • The field variable is a flag variable used to identify whether the field is modified.
  • The field variable has X’00’ when the field has not been modified and X’80’ when the field has been modified but has cleared the screen.

Scenario - Validate NAME field is modified or not.

EXEC CICS
	RECEIVE MAP
	..
END-EXEC.

IF NAMEF EQUAL X'00'
	MOVE NAMEI 	TO   WS-NAME
END-IF.

4. Length Variable -

  • The length variable is a 2-byte field that provides the length of the data entered by the user or to place the cursor in a field.
  • The length variable can be used to refresh the field. By passing -1 to the length variable, the cursor can be placed at the particular field during runtime. It is called "Dynamic cursor positioning".

Scenario1 - Validate NAME field length from screen.

EXEC CICS
	RECEIVE MAP
	..
END-EXEC.

IF NAMEL GREATER THAN ZERO
	MOVE NAMEI 	TO   WS-NAME
END-IF.

Scenario2 - Placing the cursor in NAME field.

MOVE -1   TO NAMEL.
EXEC CICS
	SEND MAP
	..
END-EXEC.

5. Attribute Variable -

  • The attribute variable is used to highlight, protect, unprotect, and brighten the field during runtime.
  • It is of 1-byte length.

Scenario - Highlighting the NAME field in red color.

MOVE DFHRED   TO NAMEA.
EXEC CICS
	SEND MAP
	..
END-EXEC.

6. Extended color Variable -

  • The color variable is used to set the extended color to the field during runtime.
  • It is of 1-byte length and generated only when DSATTS=COLOR is specified for the mapset.

Scenario - Highlighting the NAME field in red color.

MOVE DFHRED   TO NAMEC.
EXEC CICS
	SEND MAP
	..
END-EXEC.

7. Extended Highlight Variable -

  • The highlight variable is used to set the extended attribute to the field during runtime.
  • It is of 1-byte length and generated only when DSATTS=HILIGHT is specified for the mapset.

Scenario - Protect NAME field to skip the data input.

MOVE DFHPROT   TO NAMEH.
EXEC CICS
	SEND MAP
	..
END-EXEC.

Short Examples -


Scenario - Explain the concept with BMS macros and sybolic map.

0  67      141516    212223				                    72
    DISPGRP DFHMSD TYPE=&SYSPARM,			  				-
			MODE=INOUT,										-
			LANG=COBOL, 									-
			CNTL=(FREEKB,PRINT,FSET),						-
			TIOAPFX=YES          
    DISPLAY	DFHMDI SIZE=(24, 80),							-
            POS=(0,0),										-
			ATTRIB=(BLUE,BR)		
    NAMETXT DFHMDF INITIAL='NAME: ',						-
			LENGTH=10,										-
			POS=(12,6),										-
			ATTRIBUTE=(PINK,BR)			
    NAME    DFHMDF PICIN= 'X(8)',							-
			POS=(12,20),									-
			ATTRIB=(UNPROT,IC,ASKIP)	
    DISPGRP	DFHMSD TYPE= FINAL
    END

The symbolic map copybook for the above map is -

01  DISPLAYI.                             
    02  FILLER 			PIC X(12). *> TIOAPFX=YES creates 12 byte filler
    02  FILLER 			PIC X(2).              
    02  NAMEL      		PIC S9(4) COMP.         
    02  NAMEF    		PIC X.                
    02  FILLER REDEFINES NAMEF.            
      03 NAMEA    		PIC X.               
    02  NAMEI  			PIC X(08).                  
01  DISPLAYO REDEFINES DISPLAYI.           
    02  FILLER 			PIC X(12). *> TIOAPFX=YES creates 12 byte filler 
    02  FILLER 			PIC X(6).              
    02  NAMEO  			PIC X(08).

The different symbolic variables for NAME field are -

  • NAMEI
  • NAMEO
  • NAMEF
  • NAMEL
  • NAMEA
  • NAMEC
  • NAMEH