IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Recursive clist error while passing data from ISPF to CLIST


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
neerajpeddu

New User


Joined: 03 Feb 2006
Posts: 25
Location: Calgary, AB

PostPosted: Thu Apr 09, 2009 12:20 am
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 09, 2009 12:36 am
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Apr 09, 2009 12:42 am
Reply with quote

Are you thinking about that "&NRSTR" CLIST function?
Back to top
View user's profile Send private message
neerajpeddu

New User


Joined: 03 Feb 2006
Posts: 25
Location: Calgary, AB

PostPosted: Thu Apr 09, 2009 2:13 am
Reply with quote

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
View user's profile Send private message
neerajpeddu

New User


Joined: 03 Feb 2006
Posts: 25
Location: Calgary, AB

PostPosted: Thu Apr 09, 2009 2:24 am
Reply with quote

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
View user's profile Send private message
neerajpeddu

New User


Joined: 03 Feb 2006
Posts: 25
Location: Calgary, AB

PostPosted: Thu Apr 23, 2009 9:54 pm
Reply with quote

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
View user's profile Send private message
neerajpeddu

New User


Joined: 03 Feb 2006
Posts: 25
Location: Calgary, AB

PostPosted: Thu Apr 23, 2009 10:28 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 23, 2009 10:34 pm
Reply with quote

neerajpeddu,

thx for getting back
and
congratulations for being able to solve it.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts Looking for a little history of ISPF ... TSO/ISPF 5
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
Search our Forums:

Back to Top