I have inherited responsibility for a CLIST; this is not
>my forte. I'm
>trying to do something pertaining to the ampersand
>character, and despite my
>efforts, I cannot figure this out. As God is my witness,
>this is not a
>homework assignment (I'm a BAL programmer, not a sysprog).
>
>I've carved out and simplified the relevant portion of the
>CLIST for
>perusal:
>
>WRITENR ===>
>READ L
>DO &K=1 TO &LENGTH(&L)
> 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(&X) OPTC
>END
>WRITE &X
>
> ...
Replace your DO-loop and the WRITE statement with the following:
DO &K=1 TO &LENGTH(&L)
IF &SUBSTR(&K,&L)=A THEN SET &X=&STR(&NRSTR(&X)) &NRSTR(&&OPTA)
ELSE IF &SUBSTR(&K,&L)=B THEN SET &X=&STR(&NRSTR(&X)) &NRSTR(&&OPTB)
ELSE IF &SUBSTR(&K,&L)=C THEN SET &X=&STR(&NRSTR(&X)) &NRSTR(&&OPTC)
END
WRITE &NRSTR(&X)
See the TSO/E CLISTS manual for more information on &NRSTR.
Tim Cardozo
State of California, Franchise Tax Board
----------------------------------------------------------------------
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