Utilities: Syncsort: Uf Computing & Networking Services
Utilities: Syncsort: Uf Computing & Networking Services
This document briefly describes how to use SyncSort in z/OS (OS/390) to sort an
OS data set. It describes the SYNCSORT cataloged procedure, lists required
ddnames used by SyncSort, gives an example of sorting a file, and includes how
to obtain SyncSort manuals.
Related search terms include utilities, JCL, PL/I, Assembler, and COBOL.
1
Utilities: SyncSort
Table of Contents
SyncSort ..................................................................................................................3
DD Names .......................................................................................................................3
REGION Size ...................................................................................................................4
The SYNCSORT Cataloged Procedure ..............................................................................4
Basic JCL for SyncSort .....................................................................................................4
Program-Initiated Sorts .....................................................................................................5
How to Specify Options ....................................................................................................5
SyncSort Control Statements .............................................................................................6
Sorting Example ...............................................................................................................7
Documentation .................................................................................................................8
Questions .........................................................................................................................8
2
Utilities: SyncSort
SyncSort
SyncSort is the only general-purpose sort program supported under z/OS (OS/390) at NERDC.
You can use SyncSort any of the following ways:
This document primarily describes how to use the SYNCSORT cataloged procedure. You
should have a general familiarity with JCL and/or one of the languages mentioned above.
• merge -- to combine as many as 32 sequential data sets into 1 data set under the same
sequence
DD Names
SyncSort uses the following ddnames:
SORTIN defines the input data set for a sorting application; not
required for a merge-only operation.
SORTIN01-- SORTIN16 define the input data sets for a merging application; not
required for a sorting application.
SORTWK01-- SORTWK16 define intermediate storage data sets for a sorting application;
not required for a merge.
3
Utilities: SyncSort
REGION Size
SyncSort uses the default system region size unless you specify a region size. The current
system default at NERDC is 1M (1024K). SyncSort allows you to specify up to 4M by using
the REGION= parameter on the JOB or EXEC statement.
The following optional keyword parameters can be added to the EXEC statement:
REGION=nM Use this keyword to specify the region size for the SORT
utility. For example,
If you have a very large data set, you may need to request more than 5 cylinders of work space.
Also, do NOT specify more SORTWKnn DD statements than there are temporary packs
available. There are currently four. This causes negative system and job performance and may
result in your job being cancelled.
4
Utilities: SyncSort
Program-Initiated Sorts
Refer to the documentation for Assembler, COBOL, or PL/I for information on how to invoke
SyncSort from within a program.
// EXEC SYNCSORT,OPTION='options'
If you are using your own JCL rather than using the SYNCSORT cataloged procedure, you
can specify options in the PARM parameter of the EXEC statement, as in this example:
// EXEC PGM=SORT,REGION=region,PARM='options'
(col 72)
//$ORTPARM DD *
CORE=MAX-32K X
RESET
5
Utilities: SyncSort
NOEQUALS For a more efficient sort, the order of the records is not
preserved. If the order needs to be retained, use the EQUALS
keyword.
6
Utilities: SyncSort
For a sort application, the SORT statement specifies the sort order. The general form of the
SORT statement is as follows:
in which "n" is an estimate of the number of records to be sorted. Sort keys specify the fields
within the record upon which to sort, their data types, and whether they are to be sorted in
ascending or descending order.
Each sort key has the following four parts: starting byte, length in bytes, format, and order.
CH EBCDIC characters
ZD zoned decimal
PD packed decimal
FI signed integers
FL floating point
AC ASCII characters
BI unsigned binary
AQ alternate sequence as
specified by the ALTSEQ
control statement
Sorting Example
The following example helps to illustrate how to SORT a data set. Suppose you have a
card-image (80-byte records) data set called UF.userid.GRADES, which is to be sorted
alphabetically by student name within the same letter grade. Assume the name is in columns
1-25 and the letter grade is in column 50 of each record, and there are approximately 100
students in the file. Figure 3 shows a sample job setup using the SYNCSORT cataloged
procedure.
7
Utilities: SyncSort
The input data set is UF.userid.GRADES. The output data set will be sent to the printer.
Documentation
Documentation for the SyncSort utility is in the SyncSort Release 3.4 Programmer's Guide
from SyncSort, Inc. You can order manuals from the vendor at this address:
SyncSort Incorporated
50 Tice Boulevard
Woodcliff Lake, NJ 07675
Phone 201/930-9700
e-mail: [email protected]
Fax: (201) 930-8284
Attn: Syncsort Product Services
Questions
If you need assistance using SyncSort at NERDC, contact the NERDC Support Desk by phone
at (352) 392-2061 or e-mail to [email protected].