Microsoft KB Archive/21079

SORTing an ISAM File Requires an INPUT and an OUTPUT PROCEDURE

PSS ID Number: Q21079 Article last modified on 11-16-1992

2.00 2.10 2.20 MS-DOS

Summary: When using the SORT command to sort ISAM files, both the input file and the output file must be OPENed by the COBOL program prior to execution of the SORT command. The COBOL program also must CLOSE the data files. ISAM does not support the USING..GIVING format of the SORT command (which automatically OPENs and CLOSEs the data files used in the SORT). Therefore, you must have an INPUT PROCEDURE and an OUTPUT PROCEDURE, using the commands RELEASE and RETURN when sorting ISAM files. The “Microsoft COBOL Compiler Reference Manual” for Version 2.x provides an example of sorting using the INPUT/OUTPUT PROCEDURE technique on Pages 375-379.

Copyright Microsoft Corporation 1992.