Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Recursive clist error while passing data from ISPF to CLIST

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Recursive clist error while passing data from ISPF to CLIST
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: 6968
Location: porcelain throne

PostPosted: Thu Apr 09, 2009 12:36 am    Post subject:
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

Moderator Team Head


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

PostPosted: Thu Apr 09, 2009 12:42 am    Post subject: Reply to: Recursive clist error while passing data from ISPF
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    Post subject: Reply to: Recursive clist error while passing data from ISPF
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    Post subject: Reply to: Recursive clist error while passing data from ISPF
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    Post subject: Reply to: Recursive clist error while passing data from ISPF
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    Post subject: Reply to: Recursive clist error while passing data from ISPF
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: 6968
Location: porcelain throne

PostPosted: Thu Apr 23, 2009 10:34 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us