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

Last absolute generation name of a GDG

866 views
Skip to first unread message

Horacio Villa

unread,
Oct 10, 2008, 4:58:05 PM10/10/08
to
Hi all,

sorry if this has been discused before, but couldn't find it.
What´s the best way to get the last absolute generation name of a GDG, not
using ISPF?
Thanks for any tips you can give me,

Horacio Villa


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

Harrington, Mark

unread,
Oct 10, 2008, 5:31:07 PM10/10/08
to
Maybe this will help.

Mark H.

Plug in something like <name of this exec> xxx.your.file.name(-2)
and it will give you the actual g00v00 number.

/* REXX */
/*********************************************************************/
/* Purpose: Return the GDS for a relative GDG */
/*-------------------------------------------------------------------*/
/* Syntax: dsn = goovoo(xxx.yyy(-2)) */
/*-------------------------------------------------------------------*/
/* Parms: relgdg - Fully qualified relative GDG DSN */
/* */
/*********************************************************************/
/* Change Log */
/* */
/* Author Date Reason */
/* -------- --------- ----------------------------------------- */
/* R. Zenuk Aug 2001 Initial Creation */
/* */
/*********************************************************************/
trace off
arg gdgbase
if gdgbase = '' then exit(99)
*********************************************************************/
* Parse the relative number if present, set to 0 if missing */
*********************************************************************/
parse var gdgbase gdgbase '(' relgdg ')' .
if relgdg = '' | relgdg > 0 then relgdg = 0
gdg = 0
*********************************************************************/
* Trap the LISTC output from a LISTC LVL(dsn) ALL */
*********************************************************************/
x = outtrap(listc.)
LISTC LVL('"gdgbase"') ALL"
*********************************************************************/
* Parse through output putting each GDS in a stem variable */
*********************************************************************/
do i=1 to listc.0
if word(listc.i,1) = 'NONVSAM' then
do
gdg = gdg + 1
parse var listc.i . . dsn.gdg
end
else
do
iterate
end
end
/*********************************************************************/
/* Determine the offset within the stem and return the GDS */
/*********************************************************************/
absgdg = gdg + relgdg
if abs(relgdg) > gdg - 1 then
return 'INVALID'
else
return dsn.absgdg

Hi all,

Horacio Villa

IMPORTANT WARNING: This email (and any attachments) is only intended for the use of the person or entity to which it is addressed, and may contain information that is privileged and confidential. You, the recipient, are obligated to maintain it in a safe, secure and confidential manner. Unauthorized redisclosure or failure to maintain confidentiality may subject you to federal and state penalties. If you are not the intended recipient, please immediately notify us by return email, and delete this message from your computer.

Horacio Villa

unread,
Oct 10, 2008, 6:56:09 PM10/10/08
to
Hi Mark,

it's been very helpful.
I needed the volser too, so I modified it to return it also.
Thanks a lot,

Horacio

"Harrington, Mark" <MHarr...@MEDNET.UCLA.EDU>
Sent by: TSO REXX Discussion List <TSO-...@VM.MARIST.EDU>
10/10/2008 06:30 p.m.
Please respond to
TSO REXX Discussion List <TSO-...@VM.MARIST.EDU>


To
TSO-...@VM.MARIST.EDU
cc

Subject
Re: [TSO-REXX] Last absolute generation name of a GDG

Hamilton, Robert L

unread,
Oct 14, 2008, 2:09:51 PM10/14/08
to
There might be a gotcha in this; if the generations span more than one volume, does the list come
Back in order by relative generation? We found some years back the generations had to be sorted to find the last one.

bobh

Robert Zenuk

unread,
Oct 14, 2008, 3:42:46 PM10/14/08
to
Never saw that situation... This was a rewrite of something I originally
wrote in the early 90's (and lost during a management hiatus/coma). That was a
rewrite of an old CLIST using &SYSOUTTRAP. So, I can safely say in over 25
years of using this technique I haven't seen that happen. A multi-volume
dataset will have extra entries under the VOLUMES heading within the NONVSAM
entry. The NONVSAM line I'm scraping from the LISTCAT will always have the
unique DSN and no duplicates.

