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 Profile Log in to check your private messages Log in
 
SYSDSN not working in Batch REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: SYSDSN not working in Batch REXX
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: 8593
Location: Back in jolly old England

PostPosted: Tue May 31, 2011 1:12 pm    Post subject:
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

Senior Member


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

PostPosted: Tue May 31, 2011 1:53 pm    Post subject:
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:
http://ibmmainframes.com/about35604.html
http://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: 1243
Location: Israel

PostPosted: Tue May 31, 2011 2:16 pm    Post subject: Re: SYSDSN not working in Batch REXX
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    Post subject:
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

Senior Member


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

PostPosted: Tue May 31, 2011 3:00 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 4 Tue Sep 19, 2017 1:39 pm
No new posts LIBDEF not working in called proc packerm CLIST & REXX 0 Fri Sep 15, 2017 7:22 pm
No new posts Generate public-private key in batch ... vasanthz All Other Mainframe Topics 3 Fri Sep 15, 2017 9:20 am
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

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