The C1PRMGEN solution in the knowledge base is specific to the IGYCRCTL compiler, rather than the IEV90 assembler, and the CONPARMX seems to be quite complicated / cumbersome to use.
However...
The superseding assembler ASMA90 (IEV90 was retired 29 years ago, in 1995!) does accept parameters from a DDNAME, called ASMAOPT.
So the solution I eventually used was quite close to what I had in the original question:
//ASSEMBLE EXEC PGM=ASMA90,MAXRC=4
//*
//IFDEBUG IF ((&LMIPG4 EQ 'G') OR (&LMIPG5 EQ 'G')
// OR (&LMIPG6 EQ 'G') OR (&LMIPG7 EQ 'G')) THEN
//ASMAOPT DD *
&PMASMDBG
/*
//LSDEBUG ELSE
//ASMAOPT DD *
&PMASMUSR
/*
//NDDEBUG ENDIF
//*
...
And to answer a question from Eoin, "Debug" is switched on by the user specifying a different processor - specifically one that has a "G" in the processor group name, either as character 4, 5, 6 or 7.
Adding assembler debug support also requires the creation of a SYSADATA file, plus the post-processing of that file to create an IDILANGX file, so it makes sense for it to be under the control the Endevor Administrator (one request, they create the debug processor groups and associated required output datasets for that System) rather than relying an end-user specifying DEBUG=YES within user data or a comment.
But thanks for the suggestions (and Jim Aggersbury for ploughing through the assembler manual) which I sure are useful in other situations.
And as Eoin wrote, "plus to the vote to support PARMFILE in processors"
Original Message:
Sent: Sep 19, 2024 04:44 AM
From: Ollivier-Francois Dorso
Subject: Running assembler in processor with 2 different possible parameters
Hi Charles,
I agree about the solution with CONPARMX suggested by Eoin.
There is another solution with C1PRMGEN, see KD https://knowledge.broadcom.com/external/article?articleNumber=98339
Let me know which one matches best your need.
Regards,
Ollivier
Original Message:
Sent: Sep 18, 2024 12:22 PM
From: Charles Gaskell
Subject: Running assembler in processor with 2 different possible parameters
Hi,
I'm adding DEBUG support into my GASM processor which assembles Assembler source, and need to run IEV90 with different parameters, depending on whether they need debug or not. PGM=IEV90,PARMDD=PARMFILE (available since zOS 2.1) looks like it should work a treat:
//*--------------------------------------------------------------------
//* ASSEMBLE THE PROGRAM
//*--------------------------------------------------------------------
//IF3 IF (RC LE 4) THEN
//ASSEMBLE EXEC PGM=IEV90,MAXRC=4,
// PARMDD=PARMFILE
//*
//IFDEBUG IF ((&LMIPG4 EQ 'G') OR (&LMIPG5 EQ 'G')
// OR (&LMIPG6 EQ 'G') OR (&LMIPG7 EQ 'G')) THEN
//PARMFILE DD *
&PMASMDBG
/*
//LSDEBUG ELSE
//PARMFILE DD *
&PMASMUSR
/*
//NDDEBUG ENDIF
...
but unfortunately I get this out of the Processor translation step:
16:54:03 C1X0206E STMT 24 INVALID--KEYWORD PARMDD IS NOT SUPPORTED
What should I do instead? There's a whole load of complicated logic around //SYSLIB files etc. so I really don't want to repeat the //ASSEMBLE EXEC PGM=IEV90 step twice in the processor, with different parms...