To prove this I just looked up some extremely large SMF GDG's that span
multiple high capacity volumes and do not present the situation you suggest
(names changed to protect the innocent or me as the case may be).

NONVSAM ------- PROD.SMF.SYXX.MONTHLY.G0431V00

IN-CAT --- CATALOG.SYXX.PROD
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2007.274
RELEASE----------------2 EXPIRATION------0000.000
VOLUMES
VOLSER------------O07220 DEVTYPE------X'78048081' FSEQN----------
ASSOCIATIONS
GDG------PROD.SMF.SYXX.MONTHLY
ATTRIBUTES
NONVSAM ------- PROD.SMF.SYXX.MONTHLY.G0432V00

IN-CAT --- CATALOG.SYXX.PROD
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2007.305
RELEASE----------------2 EXPIRATION------0000.000
VOLUMES
VOLSER------------K80247 DEVTYPE------X'78048081' FSEQN----------
VOLSER------------G28055 DEVTYPE------X'78048081' FSEQN----------
ASSOCIATIONS
GDG------PROD.SMF.SYXX.MONTHLY
ATTRIBUTES
NONVSAM ------- PROD.SMF.SYXX.MONTHLY.G0433V00

IN-CAT --- CATALOG.SYXX.PROD
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2007.335
RELEASE----------------2 EXPIRATION------0000.000
VOLUMES
VOLSER------------G28091 DEVTYPE------X'78048081' FSEQN----------
ASSOCIATIONS
GDG------PROD.SMF.SYXX.MONTHLY
ATTRIBUTES


Rob




In a message dated 10/14/2008 11:09:59 A.M. US Mountain Standard Tim,
rob...@UTDALLAS.EDU writes:

bobh

Hi Mark,

Horacio


To
TSO-...@VM.MARIST.EDU
cc


Maybe this will help.

Mark H.

Hi all,

Horacio Villa

**************New MapQuest Local shows what's happening at your destination.
Dining, Movies, Events, News & more. Try it out
(http://local.mapquest.com/?ncid=emlcntnew00000002)

Dunkel, Martin

unread,
Oct 14, 2008, 4:04:25 PM10/14/08
to
Just one side note though...

LISTCAT shows you all of the GDG's that are cataloged. I have seen on occasion a GDG that is cataloged, but not ACTIVE in the base. The times I have seen this are usually security related - some ID doesn't have the authority to roll the gen into the GDG base.

With MVS / zOS JCL allocation services, a dsn(+0) allocation will give you the most recent CATALOGED generation that is ACTIVE in the GDG base.

Thanks! MPD

Martin Dunkel
National City Corporation
Turnover Support / ChangeMan ZMF
(w) 216-257-5354
(p) 80053...@archwireless.net

bobh

Hi Mark,

Horacio


To
TSO-...@VM.MARIST.EDU
cc


Maybe this will help.

Mark H.

Hi all,

Horacio Villa


-------------------------------------------------------------------------------------------
***National City made the following annotations
-------------------------------------------------------------------------------------------
This communication is a confidential and proprietary business communication.
It is intended solely for the use of the designated recipient(s). If this
communication is received in error, please contact the sender and delete
this communication.
===========================================================================================

Robert Zenuk

unread,
Oct 14, 2008, 8:09:09 PM10/14/08
to
Interesting... Never saw that either... I suspect Cataloged/Inactive
GDS's could trip this up. How do you see the Inactive/Active status? It doesn't
appear to be in the LISTCAT LVL('gds.name') ALL or when I do a LISTCAT
ENT('gdg.base') ALL...

Rob




In a message dated 10/14/2008 1:04:40 P.M. US Mountain Standard Time,

Dunkel, Martin

unread,
Oct 15, 2008, 7:50:48 AM10/15/08
to
Rob,

Where it shows STATUS:

NONVSAM ---- JSS.H70.RPT070.G1308V00
IN-CAT --- CATALOG.PROD1
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2008.282
RELEASE----------------2 EXPIRATION------0000.000
ACCOUNT-INFO-----------------------------------(NULL)
STATUS------------ACTIVE

You can use the IDCAMS ALTER command to ROLLIN the cataloged dataset into the GDG base to make it ACTIVE. However, you shouldn't have to do this because this usually happens normally.

Thanks! MPD

NONVSAM ------- PROD.SMF.SYXX.MONTHLY.G0431V00


Rob

bobh

Hi Mark,

Horacio


To
TSO-...@VM.MARIST.EDU
cc


Maybe this will help.

Mark H.

Hi all,

Horacio Villa


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


***National City made the following annotations
-------------------------------------------------------------------------------------------
This communication is a confidential and proprietary business communication.
It is intended solely for the use of the designated recipient(s). If this
communication is received in error, please contact the sender and delete
this communication.
===========================================================================================

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

Robert Zenuk

unread,
Oct 15, 2008, 9:12:31 AM10/15/08
to
Isn't ROLLIN exclusively an SMS attribute? I guess we have very few (if
any) SMS GDG's... All ours seem to be created with IDCAMS DEFINE GDG. The
STATUS line does not even show up in the LISTCAT. Maybe I'm missing something...
Either way, this would not be a stretch to modify the code to scrape the
STATUS line and ignore INACTIVE entries. That would keep the relative GDG to
GOOVOO mapping the same as the JCL implementation.

