That's the problem: the punch is generated inside a macro call in the middle
of the source program, based on certain dynamic conditions and the binder
can be executed in another day.

Thanks
João

-----Mensagem original-----
De: IBM Mainframe Assembler List <[email protected]> Em nome
de Jonathan Scott
Enviada em: quarta-feira, 6 de março de 2024 15:37
Para: [email protected]
Assunto: Re: HLASM PUNCH statement

As documented, the HLASM PUNCH statement output is processed
during the same pass as generating object code, so if any
earlier statement causes object code to be generated, then it
will not be the first output, and the object deck will not be
valid for the binder.

To avoid that problem, you would need to ensure that you do not
generate any object code until after the macro.  For a single
assembly, there is no way to get round that.

If you use the BATCH option, you can generate object code from
more than one assembly in the same file, so for example you
could generate a PUNCH statement by a separate assembly after
the END statement of the main program, or before the start.
That would be a separate assembly that could not make use of any
conditional assembly variables shared with the main program,
although it could for example use the same &SYSPARM or the
variables &SYSIN_DSN and &SYSIN_MEMBER containing the input data
set information.

Jonathan Scott, HLASM
IBM Hursley, UK

Reply via email to