Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to find the number of records using rexx program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: How to find the number of records using rexx program
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

Moderator Team Head


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

PostPosted: Wed Jan 10, 2007 4:21 pm    Post subject: Re: How to find the number of records using rexx program
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    Post subject: Thanks
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    Post subject:
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: 2360
Location: Israel

PostPosted: Sat Jan 20, 2007 5:16 pm    Post subject:
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

Site Director


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

PostPosted: Sun Jan 21, 2007 8:00 am    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us