Absent Member.
Absent Member.
3144 views

9/220 Attempt to execute more than one SORT or MERGE simultaneously

Jump to solution

  Hi,

  i did follow the instructions mentioned in below article "http://community.microfocus.com/microfocus/cobol/net_express__server_express/w/knowledge_base/4311.9220-attempt-to-execute-more-than-one-sort-or-merge-simultaneously.aspx"

I did add the SECTION keyword for both the input and output procedure but still I am getting the same error. I am using VS 2013 with Visual cobol 2.2 on windows 7.

Thank you.

0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

Slightly quirky syntax, but I believe that if you do:

          move 16 to sort-return

...before exiting the input/output procedure, it will cause the sort to terminate immediately.

The SORT-RETURN special register was added to Micro Focus COBOL for IBM compatibility.

View solution in original post

0 Likes
6 Replies
Vice Admiral
Vice Admiral

I suspect that the next step will be that you will be asked to upload the actual source program listing, pared down to the minimal amount to exhibit the error, if possible.

0 Likes
Micro Focus Expert
Micro Focus Expert

Are you doing any go to statements that would cause execution to go to a section outside of the output procedure? Are you doing an exit program or goback within the output section instead of letting it exit normally?

Like Austin1 stated, we really need to see the source or else it is just a guessing game...

Thanks.

0 Likes
Absent Member.
Absent Member.

I am developing a new winform application. Yes the program does goback from input procedure.

In first iteration, when certain business validations are met the program does goback from input procedure to throw message on the winform without executing the output procedure, which is working as expected.

In second iteration, the input procedure is executed completely (goback logic not executed iteration 2) and abends when the control is passed to the output procedure.

0 Likes
Micro Focus Expert
Micro Focus Expert

You cannot do the goback from within the input procedure as this leaves the sort before it has actually completed and leave it in an open state. What you should do in the input procedure is set a flag and then exit the input procedure and then in the output procedure test the flag and exit the procedure so that control returns to the next statement following the sort where you could then do your goback. This will cause the sort to function properly.

0 Likes
Absent Member.
Absent Member.

Is there any explicit statement to close/kill sort deliberately, like end-if ? which will be easier fix without much change in the code.

0 Likes
Micro Focus Expert
Micro Focus Expert

Slightly quirky syntax, but I believe that if you do:

          move 16 to sort-return

...before exiting the input/output procedure, it will cause the sort to terminate immediately.

The SORT-RETURN special register was added to Micro Focus COBOL for IBM compatibility.

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.