What is Sort Status in COBOL

Sort status is like ‘File status’ in COBOL. With sort status clause, you can get sort or merge successful or not in the COBOL.

The syntax is:

Select file-name assign to dd-name

Sort Status IS data-name1.

It is two-char field. In the case of Sort/merge error, it shows appropriate error.

The below are optional in COBOL sort.

  • Record Contains
  • Data Records

  • Value of File-id


Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.