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

How to find Size of Datasets with a particular Qualifier


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

New User


Joined: 10 Mar 2005
Posts: 41
Location: United States Of America

PostPosted: Sat Apr 22, 2006 11:07 am
Reply with quote

Hi All,

Can anybody have tool/JCL used to find out a list of datasets starting with a particular Qualifier(first Level) and their Sizes.

For Ex:

PMSDD.AA.EMP
PMSDD.BB.EMP.FILE
PMSDD.TEMP.SORT.FILE
PMSDD.AVG.EMP.SALARY


For the above example if i use 'PMSDD' as first qualifier, i want all Datasets starting with PMSDD as first qualifier(in this case we have 4 such files) and their sizes in interms of bytes.

Display should be like..


PMSDD.AA.EMP-------------------- 2,234,123 Bytes
PMSDD.BB.EMP.FILE------------------ 2,212,233 Bytes
PMSDD.TEMP.SORT.FILE------------- 3,267 Bytes
PMSDD.AVG.EMP.SALARY------------ 123 Bytes


Thanks,
Sameer[/img][/code][/list]
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Sat Apr 22, 2006 2:42 pm
Reply with quote

You can, of course, get the list of datasets by their high-level qualifier by invoking the IDCAMS LISTCAT command, either as the TSO LISTCAT command or by executing IDCAMS.

If you want to use ISPF Services, the LMDLIST function will give you the same results in a much neater and easier-to-use format.
Back to top
View user's profile Send private message
sameer

New User


Joined: 10 Mar 2005
Posts: 41
Location: United States Of America

PostPosted: Sat Apr 22, 2006 4:04 pm
Reply with quote

Thanks Superk.

I have tried with the following JCL

Code:

//JS010 EXEC PGM=IDCAMS,REGION=2M
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
 LISTCAT ENT(TMSDD.*) ALL
//*


But i am able to get only second level Datasets Starting with TMSDD.

Ex :
TMSDD.FILE1
TMSDD.FILE2

But i need to get all Datasets with this first level Qualifier

Ex :
TMSDD.FILE1
TMSDD.FILE1.SORT
TMSDD.FILE1.SORT.UPDATED.OLD

etc..

Is there any method to retrieve such datasets at one shot?

Thanks,
Sameer
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Sat Apr 22, 2006 8:09 pm
Reply with quote

Use LISTCAT LVL(HLQ) ALL instead.
Back to top
View user's profile Send private message
sameer

New User


Joined: 10 Mar 2005
Posts: 41
Location: United States Of America

PostPosted: Mon Apr 24, 2006 12:00 pm
Reply with quote

Thanks SuperK,

This time it worked fine.

//JS010 EXEC PGM=IDCAMS,REGION=2M
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT LVL(PMSDD) ALL
//*


I am able to get all the datasets with this high level qualifier. Do you have any idea about file sizes which i mentioned earlier. If so can you please share with me.

Thanks,
Sameer
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Mon Apr 24, 2006 7:03 pm
Reply with quote

sameer wrote:
Do you have any idea about file sizes which i mentioned earlier. If so can you please share with me.

Nope. As fair as I know, you will have to calculate those values individually for each dataset, based on its RECFM, LRECL, and number of physical records. Personally, I have found that a filesize represented in bytes is a rather useless detail.
Back to top
View user's profile Send private message
sameer

New User


Joined: 10 Mar 2005
Posts: 41
Location: United States Of America

PostPosted: Tue Apr 25, 2006 10:07 am
Reply with quote

Thanks for the information Superk. I know that file size in terms of bytes is most probably not required for any application. But here i am trying to get total size occupied by a particular set of datasets (ex: starting with qualifier MSA0455 or PMSDD, etc.. so that for unused datasets(such as backup datasets or temporary datasets which are not reqired by anyone) i can go and delete them. And i want to know how much space i recovered during this excersise.

For that, I need total number of space currently consuming by particular set of datasets and total number of space recoverd after removing/deleting unwanted datasets.

If i go and do the manual verification for each dataset with its RECFM, LRECL and number of physical records it takes time and for Migrated and Tape datasets i need to eaither recall or move into DASD.

If there is any method which can find space for a bunch of datasets interms or any format(eaither bytes,kb,mb,trks,etc..) that could be great help for this excersise.

Thanks,
Sameer
Back to top
View user's profile Send private message
nitinsharma_1212
Warnings : 1

New User


Joined: 21 Feb 2007
Posts: 4
Location: DELHI

PostPosted: Tue Feb 27, 2007 11:42 am
Reply with quote

Hi

Could the above method be used with repro ie
//JS010 EXEC PGM=IDCAMS,REGION=2M
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//AMSDUMP DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
REPRO IDS(T0J0JBS.CHITRA1.*) -
ODS(T0J0JBS.NITIN7.NEW)

will it work???????????????
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 To find whether record count are true... DFSORT/ICETOOL 6
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts Using Java/C/C++ to retrieve dataset ... Java & MQSeries 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
Search our Forums:

Back to Top