cics bms maps concepts and commands. what is a map? a map defines a set of formatted fields used...

16
CICS BMS Maps Concepts and commands

Upload: diane-holmes

Post on 22-Dec-2015

220 views

Category:

Documents


0 download

TRANSCRIPT

CICS BMS MapsConcepts and commands

What is a Map?

A map defines a set of formattedfields used when communicatingwith a 3270 terminal. The

symbolicrepresentation of a map is used

in anapplication program for easyreference of individual map

fields.

Mapsets• A mapset can hold several maps,

but most mapsets hold one map, thus the term map can sometimes generically refer to the mapset with its map.

• Screen Definition Facility II is an online map definition product available for use with various mainframe operating systems.

• Every map must be a part of a mapset!

Assembler Macros used to define a map

• DFHMSD – defines beginning and end of the mapset

• DFHMDI – defines a map in mapset

• DFHMDF – defines each field on the map

Assembler Macros so Assembler rules

• Assembler coding rules– Label begins in column 1– Macro begins in column 10– Operands begin in column 16 or 17

if macro names are six characters.– Continued lines must have a non-

blank continuation character in column 72; operands continue in column 16

• Syntax of assembler statementsLabel Macro operands

The BMS mapset• PRINT NOGEN – first statement

entered when typing mapset into program– Assembler command – Do not print statements generated

when expanding the assembler macros

• END – last statement entered when typing mapset into program– Assembler command used to

indicate end of a mapset source statements to the compiler

The BMS mapset• Each map has 2 forms:

– Physical – table of screen display information; resides in program load library

• need an entry in PPT before CICS can load map• Systems programmer will update PPT with

CEDA transaction or DFHPPT system macro• Physical mapset is loaded when the executing

program requests SEND or RECEIVE services.– Symbolic – group structure of COBOL field

definitions; resides in the COPY library.• Placed in the source program by the compiler.• If changes affect symbolic map then all

programs using map must be recompiled.

• Mapset is a resource so it must be included in table where programs are defined to CICS.

DFHMSD Macro - Mapset Definition Operands

• TYPE=&SYSPARM– Usually set in JCL to 1 of following 2:

• DSECT – symbolic map• MAP – physical map

• MODE=INOUT– Determines how many symbolic map areas you

are using (INOUT = 1)– Gives you a map input area mapnameI and map

output area mapnameO

• TERM=ALL (what types of terminals? All 3270)

• LANG=COBOL• TIOAPFX=YES (always)

– Use 12 byte Terminal Input/Output Area prefix (Used by CICS mgmt services when initiating a task)

• CTRL=(FREEKB) unlock keyboard

DFHMDI Macro – Map Definition Operands

• SIZE=(24,80) – screen has 24 rows by 80 columns

to be used to layout the map

• LINE=1– Map begins on line 1

• COLUMN=1– Map begins in column 1

Defining Fields with Attribute Bytes

• Every field is defined by the presence of an attribute byte.

• They take up space on the screen but are not visible.

• Controls appearance and operation of the field.

• Bit pattern of the byte determines the characteristics of the field.– Setting initially based on values coded in the

map– Settings can be changed within the program– Copybook exist for use in changing attribute

byte settings

• Marks the beginning of a display only field• Marks the beginning and end of a data

entry field

Attribute Bytes continued…

• Has characteristics associated with it that define the field data that follows it. Like:

•Protection tells if operated is allowed to enter data in field or not

– PROTECTED/UNPROTECTED/AUTOSKIP

• Intensity tells how to display the field– NORMAL/BRIGHT/NONDISPLAY – NORMAL is default

•MDT (Modified Data Tag) tells if the user entered or changed data in the field.

– ON/OFF

DFHMDF Macro – Field Definition Operands

• POS=(Line#,Column#)• LENGTH=X where

– X is number of bytes after the attribute byte

• INITIAL=‘value given by programmer’– Puts an initial value in the physical

map like a field identifying label

• ATTRB=1 to many possible settings for protection, intensity and MDT

Protection Setting - Auto-skip Option

• Skip field is similar to a protected field because user can not enter data into it.

• When cursor moved to a skip field it automatically skips to the next unprotected field.

• Used at the end of an entry field so when user fills entry area, the cursor will automatically move to next entry field.

Example of DFHMDF macroCUSTNO DFHMDF POS=(5,26), X LENGTH= 6, X ATTRIB=(NORM,UNPROT)

DFHMDF POS=(5,33), X LENGTH=1, X ATTRIB=ASKIP

• First macro occurrence defines the customer number field. It is displayed in normal mode and unprotected so the user can enter up to 6 characters in it.

• Second macro occurrence defines a skip field. It marks the end of the customer number field and causes the cursor to skip to the next unprotected field.

• (5,26) is location of attribute byte• (5,27) – (5,32) is the customer number field data• See page 115 for more examples

Symbolic Map• The copy member created by

the assembler translation of the macros defined in the mapset.

• Use the symbolic map in the program to process data for the fields named in the map.

• For each DFHMDF macro with a label the symbolic map contains five data fields. Each one has the same name as the label, followed by a single letter (L,F,A,I or O).

Data Name Suffixes• labelL – length of the data returned

in the input field• labelF – flag byte used to identify if

field was modified without entering data on input operation

• labelA – redefines of flag byte; used to change attributes defined in physical map for a field on output operation

• labelI – Input data field; data sent from from terminal to program

• labelO – redefines the Input data field; Output data field; data sent from program to terminal