Lizette Koehler wrote:
Thanks for all the ideas.  I was hoping for something a little more TSO
oriented where the end user would only see the count of the file.  By doing
strictly batch they would need to know JCL and where to look for the output.
Most of the people that will be using that cannot spell JCL let alone look
though the output.

So I am going to write a wrap around the process, a TSO Rexx to get the
files they want the counts from, build the batch job and send the output to
a file, then when the job completes, have a second process that reads the
output and just displays the file name and record count on the TSO screen.

Have a great day.

Lizette

--
 --I have about a billion ways - well not quite - to count records in a data
set.  I am
 --looking for advise as to what would be the most efficient way to run
either under
 --TSO or BATCH.
 --


When your object is just to evaluate reasonableness of allocation you don't need an exact record count, only an approximate one. Reading the entire PS file by any means is totally unnecessary - all you really need is some way to determine the high-used mark for the dataset. And perhaps just returning tracks/cylinders used and comparing that with what was requested for allocation would serve your purposes here without translating that to records.

For single volume RECFM FB datasets we have used a batch REXX EXEC that I believe uses LISTDSI to find the allocation units, used space, LRECL, BLKSIZE, etc. and determines a min-max range for the possible number of records that might be in the dataset, based on either the number of tracks or cylinders in use. The one case where this technique returns exact results is "0", since 0 tracks/cylinders in use can happen iff there are exactly 0 records. In all other cases you only know that the last track/cylinder used could contain either one record or the max possible number of records in that last allocation unit.

--
Joel C. Ewing, Fort Smith, AR        [EMAIL PROTECTED]

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to