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
 

 

Access files in DD name in a jcl thru REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
dkarthikreddy

New User


Joined: 14 Mar 2008
Posts: 28
Location: bangalore

PostPosted: Thu May 21, 2009 3:35 pm    Post subject: Access files in DD name in a jcl thru REXX
Reply with quote

Hi,

Below is a jcl which executes REXX EXEC1. The parm to this rexx is a gdg base 'YOUR.GDG.BASE'.
The rexx is finding out the oldest version of the gdg base usign LISTDS command and then we have to copy the file into BACKUP dd name after the copy is complete we have to rename the file to OUTFILE.
We are unable to access BACKUP and OUTFILE from the rexx.

One way is to read all the records in oldest version of GDGBASE using EXECIO and then writing them on to the other files.

Is there any other way to do this?

Like COPY command or RENAME command?

Please help us how to access these dd names from within the REXX.

//JS020 EXEC PGM=IKJEFT01,
// PARM=('%EXEC1',
// 'YOUR.GDG.BASE'),
// REGION=4096K,
// DYNAMNBR=30
//SYSEXEC DD DSN=SYSEXEC concatenation,
// DISP=SHR
//OUTFILE DD DSN=YOUR.OUTPUT.TEMP.FILE,
// DISP=(NEW,CATLG,DELETE)
//BACKUP DD DSN=YOUR.BACKUP.FILE(+1),
// DISP=(NEW,CATLG,DELETE)
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu May 21, 2009 3:44 pm    Post subject:
Reply with quote

You can invoke SORT/IEBGENER/IDCAMS REPRO etc. from within your REXX.

O.
Back to top
View user's profile Send private message
dkarthikreddy

New User


Joined: 14 Mar 2008
Posts: 28
Location: bangalore

PostPosted: Thu May 21, 2009 3:52 pm    Post subject: Reply to: Access files in DD name in a jcl thru REXX
Reply with quote

HI,

Thanks for your Immediate reply.

We are planning to reuse this component. So the BACKUP and OUTFILE DSN names will change. Can IEBGENER or other programs handle that.

I suppose we will have to hard code the DSN if we use any of the above mentioned utilities.

Thanks
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: Thu May 21, 2009 3:58 pm    Post subject:
Reply with quote

DFdss allows the use of relative GDS
Back to top
View user's profile Send private message
dkarthikreddy

New User


Joined: 14 Mar 2008
Posts: 28
Location: bangalore

PostPosted: Thu May 21, 2009 4:02 pm    Post subject: Reply to: Access files in DD name in a jcl thru REXX
Reply with quote

Hi expat,

Could you please expand in detail what u r trying to explain, so that it would be much helpful for us.

Thanks
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2051
Location: Silicon Valley

PostPosted: Thu May 21, 2009 9:49 pm    Post subject: Reply to: Access files in DD name in a jcl thru REXX
Reply with quote

Quote:
We are unable to access BACKUP and OUTFILE from the rexx.

What kind of errors are you seeing when you try to access?
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: Thu May 21, 2009 10:11 pm    Post subject: Re: Reply to: Access files in DD name in a jcl thru REXX
Reply with quote

dkarthikreddy wrote:
Hi expat,
Could you please expand in detail what u r trying to explain, so that it would be much helpful for us. Thanks

DFdss is a tool for backup and restore of data. It can produce single or duplex output from one run.

Also consider ICETOOL to create multiple copies of a dataset.

Do you mean oldest as lowest generation or did you really mean the newest generation.

For Dfdss you can use a relative GDS in the control statements, and for ICETOOL you can specify the relative generation in the JCL.

These methods do assume that the number of generations in existance are constant.
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 REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am


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