Re: REXX and CLISTs to generate code to delete empty GDG bases

2013-08-28 Thread Greg Dorner
This will report onb GDG's with no GDS's attached. You could alter it to also 
delete them if you want.

JCL:

//LISTCAT  EXEC PGM=IDCAMS   
//SYSPRINT DD DSN=amp;SYSPRINT,
// SPACE=(CYL,(50,20),RLSE), 
// LRECL=121,RECFM=FBA,BLKSIZE=0,
// DISP=(,CATLG) 
//SYSINDD *  
  LISTC CATALOG('SYS1.CATALOG.NAME') NAMES   
/*   
//GDGNULL  EXEC PGM=IKJEFT01,PARM='GDGNULL'  
//SYSEXEC  DD DISP=SHR,DSN=..SYSEXEC LIBRARY ..  
//INPUTDD DISP=(OLD,DELETE),DSN=amp;SYSPRINT   
//SYSTSPRT DD SYSOUT=*   
//SYSTSIN  DD DUMMY  

REXX:

/*rexx*/
 say ' '  
 say 'GDGNULL processing started' 
 say ' '  
 numgdgs = 0  
 numnull = 0  
execio * diskr input (STEM gdgline. finis)  
 do g=1 to gdgline.0  
if substr(gdgline.g,2,16) = 'GDG BASE -- ' then do
   numgdgs = numgdgs + 1  
   gdgbase = strip(substr(gdgline.g,18,44))   
   drop idcline.  
   x = outtrap(idcline.,'*',noconcat) 
  listc entry('gdgbase') all  
   x = outtrap(off)   
   if rc = 0 then do i=1 to idcline.0 
  if substr(idcline.i,8,9) = 'NONVSAM-- ' then leave  
 iterate  
   end
   if i = idcline.0 + 1 then do   
  gdgbase = left(gdgbase,44)  
  say gdgbase 'has no associated data sets'   
  numnull = numnull + 1   
   end
end   
 end  
 numgdgs = right(numgdgs,7,' ')   
 numnull = right(numnull,7,' ')   
 say ' '  
 say numgdgs 'GDG base entries processed' 
 say numnull 'GDG base entries had no associated data sets'   
 say ' '  
 say 'GDGNULL processing complete.'   
 say ' '  
 say ' '  
 exit 0

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: REXX and CLISTs to generate code to delete empty GDG bases

2013-08-28 Thread Tony Babonas
This beautiful example is gilding the lily.  Why not just delete all the 
GDG bases?  Lots of CC8(12?) but hold your nose and it's done.




On 8/28/2013 1:18 PM, Greg Dorner wrote:

This will report onb GDG's with no GDS's attached. You could alter it to also 
delete them if you want.

JCL:

//LISTCAT  EXEC PGM=IDCAMS
//SYSPRINT DD DSN=amp;SYSPRINT,
// SPACE=(CYL,(50,20),RLSE),
// LRECL=121,RECFM=FBA,BLKSIZE=0,
// DISP=(,CATLG)
//SYSINDD *
   LISTC CATALOG('SYS1.CATALOG.NAME') NAMES
/*
//GDGNULL  EXEC PGM=IKJEFT01,PARM='GDGNULL'
//SYSEXEC  DD DISP=SHR,DSN=..SYSEXEC LIBRARY ..
//INPUTDD DISP=(OLD,DELETE),DSN=amp;SYSPRINT
//SYSTSPRT DD SYSOUT=*
//SYSTSIN  DD DUMMY

REXX:

/*rexx*/
  say ' '
  say 'GDGNULL processing started'
  say ' '
  numgdgs = 0
  numnull = 0
execio * diskr input (STEM gdgline. finis)
  do g=1 to gdgline.0
 if substr(gdgline.g,2,16) = 'GDG BASE -- ' then do
numgdgs = numgdgs + 1
gdgbase = strip(substr(gdgline.g,18,44))
drop idcline.
x = outtrap(idcline.,'*',noconcat)
   listc entry('gdgbase') all
x = outtrap(off)
if rc = 0 then do i=1 to idcline.0
   if substr(idcline.i,8,9) = 'NONVSAM-- ' then leave
  iterate
end
if i = idcline.0 + 1 then do
   gdgbase = left(gdgbase,44)
   say gdgbase 'has no associated data sets'
   numnull = numnull + 1
end
 end
  end
  numgdgs = right(numgdgs,7,' ')
  numnull = right(numnull,7,' ')
  say ' '
  say numgdgs 'GDG base entries processed'
  say numnull 'GDG base entries had no associated data sets'
  say ' '
  say 'GDGNULL processing complete.'
  say ' '
  say ' '
  exit 0

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: REXX and CLISTs to generate code to delete empty GDG bases

2013-08-28 Thread Klan, Rob (RET-DAY)


Some organizations require datasets being deleted, not of your uid, be listed 
in advance,  documented and done via change ticket.  



-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Tony Babonas
Sent: Wednesday, August 28, 2013 2:42 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX and CLISTs to generate code to delete empty GDG bases

This beautiful example is gilding the lily.  Why not just delete all the GDG 
bases?  Lots of CC8(12?) but hold your nose and it's done.



On 8/28/2013 1:18 PM, Greg Dorner wrote:
 This will report onb GDG's with no GDS's attached. You could alter it to also 
 delete them if you want.

 JCL:

 //LISTCAT  EXEC PGM=IDCAMS
 //SYSPRINT DD DSN=amp;SYSPRINT,
 // SPACE=(CYL,(50,20),RLSE),
 // LRECL=121,RECFM=FBA,BLKSIZE=0,
 // DISP=(,CATLG)
 //SYSINDD *
LISTC CATALOG('SYS1.CATALOG.NAME') NAMES
 /*
 //GDGNULL  EXEC PGM=IKJEFT01,PARM='GDGNULL'
 //SYSEXEC  DD DISP=SHR,DSN=..SYSEXEC LIBRARY ..
 //INPUTDD DISP=(OLD,DELETE),DSN=amp;SYSPRINT
 //SYSTSPRT DD SYSOUT=*
 //SYSTSIN  DD DUMMY

 REXX:

 /*rexx*/
   say ' '
   say 'GDGNULL processing started'
   say ' '
   numgdgs = 0
   numnull = 0
 execio * diskr input (STEM gdgline. finis)
   do g=1 to gdgline.0
  if substr(gdgline.g,2,16) = 'GDG BASE -- ' then do
 numgdgs = numgdgs + 1
 gdgbase = strip(substr(gdgline.g,18,44))
 drop idcline.
 x = outtrap(idcline.,'*',noconcat)
listc entry('gdgbase') all
 x = outtrap(off)
 if rc = 0 then do i=1 to idcline.0
if substr(idcline.i,8,9) = 'NONVSAM-- ' then leave
   iterate
 end
 if i = idcline.0 + 1 then do
gdgbase = left(gdgbase,44)
say gdgbase 'has no associated data sets'
numnull = numnull + 1
 end
  end
   end
   numgdgs = right(numgdgs,7,' ')
   numnull = right(numnull,7,' ')
   say ' '
   say numgdgs 'GDG base entries processed'
   say numnull 'GDG base entries had no associated data sets'
   say ' '
   say 'GDGNULL processing complete.'
   say ' '
   say ' '
   exit 0

 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


REXX and CLISTs to generate code to delete empty GDG bases

2013-08-27 Thread Rob JACKSON



I have received a request for  expertise coding REXX and CLISTs to generate 
code to delete empty GDG bases.

Thanks,
 
Rob Jackson

rwjackso...@msn.com

Cell: (615) 689-1435
Home: (615) 697-2047

  
--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: REXX and CLISTs to generate code to delete empty GDG bases

2013-08-27 Thread Lizette Koehler
What level of z/OS are you running?

The DEL command can use MASK at z/OS V1.11 and above (also check for
additional maintanence)



In z/OS V1R11, DFSMS access method services (IDCAMS) adds a new MASK option
to the DELETE command. This option lets you specify many variations of a
data set name on a single deletion, using new wild card characters and rules
to give more flexibility in selecting the data sets to be deleted.


