Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Create GDG

375 views
Skip to first unread message

Terry, Richard

unread,
Mar 5, 2010, 3:51:49 PM3/5/10
to
Is there any way to create a new output member in a GDG from rexx?
For example:

"alloc ddname(outfile) new dsname('file.name(+1)')"

I know this is wrong. Is there a correct way.

Thanks,

RICK TERRY
HP Enterprise Services
CALIFORNIA

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX

Frank Clarke

unread,
Mar 5, 2010, 3:54:50 PM3/5/10
to
On 5 Mar 2010 12:51:49 -0800, richar...@HP.COM (Terry, Richard) wrote:
<4A6A90BD106BBD4ABE464...@GVW1344EXA.americas.hpqcorp.net>

>Is there any way to create a new output member in a GDG from rexx?
>For example:
>
>"alloc ddname(outfile) new dsname('file.name(+1)')"
>
>I know this is wrong. Is there a correct way.

You have to calculate the proper name (with goovoo) and allocate that.


(change Arabic number to Roman numeral to email)

Scott Gonyea

unread,
Mar 5, 2010, 4:06:48 PM3/5/10
to
Isn't it "alloc ddname(outfile) new dsname("||file.name||"(+1))" ??

I don't have an easy way to test at the moment, but I don't see why that
wouldn't be correct-ish. Adding -ish to anything and you're never wrong.

Yours,
Scott Gonyea
Enterprise Information Security Office
(310) 972-4495


The information contained in this electronic message and any attachments
to this message is intended for the exclusive use of the addressee(s) and
may contain confidential or privileged information. If you are not the
intended recipient, please notify the sender at American Honda Motor Co.,
Inc. or scott_...@ahm.honda.com immediately and destroy all copies of
this message and any attachments.

"Terry, Richard" <richar...@HP.COM>
Sent by: TSO REXX Discussion List <TSO-...@vm.marist.edu>
03/05/2010 12:49 PM
Please respond to
TSO REXX Discussion List <TSO-...@vm.marist.edu>


To
TSO-...@vm.marist.edu
cc

Subject
[TSO-REXX] Create GDG

Lizette Koehler

unread,
Mar 5, 2010, 4:34:12 PM3/5/10
to
I am not sure what your intent is for doing this.

But I would think the process might be

1) Allocate GDG (either directly or indirectly)
2) Use LISTDSI to get the GDG number if an indirect allocation used
3) Use program to create a new member
Use the explicit name DSN.GxxxxVxx(member) in the output file

I think this should work.

Lizette

Lizette Koehler

unread,
Mar 5, 2010, 4:44:58 PM3/5/10
to
Though thinking about this some more, TSO does not understand +1 it does
understand 0 -1 etc...

So I think for allocating a GDG I think you would have to do an explicit
allocation rather than the indirect of +1

The first set of messags is for the indirect allocation, the second for an
explicit.

INVALID DATA SET NAME, 'TSO.LK41591.TEST.GDG(+1)'
MISSING DATA SET NAME OR *+
MISSING NAME OF DATA SET TO BE ALLOCATED
RC from ALLOC = 12


RC from ALLOC = 0 TSO.LK41591.TEST.GDG.G0001V00


Lizette

> -----Original Message-----
> From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On
> Behalf Of Terry, Richard

> Is there any way to create a new output member in a GDG from rexx?
> For example:
>
> "alloc ddname(outfile) new dsname('file.name(+1)')"
>
> I know this is wrong. Is there a correct way.
>
> Thanks,
>

----------------------------------------------------------------------

Robert Zenuk

unread,
Mar 5, 2010, 5:18:26 PM3/5/10
to
TSO ALLOCATE does not understand (-1), (0) or (+1). You have to resolve
the GDS name and create the next GOOVOO in sequence and CATALOG it. I
suspect this can be done more elegantly, but here is some quick and dirty code
to resolve the next GDS.

/* rexx - nextgds */
arg gdgbase
if gdgbase = '' then exit(99)
x = outtrap(listc.)
"LISTC LVL('"gdgbase"') ALL"
last = listc.0
do i = 1 to listc.0
if word(listc.i,1) = 'NONVSAM' then
do
parse var listc.i . . gdsdsn
gds = substr(gdsdsn,lastpos('.G',gdsdsn),8)
parse var gds '.G' gdsgen 'V' gdsver .
end
end
if gdsgen < 9999 then
gdsgen = gdsgen + 1
else
do
gdsver = gdsver + 1
gdsgen = '0000'
end
nextgds = gdgbase'.G'right(gdsgen,4,0)'V'right(gdsver,2,0)
say nextgds


In your code "ALLOC F(NEXTGDS) DA("nextgds") ...."


Hope this helps,

Rob


In a message dated 3/5/2010 1:51:32 P.M. US Mountain Standard Time,
richar...@HP.COM writes:

Is there any way to create a new output member in a GDG from rexx?
For example:

