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

How to find the number of records using rexx program


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

New User


Joined: 20 Dec 2006
Posts: 5
Location: india

PostPosted: Wed Jan 10, 2007 3:55 pm
Reply with quote

Hi ,
Can any one tell me How to find the number of records using rexx program?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Jan 10, 2007 4:21 pm
Reply with quote

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
View user's profile Send private message
sundar_er

New User


Joined: 20 Dec 2006
Posts: 5
Location: india

PostPosted: Fri Jan 19, 2007 8:30 pm
Reply with quote

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
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Fri Jan 19, 2007 8:51 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sat Jan 20, 2007 5:16 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Jan 21, 2007 8:00 am
Reply with quote

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
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Tue Jan 23, 2007 3:01 am
Reply with quote

I will Attach the correct readable files after the above have been deleted
as the are not readable. SORRY.
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Tue Jan 23, 2007 8:38 pm
Reply with quote

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
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Using API Gateway from CICS program CICS 0
No new posts Running REXX through JOB CLIST & REXX 13
Search our Forums:

Back to Top