CICS ClassBook Lesson03
CICS ClassBook Lesson03
Instructor Notes:
Page - 03- 1
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
Lesson Objectives
Page - 03- 2
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.1: Methods for Data Communication
Types of Methods
Page - 03- 3
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.2: Characteristics of 3270 Display
Functional Characteristics
Before using BMS to define screen layout, the functional characteristics of 3270
display station’s screen need to be understood.
They are:
• Field-oriented display
• The screen consists of a number of user-defined fields
• A special character called an attribute byte marks the beginning of a field
Page - 03- 4
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.3: Attribute Byte Format
0 1 2 3 4 5 6 7
Page - 03- 5
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.3: Attribute Byte Format
Page - 03- 6
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.3: Attribute Byte Format
Field Protection
• Unprotected
• Protected
• Auto-skip
Field Intensity
• Normal
• Bright
• No-display
Shift
The difference between the protected field and a skip field is that
when the cursor is moved to a skip field, it automatically advances
to the first position of the next unprotected field on the screen.
When the cursor moves to a protected field without auto-skip, it stops
even though the user cannot enter data there. As a result of this,
protected fields without auto-skip are called stop fields. If a stop
field is used to mark the end of an unprotected field, the user has
to press the tab key to advance to the next data entry field.
An attribute byte will be required to mark the end of an unprotected
field. If the end of an unprotected field is not marked with either a
skip or stop field, the screen will be unprotected beyond the
intended data entry field until the beginning attribute byte of the
next field.
Page - 03- 7
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
Attribute Byte Format:
Field Intensity:
Normal: A normal intensity field displays the data at the normal operating
intensity.
Bright: A bright intensity field displays the data at a brighter than normal
intensity. This is often used to highlight keywords, errors, or operator
messages.
Nodisplay: A nodisplay field does not display the data on the screen for
operator viewing. This might be used to enter security data.
Shift:
It indicates whether the keyboard is numeric shift or alphanumeric shift.
In the older 3270 models, the numerals are located on the same keys as
some of the letters, so the operator has to use SHIFT key on the
keyboard to enter a numeric data. However, if a field’s attribute byte
indicates numeric shift, then the keyboard is automatically put into
numeric shift so the operator does not have to press the NUMERIC
SHIFT key.
Page - 03- 8
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.4: Basic Mapping Support
Page - 03- 9
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.5: Format Independence
Format Independence implies that application programs are written without concern
for physical position of data fields within a display.
Page - 03- 10
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.6: Device Independence
Page - 03- 11
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.6: Maps and Mapsets
Note:
Map represents BMS coding for a screen, and Mapset represents a
load module.
Page - 03- 12
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.6: Maps and Mapsets
A “mapset” contains a single or multiple maps defined for one terminal type.
A mapset once created must be assembled.
A job to assemble a mapset requires two steps:
• The first transforms your mapset into a physical map.
• The second creates symbolic map from your mapset.
Note:
A mapset is a special kind of assembler program, to define the format
of each of the screens that the programs display.
Page - 03- 13
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.6: Maps and Mapsets
Note:
The suffix is required at the time of mapset definition in order to
distinguish the device types if the same mapset is used for different
types of terminals.
CICS automatically inserts the suffix depending on the terminal in use,
thereby ensuring the device independence to the application
program.
A mapset is a special kind of assembler program, to define the format
of each of the screens that the programs display.
Page - 03- 14
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.7: Map Generation
Diagrammatic Representation
Design Screen
Code Map
Assemble
Page - 03- 15
Customer Information Control System Data Communication Operation in CICS
Program Preparation
Translated
Source
Program
Physical Symbolic Compiler
Map Map Listing
Compiler
Link-editor Object
Module
Load Link-editor
Module
Load
Module
Page - 03- 16
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.7: Physical and Symbolic Map
Types of Maps
Page - 03- 17
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.7: Physical Map
Generate a A physical map is a load module that contains a table which is used by BMS to
map in CA and determine the screen locations of the data transmitted to and received from the
display station.
show the
Example:
physical map and the
• A physical map might indicate that a particular field is displayed on the screen at column
Symbolic map. Explain 16 of line 4.
the symbolic map later. • A physical map also indicates attributes of each field such as protection and intensity.
Physical Map:
The primary objective of the physical map is to ensure the device
independence in the application programs.
More concretely:
For input operations, the physical map defines maximal data
length and starting position of each field to be read and
allows BMS to interpret an input data stream.
For output operations, the physical map defines starting
position, length, field characteristics (Attribute Bytes), and
default data for each field, and allows BMS to add control
characters and commands for output in order to construct
an output data stream.
Page - 03- 18
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.8: Physical Map
Page - 03- 19
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.8: Symbolic Map
A symbolic map, in COBOL, is a copy library member that defines the format of data
sent to or received from the terminal screen.
When an application program requests that a map be sent to the terminal, BMS
takes data from the symbolic map, formats (or maps) it according to the physical
map, and sends it to the terminal.
Likewise, when an application program requests that some data be retrieved from
the terminal, BMS uses the physical map to map the data from the screen into the
symbolic map.
Symbolic Map:
The primary objective of the BMS symbolic map is to ensure device
and format independence to the application programs. Thus
through the symbolic map, a layout change in the formatted screen
can be done independent of the application program coding as long
as the field name and length remain same.
It is used by the application program, which issues a COBOL COPY
statement in order to include a symbolic map in the program.
Page - 03- 20
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.8: Symbolic Map
Page - 03- 21
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.9: Format of Symbolic Map
The Format
A COBOL program must contain a COBOL COPY statement for each symbolic map
definition in the working storage section.
It starts with the 01 level definition of FILLER PIC X(12), which is the TIOA prefix
created by TIOPFX=YES of the DFHMSD macro.
Each symbolic map field consists of sub-fields. Each sub-field has a different suffix.
Page - 03- 22
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.9: Format of Symbolic Map
The Format
Page - 03- 23
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.10: Example of Symbolic Map Definition
Illustration
01 SAMPMAPI.
02 FILLER PIC X(12).
02 CHOICEL PIC S9(4) COMP-4.
02 CHOICEF PIC X.
02 FILLER REDEFINES CHOICEF.
03 CHOICEA PIC X.
02 CHOICEI PIC X(001)
02 MESSAGEL PIC S9(4) COMP-4.
02 MESSAGEF PIC X.
02 FILLER REDEFINES MESSAGEF.
03 MESSAGEA PIC X.
02 MESSAGEI PIC X(030).
Page - 03- 24
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.10: Example of Symbolic Map Definition
Illustration
Page - 03- 25
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.11: Example of Customized Symbolic Map Definition
Illustration
SAMPMAPI.
01 SAMPLE-MAP.
02 FILLER PIC X(12).
02 CHOICEL PIC S9(4) COMP-4.
02 CHOICED PIC X.
02 CHOICEA PIC X.
02 MESSAGEL PIC S9(4) COMP-4.
02 MESSAGED PIC X(30).
02 MESSAGEA PIC X.
Page - 03- 26
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.12: Components of a Screen
The Elements
Components of a Screen:
The first step in designing screen layout is to divide the screen into
functional areas such as title area, application data area, and
message area.
The title area of a screen should identify the program that displayed
data.
The application data area comprises the main portion of the screen.
Three kinds of fields are usually found in this area:
Keyword/unnamed/literal: They contain constant data sent by
program to identify the contents of the data field.
Data field/named: They contain data that the application
program retrieves from files and displays. The data may
appear exactly as stored in a file, or it may be edited, or it
may be left blank for operator to enter data.
Stopper field: It is on data entry screen and restricts the length
of the data field. Stopper field containing no data is used to
stop operator from entering too many characters in a field.
Page - 03- 27
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.12: Coding the Map
MAPSET:
• A group of maps is called Mapset.
• Mapset name must be defined in the PPT. This is because CICS considers BMS mapset as a
program coded in assembler.
Page - 03- 28
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.13: Modified Data Tag (MDT)
Concept of MDT
Page - 03- 29
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.13: Modified Data Tag (MDT)
Concept of MDT
Page - 03- 30
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.14: Map Definition Macros
Open the .BMS file To code a BMS map, BMS provides assembler macros as follows:
and show the various • DFHMSD : To define a mapset
Macros. • DFHMDI : To define a map
• DFHMDF: To define a field
Page - 03- 31
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.15: Format of BMS Macros
The Format
Page - 03- 32
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.16: Example of BMS Macros
Illustration
Example:
1 10 16 17 72
Page - 03- 33
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.17: Order of Map-Code
Illustration
DFHMDI
Map2 DFHMDF
|
|
|
DFHMDF
DFHMSD Type = Final --> Mapset Defn
End ----------> Assembler command
Order of Map-Code:
➢ There is rule for the order of BMS macros, which must be followed.
That is, within one mapset definition, the map definition can be
specified as many times as you wish. Within one map definition,
the field definition can be specified as many times as you wish.
Page - 03- 34
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.18: Print NOGEN
The PRINT NOGEN, causes the assembler not to print statements generated by the
BMS macro instructions. If you do not include a PRINT NOGEN command, your
assembler listing will contain hundreds of lines that are not important.
Hence it is recommended to start the mapsets with PRINT NOGEN command.
Page - 03- 35
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.19: END
Use of END
Page - 03- 36
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.20: DFHMSD Macro
Function:
• The DFHMSD macro is used to define a mapset and its characteristics or to end a mapset
definition.
• Only one mapset definition is allowed within one assembly run.
Page - 03- 37
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.21: Format of DFHMSD Macro
The Format
Label DFHMSD
TYPE=DESECT|MAP|&SYSPARM|FINAL,
[MODE=IN|OUT|INOUT,]
[LANG=ASM|COBOL|PLI,]
[STORAGE=AUTO|BASE=name,]
[CTRL=(FREEKB, ALARM, FRSET),]
[HIGHLIGHT=OFF|BLINK|REVERSE|UNDERLINE,]
[VALIDN=MUSTFILL|MUSTENTER,]
[TERM=TYPE|SUFFIX=n,]
[TIOAPFX=YES|NO,]
[DATA=FIELD|BLOCK]
Page - 03- 38
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.21: Format of DFHMSD Macro
The Format
DFHMSD TYPE=FINAL
Page - 03- 39
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.21: Format of DFHMSD Macro
The Format
The mapset name will appear in the PPT and in the copy statement for the symbolic
map in the COBOL application program.
• TYPE: The type parameter indicates whether a Physical Map(Type=MAP) or a symbolic Map
(Type=DSECT) is being generated. Type=&SYSPARM indicates that both will be generated.
• LANG: It specifies the language to be used for the symbolic map.
Page - 03- 40
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.21: Format of DFHMSD Macro
The Format
• MODE: It specifies whether the map is being used for input (IN) or output (OUT) or both.
• TERM: The term parameter specifies the type of terminal that the map can be used with:
• If you code ALL or 3270, then the map can be used with any type of terminal (even non-3270
devices).
• Although it is a bit less flexible, it is more efficient to specify the exact terminal type.
• CTRL parameter:
• FREEKB: To unlock the keyboard
• FRSET: To reset MDT to zero
• ALARM: To set an alarm at screen displaytime
• PRINT: To indicate the mapset to be sent to the printer
Page - 03- 41
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
Format of DFHMSD Macro:
Example:
If the program is run on 3270 model1 terminal, then CICS retrieves the
mapset named MORSET1L.
If the program is run on 3270 model2 terminal, then CICS retrieves the
mapset named MORSET1M.
If CICS cannot locate the appropriate mapset, then it looks for a mapset
with no suffix. An un-suffixed mapset is generated with we code
TERM=ALL or TERM=3270. Such a maspset can be used for any
type of terminal.
To accommodate any terminal type, however considerable run-time
overhead is added to the mapset. Hence it is better to specify terminal
type in the mapset.
Page - 03- 42
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.21: Format of DFHMSD Macro
The Format
Page - 03- 43
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.21: Format of DFHMSD Macro
The Format
STORAGE: This parameter is used when more than one map set is defined in the
mapset. If storage = AUTO is coded, then the symbolic maps for maps in the
mapset will occupy separate storage locations.
TIOAPFX: If YES, it generates a 12-byte filler item at the beginning of the symbolic
map and should always be specified for COBOL maps.
Page - 03- 44
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.22: DFHMDI Macro
Function:
• The DFHMDI macro is used to define a map and its characteristics in a mapset.
Page - 03- 45
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.23: Format of DFHMDI Macro
The Format
Page - 03- 46
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.23: Format of DFHMDI Macro
The Format
The DFHMDI macro is used to define a map and its characteristics in a mapset.
• The LABEL must be specified as the symbolic name to the DFHMDI macro.
• SIZE(ll, cc) is used to define the size of the map by the line size (ll) and column size (cc).
• LINE and COLUMN indicates the starting position of the map in line and column numbers,
respectively.
Page - 03- 47
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.24: DFHMDF Macro (Function)
The DFHMDF macro is used to define a field in a map and its characteristics.
The DFHMDF macro can be issued as many times as you wish within one DFHMDI
macro.
Page - 03- 48
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.24: DFHMDF Macro (Function)
Page - 03- 49
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.24: DFHMDF Macro (Function)
If the field name is required, then the name of the field (1 to 7 chars) must be
specified as the symbolic name to the DFHMDF macro.
POS=(line, column) indicates the starting position of the field in the line and column
number including the attribute character.\
The actual data field follows the attribute byte, so if you want a field to start in
column 5 of line 10, you code POS=(10,4).
Page - 03- 50
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.24: DFHMDF Macro (Function)
• LENGTH indicates the length of the field EXCLUDING the attribute character.
• Hence if you specify LENGTH=5, you actually define six screen positions – five positions for the
field itself and one position for the attribute byte.
• INITIAL defines the initial value of the field (if any).
• PICIN and PICOUT defines the PICTURE clauses of the symbolic map in COBOL, which is
useful for numeric field editing.
Page - 03- 51
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
3.24: DFHMDF Macro (Function)
Page - 03- 52
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
Summary
Page - 03- 53
Customer Information Control System Data Communication Operation in CICS
Instructor Notes:
Review Questions
Page - 03- 54