View previous topic :: View next topic
|
Author |
Message |
kalaikala
New User
Joined: 21 Jul 2007 Posts: 27 Location: Chennai
|
|
|
|
Can anyone tell me which would be best in performance?.
My requirement is, I have an input file with 800 byte record length. This file contains more than 10 million records.
I want to sort(STEP1) this file by first 5 bytes(1-5) and I am going to use only first 13 bytes (1- 13) in COBOL program(STEP2).
Two ways:
1 . Using OUTREC to get 13 bytes in my sorted file and using only 13 bytes in STEP2(COBOL program).
2. Just sorting file without OUTREC and reading 800 bytes in COBOL program.
Which would improve the performance?. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Would you not want to reduce the data size (truncate the record)
between the first READ and the first WRITE?
The first WRITE being the release of the record to SORT.
I would utilize INREC instead of OUTREC to truncate the record. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
I'd vote for the third way as follows:
3. Use INREC to get 13 bytes in my sorted file and using only 13 bytes in STEP2(COBOL program).
Note that INREC will shorten the records before they are sorted, whereas OUTREC will shorten the records after they are sorted. The less bytes you sort, the better, so INREC is a better choice here than OUTREC.
Of course, the only way to know for sure which method performs betst in your specific situation would be to try all three methods and compare the "performance" indicators you're interested in. |
|
Back to top |
|
|
|