Sending screen-image data

Sending screen-image data is an alternative to sending key stroke data. In general, this would be the screen image that you received modified to reflect the changes that would be the result of an operator action. A sample COBOL program, DFH0VZTS, illustrates the techniques used; see Screen image SEND and START.

The data is exactly what you would expect: an image of the screen that you want to send. That is, 24 rows of 80 bytes (or whatever your screen size is) of data, corresponding byte-for-byte with the screen. For example, in a COBOL program containing this data description:

     01   SCREEN-IMAGE    PIC X(1920).
     01   SCREEN-FIELDS   REDEFINES SCREEN-IMAGE.
        05  LINE-1        PIC X(80).
        05  FILLER        REDEFINES LINE-1.
          10  FILLER        PIC X(20).
          10  CUST-NO       PIC X(12).
          10  FILLER        PIC X(48).
        05  LINE-2        PIC X(80).
        05  LINE-3        PIC X(80).
        05  LINE-4        PIC X(80).
        05  FILLER        REDEFINES LINE-4.
          10  FILLER        PIC X(12).
          10  CUST-NAME     PIC X(32).
          10  FILLER        PIC X(36).

you would put the required data into the fields and send the screen image using:

        EXEC CICS FEPI SEND FORMATTED
           CONVID(....)
           FROM(SCREEN-IMAGE) FLENGTH(1920)
           AID(PF2)

where AID specifies which attention key was pressed on the simulated terminal.

Data bytes are represented as themselves; you must set any nulls (X'00') that are needed to fill a field. In a protected field, the data bytes must be the same as in the current, simulated terminal buffer that FEPI holds. In the case of attribute bytes, it does not matter what values you put, because you have no control over their positions or settings, any more than a terminal operator does. However, if the value is X'01', FEPI sets the modified data tag (MDT) for the field, even if its data has not changed. (If the data has changed, FEPI sets the MDT automatically.)

You do not have to send a complete screen image. If your changes are confined to the first few lines, you need only send those few lines. The data you send is taken as starting from the top left position of the screen.

Note:
If you are using the C programming language, remember that a screen image probably contains null characters. Take care if you are handling the screen image as a string.

The cursor position can be set using the CURSOR option.

You can choose to send all the data with one command, or to use several commands to build up the data. The last (or only) command must have an attention identifier (AID) specified, using the AID option, to send the data. The other commands must have an AID value of X'00'. Definitions for the AID values are in the DFHAID copy book, as is used with BMS.

Note:
The COBOL and assembler versions of the DFHAID copybook are different. Therefore, you cannot simply copy unmodified SEND commands from the DFH0VZTS sample program, which is supplied in COBOL only, to a user-written assembler program.

Errors

The errors you can get are similar to those for key stroke data. Your screen-image data has other ways of being incorrect. In place of escape sequences not being valid, or ‘input inhibited’, you might have cursor or AID settings not valid, or changed data in a protected field. Many of these data errors cannot be detected until the data is actually processed. This means that some of the changes will have taken effect already--they cannot be removed by FEPI.

[[ Contents Previous Page | Next Page Index ]]