View previous topic :: View next topic
|
Author |
Message |
sunny_io
New User
Joined: 11 Jul 2007 Posts: 68 Location: noida
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Abhishek_snn
New User
Joined: 07 Nov 2008 Posts: 2 Location: New Delhi
|
|
|
|
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 |
|
|
Abhishek_snn
New User
Joined: 07 Nov 2008 Posts: 2 Location: New Delhi
|
|
|
|
Hi Expat,
Its working. Thanks for your support.
Regards,
Abhishek |
|
Back to top |
|
|
|