View previous topic :: View next topic
|
Author |
Message |
malathy_tv
New User
Joined: 29 May 2007 Posts: 34 Location: chennai
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
do not use rexx,
search the forum fos dfsort/syncsort solutions |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
Selva-kumar
New User
Joined: 01 Mar 2007 Posts: 52 Location: chennai
|
|
|
|
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 |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Once you find the number of records, how will this info be used? |
|
Back to top |
|
|
malathy_tv
New User
Joined: 29 May 2007 Posts: 34 Location: chennai
|
|
|
|
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 |
|
|
Adrian Stern
New User
Joined: 13 Feb 2008 Posts: 12 Location: Sweden
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Maybe the beginners version of "Capacity Planning for Dummies". |
|
Back to top |
|
|
|