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
 

 

Finding %used space of a Dataset using REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Finding %used space of a Dataset using REXX
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: 8593
Location: Back in jolly old England

PostPosted: Thu Apr 19, 2007 12:43 pm    Post subject:
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: 2360
Location: Israel

PostPosted: Thu Apr 19, 2007 1:46 pm    Post subject:
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    Post subject: Re: Finding %used space of a Dataset using REXX
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: 2360
Location: Israel

PostPosted: Fri Apr 20, 2007 10:56 am    Post subject:
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    Post subject: Re: Finding %used space of a Dataset using REXX
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Apr 20, 2007 2:17 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm


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