Endevor

 View Only
  • 1.  Running assembler in processor with 2 different possible parameters

    Posted 22 days ago

    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...   



  • 2.  RE: Running assembler in processor with 2 different possible parameters

    Posted 22 days ago

    First of all, plus to the vote to support PARMFILE in processors, that deserves its own ideation!

    But it sounds like what you want is covered by CONPARMX. Yes it can be a bit daunting to consider ripping out all that logic, but starting for just one TYPE makes it more approachable.  Still the key factor to consider is how will developers toggle it?  CCID/Comment/Processor Group, or maybe a DD. Going CONPARMX option the path to have per element OPTIONS members.  Then consider IFPARM steps, so the developers might just add a DEBUG=YES and the processor then manipulates the parm, and required DDs. Etc. 



    ------------------------------
    Eoin O'Cleirigh
    Lead Systems Engineer @ ANZ +64273888404
    ------------------------------



  • 3.  RE: Running assembler in processor with 2 different possible parameters

    Broadcom Employee
    Posted 21 days ago

    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 




  • 4.  RE: Running assembler in processor with 2 different possible parameters

    Posted 21 days ago

    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"