Rob



In a message dated 10/15/2008 4:50:55 A.M. US Mountain Standard Time,

Dunkel, Martin

unread,
Oct 15, 2008, 10:08:57 AM10/15/08
to
Rob,

I stand corrected. Thank you.

I was simply pointing out that I have seen this before (twice that I can remember). And, apparently we do have some SMS controlled GDG's over here. Usually where I have seen this is when we are setting up new NDM's into the mainframe. In the NDM process, the incoming port / user-id translates to an internal mainframe ID, and the (+1) gdg will get cataloged but not rolled in because not all of the security is set up yet (or someone changed something and now it doesn't work). (And, I know it is better to create flat files with NDM then back them up to a GDG - but I usually had no control over these set ups).

Rob,

Where it shows STATUS:

Thanks! MPD

Rob

Thanks! MPD

NONVSAM ------- PROD.SMF.SYXX.MONTHLY.G0431V00


Rob

bobh

Hi Mark,

Horacio


To
TSO-...@VM.MARIST.EDU
cc


Maybe this will help.

Mark H.

Hi all,

Whatæ„€ the best way to get the last absolute generation name of a GDG, not

Horacio Villa


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


***National City made the following annotations
-------------------------------------------------------------------------------------------
This communication is a confidential and proprietary business communication.
It is intended solely for the use of the designated recipient(s). If this
communication is received in error, please contact the sender and delete
this communication.
===========================================================================================

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

Miranda, John

unread,
Oct 15, 2008, 4:48:55 PM10/15/08
to
Hi,
We are going to store several jobname masks for mapping purposes. Has any one tackled a similar problem? We have a general solution, but are troubled when the jobname fits two or more masks. How to determine which is the more specific mask?

John

Bob Stark

unread,
Oct 15, 2008, 4:54:54 PM10/15/08
to
I always use the theory that the longest matching mask wins.

This is similar to how a security product (RACF, TSS) matches rules.

Regards,

Bob Stark

ProTech - When you're serious about Systems Management
Consulting, Software, and Training for z/OS, UNIX and Internet
www.protechtraining.com 800-373-9188 x151 Mobile: 412-445-8072

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

John

--
If this email is spam, report it here:
http://www.onlymyemail.com/view/?action=reportSpam&Id=Mzg3MzE6NzczNTEwNjY0Om
JzdGFya0Bwcm90ZWNocHRzLmNvbQ%3D%3D

Bob Bridges

unread,
Oct 17, 2008, 1:29:56 PM10/17/08
to
And if I'm not mistaken, RACF and probably ACF2 as well insist that ACAB is
a closer match than **AB1C0, even though the latter is longer, because the
former starts further to the left.

If you go by that, it seems to me you could write an evaluation of each
mask based on its starting position and length...no, better, on the
position of each literal in the mask. Like this:

Mask Value
======== ========
A 10000000
AB 11000000
*BC 01100000
*B***F 01000100

The mask with the highest possible rank would of course be a fully
qualified "mask" such as ABCDEFGH; its rank would be 11111111. Calculate
the "specificity" of each mask and store it with the list of masks and then
when more than one mask matches a job name you just pick the one with the
higher specificity.

If you don't think the furthest-left mask getting the highest weighting
regardless of how long the other contenders are, you could think up some
other system. But I like the idea of storing a weight with the masks and
just using the highest one whenever there's an ambiguity.

---
Bob Bridges, rhb...@attglobal.net
cell 336 382-7313

/* "Bother", said the Borg, "we've assimilated a Pooh". */

-----Original Message-----
From: Bob Stark
Sent: Wednesday, October 15, 2008 16:55

I always use the theory that the longest matching mask wins. This is
similar to how a security product (RACF, TSS) matches rules.

-----Original Message-----
From: Miranda, John
Sent: Wednesday, October 15, 2008 4:49 PM

We are going to store several jobname masks for mapping purposes.
Has any one tackled a similar problem? We have a general solution, but are
troubled when the jobname fits two or more masks. How to determine which
is the more specific mask?

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

Miranda, John

unread,
Oct 17, 2008, 3:20:21 PM10/17/08
to
Is there a way to tell if a REXX is running under an interactive TSO session vs. a batch TSO session? I want to let the REXX figure out if to perform the dataset allocations in the interactive session or not if it is a batch session with the jcl doing the allocations.

John

Robert Zenuk

unread,
Oct 17, 2008, 3:26:33 PM10/17/08
to
Yes.

if sysvar('SYSENV') = 'FORE' then
call online
else
call batch


Rob

In a message dated 10/17/2008 12:20:07 P.M. US Mountain Standard Tim,
john.m...@USAA.COM writes:

John

**************New MapQuest Local shows what's happening at your destination.


Dining, Movies, Events, News & more. Try it out
(http://local.mapquest.com/?ncid=emlcntnew00000002)

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

Miranda, John

unread,
Oct 17, 2008, 3:34:30 PM10/17/08
to
Very nice, it helps a lot. Thanks

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of Robert Zenuk
Sent: Friday, October 17, 2008 2:26 PM
To: TSO-...@VM.MARIST.EDU

Ryerse, Robin

unread,
Oct 19, 2008, 9:24:53 PM10/19/08
to
No guarantee that the allocation was made via JCL. Use LISTDSI ____ FI
to determine if the allocation has been made.

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

Cloink....@googlemail.com

unread,
Dec 9, 2008, 10:52:48 AM12/9/08
to
I have seen instances whereby a dsn matching a gdg-basename is found
in a DSLIST (and, presumably, will appear in a LISTCAT in previous
examples), but <em>isn't</em> part of the gdg-base. So after a little
bit of examination of the IDCAMS documentation, and a bit of trial and
error, here is how to list the <em>GDG</em> attributes, presumably
exactly as defined by the catalogue, without running the risk of
getting dsns which do not actually belong to the GDG base. I couldn't
say whether this might include - or not - GDG +1s which haven't yet
been rolled in, but for my purposes, I'm looking to find the last one
created, which is a month ago, so 'not rolled in' is not an issue for
me.

LISTCAT GDG ENTRY('<GDG-base-in-full>') ALL

This gives output like this:

GDG BASE ------ <GDG-base>
IN-CAT --- USRCTLG.XXXX
HISTORY
DATASET-OWNER-----(NULL) CREATION--------1987.278
RELEASE----------------2 LAST ALTER------2008.337
ATTRIBUTES
LIMIT----------------120 SCRATCH NOEMPTY
ASSOCIATIONS
NONVSAM--<GDG-base>.G0136V00
NONVSAM--<GDG-base>.G0137V00
NONVSAM--<GDG-base>.G0138V00
...etc...

Cloink.

0 new messages