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: 8796
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: 6248
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: 6248
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 MacKinney Batch to CICS upgrade causi... CICS 7
No new posts Run rexx with JCL Job CLIST & REXX 1
No new posts Run rexx in batch job CLIST & REXX 7
No new posts Does anyone know rexx for VSE CLIST & REXX 3
No new posts Excuting store procedure via JCL batch JCL & VSAM 1
Search our Forums:

Back to Top