View previous topic :: View next topic
|
Author |
Message |
neerajpeddu
New User
Joined: 03 Feb 2006 Posts: 25 Location: Calgary, AB
|
|
|
|
Hi there,
I am getting the following error when I am trying to pass an & from the ISPF panel to the CLIST function. It seems that the program does not like receiving & from the ISPF Panel fields. I was wondering if there is a way to overcome this issue.
Could you please let me know if any of you ever came across this error and if so how this was resolved. Any help in this regard is greatly appreciated.
'PROGRAM ABCDEF01 ABENDED WITH COND COND: ' 900
IKJ56861I FILE FILENAM1 NOT FREED, DATA SET IS OPEN
FREE FILE(FILENAM1)
IKJ56545I THIS STATEMENT HAS CAUSED A RECURSIVE CLIST ERROR
***
Just so that you have the background on this issue, The field on the ISPF panel is a company name and the value for example in the field has been entered as "ABC & Company". CLIST does not like the character & that is passed to it and causes a recursive clist error. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
one of the many, many, many reasons I stopped CLISTs and learned REXX is this very thing.
I believe you need to qualify your argument in the CLIST as &STR(arg) or something, so that CLIST does not try to interpret the & within the string.
Superk has provided the solution (either here or else where).
He is around tonight, with luck (your's) he will see this Thread and post. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Are you thinking about that "&NRSTR" CLIST function? |
|
Back to top |
|
|
neerajpeddu
New User
Joined: 03 Feb 2006 Posts: 25 Location: Calgary, AB
|
|
|
|
Thank you Dick. Yes, I did use &STR(arg) in my code. Could there be any other reason why I can get this error?! Can you please point me to the solution SuperKevin had given in the past.
Thank you very much. |
|
Back to top |
|
|
neerajpeddu
New User
Joined: 03 Feb 2006 Posts: 25 Location: Calgary, AB
|
|
|
|
Thank you SuperK, I did a search on "&NRSTR" and was able to find a couple of posts from past. Thank you for the tip. I'll try using it and see if it works.
Thanks for your help. |
|
Back to top |
|
|
neerajpeddu
New User
Joined: 03 Feb 2006 Posts: 25 Location: Calgary, AB
|
|
|
|
Hello there,
Further to this recursive clist error issue I had, I was able to fix most of the problems using the &NRSTR built in CLIST function. However, I have one piece of code that is causing me grief. I tried different ways but can not make the following code work.
SET C = &STR(&C&SUBSTR(1:&WRK1,&WSPACE))
My understanding of the above code is to take the values passed to variable C and fill the rest with spaces.
For example, let us say variable C contains value "ABCD & company", the above mentioned instruction is causing all kinds of problems.
Has any one enountered this issue before?! Could you please let me know the solution if you were able to fix it?! |
|
Back to top |
|
|
neerajpeddu
New User
Joined: 03 Feb 2006 Posts: 25 Location: Calgary, AB
|
|
|
|
I was able to fix this issue.
SET C = &STR(&C&SUBSTR(1:&WRK1,&WSPACE))
replaced by
SET TC = &STR(&NRSTR(&C)&SUBSTR(1:&WRK1,&WSPACE))
SET C = &NRSTR(&TC) |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
neerajpeddu,
thx for getting back
and
congratulations for being able to solve it. |
|
Back to top |
|
|
|