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

Finding %used space of a Dataset using REXX


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

New User


Joined: 26 Oct 2006
Posts: 3
Location: chennai

PostPosted: Thu Apr 19, 2007 10:47 am
Reply with quote

Hi all,

Could you please help me in writting a REXX code to find the %used space of a dataset .

Example:

Tracks %Used XT Device

3 66 1 3390


i need to find the %used of any dataset name given as input to the Rexx code.
Back to top
View user's profile Send private message
expat

Global Moderator


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

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

Quote:
i need to find the %used of any dataset name given as input to the Rexx code.

WHy in REXX, can you not use 3.4
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:46 pm
Reply with quote

Two methods:
1. LISTDSI
2. DSINFO

O.
Back to top
View user's profile Send private message
bubesh_skills

New User


Joined: 26 Oct 2006
Posts: 3
Location: chennai

PostPosted: Fri Apr 20, 2007 7:51 am
Reply with quote

i can use 3.4, the need to code in REXX is because i have to develop a tool which will display the %used space for all members of a Dataset


Example:

Dataset Name %used

eee.memberone 66
eee.membertwo 80
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Fri Apr 20, 2007 10:56 am
Reply with quote

Again, you can do that in REXX using LISTDSI or DSINFO.

O.
Back to top
View user's profile Send private message
bubesh_skills

New User


Joined: 26 Oct 2006
Posts: 3
Location: chennai

PostPosted: Fri Apr 20, 2007 12:28 pm
Reply with quote

Hi ofer71

CCC.GYYYY.BACKUP

For the above DS the %used was 90%.
By using LISTDSI i can able to get the following details.
And by using the Allocated space(SYSALLOC) and used space(SYSUSED)
ie 18/20*100 i can get the 90%


DATASET NAME .. CCC.GYYYY.BACKUP
ORGANIZATION .. PO
RECORD FORMAT .. FB
BLOCKSIZE .. 27920
RECORD LENGTH .. 80
DATE CREATED .. 2007/047
VOLUME SERIAL .. TS014E
ALLOCATION .. 20 TRACK
PRIMARY .. 20 TRACK
SECONDARY .. 15 TRACK
LAST USED ON .. 2007/108
USED SO FAR .. 18
TOTAL MEMBERS .. 8
DIR BLK ASSIGNED .. 20
DIR BLK USED .. 2
CREATED ON .. 2007/047
REFERENCED LAST .. 2007/108



But in the following DS the %used was 60%
but the units are in cylinder ie; the allocated is 1 cylinder and used also 1 cylinder, so how can i get the value 60%

CEC.GY338.COPYLIB


DATASET NAME .. CEC.GY338.COPYLIB
ORGANIZATION .. PO
RECORD FORMAT .. FB
BLOCKSIZE .. 1680
RECORD LENGTH .. 80
DATE CREATED .. 2007/031
VOLUME SERIAL .. TS013E
ALLOCATION .. 1 CYLINDER
PRIMARY .. 1 CYLINDER

SECONDARY .. 2 CYLINDER
LAST USED ON .. 2007/108
USED SO FAR .. 1
TOTAL MEMBERS .. 3
DIR BLK ASSIGNED .. 368
DIR BLK USED .. 1
CREATED ON .. 2007/031
REFERENCED LAST .. 2007/108
***

Could you help me calculating the %used when the space are allocated in cylinders.
Back to top
View user's profile Send private message
foliater

New User


Joined: 06 Apr 2006
Posts: 31

PostPosted: Fri Apr 20, 2007 2:01 pm
Reply with quote

Use LISTDSI and get the following info.

address ispexec
x = LISTDSI("'"filename"'")

say sysdsname
say syslrecl
say sysblksize
say sysused
say sysalloc

LISTDSI gives many other info. on a file.
check out this link for more details

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ikj3a330/4.4.2?ACTION=MATCHES&REQUEST=listdsi&TYPE=FUZZY&SHELF=&DT=20000710164756&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Apr 20, 2007 2:17 pm
Reply with quote

If you read what the OP has subsequently posted, he has used LISTDSI.

LISTDSI will return the number of used "ALLOCATION UNITS", so if a dataset is allocated in cylinders and your dataset has only used one bytes of that cylinder, LISTDSI will return that one cylinder has been used.
Back to top
View user's profile Send private message
raam

New User


Joined: 29 Jan 2007
Posts: 13
Location: mumbai

PostPosted: Thu Jun 14, 2007 4:59 pm
Reply with quote

Hi,

This is exactly my problem here too..

Do we have a solution for this.

Even i need it for developing a tool in Rexx.

Regards,
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 Replace each space in cobol string wi... COBOL Programming 3
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
Search our Forums:

Back to Top