View previous topic :: View next topic
|
Author |
Message |
swapnadeep.ganguly
Active User
Joined: 21 Mar 2007 Posts: 203 Location: India
|
|
|
|
Hi,
I am having one enquiry. Can we sort more than one file in a COBOL program using the same SORTWORK space? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
What does the manual (link at the top of the page) tell you? |
|
Back to top |
|
|
swapnadeep.ganguly
Active User
Joined: 21 Mar 2007 Posts: 203 Location: India
|
|
|
|
Actually I am facing a problem...
I am having a LIST file that has number of file names written in the same. These files have unsorted data and my aim is to sort the records present in these input files.
I am currently dynamically allocating the input file as well as the output file with in the cobol program. The program is sorting as well as writing the first file properly.
But when I am trying to sort the next files, the SORTWORK variable is still having the last record of the previous file and thus I am unable to proceed with the sorting and the remaining files that are generated are having no records.
I have initialized the SORTWORK as well as WORKING STORAGE variables but this was of no help...
Can any one please let me know, where m i going wrong.. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I have initialized the SORTWORK as well as WORKING STORAGE variables but this was of no help... |
How does one initialize sortwk?
Quote: |
the SORTWORK variable is still having the last record of the previous file |
What is "the SORTWORK variable"? This is not a familiar term to me. Please clarify.
An SD can be sorted multiple times in the same program. . . (or could be long ago ). I expect it still can. |
|
Back to top |
|
|
swapnadeep.ganguly
Active User
Joined: 21 Mar 2007 Posts: 203 Location: India
|
|
|
|
Hi Dick,
We were able to perform the sort.. We were going wrong in one aspect... The flag that was set after performing the sort was not initialized... So we were having the problem...
Thanks to all of you who were bothered... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Good to hear it is working - thanks for letting us know
d |
|
Back to top |
|
|
|