View previous topic :: View next topic
|
Author |
Message |
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
Hi,
I want to delete around 5000 dataset as a part of cleanup but before that I want to know how much space these dataset occupied in Mainframe .
Could anyone help me on this?
Thanks & regards
Rupesh.Kothari. |
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
There are several method to know this information.
The easiest is talk with your storage admin that(I'm sure) has a lot of utility.
But if you want retrieve the same information by yourself you can write a Clist or a Rexx and with a few row of code you can do it fast.
The only prerequisite that you must to have is a list or radical(root) of your dataset.
Do you need samples? |
|
Back to top |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
Hi MGIndaco,
Thanks for your quick response.
It is very kind if you provide me the sample code for this.
Thanks
Rupesh.Kothari |
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
Do you have a list of dataset or a root? |
|
Back to top |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
Hi
Yes i have list of datasets.
Thanks
Rupesh |
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
Ok, try with this rexx and this jcl:
Rexx(to be stored in a library FB and LRECL=80):
Code: |
/*% NOCOMMENT REXX */
/* PROGRAMMA: xxxxxxxx */
/* AUTORE : MGIndaco */
/* ENV. : BATCH */
ADDRESS TSO
'Profile noprefix'
TrkTotal = 0
Say '-----------------------------------------'
Say '- Begin ---------------------------------'
Say '-----------------------------------------'
"execio * diskr FILELIST (stem FileList. finis"
say ' Files List : ',
!!' SysAlloc :',
!!' SysUnits :',
!!' SysTrksCyl :',
!!' Tracks :'
say ' -------------------------------------------',
!!'+-------------',
!!'+-------------',
!!'+-------------',
!!'+-------------'
Do iList = 1 To FileList.0
FileList.iList = Strip(FileList.iList,T)
Info = ListDSI("'"FileList.iList"'")
Select
When Strip(SysUnits) = 'CYLINDER' Then Do
Tracks = SysAlloc * SysTrksCyl
End
When Strip(SysUnits) = 'TRACK' Then Do
Tracks = SysAlloc
End
End
say ' '!!Substr(FileList.iList,1,44),
Substr(SysAlloc,1,13),
Substr(SysUnits,1,13),
Substr(SysTrksCyl,1,13),
Substr(Tracks,1,13)
TrkTotal = TrkTotal + Tracks
End
Say ' ------------------------'
Say ' Tracks used : ' TrkTotal
Say ' ------------------------'
Say '-----------------------------------------'
Say '- End -----------------------------------'
Say '-----------------------------------------'
Exit Rc |
This is the JOB:
Code: |
//STEP010X EXEC PGM=IKJEFT01,PARM='name of rexx pgm'
//SYSEXEC DD DISP=SHR,DSN=library where pgm is stored
//SYSTSPRT DD SYSOUT=B
//FILELIST DD *
File1 without quotes
File2
File3
File4
//SYSPRINT DD SYSOUT=B
//SYSTSIN DD DUMMY |
P.S.= If you copy/paste use "Renum;Unnum" after to avoid error. |
|
Back to top |
|
|
sharan Siva
New User
Joined: 28 Jun 2005 Posts: 5
|
|
|
|
Hi,
Try to get the VTOC information on that volumes,which the datasets are resides.
Thanks,
Sharan Siva |
|
Back to top |
|
|
kcprem
New User
Joined: 30 Jun 2005 Posts: 18
|
|
|
|
Hi MGindco,
I am getting the following error msg. can you pls help me to fix the error.
********************************* TOP OF DATA *********************************
1-----------------------------------------
- BEGIN ---------------------------------
-----------------------------------------
FILES LIST : !! SYSALLOC : !! SYSUNITS :
------------------------------------------- !!+------------- !!+-------------
33 +++ SAY ' '!!SUBSTR(FILELIST.ILIST,1,44),
SUBSTR(SYSUNITS,1,13),
(SYSTRKSCYL,1,13), SUBS
Error running REXSPC, line 33: Routine not found
READY
END
******************************** BOTTOM OF DATA ******************************* |
|
Back to top |
|
|
|