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

Finding number of records


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

New User


Joined: 29 May 2007
Posts: 34
Location: chennai

PostPosted: Wed Aug 20, 2008 4:01 pm
Reply with quote

hi,

how to find number of records in the file if the file volume is large

i used
"EXECIO * DISKR IDD (STEM INREC. FINIS"
"FREE FI(IDD)"

INREC.0 will give number of records but when the file volume is large where we can open the file only in the browse mode for such file this is not working fine.

any suggessions.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Aug 20, 2008 4:02 pm
Reply with quote

do not use rexx,
search the forum fos dfsort/syncsort solutions
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Wed Aug 20, 2008 9:49 pm
Reply with quote

Using EXECIO cause the entire file to be read.

You may get by with using the LISTDSI function. It will return the number of cylinders, tracks, block size, record length. With a little bit of math, you can compute the approximate number of records. For a very large file that might be good enough.
Back to top
View user's profile Send private message
Selva-kumar

New User


Joined: 01 Mar 2007
Posts: 52
Location: chennai

PostPosted: Tue Aug 26, 2008 4:46 pm
Reply with quote

Hi,

When going for huge volume of records, rexx wont be that much effective.You can find the number of records using jcl in a simpler way.
Code:

//COUNTIT  EXEC PGM=ICETOOL                   
//TOOLMSG  DD SYSOUT=*                       
//DFSMSG   DD SYSOUT=*                       
//IN1      DD DSN=<name of the file>,DISP=SHR
//TOOLIN   DD *                               
   COUNT FROM(IN1)                           
/*


The number of records will be displayed in spool.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Tue Aug 26, 2008 4:55 pm
Reply with quote

Malathy,

Quote:
The number of records will be displayed in spool.


The number of records would be displayed in TOOLMSG DD in the spool.

ICE628I message will have the record count.
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: Tue Aug 26, 2008 9:01 pm
Reply with quote

Hello,

Once you find the number of records, how will this info be used?
Back to top
View user's profile Send private message
malathy_tv

New User


Joined: 29 May 2007
Posts: 34
Location: chennai

PostPosted: Mon Sep 08, 2008 11:30 am
Reply with quote

am generating a report on this with the file name and the number of records in it

there may be thousands of files as the input, if i use the jcl i have submit it for 1000 of files and goto spool and get the count.

is there any way out of this
Back to top
View user's profile Send private message
Adrian Stern

New User


Joined: 13 Feb 2008
Posts: 12
Location: Sweden

PostPosted: Mon Sep 08, 2008 4:25 pm
Reply with quote

Ask whoever wants the report why they want number of records. This is often irrelevant as the space occupied is most often of concern. File size is readily available.

Remember 1 000 000 lines of one byte is only one line if the record length is 1 000 000 bytes! Useless information, isn't it?

Adrian
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: Mon Sep 08, 2008 9:25 pm
Reply with quote

Hello,

Quote:
am generating a report on this with the file name and the number of records in it
That is what you want to do with the data. What i asked is how will it be used? What business requirement/benefit is there for a list of record counts by file name?

If this is just to satisfy someone's curiosity, the expense may not be worth it.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Sep 09, 2008 11:45 am
Reply with quote

Maybe the beginners version of "Capacity Planning for Dummies".
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 Finding and researching jobs All Other Mainframe Topics 0
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 Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts VB to FB - Finding LRECL SYNCSORT 4
Search our Forums:

Back to Top