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

How to find the attributes of datset


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

New User


Joined: 06 Sep 2006
Posts: 3

PostPosted: Mon Oct 09, 2006 10:52 am
Reply with quote

Hi all,

I wanted to find the total number of allocated and used space of dataset using REXX. And wanted to used that figures in next programmimg.

Please suggest me how can I do this?
Back to top
View user's profile Send private message
bonniem

New User


Joined: 09 Aug 2005
Posts: 67

PostPosted: Mon Oct 09, 2006 11:20 am
Reply with quote

Issue the command
Code:

LISTDSI("'"DSN"'" RECALL)


Then check the values of variables
Code:

SYSALLOC        | Allocation, in space units
SYSUSED         | Allocation used, in space units
Back to top
View user's profile Send private message
prajal123

New User


Joined: 06 Sep 2006
Posts: 3

PostPosted: Tue Oct 10, 2006 5:08 pm
Reply with quote

Hi bonniem,

Thanks for the splution. BUt I am not gerriong the values in SYSALLOC & SYSUSED.

Could you please provide me some another option.
Back to top
View user's profile Send private message
bonniem

New User


Joined: 09 Aug 2005
Posts: 67

PostPosted: Tue Oct 10, 2006 5:23 pm
Reply with quote

try using this piece of code and then get values from the variables.

Code:

X = LISTDSI("'"DSN"'" RECALL)                                         
CC  = SYSREASON                                                       
IF CC > 0 THEN DO                                                     
   SELECT                                                             
     WHEN CC  = 19 THEN DO                                             
       ZEDSMSG = "MULTI-VOLUME DATASET"                               
       ZEDLMSG = DSN ": IS A MUTLI-VOLUME DATASET"                     
       END                                                             
     WHEN CC  = 9 THEN DO                                             
       ZEDSMSG = "MIGRATED"                                           
       ZEDLMSG = DSN ": IS MIGRATED TO NONDASD DEVICE"                 
       END                                                             
     WHEN CC  = 8 THEN DO                                             
       ZEDSMSG = TAPE                                                 
       ZEDLMSG = DSN ": IS NOT ON A DIRECT ACCESS DEVICE"             
       END                                                             
     WHEN CC  = 5 THEN DO                                             
       ZEDSMSG = "NOT CATLOGUED"                                       
       ZEDLMSG = DSN ": NOT CATLOGUED LOCATE MACRO ERROR"             
       END                                                             
     OTHERWISE DO                                                     
       ZEDSMSG = "RC: " CC                                             
       ZEDLMSG = "LOOK UP REASON CODE IN MVS REXX REFERENCE MANUAL PAGE
       END                                                             
    END   /* END SELECT */                                             
   END                                                                 
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 To find whether record count are true... DFSORT/ICETOOL 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts Find the occurrence of Key Field (Par... DFSORT/ICETOOL 6
No new posts Find a record count/numeric is multip... COBOL Programming 1
No new posts Need to find a specific STRING COBOL Programming 11
Search our Forums:

Back to Top