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

How to open a (+0) or (-1) generation of a file thru REXX?


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dvpkumar217

New User


Joined: 01 Sep 2007
Posts: 11
Location: Baltimore, MD US

PostPosted: Tue Sep 11, 2007 2:20 am
Reply with quote

My requirement is to open a file which is coded in the format:
(Userid).TEST.TEMP(-n). Where n can vary from 0 to any number.

Can we accomplish this task thru REXX or TSO cmd?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Sep 11, 2007 3:10 am
Reply with quote

Hello,

I believe you need to first convert your "relative" generation to the absolute dataset name (Userid.TEST.TEMP.GnnnnVnn) and open that.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Sep 11, 2007 6:54 am
Reply with quote

Yep.

REXX reads only from DD names. If you run the REXX in batch, you can define the DD and GDG in your JCL, and then read from it or write to it with EXECIO.

A referral to a GDG by relative generation number is strictly a JCL construct.
Back to top
View user's profile Send private message
mguolo

New User


Joined: 23 Jun 2006
Posts: 1

PostPosted: Wed Sep 12, 2007 8:22 pm
Reply with quote

You can do it inside the rexx program thru the LISTCAT tso command and put the result in a stem, after this you can get the name of your dataset name and then allocate it thru the ALLOCATE command.
icon_lol.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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top