Hi,
Our Lpar is having a lot of unused datasets which needs to be cleaned up based on the creation date and size.
I tried using listcat with VOLUME option in the batch job.I have a few problems.
1.I am not able to route the output to a dataset.I tried using outfile in the sysin along with Listcat,but it threw an error.
2.I am able to get the creation date but not the tracks/cyl used using the volume option.What other option can I use?
3.When the dataset is in MIGRAT2 will it occupy DASD space?Can we ignore them while selecting the datasets for deleting?How to consider only the active datasets.
Also I do not have priveledge to run the DCOLLECT command to collect the statistics.
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
Here is a suggestion. Take all the datasets you want to checkout and put them is an 80 byte FB datasets called "HLQ.YOUR.INPUT.DATASET" (You pick the name)
Take the following REXX code and put it in a REXX library called "HLQ.YOUR.REXX.LIB" (You pick the REXX library name) under the member name REXLIST1.
Code:
/********************** REXX *************************/
/* THIS REXX READ A 80 BYTE DATASET AND DOES */
/* LISTDSI AGAINST EACH FILE. OUTPUT IS WRITTEN */
/* OUT OF THE JOB. */
/* */
PARSE ARG DATASET
DATASET = STRIP(DATASET,'B')
CTRI1 = 0
CTRO1 = 0
ALLOC:
"ALLOC FI(INPUTFLE) DA("||DATASET||") SHR REUSE"
IF RC > 0 THEN DO
SAY "ALLOCATE ERROR RC= " RC
EXIT RC
END
READUMIN:
/* READ IN THE INPUT FILES AS STEM VARIABLES */
"EXECIO * DISKR INPUTFLE (STEM XXX. FINIS)"
ADDRESS TSO "FREE F(INPUTFLE)"
/* READ IN THE BASE INPUT FILE */
GETREC:
IF CTRI1 = XXX.0 THEN SIGNAL EXIT1
CTRI1 = CTRI1 + 1
DSNCHK = SUBSTR(XXX.CTRI1,1,44)
DSNCHK = STRIP(DSNCHK,'B')
ADDRESS TSO
X = LISTDSI("'"DSNCHK"'")
INTERPRET "X =" X
IF SYSMSGLVL2 ¬= ' ' THEN
DO
ZEDLMSG = SYSMSGLVL2
SAY DSNCHK||" "||ZEDLMSG
SYSMSGLVL2 = ' '
SIGNAL GETREC
END
say 'DATA SET NAME: ' sysdsname
say;
say ' Volume serial: ' sysvolume
say ' Device type: ' sysunit',',
'(trks/cyl 'systrkscyl', blks/trk 'sysblkstrk')'
say ' Organization: ' sysdsorg
say ' Record format: ' sysrecfm
say ' Record length: ' syslrecl
say ' Block size: ' sysblksize
say ' Allocation units: ' sysunits
say ' Space allocated: ' sysalloc
say ' Space used: ' sysused
say ' Primary allocation: ' sysprimary
say ' Secondary allocation: ' sysseconds
say ' Extents used: ' sysextents
say ' Creation date: ' syscreate
say ' Expiration date: ' sysexdate
SIGNAL GETREC
EXIT1:
EXIT
Now add a job card and run these JCLs with the libraries and datasets coded that you selected:
The REXX program will reference each dataset coded in HLQ.YOUR.INPUT.DATASET and will provide information about it. If the dataset is migrated, it will tell you. If the dataset is not migrated, you will received information about your dataset. The output is produced in the SYSTSPRT DD statement. If you want this in a dataset, code a dataset for the SYSTSPRT DD statement:
IF you don't want all the individual information about each dataset, only certain parameters (like space, creation, etc.), you may delete the "SAY" statements in the REXX program for the items you DON'T want.
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
Hi,
A little information on DFDSS:
DFDSS stands for "Data Facility Data Set Services" An IBM licensed program used to copy, move, dump, and restore data sets and volumes.
Well, this would
Quote:
Can u guide me to code it
require a broad expalntion, a good start would be read this from Manuals & if stuck up some where get back to us, some one here would be having better suggestions..DFDSS/ADRDSSU informatoin is available from the "Manuals" on this site. Click on Manuals (at the top of the page), then click on "IBM JCL Utilities Guide for DFSMS".
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
Hi,
i don't speak REXX much, however, I tried the above suggestion by cpuhawg but got the below in SYSOUT, how to deal with it. Please suggest.
Code:
READY
PROFILE NOPREFIX
READY
HLQ HLQ.LIST.ALL
READY IKJ58405I DATA SET NOT CATALOGUED. THE LOCATE MACRO RETURN CODE IS 0008
IKJ56709I INVALID DATA SET NAME, '%IGGCSIRX'
%IGGCSIRX IKJ58401I ERROR PARSING THE STATEMENT. PARSE SERVICE RETURN CODE IS 00004
IKJ56709I INVALID DATA SET NAME, 'ENTER
IKJ56712I INVALID KEYWORD, KEY'