IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to know the volume


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 463

PostPosted: Thu Jun 16, 2005 4:44 pm
Reply with quote

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
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Thu Jun 16, 2005 5:16 pm
Reply with quote

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
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 463

PostPosted: Thu Jun 16, 2005 5:20 pm
Reply with quote

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
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Thu Jun 16, 2005 5:23 pm
Reply with quote

Do you have a list of dataset or a root?
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 463

PostPosted: Thu Jun 16, 2005 5:28 pm
Reply with quote

Hi
Yes i have list of datasets.

Thanks
Rupesh
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Thu Jun 16, 2005 6:30 pm
Reply with quote

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
View user's profile Send private message
sharan Siva

New User


Joined: 28 Jun 2005
Posts: 5

PostPosted: Wed Jun 29, 2005 4:20 pm
Reply with quote

Hi,

Try to get the VTOC information on that volumes,which the datasets are resides.

Thanks,
Sharan Siva
Back to top
View user's profile Send private message
kcprem

New User


Joined: 30 Jun 2005
Posts: 18

PostPosted: Wed Jul 27, 2005 2:43 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Volume chain using DFSORT DFSORT/ICETOOL 17
No new posts volume mass delete RMM JCL & VSAM 2
No new posts Define default volume for DSN storage... JCL & VSAM 8
No new posts Copy a PDS to a new PDS - why do I ne... TSO/ISPF 8
No new posts retrieve volume records from decollec... DFSORT/ICETOOL 4
Search our Forums:

Back to Top