Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

LDS Dataset - Used Space

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Mon Jun 13, 2011 6:13 pm    Post subject: LDS Dataset - Used Space
Reply with quote

Hi,

Is there any way to find the used space for an LDS dataset.

In ISPF 3.4 option we can see the total allocated size but the utilitzation is shown as "?"

We currenly use FDREPORT to find the used space for the dataset. Is there any other way to do the same?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7932
Location: Bellevue, IA

PostPosted: Mon Jun 13, 2011 6:25 pm    Post subject:
Reply with quote

Wouldn't the utilization be 100% for a linear data set -- always?
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Mon Jun 13, 2011 7:00 pm    Post subject:
Reply with quote

I am talking about the underlying dataset for the tablespace.

Suppose we allocate PRIQTY - 7200 and SECQTY - 7200.

And the table is loaded with only 100 records then I want to know the actual used space.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7932
Location: Bellevue, IA

PostPosted: Mon Jun 13, 2011 7:18 pm    Post subject:
Reply with quote

From the VSAM Demystified Redbook:
Quote:
1.6.5 Linear data set (LDS)
A linear data set (LDS) contains data that can be accessed as byte-addressable
strings in virtual storage. It is a VSAM data set with a control interval size multiple
of 4096 bytes. An LDS has no imbedded control information in its CI, that is, no
RDFs and CIDFs. All LDS bytes are data bytes. Logical records must be blocked
and deblocked by the application program. Logical records are transparent from
VSAM’s point of view.
as per the Redbook, your statement
Quote:
And the table is loaded with only 100 records then I want to know the actual used space.
is complete and utter rubbish. A VSAM LDS does not have records. If you think it does, I strongly recommend you go to the Redbook and read it cover to cover enough times that your thinking is changed.

Since the LDS is byte-addessed, if you allocated 7200 (presumably CI) to it, then the number of allocated (and used) bytes will be 7200 times the CI size. If you are storing data in the LDS, it is up to your application to keep track of which bytes are used and unused -- as far as the system is concerned, the LDS is 100% used when you've allocated it, as I said before.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Jun 13, 2011 8:44 pm    Post subject:
Reply with quote

Hello,

When working with "db2 datasets" - use db2. . .

Directly working with db2 LDS datasets is a sure way to hurt yourself. IBM has no reason to publish changes as to the mechanics of how db2 uses the linear datasets. You could get an ugly surprise one day. . .

Suggest you ask your dba if what you want is not already available.
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Mon Jun 13, 2011 9:04 pm    Post subject:
Reply with quote

Hi Dick,

Currently we use FDREPORT to find the space utilization of DB2 dataset. I wanted to know is there any other way/utility to do that?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Jun 13, 2011 9:24 pm    Post subject:
Reply with quote

Hello,

What does your dba say?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Jun 13, 2011 9:24 pm    Post subject:
Reply with quote

as usual the terminology used is incorrect.
db2 does not have datasets.

now, if you were to spend some time with the db2 admin reference,
there are all kinds of sys.... (tables) that contain this information.

based on your db2 version,
either you have to reorg/runstats to keep them up-to-date
or the newer versions have 'run-time' / 'always current' runstats for things like space usage and allocation.
the information that you want is available thru db2 utilities
and querys against the sysibm-tables.

as dick scherrer mentioned,
deal with db2 via db2.

this is another example of 'a little knowledge is a dangerous thing'.
if you attempt to deal with db2 data thru the underlying lds,
not even ibm will help you if you screw it up.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Tue Jun 14, 2011 4:18 pm    Post subject:
Reply with quote

gylbharat,

Currently the best available option is to query the catalogs SYSTABLESPACESTATS look for column SPACE, DATASIZE.

Thanks,
Sushanth
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
No new posts FTOPEN TEMP is failing due to dataset... mbenaud TSO/ISPF 7 Thu Jul 28, 2016 4:28 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us