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

Creation of GDG using rexx


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

New User


Joined: 06 Jun 2007
Posts: 58
Location: Hyderabad

PostPosted: Thu Aug 09, 2007 6:59 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 09, 2007 7:20 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Aug 10, 2007 12:10 am
Reply with quote

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
View user's profile Send private message
shchan

New User


Joined: 06 Jun 2007
Posts: 58
Location: Hyderabad

PostPosted: Fri Aug 10, 2007 2:24 pm
Reply with quote

Hi
Apart from invoking IDCAMS from rexx do we have any other method?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Aug 10, 2007 2:25 pm
Reply with quote

Or do you mean using REXX code to define a +1 generation ?
Back to top
View user's profile Send private message
shchan

New User


Joined: 06 Jun 2007
Posts: 58
Location: Hyderabad

PostPosted: Fri Aug 10, 2007 4:35 pm
Reply with quote

Thanx expat,
I do not mean defining a +1 generation but to create the base version.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Fri Aug 10, 2007 5:23 pm
Reply with quote

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
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 Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top