If you code INFOR in the PUTLINE macro, the PUTLINE service routine writes the information
you supply as an informational message
and provides additional functions not applicable to data lines. An
informational message is a line of output from the program in control
to the user at the terminal. It is used solely to pass output to
the terminal; no input from the terminal is required after an informational
message. For information about the additional functions that PUTLINE
provides for message lines, see PUTLINE Message Line Processing.
There are two types of informational messages processed by the
PUTLINE service routine: single-level messages and multilevel messages.
- Single-Level Messages: A single-level message is composed of
one or more message segments to be formatted and written to the terminal
with one execution of the PUTLINE macro instruction. Use
the SINGLE operand on the PUTLINE macro instruction to indicate
that the output line is a single-level message.
- Multilevel Messages: Multilevel
messages are composed of one or more message segments to be formatted
and written to the terminal, and one or more message segments to be
formatted and placed on an internal chain in shared subpool 78. This
internal chain can either be put out to the terminal or purged by
a second execution of the PUTLINE macro instruction. Use the
MULTLVL operand on the PUTLINE macro instruction to indicate
that a multilevel message is to be written to the terminal.
Figure 1. Example Showing
PUTLINE Single Line Data Processing* ON ENTRY FROM THE TMP, REGISTER 1 CONTAINS A POINTER TO THE COMMAND
* PROCESSOR PARAMETER LIST (CPPL).
*
* SET UP ADDRESSABILITY
* SAVE AREA CHAINING
*
LR 2,1 SAVE THE ADDRESS OF THE CPPL.
USING CPPL,2 ADDRESSABILITY FOR THE CPPL
L 3,CPPLUPT PLACE THE ADDRESS IF THE UPT
* INTO A REGISTER
L 4,CPPLECT PLACE THE ADDRESS OF THE ECT
* INTO A REGISTER
* ISSUE THE EXECUTE FORM OF THE PUTLINE MACRO INSTRUCTION. USE IT
* TO WRITE A SINGLE LINE OF DATA TO THE TERMINAL AND TO BUILD THE
* IOPL. IT DOES NOT SPECIFY THE TERMPUT OPERANDS, AND THEREFORE
* PUTLINE WILL USE THE DEFAULT VALUES.
*
PUTLINE PARM=PUTBLOK,UPT=(3),ECT=(4),ECB=ECBADS, X
OUTPUT=(TEXTADS,TERM,SINGLE,DATA),MF=(E,IOPLADS)
*
* PROCESSING
* STORAGE DECLARATIONS
*
ECBADS DS F'0' SPACE FOR THE EVENT CONTROL BLOCK
PUTBLOK PUTLINE MF=L LIST FORM OF THE PUTLINE MACRO
* INSTRUCTION. THIS EXPANDS INTO A
* PUTLINE PARAMETER BLOCK.
TEXTADS DC H'20' LENGTH OF THE OUTPUT LINE
DC H'0' RESERVED
DC CL16' SINGLELINE DATA'
IOPLADS DC 4F'0' SPACE FOR THE INPUT/OUTPUT
* PARAMETER LIST
IKJCPPL DSECT FOR THE CPPL
END
Figure 2. Example Showing
PUTLINE Multiline Data Processing* ON ENTRY FROM THE TMP, REGISTER 1 CONTAINS A POINTER TO THE COMMAND
* PROCESSOR PARAMETER LIST (CPPL).
*
* SET UP ADDRESSABILITY
* SAVE AREA CHAINING
*
LR 2,1 SAVE THE ADDRESS OF THE CPPL.
USING CPPL,2 ADDRESSABILITY FOR THE CPPL
L 3,CPPLUPT PLACE THE ADDRESS IF THE UPT
* INTO A REGISTER
L 4,CPPLECT PLACE THE ADDRESS OF THE ECT
* INTO A REGISTER
LA 5,ECBADS PLACE THE ADDRESS OF THE ECB
* INTO A REGISTER
* SET UP ADDRESSABILITY FOR THE INPUT/OUTPUT PARAMETER LIST DSECT.
*
LA 7,IOPLADS
USING IOPL,7
* FILL IN THE IOPL EXCEPT FOR THE PTPB ADDRESS
ST 3,IOPLUPT
ST 4,IOPLECT
ST 5,IOPLECB
*
* ISSUE THE EXECUTE FORM OF THE PUTLINE MACRO INSTRUCTION
*
PUTLINE PARM=PUTBLOK,OUTPUT=(TEXTADS,MULTLIN,DATA), X
MF=(E,IOPLADS)
*
* PROCESSING
* STORAGE DECLARATIONS
*
ECBADS DS F
IOPLADS DS 4F'0'
TEXTADS DC A(TEXT2) FORWARD POINTER TO THE NEXT LINE.
DC H'20' LENGTH OF THE FIRST LINE.
DC H'0' RESERVED.
DC CL16'MULTILINE DATA 1'
PUTBLOK PUTLINE MF=L LIST FORM OF THE PUTLINE MACRO
* INSTRUCTION.
*
TEXT2 DC A(0) END OF CHAIN INDICATOR.
DC H'20' LENGTH OF THE SECOND LINE.
DC H'0' RESERVED.
DC CL16'MULTILINE DATA 2'
*
IKJCPPL DSECT FOR THE COMMAND PROCESSOR
* PARAMETER LIST. THIS EXPANDS
* WITH THE SYMBOLIC NAME CPPL.
IKJIOPL DSECT FOR THE INPUT/OUTPUT
* PARAMETER LIST. THIS EXPANDS
* WITH THE SYMBOLIC NAME IOPL.
END