Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 4648
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 Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us