Previously, only one data set qualifier could be replaced by a wild card on
a DELETE command. For example: DELETE A.*.C  would delete data sets with A
as the first qualifier, any second qualifier,  and C as the third qualifier,
such as A.B.C or A.BB.C. With the new  MASK keyword, you  can replace
multiple qualifiers with wild cards, and can replace specific characters in
a qualifier name with wild cards as well.


The MASK keyword treats a single asterisk in the  same way as the generic
DELETE command. 

For example DELETE A.*.C MASK specifies a data set with A and C as the first
and third qualifiers,  and a second qualifier with any set of characters. 

In addition, the MASK keyword allows two consecutive asterisks to replace
multiple qualifier names. 

For example, the entry name DELETE A.**.B MASK means all data set names of
two or more levels with A as the first qualifier, and B as the last
qualifier. A.B.** means all data set names of two or more levels where A is
the first qualifier  and B is the second (or last) qualifier.

Double asterisks cannot be part of a qualifier name; they must be preceded
or followed by either a period or a blank character.


The MASK keyword also accepts percent signs (%) was  wild cards to replace
individual characters in the same position. You can specify from one to
eight percent signs in each qualifier.  
For example,  DELETE A%DE MASK would match a data set named ABDE, 
while DELETE A%%D% MASK would match one named ABCDE.

The DELETE MASK command allows only one data set entry-name to be specified.
If multiple entry-names are specified, the DELETE request will fail with
error messages. If more than 100 data set names are filtered from the wild
card notation, AMS only deletes the first 100 data sets identified by the
filtering process.

If you do not specify the MASK keyword on the DELETE command, or explicitly
specify NOMASK, the previous wild card rules remain in effect (one asterisk
can replace one qualifier in a data set name).

For more information about using the new MASK keyword on the IDCAMS DELETE
command, see z/OS DFSMS Access Method Services for Catalogs.


I would think you could do  DEL GDGBASE.*followed by DEL GDGBASE GDG


Lizette


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Rob JACKSON
Sent: Tuesday, August 27, 2013 5:15 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: REXX and CLISTs to generate code to delete empty GDG bases




I have received a request for  expertise coding REXX and CLISTs to generate
code to delete empty GDG bases.

Thanks,
 
Rob Jackson

rwjackso...@msn.com

Cell: (615) 689-1435
Home: (615) 697-2047



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: REXX and CLISTs to generate code to delete empty GDG bases

2013-08-27 Thread Klan, Rob (RET-DAY)
The answer LISTCAT LEVEL('hlq') GDG NAME does supply GDG names 

However question was for empty GDG which I assume to mean no generations. 
 
