Included in ZMF 8.3
I had read the following information about the CLR= parameter that is passed to the CMNSRCPP program via SYSIN DD:
- CLR=YES is the default. This parameter tells CMNSRCPP whether (YES) to delete all
pre-existing source-to-copy records for the component in the current package before
proceeding. That is, we are using CMNSCRPP to record both macros and copybooks. - CLR=NO means that pre-existing source-to-copy records will not be deleted. CLR=NO
should only be specified where CMNWRITE will have cleared the source-to-copy
records before adding entries for copybooks. CMNSRCPP then adds entries for macros
only.
This makes sense for the a regular single assembly build procedure, such as done via the delivered CMNASM ISPF skeleton. The way CMN$$WPP is currently coded:
)SEL &ADATA NE Y
CLR=NO
)ENDSEL &ADATA NE Y
it takes into account, when &ADATA is not "Y", to not clear the source-to-copybook information created by CMNWRITE when copybooks are processed with CMNWRITE and macros are processed separately with CMNSRCPP.
However, if a build procedure is set up that will do a double (or more) assembly, then source-to-copybook and/or source-to-macro relationship will be deleted when the second assembly is done. Granted, in most cases, the exact same program will be used in the first and second assemble, resulting in no actual loss in source-to-copybook and source-to-macro information. However, some vendor applications have very unusual compile requirements and have their own source pre-processors which could change which copybooks (and possibly even macros) are used in the first assemble compared to the second assemble. And capturing all the source-to-copybook and source-to-macro information is desirable (vs. losing it), even if duplicate relationships are created. I suppose that when ChangeMan ZMF internally updates the final list of source-to-copybook and source-to-macro information for a given build, it will need to ensure that duplicate relationships are eliminated.
So, in order to capture any different copybooks and macros used in the second, third, fourth, etc. assemble for a given staging of an assembler program, instead of the following:
)SEL &ADATA NE Y
CLR=NO
)ENDSEL &ADATA NE Y
we could do the following:
)SEL &ADATA NE Y OR &C#C GT 1
CLR=NO
)ENDSEL &ADATA NE Y OR &C#C GT 1
#Source-to-Copybook
#Assemble
#MultipleAssembles
#Source-to-Macro