0% found this document useful (0 votes)
31 views20 pages

CICS ClassBook Lesson06

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)
31 views20 pages

CICS ClassBook Lesson06

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

Customer Information Control System CICS Copy Books

Instructor Notes:

Customer Information Control


System
Lesson 6: CICS Copy Books

Page – 06 - 1
Customer Information Control System CICS Copy Books

Instructor Notes:
Lesson Objectives

Execute Interface Block – DFHAID


Copy Book DFHBMSCA

Page – 06 - 2
Customer Information Control System CICS Copy Books

Instructor Notes:
6.1: Exec Interface Block (EIB)

Use of Exec Interface Block (EIB)

Exec Interface Block (EIB) in Linkage section:


• It keeps record of system related information.
• It creates one EIB per task.
• EIB for a task contains information about the task, which is initiated.
• It automatically includes copy of DFHEIBLK as EIB in the Linkage section of application
program during translation.
• Program can only access data using EIB field names.
• User should not update data in EIB fields.

Note:
Execute Interface Block (EIB) is a CICS area that contains information
related to the current task.

Page – 06 - 3
Customer Information Control System CICS Copy Books

Instructor Notes:
6.2: EIB Fields

List of EIB Fields

Here is a list of EIB fields:


• EIBAID • EIBRCODE
• EIBCALEN • EIBREQID
• EIBCPOSN • EIBTRMID
• EIBDATE • EIBTRNID
• EIBTIME • EIBTASKN
• EIBDS

Page – 06 - 4
Customer Information Control System CICS Copy Books

Instructor Notes:
6.2: EIB Fields

Use of EIB Fields

EIBAID: It is a one character field that indicates which attention key was used for
the last receive command.
EIBFN: It indicates which CICS command was executed last.
EIBRCODE: This will contain the response code of the last CICS command. It
indicates the command’s completion status.
EIBDS: It contains the name of the dataset processed by the last file control
command.

Page – 06 - 5
Customer Information Control System CICS Copy Books

Instructor Notes:
6.2: EIB Fields

Use of EIB Fields

EIBCPOSN:
• This field supplies the screen position of the cursor.
• The cursor position is a number from 0 to 1919, indicating the cursor’s displacement on the
screen.
• Example: cursor position 255 is line 4, column 16 (255/80 =3, remainder =15)
• The above calculation is for terminals with 80 character lines.
• The integer portion of the answer plus 1 is the line number, the remainder plus 1 is the
column number.

Page – 06 - 6
Customer Information Control System CICS Copy Books

Instructor Notes:
6.2: EIB Fields

Use of EIB Fields

EIBTIME:
• It contains the time of the day that the task was started. The time is stored as a seven digit
packed decimal number in the form 0HHMMSS (one leading digit followed by hours,
minutes, and seconds).
• This assumes a 24 Hr clock:
• 2.00 pm is hour 14.
• 38 seconds after 2:41 PM is stored as 0144138.
• Midnight is stored as 0000000.
• One second before is stored as 0235959.

Page – 06 - 7
Customer Information Control System CICS Copy Books

Instructor Notes:
6.2: EIB Fields

Use of EIB Fields

EIBDATE:
• It contains the date on which the task was started. The format of EIBDATE is 00YYDDD,
where DDD represents the three digits that indicates the number of the day in the year.
• Thus July 1 1983 is stored as 0083182 (the 182nd day of 1983).
• Although the YYDDD format is useful for comparison, it is inappropriate for display
purposes.
• Hence if you want to display the current date, you can first convert EIBDATE into standard
format.

Page – 06 - 8
Customer Information Control System CICS Copy Books

Instructor Notes:
6.2: EIB Fields

Use of EIB Fields

EIBTRNID:
• It contains the transaction identifier that started the task.
• One of the common uses of EIBTRNID is to determine how your program was started.
• This field can be used to ensure that the program is invoked only from a menu. In other
words, a program cannot be started by entering a transaction identifier at the terminal.
• Example: If EIBTRNID is anything other than MENU (the transaction identifier that starts the
menu program), a return command is used to terminate the task.

Page – 06 - 9
Customer Information Control System CICS Copy Books

Instructor Notes:
6.2: EIB Fields

Use of EIB Fields

EIBTRMID:
• This field supplies the name of the terminal running the task.
• The terminal name that appears in the EIBTRMID is not a physical device like 3270-2, rather
it is a symbolic name assigned to a terminal to meet installation specific requirement.
• These names are used for security purposes.
• This can be used to restrict a program to certain terminals.
• The EIBTRMID can be checked to ensure that the TERMINAL is eligible to run the task.

Page – 06 - 10
Customer Information Control System CICS Copy Books

Instructor Notes:
6.2: EIB Fields

Use of EIB Fields

