Thanks, you find the problem. Now I remember I didn't quote X because I wanted the opts to be case insensitive. I'll choose another variable name for OUTTRAP statement. Thanks again for your help.
在2008-09-06 21:07:09,"Gerhard Postpischil" <[EMAIL PROTECTED]> 写道: >--- Neo wrote: > >> DO FOREVER >> >> WHEN OPTS = X > > >> OBJ_D2: >> X = OUTTRAP("COMP_VAR",5,"CONCAT") > >The loop terminates only when your PULL OPTS (why just PULL in >the routine) matches the value in variable X, which you are >changing with the OUTTRAP. If you meant to have variables in >OBJ_D2 local only, you need to change it to a PROCEDURE, with >explicit definitions of non-local variables. The simplest fix is >to change the original WHEN to OPTS = 'X' > >Gerhard Postpischil >Bradford, VT > >---------------------------------------------------------------------- >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 > ---------------------------------------------------------------------- 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