Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Execio and JCL Proc to write PDS members 1

Status
Not open for further replies.

rexx8me

Programmer
Jan 7, 2011
3
US
I am new to Rexx and JCL so please be kind.. :)
I am writing a JCL Proc that will execute a REXX program. The program will read a file and write lines of text into multiple members. The member names will be found by the REXX program. My question is how do I write the members using the JCL Proc? So, I have my REXX EXECIO statement without my ALLOC and my JCL uses the label OUTDATA. My biggest problem is trying to get the JCL to understand the name of the new member it needs to write. The JCL does know the PDS that the member belongs to. I hope I was clear enough. Thank you in advance for your help.
 
Remove the OUTDATA DD statement from your JCL and do the full allocation/deallocation within Rexx. You will have to allocate and deallocate the PDS for EACH member.


Nic
 
Thanks, Nic. The Rexx program currently writes all the PDS Members just fine but I wanted to do this in a Batch process. So are you saying that there is no way to take out the Alloc statement in the REXX and passing it to the Proc when using PDS members?
 
You would have to have 1 DDname for EACH member - fine if you only have handful but if you have loads you could run up against the step DD limit (255 I think, or was).

If it runs ok interactively then do not muck with it - just run as-is under IKJEFT01 or whichever IKJEFTxx you need.


Nic
 
Thanks, Nic.
I think I will just let it do its thing.

I appreciate all your help.
 
An alternative would be to have your rexx program file tailor a JCL that calls the proc as an instream proc. This probably requires the first job to sub a second job. But more complex when you could just do it within the code. :)
 
Or alternatively use file tailoring to create the members instead of EXECIO; each call to FTCLOSE allows you to specify the member name it is going to write. So you'd only need one DD card pointing to the library.

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
Create the output in IEBUPDTE format. Then, the next step could actually run IEBUPDTE and create the members that way.
 
IEBUPDTE, now that really is old-school. Sadly, I did exactly that about three weeks ago for another problem I was dealing with, and it works just fine [smile]

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top