Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Check for Free Space / Space Utilisation for a library (PDS)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Check for Free Space / Space Utilisation for a library (PDS)
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

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Apr 21, 2009 8:36 pm    Post subject:
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    Post subject:
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: 8154
Location: East Dubuque, Illinois, USA

PostPosted: Tue Apr 21, 2009 9:21 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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: 8154
Location: East Dubuque, Illinois, USA

PostPosted: Fri Apr 24, 2009 1:32 am    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts The TS7720 is out of cache space. Rex Montemayor All Other Mainframe Topics 2 Mon Sep 25, 2017 7:18 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
This topic is locked: you cannot edit posts or make replies. How to save expanded jcl's into one l... enrico-sorichetti CLIST & REXX 13 Thu Jul 27, 2017 2:45 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts VSAM Space Allocation mrgnndhmk JCL & VSAM 7 Sat Apr 22, 2017 12:42 am

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