Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Nesting COPY instructions and macro definitions HLASM Programmer's Guide SC26-4941-06 |
|
The assembler lets you code COPY instructions and macro call instructions in copy code members. It also lets you code COPY instructions in macro definitions. This type of coding is described as nesting. If the exit is processing a member, and supplies a record to the assembler containing a COPY instruction or a macro call instruction, the assembler calls the exit with a request type of FIND COPY or FIND MACRO. In this case, the exit needs to save the position in the currently active member before reading the new copy code or macro member. This enables the exit to resume processing the currently active member after it finishes with the new member. The assembler indicates that it is processing a new (or nested) member by setting the options field to 3. When the assembler finishes processing the new member and resumes the previous (or outer) member, it issues a FIND call to the exit with the options field set to 2 indicating that the previous member is resumed. After the FIND call is complete, the assembler continues with PROCESS or READ calls to the exit for the previous member. When the assembler calls the exit with a FIND COPY or FIND MACRO request, and the options field is set to 3, the exit should save the current member control information in a stack. When the assembler calls the exit with a FIND COPY or FIND MACRO request, and the options field is set to 2, the exit should restore the previous member control information from the stack. The next READ request expects the next record from the previous member. The assembler does not limit the number of levels of nesting. There is a corresponding FIND (resume) request for every successful
nested FIND request, except under the following situations:
If the FIND COPY or FIND MACRO is unsuccessful, the position in the currently active member should not be affected. |
Copyright IBM Corporation 1990, 2014
|