MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GDG base creation using Rexx

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
sinduja
Beginner


Joined: 20 Jun 2005
Posts: 29
Topics: 14

PostPosted: Tue Dec 23, 2008 6:10 am    Post subject: GDG base creation using Rexx Reply with quote

Hi ,

I am new to Rexx and have requirement where I need to create gdg base for all jobs in a PDS. Please let me know how this can be done.
The tool should basically jem all the jobs in the PDS and identify the files which do not have GDG base and create them.

Thanks,
Sindu
Back to top
View user's profile Send private message
jim haire
Beginner


Joined: 30 Dec 2002
Posts: 140
Topics: 40

PostPosted: Tue Dec 23, 2008 2:40 pm    Post subject: Reply with quote

This would be an interesting task...

I don't have the exact code for you, but I think the following would be the steps you would follow:
Code:

DO a LISTC on your PDS, returning all JCL members.

DO I = 1 to the number of JCL members
   JEM each member, extracting the datasets
   DO J = 1 to the number of datasets
          x=LISTDSI("'"dataset name here"'")
          retcode = SYSREASON
          If retcode = 0     /*  Convert this file to a GDG  */
                Need to decide what to do here!!!!! :?:
          Else
                File is already a GDG, leave it alone.   
                /*  When I tried this it returned a value of 5 for retcode  */
    END
END

Question So what will you do with datasets you determine should be GDGs. Will you just delete them? What about the contents of the existing dataset? You may want to think about your action here.

To create the file as a GDG, just create a set of JCL within your REXX command
which executes an IDCAMS job for every dataset that needs to be converted. Write this JCL to a partitioned dataset that you have pre-defined. SUBMIT the JCL within your REXX to create the GDG.

The reason I ask you to write the JCL to a partitioned dataset is so that you have
an audit trail to determine the JCL which was submitted if your job didn't work correctly. You can change the JCL and re-submit from your JCL library.

If you are new to REXX, I think you may want to have someone with a little more experience help you with this. Very Happy
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Tue Dec 23, 2008 3:06 pm    Post subject: Reply with quote

No need to run batch IDCAMS. the DEFINE command can be run as a TSO command, but Jim's point of keeping a record is a good one so if you choose to use online TSO commands instead of batch IDCAMS jobs, you may still want to save the commands you issue for later use or auditing.
_________________
New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html.
Back to top
View user's profile Send private message Visit poster's website
Ravi
Beginner


Joined: 27 Jun 2005
Posts: 88
Topics: 2

PostPosted: Fri Jan 02, 2009 12:12 am    Post subject: Reply with quote

sinduja, I would recommd to update the forum, once you are comeup with a logic/solution.

I would appreciate it. Mr. Green
Back to top
View user's profile Send private message
sinduja
Beginner


Joined: 20 Jun 2005
Posts: 29
Topics: 14

PostPosted: Mon Jan 05, 2009 3:29 am    Post subject: Reply with quote

I have put this on hold for now, as I have got busy with something else. I will surely update it once I come up with the solution.

And thank you all for your time

Sinduja.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group