Easy way to get rec count
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Application Programming

#1: Easy way to get rec count Author: Kannan PostPosted: Fri Mar 21, 2003 11:40 am
    —
Hi,

My aim is to get the record counts of 30 seq files. Ultimately these rec counts have to be updated in a VSAM file. I can write a COBOL program to do this task. Please let me know is there any other way.

If writing COBOL program is the only way, then I wanted to discuss the following. Performance wise I am looking for a better option.
Option 1 : Open all the files
Reading one after another to get record count of each file
update VSAM file
Close all the files
Option 2 : Open first file A
Read the file A until eof
update VSAM file for the record count of fileA
CLose file A
<Do the same process for all the 30 files>
Looking forward to have better option. Thanks for your help, Kannan

#2:  Author: CaptBillLocation: Pasadena, California, USA PostPosted: Fri Mar 21, 2003 12:06 pm
    —
If you just want a record count then the following VISION: Results or DYL-280 program will give you what you asked for.
Code:

//DYL280     EXEC PGM=DYL280                         
//SYSPRINT DD  SYSOUT=*                               
//SYSOUT   DD  SYSOUT=*                               
//SYS004   DD  UNIT=SYSDA,SPACE=(TRK,(10,5))         
//*                                                   
//SYS280R  DD  SYSOUT=*                               
//*                                                   
//YOURFILE   DD  DSN=you.actual.file.name,DISP=SHR   
//SYSIN     DD *                                     
FILE YOURFILE                                         
/*
//


After is is run, one of the outputs is a record and character count for each file,
Code:

COMPUTER ASSOCIATES       VISION:RESULTS  5.0 *           
         1         2         3         4         5         
12345678901234567890123456789012345678901234567890123456789
VISION:RESULTS CONTROL TOTALS                             
                                                           
FILE       RECORD         CHARACTER     BLOCK     DROPPED 
 ID         COUNT           COUNT       COUNT   BLOCK COUNT
                                                           
YOURFILE         200            70,400                     

#3:  Author: vallisharLocation: BengaLuru PostPosted: Fri Mar 21, 2003 12:40 pm
    —
Hi,

Refer to the following links, you could get the record count using SORT/ICETOOL.

http://www.mvsforums.com/helpboards/viewtopic.php?t=361

http://www.mvsforums.com/helpboards/viewtopic.php?t=360



MVSFORUMS.com -> Application Programming


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group