View previous topic :: View next topic
|
Author |
Message |
shchan
New User
Joined: 06 Jun 2007 Posts: 58 Location: Hyderabad
|
|
|
|
Hi,
Can anyone tell me how to create a GDG using rexx and how to find if a particular GDG or a ps or PDS already exists using rexx? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
GDG creation - why not just code the GDG(+1) in the JCL and access it via the DDname.
To see if a dataset exist, either DSINFO or LISTDSI should work. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
By this
Quote: |
Can anyone tell me how to create a GDG using rexx |
are you asking how to create a new generation or are you asking how to define a new gdg base?
The "create" of a new generation is answered above.
To define a new base, invoke IDCAMS from within your rexx code. |
|
Back to top |
|
|
shchan
New User
Joined: 06 Jun 2007 Posts: 58 Location: Hyderabad
|
|
|
|
Hi
Apart from invoking IDCAMS from rexx do we have any other method? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Or do you mean using REXX code to define a +1 generation ? |
|
Back to top |
|
|
shchan
New User
Joined: 06 Jun 2007 Posts: 58 Location: Hyderabad
|
|
|
|
Thanx expat,
I do not mean defining a +1 generation but to create the base version. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Then yes, you have to use IDCAMS through the proper TSO command:
Code: |
/* REXX */
ADDRESS TSO
"DEF GDG (NAME(GDG01) EMP NSCR LIM(255))"
Exit 0
|
or, as already mentioned, by invoking IDCAMS:
Code: |
/* REXX */
ADDRESS TSO
"ALLOC DD(SYSPRINT) DA(*) REU"
"ALLOC DD(SYSIN) NEW REU RECFM(F B) LRECL(80)"
Queue " DEF GDG (NAME(GDG01) EMP NSCR LIM(255))"
"EXECIO "Queued()" DISKW SYSIN (FINIS"
"CALL *(IDCAMS)"
Exit 0
|
|
|
Back to top |
|
|
|