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

I want to find the %used of a PDS using REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
karthik-guruprasad

New User


Joined: 17 Apr 2007
Posts: 6
Location: chennai

PostPosted: Thu Apr 19, 2007 1:25 pm
Reply with quote

I have n no of PDS.I want to write a REXX code to find out those datasets which have crossed more than 95% used .could any one help me in giving out this code.The ouput should be when I give TSO PDS i should get


PDS %used
cec.karthik.pds 96
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Apr 19, 2007 1:43 pm
Reply with quote

The LISTDSI function populates some variables with info regarding the dataset in question. For more details, please refer to the fine manual.

In the same manner, you can use the ISPF service DSINFO.

O.
Back to top
View user's profile Send private message
karthik-guruprasad

New User


Joined: 17 Apr 2007
Posts: 6
Location: chennai

PostPosted: Sat Apr 21, 2007 9:45 pm
Reply with quote

the 3.4 option gives %used but my requirement is to find the datsets which have %used greater than 95%.How to code in rexx.The listdsi command gives information only when it is allocated in tracks.But when comes to cylinder I am not able to get the required calculation.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Sat Apr 21, 2007 10:03 pm
Reply with quote

DCOLLECT records show the usage and allocation in Kb, but can certainly be a real pain to interpret.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Sat Apr 21, 2007 11:33 pm
Reply with quote

Hello,

You can save the data returned via 3.4 and use it to check the %used.
Back to top
View user's profile Send private message
karthik-guruprasad

New User


Joined: 17 Apr 2007
Posts: 6
Location: chennai

PostPosted: Sun Apr 22, 2007 10:58 am
Reply with quote

How could I do that??some sample code????
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Sun Apr 22, 2007 12:45 pm
Reply with quote

Quote:
some sample code????

In deference to one of Dick's comments in another thread, I'll do the code for a fixed price icon_biggrin.gif

The layout of DCOLLECT records can be found here
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2I230/CCONTENTS?DT=20040628101835

And, if you follow the links supplied by Frank in the SORT forum, there are some examples of how this or something similar can be done.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Sun Apr 22, 2007 9:15 pm
Reply with quote

Hello,

If you are in 3.4 and have produced a dataset list, you can create a file of that list by typing "SAVE my.filelist" in the command line. A file named my.filelist with the high-level node of either your id or your prefix (depending on how your site is set up) will be created. You can use this file as input to other processes to get what you want.

The "my.filelist" may be any valid dsn but make sure it is a new name rather than an existing one.

Expat - cross-topic harrassment? heh heh heh icon_smile.gif
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top