Microsoft KB Archive/11275

End-of-File Used by MS SORT Is Different Than COBOL PSS ID Number: Q11275 Article last modified on 06-10-1988 PSS database name: B_SORT

1.01

MS-DOS

Summary:

When SORT sorts a Sequential file created in Microsoft COBOL Versions 2.00, 2.10, or 2.20, the end-of-file used by MS SORT (CTRL-Z, or hex 1A) is different than the end-of-file used and recognized by COBOL (which shows the exact number of bytes in the file). This difference prevents the AT END condition in COBOL from meeting, and generates a “File Structure Error” file status. The following are two workarounds for this problem:


 * 1) Use the SORT verb (which is built into COBOL Versions 2.00, 2.10, and 2.20) instead of the separate MS SORT Version 1.01 utility.
 * 2) WRITE a COBOL program that READs from the Sequential file and WRITEs to a new Line Sequential file. MS SORT can then sort the Line Sequential file.

Microsoft is researching this problem and will post new information as it becomes available.

Copyright Microsoft Corporation 1988.