On 5/10/2007 6:22 AM, David Eisenberg wrote:
So, as you want 2 ampersands you need to use 4, and thus I suggest trying:
   IF &SUBSTR(&K,&L)=A THEN SET &X=&STR(&X) &&&&OPTA
   ELSE IF &SUBSTR(&K,&L)=B THEN SET &X=&STR(&X) &&&&OPTB
   ELSE IF &SUBSTR(&K,&L)=C THEN SET &X=&STR(&amp;X) &&amp;&&amp;OPTC<

I've tried things like that; it is absolutely not that simple. I just tried this solution; it sets X to a single ampersand concatenated only to the last expression. For example, if the user enters "ABC", the result is "&OPTC".

There's something more to it than just doubling the ampersands.

You're right; sorry. That will work for the first assignment, but not the subsequent times. Lizette's idea of using &NRSTR or &SYSNSUB is probably what you need.

        ... THEN SET &X = &SYSNSUB(1,&X) &&&&OPTA
or possibly
        ... THEN SET &X = &SYSNSUB(1,&X) &NRSTR(&&OPTA)

See http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4B840/6.13?SHELF=EZ2ZO10I&DT=20060627214234 or http://preview.tinyurl.com/2gkwe8

and http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4B840/6.5?SHELF=EZ2ZO10I&DT=20060627214234
or http://preview.tinyurl.com/224965

        Walt Farrell, CISSP
        z/OS Security Design, IBM

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to