View previous topic :: View next topic
|
Author |
Message |
Velkumar
New User
Joined: 23 Apr 2007 Posts: 18 Location: India
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
Velkumar
New User
Joined: 23 Apr 2007 Posts: 18 Location: India
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
Velkumar
New User
Joined: 23 Apr 2007 Posts: 18 Location: India
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Use the DATE() built-in function when you set the dataset name.
O. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
|