The assembler calls the exit with a request type of 9 (END OF MEMBER) whenever the reading of a macro or copy member is completed. For a macro, processing of a MEND statement indicates completion; for a copy member, an end of file condition indicates completion.
The END OF MEMBER call simplifies stack management required in coding a LIBRARY exit which contains READs and FINDs. The exit may use the information provided by this call in the handling of nested FINDs where there is usually, but not always, a corresponding resume FIND (options=2) for every nested FIND (options=3). For an example of how you can use END OF MEMBER calls to perform stack management, see topic ***.
Table 17 summarizes the LIBRARY exit processing.
| Request Value=Type | Exit Return Code | Action |
|---|---|---|
| 1=OPEN | 0 | Assembler opens its library for input.
If reason code=4, the assembler makes END OF MEMBER calls to the exit. If reason code=16, REINIT call required. |
| 4 | Exit supplies library records.
If reason code=4, the assembler makes END OF MEMBER calls to the exit. If reason code=16, REINIT call required. |
|
| 8 | Both the assembler and the exit supply library records. The
assembler opens its library.
If reason code=4, the assembler makes END OF MEMBER calls to the exit. If reason code=16, REINIT call required. |
|
| 16 | Assembler opens the library 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. |
| 3=READ | 0 | Exit supplies record in buffer. Record with MEND statement indicates end of macro member. |
| 16 | Exit indicates end-of-file for member. | |
| 5=PROCESS
MACRO |
0 | Record accepted. Exit can 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 (disregarded if the EXIT return code from the OPEN is 8). | |
| 6=PROCESS
COPY |
0 | Record accepted. Exit can 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 (disregarded if the EXIT return code from the OPEN is 8). | |
| 7=FIND
MACRO |
0 | Macro member found by exit; the exit supplies the
records.
If options=3, the exit should save the current member position. If options=2, the exit should restore the previous member position. If reason code=4, exit supplies data set information. If reason code=8, redrive requested. 1 |
| 4 | Macro member not found by exit; the exit does not supply the records. | |
| 8=FIND
COPY |
0 | Copy code member found by exit; the exit supplies the
records.
If options=3, the exit should save the current member position. If options=2, the exit should restore the previous member position. If reason code=4, exit supplies data set information. If reason code=8, redrive requested. 1 |
| 4 | Copy code member not found by exit; the exit does not supply the records. | |
| 9=END OF
MEMBER |
Exit may use the information to perform stack management.
If reason code=8, redrive requested. 1 |
|
| 10=REINIT | 0 | Operation successful.
If reason code=8, redrive requested. 1 |
| 16 | Assembler makes no further calls to the exit. | |
|
Notes:
|
||
[ Top of Page | Previous Page | Next Page | Contents | Index ]