Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Getting space used/allocated for many datasets?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
JPVRoff

New User


Joined: 06 Oct 2009
Posts: 32
Location: Melbourne, Australia

PostPosted: Mon Apr 15, 2019 12:35 pm    Post subject: Getting space used/allocated for many datasets?
Reply with quote

Hi,

Within Rexx, we normally use IGGCSI00 to obtain catalog info for many datasets (as it's quicker than moth other methods).

But for one particular use (where we want to migrate datasets at the end of a batch run to save on DASD usage) I've had to rely on LISTDSI up to this point. Simply because the requirement was only to migrate those datasets bigger then a certain size. This is twofold, it means that we don't tie up HSM with thousands of requests to migrate small datasets, yet we also manage to save a lot of DASD space after each batch run.
Now LISTDSI is a wonderful Rexx function for one or two or ten files. But when we're looking through 5-10,000, the small amount of time it takes to allocate and deallocate each dataset for each LISTDSI starts to become a very significant piece of time.

Question is, is there any other way to find how much space is allocated or used by PS/PO datasets without having to allocate them?
Back to top
View user's profile Send private message

enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10622
Location: italy

PostPosted: Mon Apr 15, 2019 1:20 pm    Post subject: Reply to: Getting space used/allocated for many datasets?
Reply with quote

use something like

Code:
 000005 //DSS     EXEC PGM=ADRDSSU,REGION=0M,
 000006 //             PARM='TYPRUN=NORUN'
 000007 //SYSPRINT  DD SYSOUT=*
 000008 //SYSIN     DD *
 000009   DUMP -
 000010        DATASET( -
 000011                 INCLUDE( -
 000012                          XXXXXX.** -
 000013                        ) -
 000014                 BY( REFDT LT (*,-365) ) -
 000015               ) -
 000016        OUTDDNAME(OUT)
 000017 //OUT       DD DUMMY



change the

Code:
BY( REFDT LT (*,-365) )


to the appropriate construct

DFDSS filtering capabilities are quite sophisticated
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8784
Location: Welsh Wales

PostPosted: Mon Apr 15, 2019 2:49 pm    Post subject:
Reply with quote

I have used DCOLLECT in the past for things like this, the records are pretty easy to understand and work with.
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 311
Location: Denmark

PostPosted: Mon Apr 15, 2019 5:46 pm    Post subject:
Reply with quote

If you know which disk(s) the datasets are on then I will recommend the VTOC command from www.cbttape.org file 112. The command will scan disks based on volser prefix, or all which will be a bit too much at most sites, and filter on datasetname, used space and more. The generated list is easily postprocessed.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1647
Location: The Good Place

PostPosted: Mon Apr 15, 2019 11:02 pm    Post subject:
Reply with quote

DCOLLECT D type records have this information. I can provide a working code if you have SAS-MXG at your shop.
Back to top
View user's profile Send private message
JPVRoff

New User


Joined: 06 Oct 2009
Posts: 32
Location: Melbourne, Australia

PostPosted: Wed Apr 17, 2019 3:40 am    Post subject:
Reply with quote

Thanks you for the suggestions.
I'll have a go at DFDSS first, as it doesn't involve downloading anything (financial institutions are so fussy about that...sarcasm) and I've got a few macros that pull info from DFDSS output.
I might have a CBT from an earlier time on my 'home' LPAR, so if I'll try to have a look at both VTOC and DCOLLECT.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2136
Location: Silicon Valley

PostPosted: Wed Apr 17, 2019 9:11 pm    Post subject: Reply to: Getting space used/allocated for many datasets?
Reply with quote

I would consider also using the 'modified' date. If a data set has not been updated since your last check, then just ignore it.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 752
Location: The Universe

PostPosted: Wed Apr 17, 2019 10:05 pm    Post subject: Re: Reply to: Getting space used/allocated for many datasets?
Reply with quote

Pedro wrote:
I would consider also using the 'modified' date. If a data set has not been updated since your last check, then just ignore it.

There is no such thing as a "modified date" data set attribute. There is a flag - mainly for storage management products such as HSM - to indicate that a data set has been modified since the last backup by the storage management product.
Back to top
View user's profile Send private message
sergeyken

Active Member


Joined: 29 Apr 2008
Posts: 542
Location: Maryland

PostPosted: Fri Apr 19, 2019 7:36 pm    Post subject:
Reply with quote

There are only 3 date fields stored in DSCB block of VTOC.
    - DS1CREDT - Creation date ('YDD'), discontinuous binary.
    - DS1EXPDT - Expiration date ('YDD'), discontinuous binary.
    - DS1REFD - Date last referenced ('YDD' or zero, if not maintained).

For some reason the last update date is not maintained... icon_cry.gif
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 752
Location: The Universe

PostPosted: Fri Apr 19, 2019 7:58 pm    Post subject:
Reply with quote

There is NO last modified date field in the format 1 DSCB. Period. End of story. There never has been.

There is one bit that notes the data set has been modified. Obviously that is not a date. This bit is maintained for storage management products like HSM.

The YDD date data segeyken mentions is 3 bytes of binary data. The first byte is the year, from 1900. 2019, for example, is 77, or 119 in decimal. The next two bytes are the day of the year. April 19 2019 (today, in other words) is 77006D.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2136
Location: Silicon Valley

PostPosted: Sat Apr 20, 2019 10:06 am    Post subject: Reply to: Getting space used/allocated for many datasets?
Reply with quote

Quote:
There is NO last modified date field in the format 1 DSCB


Sorry, I am not sure what I was thinking about.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ADRDSSU BY(REFDT... not selecting cor... Greg Roschel IBM Tools 2 Wed Sep 18, 2019 7:23 pm
No new posts VSAM Spacce allocated and used -->... upendrasri CLIST & REXX 18 Sat Mar 09, 2019 3:54 pm
No new posts What is a table space in db2 for z/os? martin schlatter DB2 13 Sat Nov 24, 2018 11:19 pm
No new posts DUMP A Multi volume datasets and rest... lind sh JCL & VSAM 6 Mon Oct 01, 2018 12:02 pm
No new posts VSAM Space allocated and used space ... upendrasri JCL & VSAM 5 Tue Sep 04, 2018 4:29 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us