View previous topic :: View next topic |
Author |
Message |
Kannan Beginner
Joined: 13 Mar 2003 Posts: 5 Topics: 2
|
Posted: Fri Mar 21, 2003 11:40 am Post subject: Easy way to get rec count |
|
|
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 |
|
Back to top |
|
|
CaptBill Beginner
Joined: 02 Dec 2002 Posts: 100 Topics: 2 Location: Pasadena, California, USA
|
Posted: Fri Mar 21, 2003 12:06 pm Post subject: |
|
|
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
|
|
|
Back to top |
|
|
vallishar Beginner
Joined: 17 Dec 2002 Posts: 53 Topics: 14 Location: BengaLuru
|
|
Back to top |
|
|
|
|