0% found this document useful (0 votes)
8 views

CICS-ClassBook-Lesson08

Uploaded by

josephjabin8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

CICS-ClassBook-Lesson08

Uploaded by

josephjabin8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Customer Information Control Systems BMS Programming Considerations

Instructor Notes:

Add instructor notes here.

Customer Information Control


System
Lesson 8: BMS Programming Considerations

Page - 08 - 1
Customer Information Control Systems BMS Programming Considerations

Instructor Notes:
Lesson Objectives

In this lesson, you will learn about:


• Dynamic Attribute Character Assignment
• Cursor Positioning Techniques

Page - 08 - 2
Customer Information Control Systems BMS Programming Considerations

Instructor Notes:
8.1: DFHBMSCA – Standard Attribute Byte List

Concept of DFHBMSCA

Copy book DFHBMSCA A field’s attribute can be changed by moving a value to the corresponding attribute
is discussed in field in the symbolic map.
Chapter 6. Just This feature can be used to highlight errors detected by an edit module.
provide a quick recap. To make it easy to modify attribute characters, IBM supplies a standard COPY
member named DFMHBMSCA.
For example:
• COPY DFHBMSCA
• MOVE DFHBMPRO to NAMEA

DFHBMSCA – Standard Attribute Byte List:


Constants Meaning
DFHBMPEM Printer end-of-message
DFHBMPNL Printer new line
DFHBMASK AutoSkip
DFHBMUNP Unprotected
DFHBMUNN Unprotected & num
DFHBMPRO Protected
DFHBMPRY Bright
DFHBMDAR Dark
DFHBMFSE MDT set
DFHBMPRF Protected and MDT set
DFHBMASF Auto-Skip & MDT set
DFHBMASB Auto-Skip & bright
---------
To dynamically assign an attribute, the copy book “DFHBMSCA” has
to be included in Working Storage section of the application
program.
When the map is sent through SEND MAP command, the new attribute
will be in effect on the field on subject, overriding the original
attribute defined at the time of map definition.

Page - 08 - 3
Customer Information Control Systems BMS Programming Considerations

Instructor Notes:
8.1: DFHBMSCA – Standard Attribute Byte List

Example of DFHBMSCA

Copy book DFHBMSCA


is discussed in
WORKING-STORAGE SECTION.
Chapter 6. Just -------
provide a quick recap. COPY 'MAPSETA'.
-------
COPY 'DFHBMSCA'.
-------
PROCEDURE DIVISION.
-------
MOVE DFHBMBRY TO CUSTNOA.
MOVE DFHDMPRO TO CUSTNAMEA.
EXEC CICS SEND
MAP ('MAPNAME')
MAPSET('MAPSETA')
FROM(MAPSETAI)
END-EXEC.

Dynamic Attribute Character Assignment:


It can be used to change the default attribute character which has been
defined in the BMS map.
It can be done by placing the predefined attribute character to the
fieldname+A of the field to which you wish to dynamically assign the
attribute character.

Page - 08 - 4
Customer Information Control Systems BMS Programming Considerations

Instructor Notes:
8.2: FACDEFN

Concept of FACDEFN

The FADEFN Copy book is Using DFHBMSCA for changing attributes is cryptic.
not supported by CA- Also, it does not include some of the most commonly used attribute bytes.
Realia. Furthermore, most of the definitions it does include are rarely used.
Hence an improved copy member for the attribute definitions is created.
The library member FACDEFN contains standardized definitions for attribute
characters.

Page - 08 - 5
Customer Information Control Systems BMS Programming Considerations

Instructor Notes:
8.2: FACDEFN

Concept of FACDEFN

Let us see an example using FACDEFN:

COPY FACDEFN.
..
..
MOVE FAC-PROT-SKIP TO CUSTNOA

FACDEFN:
05 FAC-PROT-DARK PIC X
VALUE '%'.
05 FAC-PROT-DARK-MDT PIC X VALUE '_'.
05 FAC-PROT-SKIP PIC X VALUE '0'.
05 FAC-PROT-SKIP-MDT PIC X
VALUE '5'.
05 FAC-PROT-SKIP-BRT PIC X
VALUE '8'.
05 FAC-PROT-SKIP-BRT-MDT PIC X VALUE '9'.
05 FAC-PROT-SKIP-DARK PIC X VALUE '@'.
05 FAC-PROT-SKIP-DARK-MDT PIC X VALUE
QUOTE

