The assembler calls the exit with a request type of 5 (PROCESS) when the assembler is reading the primary input data set, and it has a record for the exit to process. The address of the record read is in the buffer pointer field, and the length is in the buffer length field. The record length is always 80.
The exit can set the return code in the Exit Parameter List to one of these:
Although the user exit might insert or discard records, the assembler maintains the absolute record number and relative record number.
If the options field is set to 1 (see Options), the assembler has provided the exit with the current primary input data set information in the data set name, member name, and volume serial fields of the exit-specific information block. The assembler updates this information when it reads the first record of each data set in a data set concatenation.
Table 16 summarizes the SOURCE exit processing.
| Request
Value=Type |
Exit
Return Code |
Action |
|---|---|---|
| 1=OPEN | 0 | Assembler opens primary input. |
| 4 | Exit supplies primary input records.
If reason code=4, exit supplies data set information. If reason code=16, REINIT call required. |
|
| 16 | Assembler opens primary input,
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. |
| 3=READ | 0 | Exit supplies record in buffer.
If reason code=4, exit supplies data set information. If reason code=8, redrive requested. 1 |
| 16 | Exit indicates end-of-file. | |
| 5=PROCESS | 0 | Record accepted. Exit may 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. |
| 16 | Assembler makes no further calls to the exit. | |
|
Notes:
|
||
[ Top of Page | Previous Page | Next Page | Contents | Index ]