Header and trailer format
To place a header or trailer on the pages of a text message, you point to a block of data with a set format.
- LL
- is the length of the header (trailer) data, not including the four bytes of LL, P, and C characters. LL should be expressed in halfword binary form.
- P
- is the page-number substitution character (see PNFLD below). Use a blank if you do not want page numbers.
- C
- is a reserved 1-byte field.
- TEXT
- is the header (trailer) text to be placed at the top (bottom) of each page of output. Use new-line characters (X'15') to indicate where line breaks should occur if you want multiple lines.
- PNFLD
- is the page number field within your header (trailer) text. If you want to number the pages of your output, choose a character that does not otherwise appear in your header (trailer) text. Place this character in the positions where the page number is to appear. You can use from one to five adjacent positions, depending on how large you expect your page numbers to get (32,767 is the maximum BMS allows). Place the same character in the P field above, to tell BMS where to make the substitution. Do not use X'0C', X'15', X'17', X'26', or X'FF' for P; these values are reserved for other purposes. If you do not want page numbering, place a blank (X'40') in P.
EXEC CICS SEND TEXT FROM (OUTPUT-AREA)
HEADER(HEADER-TEXT) PAGING ACCUM END-EXEC.
where: 01 HEADER-TEXT
02 HEADER-LL PIC S9(4) COMP VALUE +11.
02 HEADP PIC X VALUE '@'.
02 FILLER PIC X VALUE LOW-VALUE.
02 HEADING PIC X(11) VALUE 'PAGE NO. @@'.
Screens built with SEND TEXT are not designed for extensive input from the terminal operator. However, you can interpret the attention identifier and read simple inputs—such as those used in the CSPG transaction to control the page display—if the field structure on the screen is suitable and the operator knows or can see what is expected. (A new field starts at each line, as well as at the first character of the text sent with each SEND TEXT command that made up the message. The fields defined are unprotected, alphameric and normal intensity, so that the operator can key into them.) Normally a terminal control RECEIVE is used in this situation; you can use RECEIVE MAP only if you can build a map with a field structure matching that of the screen.