RELEASE Record-name-1 [ FROM {Identifier-1} ]                              {Literal-1   }  | 
 input-output section.  file-control.    select work-file assign to "sort-workfile".  file section.  sd work-file.  01 work-rec.     03 wr-key-1 pic x(5).     03 wr-key-2 pic x(5).  working-storage section.  01 eof-flag pic x.     88 eof-sort value "Y" false "N".  procedure division.  main.   display x"0d0a" "First sort descending on key 1, ascending on key 2"   sort work-file on descending key wr-key-1                     ascending  key wr-key-2        input procedure is input-proc        output procedure is output-proc.   display x"0d0a" "Second sort descending on key 2, ascending on key 1"   sort work-file on descending key wr-key-2                     ascending  key wr-key-1        input procedure is input-proc        output procedure is output-proc.   goback.   input-proc.      release work-rec from "aaaaabbbb1"      release work-rec from "aaaaazzzz2"      release work-rec from "ccccczzzz3"      release work-rec from "cccccdddd4"      release work-rec from "cccccmmmm5"      release work-rec from "zzzzzcccc6"      release work-rec from "zzzzzaaaa7"      release work-rec from "zzzzznnnn8".   output-proc.       set eof-sort to false       perform until eof-sort         return work-file          at end set eof-sort to true          not at end display work-rec         end-return       end-perform.  |