Page 1 of 1

Rexx code to find the size of a dataset in kilobytes

PostPosted: Thu Aug 06, 2009 5:23 pm
by ngsivaraman
hi ,

i am new to rexx, currently i am working on this rexx code to determine the size of a dataset in kilobytes.

input can be a 'PDS' ,'PS' ,'VSAM' anything except GDG 's .Output is the size in kilobytes. It Would helpful if a sample code is provided.

Thanks in advance.
Sivaraman

Re: Rexx code to find the size of a dataset in kilobytes

PostPosted: Thu Aug 06, 2009 5:32 pm
by expat
Where do you source the information from to be able to process it by REXX

Re: Rexx code to find the size of a dataset in kilobytes

PostPosted: Thu Aug 06, 2009 6:03 pm
by ngsivaraman
Through Execio we Read the datset. From which we have to determine size of the datset.

Re: Rexx code to find the size of a dataset in kilobytes

PostPosted: Thu Aug 06, 2009 6:26 pm
by expat
WRONG - EXECIO is one of the worst performers of IO for larger files.
Just think of the resource you could waste.

There are more efficient methods available, ISMF being one of them.

Suggest you have a chat with your friendly storage management team to see if they already report on this kind of thing. Why reinvent the wheel if it's already done.

Re: Rexx code to find the size of a dataset in kilobytes

PostPosted: Thu Aug 06, 2009 11:50 pm
by dick scherrer
Hello and welcome to the forum,

Through Execio we Read the datset. From which we have to determine size of the datset.

Does your family have the hardware contract? The only reason to do this is if you/your family make money based on resources required.

This is an incredible waste of system resources. . .

On a well-managed environment, it would not be permitted.

Re: Rexx code to find the size of a dataset in kilobytes

PostPosted: Fri Aug 07, 2009 3:58 pm
by expat
ngsivaraman

In response to your PM requesting code.
1) I do not undertake offline Q&A sessions. The forum is for all members to learn from.
2) I do not possess the code to satisfy your request, and will certainly not write any unless
- (a) I need it for myself.
- (b) It is undertaken as a commercial project

DCOLLECT D records will contain the data you need. These are detailed in the IDCAMS manual.
To read the IDCAMS manual, Click HERE

Good luck with your coding, and if you need any help with the issues you find, please let us know.

Re: Rexx code to find the size of a dataset in kilobytes

PostPosted: Fri Aug 07, 2009 5:06 pm
by expat
Also, to give you an idea of the programming involved, I have just posted an old job on the main forum which uses REXX code to interpret DCOLLECT V records.

Click HERE to see it.