Академический Документы
Профессиональный Документы
Культура Документы
CICS, C8
Slide 1
Objectives
1. Use the symbolic cursor positioning technique to control the position of the cursor when you issue a SEND MAP command. 2. Code appropriate MOVE statements to change standard and extended field attributes. 3. Explain the techniques used to optimize the transmission of data from a CICS program to a terminal using the SEND MAP command. 4. Code appropriate INSPECT statements to add and remove underscore characters from a symbolic map. 5. Given editing requirements for the fields in a symbolic map, code an appropriate edit procedure to detect and indicate each possible error. 6. Use the SEND TEXT command to display a short message on the terminal.
CICS, C8
Slide 2
Objectives (continued)
7. Identify the contents of the following Execute Interface Block fields: EIBAID EIBRESP EIBCALEN EIBRESP2 EIBCPOSN EIBRSRCE EIBDATE EIBTIME EIBDS EIBTRMID EIBFN EIBTRNID 8. Code the CICS commands necessary to access the Common Work Area. 9. Code the CICS commands necessary to retrieve the current date and time and to format the values appropriately for the application.
CICS, C8
Slide 3
How to use the IC option in the DFHMDF macro for a field to control cursor positioning
CUSTNO DFHMDF POS=(2,26), LENGTH=6, ATTRB=(NORM,UNPROT, IC), COLOR=TURQUOISE, INITIAL='______' X X X X
When you issue a SEND MAP command, CICS positions the cursor in the field defined with the IC (initial cursor) attribute. If you specify IC for more than one map field, CICS positions the cursor in the last one on the screen.
CICS, C8
Slide 4
The CURSOR value specifies a screen position that represents a displacement from the start of the screen. To calculate the displacement for a screen position, use this formula:
(Row-number 1) x 80 + (Column-number 1) = Displacement
CICS, C8
Slide 5
When you issue the SEND MAP command with a CURSOR option that has no displacement value, CICS positions the cursor in the field whose length field (suffix L) in the symbolic map has a value of -1. If you move -1 to more than one length field, CICS positions the cursor in the first one on the screen.
CICS, C8
Slide 6
CICS, C8
Slide 7
MSGC
INVNOH
CICS, C8
Slide 8
CICS, C8
Slide 10
Notes
Attribute values can be given in hex codes or EBCDIC. IBM also supplies a standard copy member, named DFHBMSCA, that defines many attribute settings.
CICS, C8
Slide 11
How to minimize the data thats sent from your program to the terminal
Use the DATAONLY option of the SEND MAP command whenever you send data using a map thats already on the screen. Move Low-Value to symbolic map fields that are already present on the screen and should remain unchanged.
CICS, C8
Slide 12
Code for minimizing data sent from your program to the terminal
. . MOVE LOW-VALUE TO CUSTNO1O ACTIONO SET SEND-DATAONLY-ALARM TO TRUE PERFORM 1500-SEND-KEY-MAP . 1500-SEND-KEY-MAP. * EVALUATE TRUE . . WHEN SEND-DATAONLY-ALARM EXEC CICS SEND MAP('MNTMAP1') MAPSET('MNTSET1') FROM(MNTMAP1O) DATAONLY ALARM CURSOR END-EXEC END-EVALUATE.
CICS, C8
Slide 13
How to minimize the data thats sent to your program when the user presses an attention key
1. Maintain a copy of all the fields on the screen in the communication area. 2. Specify the FRSET option on the SEND MAP command to turn off the modified data tags of all the unprotected fields. If the user changes the field, the MDT will be turned back on, signifying that the new data should be transmitted. 3. When your program issues a RECEIVE MAP command, it must merge the new user entries with the fields saved in the communication area from the previous transmission.
CICS, C8
Slide 14
CICS, C8
Slide 15
CICS, C8
Slide 16
How to use underscores to identify entry fields on terminals that dont support extended highlighting
How to initialize a field with underscores
CUSTNO DFHMDF POS=(5,26), LENGTH=6, ATTRB=(NORM,UNPROT,IC), COLOR=TURQUOISE, INITIAL='______' X X X X
CICS, C8
Slide 17
Description
Most CICS programs have to edit data entered by the user to make sure that no fields are missing, that the entries consist of valid data, and that related fields have logically related values. If the editing is complicated, requiring table or file lookups for example, you can break it down into two or more procedures. In many cases, though, a single procedure is all you need.
CICS, C8
Slide 18
Note
Its common to edit data entry fields from the bottom of the screen to the top. That way, the error message the program displays relates to the first invalid field on the screen.
CICS, C8
Slide 19
CICS, C8
Slide 20
CICS, C8
Slide 21
CICS, C8
Slide 22
COMP-3.
CICS, C8
Slide 23
CICS, C8
Slide 24
CICS, C8
Slide 25
CICS, C8
Slide 26
CICS, C8
Slide 28
CICS, C8
Slide 29
Description Specifies the name of the field containing the data to be displayed on the terminal. Indicates that the screen should be erased before the data is displayed. Indicates that the terminal keyboard should be unlocked after the data is sent. If FREEKB is omitted, the user has to press the Reset key to unlock the keyboard.
Description
The SEND TEXT command makes it easy to display a brief message on the screen without having to create a BMS mapset. A SEND TEXT message is displayed starting at the top left corner of the screen.
CICS, C8 2001, Mike Murach & Associates, Inc. Slide 30
CICS, C8
Slide 31
CICS, C8
Slide 32
CICS, C8
Slide 33
CICS, C8
Slide 34
'A serious error has '. 'occurred. Please co'. ' ntact technical supp'. 'ort. '. SPACE. = '.
PIC X(11) VALUE 'EIBRESP PIC Z(08)9. PIC X(59) VALUE SPACE.
PIC X(11) VALUE 'EIBRESP2 = '. PIC Z(08)9. PIC X(59) VALUE SPACE. PIC X(11) VALUE 'EIBTRNID = '. PIC X(04). PIC X(64) VALUE SPACE.
CICS, C8
Slide 35
* * * * * *
PROCEDURE DIVISION. 0000-DISPLAY-ERROR-MESSAGE. MOVE MOVE MOVE MOVE MOVE EXEC DFHCOMMAREA TO ERROR-PARAMETERS. ERR-RESP TO EM-RESP. ERR-RESP2 TO EM-RESP2. ERR-TRNID TO EM-TRNID. ERR-RSRCE TO EM-RSRCE. CICS SEND TEXT FROM(ERROR-MESSAGE) ERASE ALARM FREEKB END-EXEC. EXEC CICS RETURN END-EXEC.
CICS, C8
Slide 36
CICS, C8
Slide 37
CICS, C8
Slide 38
Description
You can use the ADDRESS command to establish addressability to areas of CICS storage that can be accessed through fields defined in the Linkage Section.
CICS, C8
Slide 39
CICS, C8
Slide 40
Description
The ASKTIME command retrieves the current date and time as an absolute time. Each time this command is executed, the date and time in the EIBDATE and EIBTIME fields are updated. You can convert an absolute time value to a more useful format using the FORMATTIME command.
CICS, C8
Slide 41
CICS, C8
Slide 42
CICS, C8
Slide 43
CICS, C8
Slide 44
DATEFORM
CICS, C8
Slide 45
Description
The FORMATTIME command formats an absolute time and places the date and time portions in the named fields. The date and time that are returned by the FORMATTIME command are always left justified in the named field. You can also use the MMDDYY, DDMMYY, YYMMDD, YYDDMM, and YYDDD options to format a date with a two-digit year.
CICS, C8 2001, Mike Murach & Associates, Inc. Slide 46
A FORMATTIME command that formats the date and time in the default format with the default separators
EXEC CICS FORMATTIME ABSTIME(ABSOLUTE-TIME) DATE(WS-DATE) DATESEP TIME(WS-TIME) TIMESEP END-EXEC.
CICS, C8
Slide 47