"alloc ddname(outfile) new dsname('file.name(+1)')"

I know this is wrong. Is there a correct way.

Thanks,

RICK TERRY
HP Enterprise Services
CALIFORNIA

----------------------------------------------------------------------

Terry, Richard

unread,
Mar 5, 2010, 5:23:29 PM3/5/10
to
Thanks. I will try it. And thanks to everyone else who responded.

Rick

Gilbert C Cardenas

unread,
Mar 5, 2010, 7:37:22 PM3/5/10
to
Somebody on this forum (I think is was Mickey or Gil) gave this example a while back.

X = BPXWDYN("ALLOC DD(XXX) DA('DISK.YOUR.DATASET(+1)') NEW SPACE(1,1)
RECFM(F,B) LRECL(80) DSORG(PS) CATALOG") GDGNT

I've never had to try it but I saved a copy for when I did. I hope I copied it correct.

Rick


Hope this helps,

Rob

Thanks,

This e-mail (and any attachments) may contain information that is confidential and/or protected by law. Any review, use, distribution or disclosure to anyone other than the intended recipient(s) is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and delete all copies of this message.

Mickey

unread,
Mar 5, 2010, 8:51:17 PM3/5/10
to
Yup, I use it almost every day. BPX is just a killer program

--------------------------------------------------
From: "Gilbert C Cardenas" <Gilbert...@GROCERYBIZ.COM>
Sent: Friday, March 05, 2010 7:36 PM

Robert Zenuk

unread,
Mar 5, 2010, 8:55:24 PM3/5/10
to
I had this CRS crap... I saw that too and actually coded up a working
example... Here is some working code to allocate and use a new GDS using
BPXWDYN with the +1 syntax...

arg dsn
if dsn = '' then dsn = 'OPSROZ.TESTX.GDG(+1)'
RC = bpxwdyn("ALLOC FI(GDG) DA('"dsn"') NEW CATALOG SPACE(1,1)",
"CYL UNIT(SYSDA)")
if RC <> 0 then exit RC
gdg.1 = 'test data'
"EXECIO * DISKW GDG (STEM GDG. FINIS"
x = listdsi('GDG FILE')
say sysdsname sysvolume

Rob


In a message dated 3/5/2010 5:37:03 P.M. US Mountain Standard Time,

Robert Zenuk

unread,
Mar 5, 2010, 9:05:03 PM3/5/10
to
And I just looked up the GDGNT parameter... That is nice too. It allows
the relative GDG to keep incrementing within the same job step by
continuing to use +1 instead of +2, +3, +4, etc (as required in JCL).

Here is an updated example:

arg dsn


dsn = 'OPSROZ.TESTX.GDG(+1)'
RC = bpxwdyn("ALLOC FI(GDG) DA('"dsn"') NEW CATALOG SPACE(1,1)",

"CYL UNIT(SYSDA) GDGNT")


if RC <> 0 then exit RC
gdg.1 = 'test data'
"EXECIO * DISKW GDG (STEM GDG. FINIS"
x = listdsi('GDG FILE')
say sysdsname sysvolume

RC = bpxwdyn("FREE FI(GDG)")


Rob

In a message dated 3/5/2010 6:50:57 P.M. US Mountain Standard Time,
mic...@COMCAST.NET writes:

Yup, I use it almost every day. BPX is just a killer program

--------------------------------------------------
From: "Gilbert C Cardenas" <Gilbert...@GROCERYBIZ.COM>

Sent: Friday, March 05, 2010 7:36 PM

Paul Gilmartin

unread,
Mar 6, 2010, 1:17:30 PM3/6/10
to
On Mar 5, 2010, at 18:50, Mickey wrote:

> Yup, I use it almost every day. BPX is just a killer program
>
> --------------------------------------------------
> From: "Gilbert C Cardenas"

> Sent: Friday, March 05, 2010 7:36 PM
> To: <TSO-...@VM.MARIST.EDU>
> Subject: Re: [TSO-REXX] Create GDG
>
>> Somebody on this forum (I think is was Mickey or Gil) gave this example a
>> while back.
>>
>> X = BPXWDYN("ALLOC DD(XXX) DA('DISK.YOUR.DATASET(+1)') NEW SPACE(1,1)
>> RECFM(F,B) LRECL(80) DSORG(PS) CATALOG") GDGNT
>>

I don't believe I contributed this (I rarely use GDGs), but isn't
there supposed to be a "model DSCB" that spares the programmer the
need to reassert (some of) the attributes with each new generation?
Or is that beyond the ken of BPXWDYN( GDGNT )?

-- gil

Scott T. Harder

unread,
Mar 6, 2010, 3:43:36 PM3/6/10
to
I'm pretty sure that SMS (at some point - a while ago) negated or replaced,
somehow, the need for the model DSCB.

Scott T. Harder
Mainframe Services, Inc.
Naples, FL

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of

0 new messages