If you wanted to keep with REXX then you can get around the region issue by
reading the file into a single level stem (for example).
"alloc fi(input) ds('input_file') shr"
count = 0
do forever
"execio 1 diskr input(stem inp.1"
if rc ¬= 0 then leave
count = count + 1
end
say count
"execio 0 diskr input(finis"
"free fi(input)"
The above code should use the same amount of region regardless of how large the
input file is.
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of
Lizette Koehler
Sent: Thursday, April 26, 2007 9:04 AM
To: [email protected]
Subject: Re: Better way to count records
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.
--
----------------------------------------------------------------------
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
----------------------------------------------------------------------
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