SORTING UNDER CICS - IBM Mainframe

There is no IBM sort product that is supported under CICS. However, you can use the SORT statement with a sort program you write that runs under CICS to sort small amounts of data. You must have both an input and an output procedure for the SORT statement. In the input procedure, use the RELEASE statement to transfer records from the COBOL program to the sort program before the sort is performed. In the output procedure, use the RETURN statement to transfer records from the sort program to the COBOL program after the sort is performed.

CICS SORT Application Restrictions

The following restrictions apply to VS COBOL II applications, which are written using the SORT statement and will run under CICS.

  • SORT statements that include the USING or GIVING phrase are not supported.
  • Sort control data sets are not supported. Data in the SORT-CONTROL special register is ignored.
  • Using the following CICS commands in the input/output procedures may cause unpredictable results: LINK, XCTL, RETURN, HANDLE, IGNORE, PUSH, POP, etc.
  • CICS commands, other than those in the preceding list, are allowed provided they are used with the NOHANDLE or RESP option. Unpredictable results may occur if the NOHANDLE or RESP option is not used.
  • Any CICS HANDLE or CICS HANDLE ABEND commands specified in the COBOL program prior to executing the SORT statement will not be in effect during the SORT.
  • The COBOL sort input/output procedure can contain CALLs to nested programs. Calls to separately compiled programs are not allowed and unpredictable results may occur.

We have seen how to perform sort and merge operations in VS COBOL II. We will now see how to transfer control to another program in the next chapter—Subprogram Linkage.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics