Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
REXX to create a new GDG version. ( not base )

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
sunny_io

New User


Joined: 11 Jul 2007
Posts: 22
Location: noida

PostPosted: Thu May 22, 2008 4:06 pm    Post subject: REXX to create a new GDG version. ( not base )
Reply with quote

Hi All

Following is what i've written in REXX to define a GDG base.
Pls suggest code to create a version

----------------------------------------------------
* 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
References
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 3070
Location: italy

PostPosted: Thu May 22, 2008 4:11 pm    Post subject: Reply to: REXX to create a new GDG version. ( not base )
Reply with quote

no need to invoke idcams...
DEFINE is a supprted TSO command..
Address TSO "DEFINE blah... blah..."
is enough

search the forum or google for BPXWDYN
to find out how to allocate a generation
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 3505
Location: Brussels once more ...

PostPosted: Thu May 22, 2008 4:14 pm    Post subject:
Reply with quote

It has been posted by me on the forum before ................. I think.

Do a search with expat as the author and if not I will post again when I get time ......................... or if icon_neutral.gif

Although if this REXX will run in batch, then the +1 GDG can be allocated in the JCL that is submitted. Much easier.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 3505
Location: Brussels once more ...

PostPosted: Thu May 22, 2008 4:30 pm    Post subject:
Reply with quote

Code:

GDG = "YOUR GDG BASE"                                               
DSN = STRIP(GDG!!".G0000V00")                                       
X=OUTTRAP(LST.)                                                     
" LISTC ENT('"GDG"')"                                               
X=OUTTRAP(OFF)                                                     
DO A = LST.0 TO 1 BY -1                                             
  IF POS('NONVSAM',LST.A) > 0 THEN DO                               
    DSN = SUBSTR(LST.A,POS('NONVSAM',LST.A)+13,44)                 
    A = 0                                                           
  END                                                               
END                                                                 
VX = LENGTH(STRIP(DSN)) - 6                                         
NG = STRIP(OVERLAY(RIGHT(1+SUBSTR(DSN,VX,4),4,'0'),DSN,VX,4))       
"ALLOC FI(MST) NEW TRACKS SPACE(5 3) RECFM(F B) LRECL(8) DA('"NG"')"
"FREE FI(MST)"                                                     
DROP LST.                                                           
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1