Changing to LISTCAT LEVEL('hlq'') VOLUME' will return the associations or NULL 
if no generations exists.  
  
Such as 

GDG BASE -- MY.GDG.BASE.A
 ASSOCIATIONS(NULL)

GDG BASE -- MY.GDG.BASE.B 
 ASSOCIATIONS
   NONVSAM--MY.GDG.BASE.B.G0001V00

Maybe other better ways to list,  but I am  IDCAMS fan. 
 
Rob

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of R.S.
Sent: Tuesday, August 27, 2013 8:39 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX and CLISTs to generate code to delete empty GDG bases

W dniu 2013-08-27 14:14, Rob JACKSON pisze:


 I have received a request for  expertise coding REXX and CLISTs to generate 
 code to delete empty GDG bases.


CONTROL ASIS
/* this CLIST deletes some GDG bases */
/* only empty GDG base will be deleted */ DEL HLQ.ANY.NAME DEL 
HLQ.ANO.THER.NAME DEL ...
DEL ...
/* this is the end */


Hint: you can find GDG bases using the following:
LISTCAT LEVEL(HLQ) GDG NAME

--
Radoslaw Skorupka
Lodz, Poland






--
Tre tej wiadomoci moe zawiera informacje prawnie chronione Banku 
przeznaczone wycznie do uytku subowego adresata. Odbiorc moe by jedynie 
jej adresat z wyczeniem dostpu osób trzecich. Jeeli nie jeste adresatem 
niniejszej wiadomoci lub pracownikiem upowanionym do jej przekazania 
adresatowi, informujemy, e jej rozpowszechnianie, kopiowanie, rozprowadzanie 
lub inne dziaanie o podobnym charakterze jest prawnie zabronione i moe by 
karalne. Jeeli otrzymae t wiadomo omykowo, prosimy niezwocznie 
zawiadomi nadawc wysyajc odpowied oraz trwale usun t wiadomo 
wczajc w to wszelkie jej kopie wydrukowane lub zapisane na dysku.

This e-mail may contain legally privileged information of the Bank and is 
intended solely for business use of the addressee. This e-mail may only be 
received by the addressee and may not be disclosed to any third parties. If you 
are not the intended addressee of this e-mail or the employee authorised to 
forward it to the addressee, be advised that any dissemination, copying, 
distribution or any other similar activity is legally prohibited and may be 
punishable. If you received this e-mail by mistake please advise the sender 
immediately by using the reply facility in your e-mail software and delete 
permanently this e-mail including any copies of it either printed or saved to 
hard drive. 

BRE Bank SA, 00-950 Warszawa, ul. Senatorska 18, tel. +48 (22) 829 00 00, fax 
+48 (22) 829 00 33, www.brebank.pl, e-mail: i...@brebank.pl
Sd Rejonowy dla m. st. Warszawy XII Wydzia Gospodarczy Krajowego Rejestru 
Sdowego, nr rejestru przedsibiorców KRS 025237, NIP: 526-021-50-88. 
Wedug stanu na dzie 01.01.2013 r. kapita zakadowy BRE Banku SA (w caoci 
wpacony) wynosi 168.555.904 zotych.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: REXX and CLISTs to generate code to delete empty GDG bases

2013-08-27 Thread Elardus Engelbrecht
Klan, Rob (RET-DAY) wrote:

Changing to LISTCAT LEVEL('hlq'') VOLUME' will return the associations or 
NULL if no generations exists.  
  
Such as 

GDG BASE -- MY.GDG.BASE.A
 ASSOCIATIONS(NULL)

Hmmm, I have a look at CSI to see what CSI will give, but I find nothing or I 
have missed it.

To what (field or value) should one look to in CSI processing for that NULL 
association?

CSI - Catalog Search Facility, not that Crime thing. ;-)

TIA!

Groete / Greetings
Elardus Engelbrecht

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: REXX and CLISTs to generate code to delete empty GDG bases

2013-08-27 Thread Elardus Engelbrecht
CSI - Catalog Search Facility, not that Crime thing. ;-)

