PROCESS
The assembler calls the exit with a request type of 5 (PROCESS) when the assembler is writing the listing records, and it has a record for the exit to process. The address of the record is in the buffer pointer field, and the length is in the buffer length field.
- z/VM® and z/OS®
- The record has either an American National Standard or a machine printer control character at the start of the record depending on the setting of the ASA assembler option.
The options field contains a value that represents the type of listing record that is passed. The listing record types, and their corresponding options values, are shown in For the LISTING exit.
The exit sets the return code in the
Exit Parameter List to one of these values:
- 0
- Indicates that the record has been accepted, and the assembler
is to write it to the listing data set. The exit can modify the record
before it returns control to the assembler. The user exit can also
insert extra records in the listing by setting the reason code to 4.
The assembler writes the current record and then calls the user exit
with an empty buffer. The exit must place the additional listing
record in the area pointed to by the buffer pointer field.
The exit can continue to supply additional records by setting the reason code to 4.
The exit must keep track of when the assembler calls it with an empty
buffer, and ensure that it resets the reason code to zero
to resume normal processing. Note: A reason code of 8 requests redrive of the exit.
- z/VM and z/OS
- The exit must also ensure that a valid printer control character is placed in the first character of the record. The printer control character is either American National Standard or machine. The exit can check the DCB, pointed to by the DCB pointer field in the Exit Parameter List, to find out which printer control character to use.
- z/VSE®
- The exit must also ensure that a valid American National Standard printer control character is placed in the first character of the record.
- 4
- Instructs the assembler to discard the listing record. Note: A reason code of 8 requests redrive of the exit.
- 16
- Instructs the assembler to make no further calls to the exit.
Although the user exit can insert or discard records, the assembler maintains the absolute record number and relative record number.
Table 1 summarizes the LISTING
exit processing.
Request Value=Type | Exit Return Code | Action |
---|---|---|
1=OPEN | 0 | Assembler opens listing data set. If reason code=4, exit supplies listing line length. If reason code=16, REINIT call required. |
4 | Exit writes listing records. If reason code=4, exit supplies data set information. If reason code=16, REINIT call required. |
|
16 | Assembler opens listing data set, and makes no further calls to the exit. | |
2=CLOSE | n/a | Exit should close any data sets it opened, and release any storage it acquired. |
4=WRITE | 0 | Exit writes record. If reason code=8, redrive requested.1 |
5=PROCESS | 0 | Record accepted. Exit might modify record. If reason code=4, the assembler, after processing the current record, provides an empty buffer for the exit to provide additional record. If reason code=8, redrive requested.1 |
4 | Requests assembler to discard record. If reason code=8, redrive requested.1 |
|
16 | Assembler makes no further calls to the exit. | |
10=REINIT | 0 | Operation successful. If reason code=8, redrive requested.1 |
16 | Assembler makes no further calls to the exit. | |
Notes:
|