Page - 08 - 6
Customer Information Control Systems BMS Programming Considerations

Instructor Notes:
8.3: Cursor Positioning Techniques

Different Techniques

CICS provides three techniques to set the cursor position:


• Static Cursor Positioning
• Dynamic / Symbolic Cursor Positioning
• Relative Cursor Positioning

Cursor Positioning Techniques:


When a SEND MAP command is issued, by default CICS will place the
cursor in the top left corner of the screen. This forces the user to press
the Tab key to move to the first data entry field.

Checking Cursor Position:


The cursor position can be known by checking the EIBCPOSN ,
which is a half word binary S9(4) COMP. This can be checked
after the completion of the RECEIVE command. The
EIBCPOSN gives the relative position of the cursor at the time
of data transfer.

Page - 08 - 7
Customer Information Control Systems BMS Programming Considerations

Instructor Notes:
8.4: Static Cursor Positioning

Concept of Static Cursor Positioning

In the Static Cursor Positioning approach, a cursor position is defined in a map by


placing “IC” in the ATTRB parameter of the DFHMDF macro for a particular field.

DFHMDF POS=(3,16),
ATTRB=(UNPROT, FSET, IC)
LENGTH=8

Static Cursor Positioning:


When the map is sent, the cursor will appear in this field specified with
the IC attribute.
IC stands for Initial Cursor.
If more than one field with IC is specified in one map, then the last IC
will be honored.

Page - 08 - 8
Customer Information Control Systems BMS Programming Considerations

Instructor Notes:
8.5: Symbolic Cursor Positioning

Concept of Symbolic Cursor Positioning

In the Symbolic Cursor Positioning approach, a cursor is dynamically positioned


through an application program using a symbolic name of the symbolic map by
placing –1 into the field’s length field (that is, filename+L) of the field.

MOVE –1 TO CHOICEL.
EXEC CICS SEND MAP(‘MAP1’)
MAPSET(‘MAP1’)
CURSOR
ERASE
END-EXEC

Note:
The SEND MAP command to be issued must have the CURSOR
option (without argument). Also, the mapset must be coded with
MODE=INOUT in the DFHMSD macro.

Page - 08 - 9
Customer Information Control Systems BMS Programming Considerations

Instructor Notes:
8.6: Relative Cursor Positioning

Concept of Relative Cursor Positioning

In the Relative Cursor Positioning approach, you dynamically position a cursor


through an application program using the CURSOR (data-value) option in the SEND
MAP command.
Data-value is calculated as: (row-1) * 80 + (column –1)
• Example: If you want to place the cursor in column 17 of row 12. The correct displacement
will be 896:
• (12-1)*80 + (17-1) = 896

Relative Cursor Positioning:


The map will be displayed with the cursor at the specified position,
overriding the static cursor position defined at the map definition
time.
Direct cursor positioning has two major drawbacks:
Cursor displacements are awkward to use.
Direct positioning ties the program to specific screen
locations. Hence if the mapset is changed by moving a field
from one screen location to another, the program has to be
changed as well.

Page - 08 - 10
Customer Information Control Systems BMS Programming Considerations

Instructor Notes:
8.6: Relative Cursor Positioning

Example of Relative Cursor Positioning

Let us see an example of Relative Cursor Positioning:

EXEC CICS SEND


MAP(------)
MAPSET(-------)
CURSOR(896)
ERASE
END-EXEC

Page - 08 - 11
Customer Information Control Systems BMS Programming Considerations

Instructor Notes:
Summary

In this lesson, you have learnt:


• A method to dynamically assign attributes
• A method to dynamically position cursor

Page - 08 - 12
Customer Information Control Systems BMS Programming Considerations

Instructor Notes:
Review Questions

1. Symbolic cursor
Question 1: In ___ approach, a cursor is dynamically positioned through an
positioning application program by placing –1 into the field’s length field.
2. False
3. False Question 2: If IC is set for multiple field, the first IC will be honored.
• True / False

Question 3: Direct cursor positioning is the most preferred way of positioning


the cursor.
• True / False

Page - 08 - 13

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy