FALSE

Page Nav

HIDE

Grid

GRID_STYLE

CICS FAQ's part6

BMS MAPS   1.     What is BMS? BMS is Basic mapping support, it allows you to code assembler level programs to define screens. The primary ...

BMS MAPS

BMS is Basic mapping support, it allows you to code assembler level programs to define screens.
The primary objective of Basic Mapping Support system is to free the Application Program from device dependent codes and Format.

A screen defined through BMS is called a Map. There are two type of maps.
Physical Map and
Symbolic map
A group of maps, which are link-edited together is called a Mapset. BMS maps are generated by using the following, BMS Macros: DFHMSD - To define the Mapset

A. The map copybook (symbolic map) saved in copy lib and the load module (making the physical map).

Physical Map– Screen layout coded in BMS and finally loaded into a load module

The physical map is the load module, which is primarily used by CICS. It defines maximal data length and the starting position of each field to be read and allows BMS to interpret input NMDS. It controls the screen alignment plus sending and receiving of constants and data from and to the terminal, and has the terminal information.
For output operations, the physical map defines starting position, length, and field characteristics and default data for each field and allows BMS to add Bcc and commands for output in order to construct an output NMDS.

Symbolic Map– Copy library which is copied into the working storage of a program.
It is a copy library member, which is to be included in the application program for defining the screen fields. It is to ensure device and format independence to application programs.

Length field, Flag Field and Attribute field. In addition Input & Output field are also created. Others are extended Color & Extended Highlighting attributes created only if MAPATTS and DSATTS are specified.
DFHBMSCA.

The first way is to code a physical map and then code a matching symbolic map in your COBOL program.
The second way to create a physical map along with a matching symbolic map is to code only the physical map using the &SYSPARM option, CICS will automatically create a member in a COPY library.
And the third way is to use a map generator such as SDF (Screen Definition Facility).

The Symbolic map is used to send and receive data to and from the screen. When you assemble a Mapset the symbolic maps are created and placed in a COBOL Copy library. Every Symbolic map consists of two 01 levels generated with labels FilednameI and FieldnameO. These items overlay each other as the FieldnameO redefines FieldnameI. Variables under FieldnameI are used for Input while the other are used for output. The first variable is a filler of 12 bytes long generated because of TIOAPFX=YES parameter of the Mapset. In the 1st 01 level of the symbolic map, for each field macro coded with a label, five data-name's would be created with one-char suffix to the label in addition to the Input field. And Output field in 2nd 01 level. A sample Symbolic map, with a single field is.

01 INQMAPI.

02 FILLER PIC X(12). ------ > 1ST Field of the Symbolic map.

02 NAMEL PIC S9(4) COMP.

02 NAMEF PIC X(01).

02 FILLER REDEFINES NAMEF.

03 NAMEA PIC X(01).

02 FILLER PIC X(02) (if ext. Attrib. allowed)

02 NAMEI PIC X(25). ------ > RECEIVE INTO I

01 INQMAPO REDEFINES INQMAPI.

02 FILLER PIC X(12). ------ > 1ST Field of the Symbolic map.

02 FILLER PIC X(03). ------ > SEND FROM O

02 NAMEC X(1). 02 NAMEH X(1)

02 NAMEO PIC X(25). ( || if ext. Attributes. allowed)

The variable with suffix 'L' is a binary half word field that contains the length of the data sent to program. Variable with suffix 'F' is a single char field that contains X'80', if the user made a change to the field, but no data was transmitted; otherwise it contains low values. 'F' indicates whether <ERASE EOF> Key is used. Variable with suffix 'A' is a single char field containing the attribute byte of the field for the output operations. Occupies the same storage location as the 'F' field. Variable with suffix 'C' is a single character field that contains the attribute for extended color, generated only if DSATTS=COLOR is specified in DFHMSD Macro. Variable with suffix 'H' is a single character field that contains the attribute for extending highlighting, generated only if DSATTS=HILIGHT is specified in DFHMSD Macro. Variable with Suffix of 'I' indicates the input field while the variable with suffix 'O' indicates the Output field.

Yes, By using the SEND TEXT command with FROM(data-area), LENGTH(value), ERASE and FREEKB options, as needed. FREEKB option specifies the keyboard to be unlocked, If not specified press the RESET key.

If say three maps have to be sent to the terminal (1st with title common to all, Last with messages common to all and the middle one, the map with info' pertaining to the program.) The if we use the ACCUM option with the SEND MAP, the system accumulate the maps into a Page Buffer. By using SEND PAGE, all the maps can be sent together as a single map, which decrease the I/O time between the system terminal and the CICS system.


ASSIGN command can be used to determine which extended attributes are supported by the terminal. IBM manual documents more than 60 options. The most commonly used options are COLOR(data-area), HILIGHT(data-area), SCRNHT(data-area) for screen height, and SCRNWD(data-area) for screen width. The system returns the one-byte field(data-area), set to High-Value (X'FF') if the terminal supports and a low-value, if not or else the length indicating the screen height or width, based on the option used.

When a MAP is sent with HEADER=YES as an operand, previous pages are erased. A page always "reserves" enough space to hold the largest TRAILER=YES map. Define the 1st map with header=yes with Justify=First and last map with trailer=yes with justify=last and the all the other's in between with justify=next. This type of Map Definition Initial will helps to control overflow by using the HANDLE CONDITION OVERFLOW command.

DFHMSD – To define Mapsets
DFHMDI  - To define the Map's within a Mapset
DFHMDF  - To define Field's within a Map
DFHMSD Macro is used to define the Mapset. The name of the Mapset is the label typed before the macro name. The various parameters used to define the DFHMSD Macro are. TYPE specifies whether a Physical map (=MAP), or Symbolic map (=DSECT), or both (=&SYSPARM) need to be generated. TYPE=FINAL indicates the end. LANG specifies the programming language in use (=ASM),(=COBOL),(=PLI). MODE specifies whether the Mapset is for input (=IN), output (=OUT), or both (INOUT). TERM specifies the terminal type, ( =ALL), (=3270), (=3270-1)indicates 3270 model 1terminal with 40 char lines, (=3270-2) indicates 3270 model 2 terminal with 80. CTRL specifies the control options, the common ones in use are (=FREEKB), (=ALARM). STORAGE=AUTO specifies the symbolic maps will occupy separate storage locations, Otherwise they will overlay the same storage locations, i.e. a redefines clause will be used for symbolic map items. MAPATTS specifies the Physical map extended attributes, COLOR and HILITE are the most common. DSATTS specifies which extended attributes need to be supported by Symbolic maps. EXTATT specifies whether extended attributes are allowed to be specified. =YES indicates that support for all extended attributes should be provided in both physical and symbolic maps, =MAPONLY generate support only for physical maps. TIOAPFX=YES should be specified for all COBOL maps, it generates a 12 byte filler item at the beginning of the symbolic map.

DFHMDI Macro is used to define Map's within a Mapset. The label on the DFHMDI macro is the Map's name. The various parameters used with DFHMDI are SIZE=(lines,columns) (usually 24,80) specifies the map size. LINE specifies the starting Line number. COLUMN specifies, starting column number (usually it's 1 as Line). JUSTIFY (left,right,last,first). CTRL specifies the control options to be used similar to DFHMSD as (FREEKB or ALARM).

DFHMDF Macro is used to define Field's within a Map. It may or may not be preceded by a label name to indicate the field name. The various parameters used are POS=(line,column) specifying the position of the field. ATTRB=(BRT/NORM/DRK,PROT/ASKIP/UNPROT,NUM,IC,FSET) specifies the attribute fields, NUM is used to specify the field as numeric and is right justified filled with zeroes, IC specifies the cursor to be located at the start of the data field, while FSET specifies the MDT bit On in the attribute byte of data field. COLOR specifies the color of the field (=Color (Red, blue, pink, green, turquoise, yellow, white)). INITIAL specifies the initial value of the field, during the MAP SEND (='literal'). PICIN specifies the input format while PICOUT specifies the output format, usually used with numeric strings (='picture-string') ex. (='ZZ,ZZZ,Z99.99').

Modified data tag. It is the last bit of an attribute byte that says whether a field has been modified or not.
If the user keys in any data into the field, it turns the MDT ON indicating that the data is modified. To save transmission time , 3270 terminal sends a field over the TC line only if the MDT is on. Otherwise, the field value is not transmitted.

MDT's can be turned on by Specifying FSET as part of the attribute of the BMS map, then issuing a SEND which includes the physical map. Do not overlay the BMS map's attributes with the symbolic map attributes on a SEND of map and data. Symbolic map's attributes equal to low values will not overlay the BMS attributes. Ex. ATTRB=(ASKIP,FSET).

Moving a standard attribute, which contains FSET to the Symbolic map's attribute before issuing the SEND which includes the symbolic map, such as MOVE UNPROT-FSET TO MAPFLDA.

Keying data into Unprotected field on the screen. Entering data into a field will turns its MDT On.

By using FSET –set to 1
By using FRSET –set to 0

Changes on Input operation. FSET - is an attribute that sets the MDT On to ensure that the field is transmitted.
Happens on an Output operation. FRSET. Resets MDT. Until this happens, field continues to be sent.

The extended attributes of a field include extended Color (Red, blue, pink, green, turquoise, yellow, white), extended highlighting (Blinking, Reverse Video, Underline), Validation (Must fill, Must enter, Trigger), and Programmed symbols (Up to six alternative user defined char-sets).

 Define EXTATT =YES and the correct terminal type.
Note:
For CICS V1.7 or later use MAPATTS and DSATTS.

Skipper –Skips to a field immediately after the data has been entered
Stopper – Will not skip until TAB is pressed


The Special byte unnamed fields on a Map are called stopper fields. The others are Unnamed fields (Literal's) are used for Titles, Field identifiers and messages and the Named (variables) Output fields and Named Input fields. There's a stopper field at the end of every named field.

Using Protected attribute. The Attribute byte defines the display/transmission of field.

When the application program tries to receive data which is not entered in the terminal. It is AEI9

Attribute bytes define map field characteristics, they are modified prior to issuing SEND MAP command  eg- from normal to intense to highlight an error field.

The IBM3270 screen is a field-oriented display. In other words the screen is logically divided into a number of user defined fields. The location and characteristics of the screen fields are determined by special characters called the attribute bytes. The attribute byte takes one position on the screen immediately to the left of the field. The standard attributes used in general are Protection, Intensity and Shift. The Attribute byte Bit positions - 0th-1st bits indicate none. 2nd-3rd bits indicates the protection and shift (If 00-Unprotected Alphanumeric, 01-Unprotected Numeric, 10-Protected Stop and 11-Protected Skip). 4th-5th bits indicate the intensity (00-Normal, 01-Normal, 10-bright, 11-No-display). 6th must always be '0'. 7th bit indicates MDT (0-field has not been modified, 1-field is modified).

MAPONLY is a send map operand that sends only fields with initial values to the screen. DATAONLY is the send map operand that specifies only the data from the map area.

A logical message is a single unit of output created by SEND TEXT or SEND MAP commands. BMS collects the separate output from each command and treats them as one entity. The technique may be used to build CICS reports.

Static    - By coding attribute =IC
Relative – Send cursor with (nn)
Symbolic–Move –1 to length field

There are 3 ways of positioning the cursor in the screen. They are as follows    

1.Static positioning -Define IC (Initial cursor) in the attribute field while defining the cursor.
2.Dynamic Symbolic positioning -Move –1 to the length field of the field on which the cursor has to be positioned and use the cursor option in SEND command without displacement value.
3. Dynamic Relative positioning - Use the CURSOR(nnn) option, with SEND MAP, where nnn = (row-1)*80+(col-1) (physical positioning).nnn is the value relative to the first position starting from zero.

The map copy book and the load module.

 The attribute field should have PROT mentioned while defining the field (needs clarification).

An attribute byte determines the characteristics of the field.      

Length, Attribute and input/output fields are the three working storage fields used for every field in the map.

DSECT parameter is used in the generation of symbolic map.   
      
Yes, On EOF.


We have to use ASIS option in the map receive option.
PF keys wake up (Initiate) the task and transmit modified data, PA keys only wake up (initiate) the task.

Yes we can use.

        Yes

Storage for maps redefine first. The largest of the maps is stored first.
 Data was not entered in the field.

No, not if erase EOF was used.

The buffer option in the receive command is to bring the entire datastream from the terminal buffer.

Assembler macros are assembled and then link edited to get the load module and is placed in the load library.

PPT table entry is required in case of BMS


RETURN command is used to pass control from program to other or to program being executed to the higher level (CICS to end the session). The Options of RETURN command are TRANSID(name), COMMAREA(data-area), and LENGTH(length of Commarea).

XCTL command is used to transfer control from the current to the program specified through the PROGRAM(program-name) option, Other options that can be specified are COMMAREA and LENGTH. The SEND MAP command is used to send data from the program to the terminal screen by using the various options such as MAP to specify the physical map name, MAPSET for Physical Mapset name, FROM(data-area) for symbolic map definition, MAPONLY/DATAONLY to specify if only Physical or Symbolic maps are to be sent, The ERASE/ERASEAUP to specify if the all data or only the unprotected field data on the screen need to be erased before the map is sent, and finally the CURSOR is used to specify the cursor position.

The RECEIVE MAP command receives input data from the terminal, the options MAP, MAPSET and INTO are used similar to the SEND MAP options, INTO is used instead of from.

The READ command is used to read data from files. The DATASET option is used to specify the filename that needs to be defined in FCT, INTO(data-area) field specifies the data area to be used, RIDFLD(data-area) for a keyed field specifies the key of a record to be read, RRN or RBA when specified, this field is interpreted as Relative Record Number or R Byte Address, the UPDATE option specifies that the program intends to update the file with a subsequent REWRITE or DELETE command.

The ABEND command is used to terminate the program abnormally, If you specify ABCODE(name) the system will generate a storage dump with the abcode-name to identify it.

No comments