At 15:39 +0000 on 11/02/2013, esst...@juno.com wrote about Some Help
with Conditional Assembly:

Could someone please provide an example as to how to test for
the conditions above in a Macro.

Others have done this. I will add that you should do a sanity check
and make sure exactly ONE of the 3 parms have been used. This can be
done this way:


&PARMS SETA 0
       AIF (T'&L EQ "O").NOLENGTH
&PARMS SETA &PARMS+1
.NOLENGTH AIF (T'&S EQ "O").NOSOURCE
&PARMS SETA &PARMS+1
.NOSOURCE AIF (T'&T EQ "O").NOTARGET
&PARMS SETA &PARMS+1
.NOTARGET AIF (T'&PARMS EQ 1).PARMSOK
          MNOTE 4,'ONLY THAN 1 PARM NOT DEFINED'
          MEXIT
.PARMSOK  ANOP
 .*       CODE GOES HERE


This insures that you have one of the three given a value and issues
an MNOTE of none or more than 1 are defined.

Reply via email to