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
 

 

Finding number of records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Finding number of records
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Wed Aug 20, 2008 4:02 pm    Post subject: Reply to: Finding number of records
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

Senior Member


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

PostPosted: Wed Aug 20, 2008 9:49 pm    Post subject: Reply to: Finding number of records
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    Post subject: Reply to: Finding number of records
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: 1288
Location: Chennai, India

PostPosted: Tue Aug 26, 2008 4:55 pm    Post subject: Reply to: Finding number of records
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

Site Director


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

PostPosted: Tue Aug 26, 2008 9:01 pm    Post subject:
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    Post subject:
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    Post subject: Finding number of records
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

Site Director


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

PostPosted: Mon Sep 08, 2008 9:25 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Sep 09, 2008 11:45 am    Post subject:
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    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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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