DOS/360 betrays its unit record (tab card) processing roots with the inclusion of several sort utilities.
Documentation for DOS/360 SORT is hard to come by; I used the DOS/VS SORT manuals, but several of the DOS/VS SORT control statement keywords do not work. Here's what I have learned:
DLBL file names: SORTOUT is always the output file. Input files are named SORTIN1 - n, and work file names are always SORTWK1 - n. Control card keywords that change this fixed assignment did not exist until later versions of SORT and do not work with this version.
Logical Units: The output is always to SYS001, the input file(s) are assigned to SYS002 and increase by one for each input file, and the work files follow the last input file logical unit, again increasing by one for each workfile. Control card keywords that change this fixed logical unit assignment did not exist until later versions of SORT and do not work with this version.
Because the logical unit assignments for sort work files change based on the number of input files, it is very difficult to set up standard logical unit assignments and DLBL/EXTENT statements for the work files. Standard labels loaded during system generation for BG and for F2 assume one input file. Jobs that use more than one input will require complete JCL statements to identify and assign work files.
The installation verification procedure jobs VERIFY01-04 include working SORT steps and provide JCL examples for sorting tape input and output files.
// DLBL SORTOUT,'OUTPUT FILE',0,SD
// EXTENT SYS001,WRKVOL,1,0,20,200
// DLBL SORTIN1,'INPUT FILE 1',0,SD
// EXTENT SYS002,WRKVOL,1,0,220,200
// DLBL SORTIN2,'INPUT FILE 2',0,SD
// EXTENT SYS003,WRKVOL,1,0,420,200
// DLBL SORTWK1,'WORK FILE 1',0,SD
// EXTENT SYS004,WRKVOL,1,0,620,200
// DLBL SORTWK2,'WORK FILE 2',0,SD
// EXTENT SYS005,WRKVOL,1,0,820,200
// DLBL SORTWK3,'WORK FILE 3',0,SD
// EXTENT SYS006,WRKVOL,1,0,1020,200
// ASSGN SYS001,X'cuu' OUTPUT FILE
// ASSGN SYS002,X'cuu' INPUT FILE 1
// ASSGN SYS003,X'cuu' INPUT FILE 2
// ASSGN SYS004,X'cuu' WORKPUT FILE 1
// ASSGN SYS005,X'cuu' WORKPUT FILE 2
// ASSGN SYS006,X'cuu' WORKPUT FILE 3
// EXEC SORT
SORT FIELDS=(...),FILES=2,WORK=3
(other control statements)
END
/*
// DLBL SORTOUT,'OUTPUT FILE',0,SD
// EXTENT SYS001,WRKVOL,1,0,20,200
// DLBL SORTIN1,'INPUT FILE 1',0,SD
// EXTENT SYS002,WRKVOL,1,0,220,200
// DLBL SORTWK1,'WORK FILE 1',0,SD
// EXTENT SYS003,WRKVOL,1,0,620,200
// DLBL SORTWK2,'WORK FILE 2',0,SD
// EXTENT SYS004,WRKVOL,1,0,820,200
// ASSGN SYS001,X'cuu' OUTPUT FILE
// ASSGN SYS002,X'cuu' INPUT FILE
// ASSGN SYS003,X'cuu' WORKPUT FILE 1
// ASSGN SYS004,X'cuu' WORKPUT FILE 2
// EXEC SORT
SORT FIELDS=(...),FILES=1,WORK=2
(other control statements)
END
/*