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

Access files in DD name in a jcl thru REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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: 2358
Location: Israel

PostPosted: Thu May 21, 2009 3:44 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Thu May 21, 2009 3:58 pm
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
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

Global Moderator


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

PostPosted: Thu May 21, 2009 9:49 pm
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: 8797
Location: Welsh Wales

PostPosted: Thu May 21, 2009 10:11 pm
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 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 Write line by line from two files DFSORT/ICETOOL 7
Search our Forums:

Back to Top