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
 

 

How to create a GDG base through REXX utilty

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Velkumar

New User


Joined: 23 Apr 2007
Posts: 18
Location: India

PostPosted: Thu Apr 26, 2007 6:14 pm    Post subject: How to create a GDG base through REXX utilty
Reply with quote

Hi

I need to create a GDG base through REXX. If anyone is having the code, will you be able to help?

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

superk

Moderator Team Head


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

PostPosted: Thu Apr 26, 2007 6:23 pm    Post subject: Re: How to create a GDG base through REXX utilty
Reply with quote

Does your REXX exec run under TSO? Is it running in the foreground or in batch?

If it's running under TSO in either foreground or batch, why don't you just use the same TSO command you use for defining GDG bases already?

If it's running under some other environment, you can always call IDCAMS.

Either way should work.

Here are some links to review:

DEFINE GENERATIONDATAGROUP command.

The TSO CALL Command.

z/OS V1R7.0 TSO/E REXX Reference.
Back to top
View user's profile Send private message
Velkumar

New User


Joined: 23 Apr 2007
Posts: 18
Location: India

PostPosted: Thu Apr 26, 2007 6:27 pm    Post subject: Re: How to create a GDG base through REXX utilty
Reply with quote

Hi

It truns under TSO batch only. But how to write the IDCAMS utility in REXX. I think the JCL below will not work in REXX.

//GDG EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=X
//SYSIN DD *
DEFINE GDG(NAME('TESTM.CAA5015.P41049XF') LIM(3) SCR)
/*
//

How to execute the above in REXX
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Thu Apr 26, 2007 6:41 pm    Post subject: Re: How to create a GDG base through REXX utilty
Reply with quote

Here's an example of two different methods:

Code:

/* REXX Define GDG Base */                                       
"DEFINE GDG(NAME('TESTM.CAA5015.P41049XF') LIM(3) SCR)"           
                                                                 
"ALLOC DD(SYSPRINT) DA(*) REU"                                   
"ALLOC DD(SYSIN) NEW REU"                                       
Queue "  DEFINE GDG(NAME('TESTM.CAA5015.P41049XF') LIM(3) SCR)" 
"EXECIO "Queued()" DISKW SYSIN (FINIS"                           
"CALL *(IDCAMS)"                                                 
"FREE DD(SYSPRINT SYSIN)"                                       
Back to top
View user's profile Send private message
Velkumar

New User


Joined: 23 Apr 2007
Posts: 18
Location: India

PostPosted: Fri Apr 27, 2007 10:49 am    Post subject: Re: How to create a GDG base through REXX utilty
Reply with quote

Hi

Thanks. Its working fine. Is it possible to accept the system date and use it in the name of the GDG.
In the GDG base file I need to have the sysyen date to be appended to the last qualifier of the GDG base name.

The file will be look like TSP.CAT007.BD270406
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Fri Apr 27, 2007 12:01 pm    Post subject:
Reply with quote

Use the DATE() built-in function when you set the dataset name.

O.
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: Fri Apr 27, 2007 12:45 pm    Post subject:
Reply with quote

Sounds like you may want to look into expanding your user catalog environment too if you are going to create a GDG base and entries using the date as part of the base name on a very regular basis.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 5 Thu Apr 27, 2017 1:15 am
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm


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