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
 

 

REXX to create a new GDG version. ( not base )

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

New User


Joined: 11 Jul 2007
Posts: 68
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

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
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: 8593
Location: Back in jolly old England

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: 8593
Location: Back in jolly old England

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
Abhishek_snn

New User


Joined: 07 Nov 2008
Posts: 2
Location: New Delhi

PostPosted: Wed Dec 10, 2008 10:24 am    Post subject: This is not working...
Reply with quote

Hi Expat,

I tried using this by changing the "YOUR GDG BASE" to a real base "TTYY.SINHAAA.TESTABC"

It gives error at !! in line 2. Should this not be ||? Also, Why do we have G0000V00?

In line 8, that +13 is the length of the base if I am not wrong?

Could not understand this whole line <NG = STRIP(OVERLAY(RIGHT(1+SUBSTR(DSN,VX,4),4,'0'),DSN,VX,4)) >

I am new to REXX and it would be a great help if you could please take some time out to answer these queries of mine.

Regards,

Abhishek
Back to top
View user's profile Send private message
Abhishek_snn

New User


Joined: 07 Nov 2008
Posts: 2
Location: New Delhi

PostPosted: Wed Dec 10, 2008 11:11 am    Post subject: Its working....
Reply with quote

Hi Expat,

Its working. Thanks for your support.

Regards,

Abhishek
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
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am


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