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

Records count without using ISREDIT


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

New User


Joined: 17 Mar 2009
Posts: 27
Location: Bangalore

PostPosted: Fri Feb 10, 2012 1:00 pm
Reply with quote

I have a PS file with huge amount of records in it and I need to get the total number of records using REXX.

I tried using STEM variables, but since it so huge I'm getting Memory allocation error.

Is it possible to get the job done, without using STEM variables and ISREDIT ?

A code snippet for the same would be much helpful.

Regards,
Vamshi
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Feb 10, 2012 1:39 pm
Reply with quote

Yes it would be possible, but EXECIO is not a great way to do it as it is quite inefficient for large data volumes.

You could read the file via IEBGENER or SORT, outputting to a dummy file, and then parse the SYSOUT / SYSPRINT output to get the count.

But why do you need to do this, if the creating programs were written correctly this information should already be known.
Back to top
View user's profile Send private message
kalyan418

New User


Joined: 03 Jan 2007
Posts: 2
Location: chennai

PostPosted: Fri Feb 10, 2012 2:45 pm
Reply with quote

Is there any alternate way to do this reuirement using rexx
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Feb 10, 2012 2:55 pm
Reply with quote

Of course. Call SORT from rexx.

Here is a topic with some sort cards for counting.

Search here or the web for examples of using Sort from rexx.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Feb 10, 2012 3:50 pm
Reply with quote

You could read one record at a time and count them or read a block of records at a time and accumulate totals. Drop the stem before doing the next read. Still a waste of resource when other utilities can do it much more efficiently.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Feb 10, 2012 7:17 pm
Reply with quote

Quote:
I have a PS file with huge amount of records in it and I need to get the total number of records using REXX.


then REXX is not the best tool for it!
there are novemtrigintillion examples on the forum ( JCL or DFSORT ) on how to do it using <SORT>
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(F1 & F2) and writ... JCL & VSAM 8
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top