EIBREQID:
• It contains the request identifier assigned to an interval control command by CICS.
EIBRESP:
• It contains a binary number corresponding to the condition that has been raised. Generally,
it is used with DFHRESP.
EIBTASKN:
• It contains the task number assigned to the task by CICS.

Page – 06 - 11
Customer Information Control System CICS Copy Books

Instructor Notes:
6.2: DFHAID – Attention Identifier (AID)

Concept of DFHAID

Attention Identifier indicates the method that the terminal operator has used to
initiate the transfer of information from the terminal device to CICS.
AID keys are PF keys, PA keys, ENTER key, and CLEAR key.
The EIBAID field in EIB contains the AID code of the most recently used AID.
CICS provides the standard AID list in the form of copy library member (DFHAID).

Note:
A program can use the standard AID list by specifying in the program:
COPY DFHAID.

Page – 06 - 12
Customer Information Control System CICS Copy Books

Instructor Notes:
6.2: DFHAID – Attention Identifier (AID)

Concept of DFHAID

The DFHAID member contains AID codes as shown below:


• DFHENTER: ENTER key
• DFHCLEAR: CLEAR key
• DFHPA1-3: PA1 TO PA3 keys
• DFHPF1-24: PF1 TO PF24 keys

Page – 06 - 13
Customer Information Control System CICS Copy Books

Instructor Notes:
6.3: Using AID Information in a Program

Illustration

Let us see an example on using AID information:

IF EIBAID = DFHPF3
PERFORM 2100-END-ROUTINE
ELSE IF EIBAID = DFHPA1
PERFORM 2200-CANCEL-ROUTINE
ELSE IF EIBAID = DFHENTER
PERFORM 2300-NORMAL-ROUTINE
ELSE
PERFORM 2400-WRONG-ROUTINE.

Page – 06 - 14
Customer Information Control System CICS Copy Books

Instructor Notes:
6.4: DFHBMSCA – Standard Attribute Byte List

Concept of DFHBMSCA

A field’s attribute can be changed by moving a value to the corresponding attribute


field in the symbolic map.
This feature can be used to highlight errors detected by an edit module.
To make it easy to modify attribute characters, IBM supplies a standard COPY
member named DFMHBMSCA.
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 map definition time.

Page – 06 - 15
Customer Information Control System CICS Copy Books

Instructor Notes:
6.5: DFHBMSCA

Example of DFHBMSCA

Let us see an example of DFHBMSCA:

WORKING-STORAGE SECTION.
-------
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.

DFHBMSCA – Standard Attribute Byte List:


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 – 06 - 16
Customer Information Control System CICS Copy Books

Instructor Notes:
6.5: FACDEFN

Concept of FACDEFN

Using DFHBMSCA for changing attributes is cryptic.


Also, it does not include some of the most commonly used attribute bytes.
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.

FACDEFN:
Field-Attribute-Definition:
05 FAC-UNPROT PIC X VALUE ' '.
05 FAC-UNPROT-MDT PIC X VALUE 'A'.
05 FAC-UNPROT-BRT PIC X VALUE 'H'.
05 FAC-UNPROT-BRT-MDT PIC X
VALUE 'I'.
05 FAC-UNPROT-DARK PIC X VALUE '<'.
05 FAC-UNPROT-DARK-MDT PICX
VALUE '('.
05 FAC-UNPROT-NUM PIC X VALUE '&'.
05 FAC-UNPROT-NUM-MDT PIC X VALUE 'J'.
05 FAC-UNPROT-NUM-BRT PIC X VALUE 'Q'.
05 FAC-UNPROT-NUM-BRT-MDT PIC X VALUE 'R'.
05 FAC-UNPROT-NUM-DARK PIC X VALUE '*'.
05 FAC-UNPROT-NUM-DARK-MDT PIC X VALUE ')'.
05 FAC-PROT PIC X VALUE '-'.
05 FAC-PROT-MDT PIC X
VALUE '/'.
05 FAC-PROT-BRT PIC X
VALUE 'Y'.
05 FAC-PROT-BRT-MDT PIC X VALUE 'Z'.

Page – 06 - 17
Customer Information Control System CICS Copy Books

Instructor Notes:
6.5: FACDEFN

The Syntax

COPY BOOKS.
..
..
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 – 06 - 18
Customer Information Control System CICS Copy Books

Instructor Notes:
Summary

EIB fields
Copy book DFHAID
Copy book DFHEIBLK, DFHBMSCA

Page – 06 - 19
Customer Information Control System CICS Copy Books

Instructor Notes:
Review Questions

Question 1: The ___ field supplies the name of the terminal running the task.

Question 2: ___ contains the request identifier assigned to an interval control


command by CICS.

Question 3: ___ contains the transaction identifier that started the task.

Page – 06 - 20

You might also like