View previous topic :: View next topic
|
Author |
Message |
sundar_er
New User
Joined: 20 Dec 2006 Posts: 5 Location: india
|
|
|
|
Hi ,
Can any one tell me How to find the number of records using rexx program? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Sure.
Set the counter to zero.
Read a record.
Add 1 to the counter
Continue until you reach EOF.
OR
Read the entire dataset into a stem array. The number zero entry of the stem (stemname.0) will contain the number of items read.
OR
Run DFSORT/ICETOOL with the COUNT parameter, as shown by many examples in the DFSORT Forum. |
|
Back to top |
|
|
sundar_er
New User
Joined: 20 Dec 2006 Posts: 5 Location: india
|
|
|
|
Thanks superk ..
Even i tried the same technique but stem approach is failing when my dataset contains records in millions ....
Any other function in rexx which does this .... |
|
Back to top |
|
|
Mickeydusaor
Active User
Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
I had the same problem, so I wrote a little Assembler program to handle
this. I you want to contact me about it, I would be glad to send you the source as its only 230 lines of code. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
If the file is to big, you might want to use LISTDSI, then calculate the number of records based on REFB, LRECL and size allocated.
O. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Why not post the assembler code here? You could "post" it as a downloadable text file.
It has been asked several times and the answer could benefit several others. |
|
Back to top |
|
|
Mickeydusaor
Active User
Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
I will Attach the correct readable files after the above have been deleted
as the are not readable. SORRY. |
|
Back to top |
|
|
Mickeydusaor
Active User
Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
I will try this one more time. I have included the two PANELS used in the REXX Exec. The included REXX is only the code used for the SEQ. Files as
my full REXX code also process PO and VSAM file COUNTS. |
|
Back to top |
|
|
|