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

Check for Free Space / Space Utilisation for a library (PDS)


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

New User


Joined: 22 May 2007
Posts: 19
Location: Belfast, UK

PostPosted: Tue Apr 21, 2009 6:21 pm
Reply with quote

Is there a utility in JCL or a REXX code that would check the below
1. Amount of Free Space (ie CYLS or TRK, etc) available
2. % Utilization

Basically, I'd like to automate such a process so that I could know well ahead of 100% utilisation. I could then allocate more space and in turn prevent my production jobs from abending.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Tue Apr 21, 2009 8:36 pm
Reply with quote

Could you not just use PDSe rather than PDS?

Garry.
Back to top
View user's profile Send private message
shanbalasay

New User


Joined: 22 May 2007
Posts: 19
Location: Belfast, UK

PostPosted: Tue Apr 21, 2009 9:21 pm
Reply with quote

Hi Garry,

I'm actually looking for a method or approach (JCL Utility or a REXX code) that would fetch me the required information either from a PDSE or a PDS.

I'd be very grateful if I get information to handle both PDSE and PDS as well.

Thanks
Bala
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Tue Apr 21, 2009 9:21 pm
Reply with quote

Questions that come to mind:
1) Why not use PDSe (as Garry suggested)?
2) Why would a production job be sending output to a PDS member?
3) Why not put a space parameter on the production job so if it does go into extents it can get whatever you deem necessary?
4) Why bother, anyway? No matter what you do sooner or later a bigger production file will be processed and force a space abend for the PDS.
5) Why not get the site using STOP X37 or something similar?
Back to top
View user's profile Send private message
shanbalasay

New User


Joined: 22 May 2007
Posts: 19
Location: Belfast, UK

PostPosted: Tue Apr 21, 2009 10:44 pm
Reply with quote

Hi Robert,

Answers to your Questions:

1) Why not use PDSe (as Garry suggested)?
There are 1000s of PDSs or PDSe's already in production at the moment. They are being used on a regular basis

2) Why would a production job be sending output to a PDS member?
100s of members are being copied to production libraries (PDS or PDSe) which we support

3) Why not put a space parameter on the production job so if it does go
into extents it can get whatever you deem necessary?
I might agree to this suggestion. But it'd mean enhancement on part of the software product that we support.

4) Why bother, anyway? No matter what you do sooner or later a bigger production file will be processed and force a space abend for the PDS.
I have to be proactive in finding if a production library is nearing 100% utilization I'd have to place a request to Mainframe Admin to increase the space so that the product I support is not blamed for it. Secondly, the users of the product wouldnt face the problem during the critical time of production implementation

5) Why not get the site using STOP X37 or something similar?
This is something which I'm not aware of.

Well, all that I'm looking for is any simple JCL utility or a REXX/CLIST code or any other simple method with which I can use to retrieve the dataset information (Only the space parameters) and check for the available space. If its around 85% to 90% utilised, I could then take a precautionary step to increase the space by 20% so that if there are any production implementation going on, it'd not affect them.

If there'd be a possibility of doing this, I'd then think of automating the process weekly or monthly and receive a report through email from the mainframes.

Your valuable suggestions would be very much welcome.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Wed Apr 22, 2009 12:42 am
Reply with quote

You could write one in REXX using LISTDSI.
Back to top
View user's profile Send private message
shanbalasay

New User


Joined: 22 May 2007
Posts: 19
Location: Belfast, UK

PostPosted: Thu Apr 23, 2009 11:29 pm
Reply with quote

Hi Douglas,

Thanks for clue. I could get the below information with the LISTDSI and its related variables; SYSDSORG, SYSRECFM, SYSUNITS, SYSALLOC, SYSUSED, SYSPRIMARY, SYSSECONDS

Dataset Organisation : PO
Record Format : U
Space Units : CYLINDER
Allocation (Space units) : 6
Allocation used (Space units): N/A
Primary Alloc. (Space units) : 5
Sec. Alloc. (Space units) : 20

However, I couldnt find the variable that'd return % Utilisation. I'll continue to search for it.

Thanks for your help.

Thanks to Garry & Robert too.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Fri Apr 24, 2009 1:11 am
Reply with quote

Think about it a little. Assuming the dataset does not span multiple packs.

If I remember right total space = primary + (16 * secondary)
% Used = used space / total space * 100

I think you have all of the number you need.

For a PDS you might want to check the percent of directory space used also.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri Apr 24, 2009 1:32 am
Reply with quote

Douglas: there is one complicating factor: a primary allocation may be spread across as many as 5 extents, which only leaves 11 extents for secondary allocations. This normally only happens for highly fragmented packs but I have seen it happen.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Fri Apr 24, 2009 3:59 am
Reply with quote

Yes, that is right.

What about Total space = Used + ((17 - sysextents) * secondary)
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Calling an Open C library function in... CICS 1
No new posts Submit multiple jobs from a library t... JCL & VSAM 14
Search our Forums:

Back to Top