Aw cr*p, I commited a crime in word checking! :-(

Replace word 'Facility' with 'Interface'  ...

:-D

Groete / Greetings
Elardus Engelbrecht

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: REXX and CLISTs to generate code to delete empty GDG bases

2013-08-27 Thread Shmuel Metz (Seymour J.)
In bay170-w14141a07d63910d508a6a4b0...@phx.gbl, on 08/27/2013
   at 08:14 AM, Rob JACKSON rwjackso...@msn.com said:

I have received a request for  expertise coding REXX and CLISTs to
generate code to delete empty GDG bases.

What's the issue, and why consider clist at this late date?

-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 Atid/2http://patriot.net/~shmuel
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: REXX and CLISTs to generate code to delete empty GDG bases

2013-08-27 Thread Lizette Koehler
Rob,

If you could provide more detail on what  you are trying to accomplish, we
can probably provide several solutions.

Lizette


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Klan, Rob (RET-DAY)
Sent: Tuesday, August 27, 2013 6:30 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX and CLISTs to generate code to delete empty GDG bases

The answer LISTCAT LEVEL('hlq') GDG NAME does supply GDG names 

However question was for empty GDG which I assume to mean no generations. 
 
Changing to LISTCAT LEVEL('hlq'') VOLUME' will return the associations or
NULL if no generations exists.  
  
Such as 

GDG BASE -- MY.GDG.BASE.A
 ASSOCIATIONS(NULL)

GDG BASE -- MY.GDG.BASE.B 
 ASSOCIATIONS
   NONVSAM--MY.GDG.BASE.B.G0001V00

Maybe other better ways to list,  but I am  IDCAMS fan. 
 
Rob

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of R.S.
Sent: Tuesday, August 27, 2013 8:39 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX and CLISTs to generate code to delete empty GDG bases

W dniu 2013-08-27 14:14, Rob JACKSON pisze:


 I have received a request for  expertise coding REXX and CLISTs to
generate code to delete empty GDG bases.


CONTROL ASIS
/* this CLIST deletes some GDG bases */
/* only empty GDG base will be deleted */ DEL HLQ.ANY.NAME DEL
HLQ.ANO.THER.NAME DEL ...
DEL ...
/* this is the end */


Hint: you can find GDG bases using the following:
LISTCAT LEVEL(HLQ) GDG NAME

--
Radoslaw Skorupka
Lodz, Poland

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: REXX and CLISTs to generate code to delete empty GDG bases

2013-08-27 Thread R.S.

W dniu 2013-08-27 15:29, Klan, Rob (RET-DAY) pisze:

The answer LISTCAT LEVEL('hlq') GDG NAME does supply GDG names

However question was for empty GDG which I assume to mean no generations.
  
Changing to LISTCAT LEVEL('hlq'') VOLUME' will return the associations or NULL if no generations exists.
   
Such as


GDG BASE -- MY.GDG.BASE.A
  ASSOCIATIONS(NULL)

GDG BASE -- MY.GDG.BASE.B
  ASSOCIATIONS
NONVSAM--MY.GDG.BASE.B.G0001V00

Maybe other better ways to list,  but I am  IDCAMS fan.
  

Not necessary. Just issue DEL HLQ.GDG. Empty GDG will be deleted, 
non-empty will not.

fine print on
Caution:  DEL HLQ.GDG FORCE plus some STGADMIN profile will allow you to 
delete non-empty GDG as well, but it requires two things: FORCE keyword 
and RACF authorization.


--
Radoslaw Skorupka
Lodz, Poland






--
Tre tej wiadomoci moe zawiera informacje prawnie chronione Banku 
przeznaczone wycznie do uytku subowego adresata. Odbiorc moe by jedynie 
jej adresat z wyczeniem dostpu osób trzecich. Jeeli nie jeste adresatem 
niniejszej wiadomoci lub pracownikiem upowanionym do jej przekazania 
adresatowi, informujemy, e jej rozpowszechnianie, kopiowanie, rozprowadzanie 
lub inne dziaanie o podobnym charakterze jest prawnie zabronione i moe by 
karalne. Jeeli otrzymae t wiadomo omykowo, prosimy niezwocznie 
zawiadomi nadawc wysyajc odpowied oraz trwale usun t wiadomo 
wczajc w to wszelkie jej kopie wydrukowane lub zapisane na dysku.

This e-mail may contain legally privileged information of the Bank and is intended solely for business use of the addressee. This e-mail may only be received by the addressee and may not be disclosed to any third parties. If you are not the intended addressee of this e-mail or the employee authorised to forward it to the addressee, be advised that any dissemination, copying, distribution or any other similar activity is legally prohibited and may be punishable. If you received this e-mail by mistake please advise the sender immediately by using the reply facility in your e-mail software and delete permanently this e-mail including any copies of it either printed or saved to hard drive. 


BRE Bank SA, 00-950 Warszawa, ul. Senatorska 18, tel. +48 (22) 829 00 00, fax 
+48 (22) 829 00 33, www.brebank.pl, e-mail: i...@brebank.pl
Sd Rejonowy dla m. st. Warszawy XII Wydzia Gospodarczy Krajowego Rejestru Sdowego, nr rejestru przedsibiorców KRS 025237, NIP: 526-021-50-88. 
Wedug stanu na dzie 01.01.2013 r. kapita zakadowy BRE Banku SA (w caoci wpacony) wynosi 168.555.904 zotych.



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: REXX and CLISTs to generate code to delete empty GDG bases

2013-08-27 Thread Ravi Gaur
Do you mean which are not having any associated GDS? or mean they not using any 
Space ? or they have status of Rolled off? if rolled off I did code CSI 
interface which work on filter and give you list of datasets which in that 
status pretty fast and nice way of working with catalogs..let me know if you 
need that...but nevertheless need more clarity on the question.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN