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

SYSDSN not working in Batch REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Amb

New User


Joined: 12 Mar 2010
Posts: 64
Location: India

PostPosted: Tue May 31, 2011 1:03 pm
Reply with quote

Hi,

I am executing a REXX program from a JCL using IKJEFT01 utility.

In my REXX program I have the following logic. It searches for the existence of a member and does some processing.
The below loop runs 'n' number of times where 'n' is the number of members present in the PDS.

x = SYSDSN('A.B(member)')

if x <> "OK" then
Do
---- Some Logic
End
else
Do
---- Some Logic
End

The SYSDSN statement is not wroking. Once the first member is found and return code is "OK" after that for all the other members I am getting the
below message

"ERROR PROCESSING THE REQUIRED DATASET"


However if I run the above REXX in online mode then it works.

Pls help.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 31, 2011 1:12 pm
Reply with quote

What you have posted is about as much use as a chocolate tea pot.
It tells us absolutely nothing.

Were there no error codes issued.
Did you trace the REXX.
What have YOU actually done to resolve before posting.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue May 31, 2011 1:53 pm
Reply with quote

I agree with expat, give some more information.

Just a guess, are you opening the file for write (DISKW)?

Also look here:
ibmmainframes.com/about35604.html
publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.ikja300/ikj4a37051.htm
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Tue May 31, 2011 2:16 pm
Reply with quote

Amb wrote:
The below loop runs 'n' number of times where 'n' is the number of members present in the PDS.

Do you have a list of "members present in the PDS" ?
If yes, why do you need to run SYSDSN ?
If no, LISTDS is more appropriate.

Are you sure the message "ERROR PROCESSING THE REQUIRED DATASET" comes from SYSDSN ?

1. Run with TRACE
2. Show us the exact code used for the SYSDSN command.
Back to top
View user's profile Send private message
Amb

New User


Joined: 12 Mar 2010
Posts: 64
Location: India

PostPosted: Tue May 31, 2011 2:53 pm
Reply with quote

Thanks
I coded the DYNMBR parameter and the problem was solved.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue May 31, 2011 3:00 pm
Reply with quote

Good! icon_smile.gif
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top