Manual DFSort
Manual DFSort
Manual DFSort
SC33-4035-17
DFSORT IBM
Application Programming Guide
Release 13
SC33-4035-17
Note!
Before using this information and the product it supports, be sure to read the general information under “Notices”
on page vii.
This edition replaces and makes obsolete the previous edition, SC33-4035-16. The technical changes for this edition are summa-
rized under “Summary of Changes,” and are indicated by a vertical bar to the left of a change. A vertical bar to the left of a figure
caption indicates that the figure has changed. Editorial changes that have no technical significance are not noted. Technical
changes made to this edition for new programming support for Release 13 PTFs are summarized under "Summary of Changes", and
are indicated by a colon (:) to the left of the change.
This edition applies to Release 13 of DFSORT, Program Number 5740-SM1, and to any subsequent releases until otherwise indi-
cated in new editions or technical newsletters. Make sure you are using the correct edition for the level of the product.
Order publications through your IBM representative or the IBM branch office serving your locality. Publications are not stocked at the
address below.
A form for readers' comments is provided at the back of this publication. If the form has been removed, address your comments to:
IBM Corporation, Department M86
5600 Cottle Road
San Jose, CA, 95193-0000
United States of America
When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in any way it believes
appropriate without incurring any obligation to you.
Copyright International Business Machines Corporation 1973, 1995. All rights reserved.
Note to U.S. Government Users — Documentation related to restricted rights — Use, duplication or disclosure is subject to
restrictions set forth in GSA ADP Schedule Contract with IBM Corp.
Contents
Contents
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Programming Interface Information . . . . . . . . . . . . . . . . . . . . . . . . . vii
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
About This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Required Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
DFSORT Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
DFSORT Library Softcopy Information . . . . . . . . . . . . . . . . . . . . . . . x
Related Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Referenced Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Notational Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Contents v
Contents
Checkpoint/Restart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
DFSORT Abend Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
Abend Recovery Processing for Unexpected Abends . . . . . . . . . . . . . . 498
Processing of Error Abends with A-Type Messages . . . . . . . . . . . . . . . 499
CTRx Abend processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509
IBM may have patents or pending patent applications covering subject matter in this document. The fur-
nishing of this document does not give you any license to these patents. You can send license inquiries,
in writing, to the IBM Director of Licensing, IBM Corporation, 500 Columbus Avenue, Thornwood, NY
10594.
General-use Programming Interface and Associated Guidance Information is identified where it occurs,
either by an introductory statement to a chapter or section or by the following marking:
Trademarks
The following terms are trademarks of the IBM Corporation in the United States or other countries or both:
Other company, product, and service names, which may be denoted by a double asterisk (**), may be
trademarks or service marks of other companies.
Preface
This book is intended to help you to sort, merge, and copy data sets using DFSORT. This book is not
designed to teach you how to use DFSORT, but is for programmers who already have a basic under-
standing of DFSORT, and need a task-oriented guide and reference to its functions and options. If you
are a new user, then you should read Getting Started with DFSORT first. Getting Started with DFSORT is
a self-study guide that tells you what you need to know to begin using DFSORT quickly, with step-by-step
examples and illustrations.
Required Publications
You should be familiar with the information presented in the following publications:
DFSORT Publications
The DFSORT Application Programming Guide is a part of a more extensive DFSORT library. The addi-
tional books in the library are listed below.
You can order a complete set of DFSORT publications with the order number SBOF-1243, except for
DFSORT Licensed Program Specifications, GC33-4032, which must be ordered separately.
Related Publications
In the course of programming a DFSORT application, you may need access to the additional publications
listed in the table below.
For more information on using DFSORT with COBOL, see the Programmer's Guide describing the com-
piler version available at your site.
Preface xi
Referenced Publications
Referenced Publications
Within the text of this document, references are made to the following publications:
Notational Conventions
The syntax diagrams in this book are designed to make coding DFSORT program control statements
simple and unambiguous. The lines and arrows represent a path or flowchart that connects operators,
parameters, and delimiters in the order and syntax in which they must appear in your completed state-
ment. Construct a statement by tracing a path through the appropriate diagram that includes all the
parameters you need, and code them in the order that the diagram requires you to follow. Any path
through the diagram gives you a correctly coded statement, if you observe these conventions:
Read the syntax diagrams from left to right and from top to bottom.
Begin coding your statement at the spot marked with the double arrowhead.
Preface xiii
Notational Conventions
55────
A single arrowhead at the end of a line indicates that the diagram continues on the next line or at an
indicated spot.
────5
5─────
Strings in upper-case letters, and punctuation (parentheses, apostrophes, and so on), must be coded
exactly as shown.
– Semicolons are interchangeable with commas in program control statements and the EXEC PARM
string. For clarity, only commas are shown in this book.
Strings in all lowercase letters represent information that you supply.
Required parameters appear on the same horizontal line (the main path) as the operator, while
optional parameters appear in a branch below the main path.
5──Required──┬──────────┬────────────────────────────────────────────────────────────5
└─Optional─┘
Where you can make one choice between two or more parameters, the alternatives are stacked verti-
cally.
If one choice within the stack lies on the main path (as in the example above, left), you must specify
one of the alternatives. If the stack is placed below the main path (as in the example above, right),
then selections are optional, and you can choose either one or none of them.
The repeat symbol shows where you can return to an earlier position in the syntax diagram to specify
a parameter more than once (see the first example below), to specify more than one choice at a time
from the same stack (see the second example below), or to nest parentheses (see the third example
below).
Do not interpret a repeat symbol to mean that you can specify incompatible parameters. For instance,
do not specify both ABEND and NOABEND in the same EXEC statement, or attempt to nest paren-
theses incorrectly.
Use any punctuation or delimiters that appear within the repeat symbol to separate repeated items.
A double arrowhead at the end of a line indicates the end of the syntax diagram.
────5%
Preface xv
Notational Conventions
Year 2000 Features: New Y2C, Y2Z, Y2P and Y2D formats, in conjunction with a new Y2PAST
installation and run-time option, allow you to handle two-digit year data in the following ways:
Set the appropriate century window for your applications (for example, 1915-2014 or 1950-2049).
Order two-digit character, zoned decimal, packed decimal or decimal year data according to the
century window using Blockset SORT or MERGE (for example, order 96 representing 1996 before 00
representing 2000 in ascending sequence, or order 00 before 96 in descending sequence).
Transform two-digit character, zoned decimal, packed decimal or decimal year data to four-digit char-
acter year data according to the century window using OUTFIL OUTREC (for example, transform 96 to
1996 and 00 to 2000).
A new PD0 format allows you to order and transform parts of packed decimal fields (for example, month
and day in date fields) using SORT, MERGE and OUTFIL.
Performance Improvements for FLR and VLR Blockset Sorts: Performance improve-
ments for FLR and VLR Blockset sorts include the following:
Dataspace sorting can now be used for variable-length record sort applications.
DFSORT data processing methods have been improved.
Dynamic storage adjustment is a new feature that allows DFSORT to automatically use more storage
than the TMAXLIM value for a Blockset sort application if DFSORT determines that doing so should
improve performance. New installation option DSA=n has been added to enable you to specify the
dynamic storage adjustment limit.
The upper limit for the amount of main storage that can be specified and used by DFSORT has been
raised from 32M to 2000M. Specifying more main storage can provide the following benefits:
– It allows DFSORT to sort very large data sets more efficiently.
– It allows more sort applications to be done entirely in main storage, eliminating the need for inter-
mediate work space and greatly reducing the EXCP counts for those applications.
– It increases the maximum amount of data DFSORT can process in a single sort application.
New installation option IOMAXBF=n has been added to enable you to specify the upper limit for the
amount of storage to be used for SORTIN and SORTOUT data set buffers, which in turn limits the
amount of data that can be transferred in a single I/O operation.
The upper limit for the number of JCL and dynamically allocated work data sets that can be specified
and used by DFSORT's Blockset technique has been raised from 32 to 100. The use of more work
data sets increases the maximum amount of data DFSORT can process in a single sort application.
Changes to the DFSORT SVC provide caching selection enhancements that improve storage control
caching performance, especially for SORTIN and SORTOUT devices.
DFSORT can now use NOEQUALS for VLR Blockset applications if EQUALS=NO is specified at
installation or NOEQUALS is specified at run-time. The use of NOEQUALS can improve performance
and is recommended for applications for which the order of records that collate identically need not be
Floating Point for SUM: FL format can now be used with the SUM control statement for short
(4-byte), long (8-byte) and extended (16-byte) floating point data.
Security Improvements: Changes to the DFSORT SVC provide security improvements that bring
DFSORT up to B1 security standards.
World Wide Web Site: For articles, news, tips, techniques, examples, and more, visit the
DFSORT/MVS home page at URL:
http://www.storage.ibm.com/storage/software/sort/srtmhome.htm
FTP Server: You can obtain DFSORT articles and examples via anonymous FTP to:
lscftp.kgn.ibm.com/pub/mvs/docs/
DFSORT's Performance Booster for The SAS** System: DFSORT Release 13 provides
significant CPU time improvements for SAS applications. To take advantage of this new feature, contact
SAS Institute Inc. for details of the support they provide to enable this enhancement.
Dynamic Hipersorting: Dynamic Hipersorting is a new, automatic feature that eliminates the unin-
tended system paging activity and expanded storage and paging data set space shortages that sometimes
resulted from a large amount of Hipersorting activity, especially from multiple concurrent Hipersorting appli-
cations.
Dynamic Hipersorting allows for more optimal DFSORT and system performance and provides installation
options that allow you to customize HIPRMAX=OPTIMAL to your own criteria. With the advent of this
feature, we recommend that you use HIPRMAX=OPTIMAL as your site default.
Performance: Performance enhancements for DFSORT applications that use the Blockset technique
include the following:
Dataspace sorting, introduced in R12 for fixed-length record sort applications, now available for
variable-length record sort applications (MVS/ESA only)
Improved data processing methods for fixed-length record sort applications
OUTFIL processing for producing multiple output data sets using a single pass over one or more input
data sets.
OUTFIL Processing: OUTFIL is a new DFSORT control statement that allows you to create one or
more output data sets for a sort, copy, or merge application from a single pass over one or more input
data sets. You can use multiple OUTFIL statements, with each statement specifying the OUTFIL proc-
essing to be performed for one or more output data sets. OUTFIL processing begins after all other proc-
essing ends (that is, after processing for exits, options, and other control statements). OUTFIL statements
support a wide variety of output data set tasks, including:
Creation of multiple output data sets containing unedited or edited records from a single pass over one
or more input data sets.
Creation of multiple output data sets containing different ranges or subsets of records from a single
pass over one or more input data sets. In addition, records that are not selected for any subset can
be saved in another output data set.
Conversion of variable-length record data sets to fixed-length record data sets.
Sophisticated editing capabilities such as hexadecimal display and control of the way numeric fields
are presented with respect to length, leading or suppressed zeros, symbols (for example, the thou-
sands separator and decimal point), leading and trailing positive and negative signs, and so on.
Twenty-six pre-defined editing masks are available for commonly used numeric editing patterns,
encompassing many of the numeric notations used throughout the world. In addition, a virtually unlim-
ited number of numeric editing patterns are available via user-defined editing masks.
Cultural Include and Omit: DFSORT will allow the selection of an active locale at installation or run time
and will include or omit records for output according to the collating rules defined in the active locale. This
provides inclusion or omission for single- or multi-byte character data based on defined collating rules
which retain the cultural and local characteristics of a language.
OUTFIL Reports: OUTFIL allows date, time, and numeric values in reports to be formatted in many of
the notations used throughout the world.
ICETOOL Reports: ICETOOL's DISPLAY operator allows date, time, and numeric values in reports to be
formatted in many of the notations used throughout the world.
SMF Type-16 Record Enhancements: New fields, such as information pertaining to each
DFSORT run about SORTIN, SORTINnn, SORTOUT and OUTFIL data sets, control statements, record
counts, specified values for E15, E35, HIPRMAX, DSPSIZE, FILSZ, LOCALE and AVGRLEN, have been
added to DFSORT's SMF type-16 record.
SMF=FULL, SMF=SHORT, and SMF=NO can now be specified in an OPTION statement in DFSPARM or
the extended parameter list, to produce or suppress the SMF type-16 record for an individual application.
Note: The offsets of fields ICESPGN, ICEUSER, and ICEGROUP have changed in the Release 13 SMF
record. If you have programs that reference those fields, recompile them using the Release 13 version of
the ICESMF macro, before attempting to run them against Release 13 SMF records.
Other Enhancements: Several ICEMAC installation options have been added or changed:
The IBM-supplied default for EXCPVR has been changed from ALL to NONE.
The IBM-supplied default for DYNAUTO has been changed from NO to YES.
SDBMSG enables you to specify whether DFSORT should use the system-determined optimum block
size for DFSORT message data sets and ICETOOL message and list data sets.
LOCALE enables you to select an active locale.
ODMAXBF enables you to specify the maximum buffer space DFSORT can use for each OUTFIL data
set.
EXPMAX enables you to specify the maximum total amount of available storage to be used for all
Hipersorting applications.
EXPOLD enables you to specify the maximum total amount of old expanded storage to be used at any
one time by all Hipersorting applications.
EXPRES enables you to specify the minimum amount of available expanded storage to be reserved
by DFSORT for use by non-Hipersorting applications.
DFSORT will now ignore any DD statements not needed for the application (for example, a SORTIN DD
statement will be ignored for a merge application).
The installation initialization exit, ICEIEXIT, enables you to specify the maximum buffer space DFSORT
can use for each OUTFIL data set.
The installation termination exit, ICETEXIT, contains additional fields such as a flag to indicate that
OUTFIL processing was used.
For INCLUDE and OMIT, COND=ALL, COND=(ALL), COND=NONE, and COND=(NONE) enable you to
include or omit all records.
The L2 value from the RECORD statement will be used if the L1 value is not specified when an E15 or
E32 user exit passes all of the input records.
When input is a VSAM data set and output is a non-VSAM data set with RECFM not specified, DFSORT
will now set the output RECFM as blocked rather than unblocked, when doing so will allow the use of the
system-determined optimum block size for output.
The IBM 3390-9 DASD is supported for input, output, and work data sets, although it is not recommended
for work data sets for performance reasons.
The IBM RAMAC Array DASD and RAMAC Array Subsystem are supported for input, output, and work
data sets.
DFSORT Overview
This chapter introduces IBM DFSORT Licensed Program 5740-SM1. DFSORT is a program you use to
sort, merge, and copy information. DFSORT is intended to run in a user key (that is, key 8 or higher).
When you sort records, you arrange them in a particular sequence, choosing an order more useful to
you than the original one.
When you merge records, you combine the contents of two or more previously sorted data sets into
one.
When you copy records, you make an exact duplicate of each record in your data set.
Merging records first requires that the input data sets are identically sorted for the information you will use
to merge them and that they are in the same order required for output. You can merge up to 16 different
data sets at a time (DFSORT's Blockset technique might allow more depending on available storage).
In addition to the three basic functions, you can perform other processing simultaneously:
You can control which records to keep in the final output data set of a DFSORT run by using INCLUDE
| and OMIT statements in your application. These statements work like filters, testing each record against
criteria that you supply and retaining only the ones you want for the output data set. For example, you
might choose to work only with records that have a value of “Kuala Lumpur” in the field reserved for office
location. Or perhaps you want to leave out any record dated after 1987 if it also contains a value greater
than 20 for the number of employees.
You can edit and reformat your records before or after other processing by using INREC and OUTREC
statements. Use INREC and OUTREC to delete fields from your records, to rearrange the order of the
fields within records, and to insert separators, such as blanks, zeros, or constants, before, between, or
after fields. For example, you might want to create a data set containing financial data but without any of
the names that were there originally.
You can sum numeric information from many records into one record with the SUM statement. For
example, if you want to know the total amount of a yearly payroll, you can add the values for a field
containing salaries from the records of all your employees.
You can create one or more output data sets for a sort, copy, or merge application from a single pass
| over one or more input data sets by using OUTFIL control statements. You can use multiple OUTFIL
| statements, with each statement specifying the OUTFIL processing to be performed for one or more
| output data sets. OUTFIL processing begins after all other processing ends (that is, after processing for
| exits, options, and other control statements). OUTFIL statements support a wide variety of output data set
| tasks, including:
| Creation of multiple output data sets containing unedited or edited records from a single pass over one
| or more input data sets.
| Creation of multiple output data sets containing different ranges or subsets of records from a single
| pass over one or more input data sets. In addition, records that are not selected for any subset can
| be saved in a separate output data set.
| Conversion of variable-length record data sets to fixed-length record data sets.
| Sophisticated editing capabilities, such as hexadecimal display and control of the way numeric fields
| are presented with respect to length, leading or suppressed zeros, symbols (for example, the thou-
| sands separator and decimal point), leading and trailing positive and negative signs, and so on.
| Twenty-six pre-defined editing masks are available for commonly used numeric editing patterns,
| encompassing many of the numeric notations used throughout the world. In addition, a virtually unlim-
| ited number of numeric editing patterns are available via user-defined editing masks.
| Selection of a character or hexadecimal string for output from a lookup table, based on a character,
| hexadecimal, or bit string as input (that is, lookup and change).
| Highly detailed three-level (report, page, and section) reports containing a variety of report elements
| you can specify (for example, current date, current time, page number, character strings, and blank
| lines) or derive from the input records (for example, character fields; edited numeric input fields; record
| counts; and edited totals, maximums, minimums, and averages for numeric input fields).
You can control DFSORT functions with other control statements by specifying alternate collating
sequences, invoking user exit routines, overriding installation defaults, and so on.
You can direct DFSORT to pass control during run-time to routines you design and write yourself. For
example, you can write user exit routines to summarize, insert, delete, shorten, or otherwise alter records
| during processing. However, keep in mind that the extensive editing capabilities provided by the
| INCLUDE, OMIT, INREC, OUTREC, SUM, and OUTFIL statements can eliminate the need to write user
| exit routines. You can write your own routines to correct I/O errors that DFSORT does not handle, or to
perform any necessary abnormal end-of-task operation before DFSORT terminates.
You can write an EFS (Extended Function Support) program to intercept DFSORT control statements
and PARM options for modification prior to use by DFSORT or to provide alternate sequence support for
user-defined data.
: You can obtain DFSORT articles and examples via anonymous FTP to:
: lscftp.kgn.imb.com/pub/mvs/docs/
Invoking DFSORT
You can invoke DFSORT processing in the following ways:
With an EXEC job control statement in the input stream using the name of the program or the name of
a cataloged procedure. See Chapter 2, “Invoking DFSORT with Job Control Language” on page 19.
(Foreground TSO users can also use the name of the program to invoke DFSORT.)
With a program written in basic assembler language using a system macro instruction. See
Chapter 5, “Invoking DFSORT from a Program” on page 265.
With programs written in either COBOL or PL/I with a special facility of the language. See the pro-
grammer's guide describing the compiler version available at your location.
| With interactive panels supported under ISPF and ISMF. See Panels Guide for complete information.
With the ICETOOL utility. See Chapter 6, “Using ICETOOL” on page 281.
In this book, the term directly invoked means that DFSORT is not initiated from another program. The
term program invoked means that DFSORT is initiated from another program.
The Blockset technique is DFSORT's most efficient technique for sorting, merging and copying data sets.
DFSORT uses the Blockset technique whenever possible to take advantage of its highly optimized internal
algorithms and efficient utilization of IBM hardware. If Blockset cannot be used, DFSORT uses another of
its techniques — Peerage/Vale or Conventional.
Operating Systems
DFSORT runs under control of your operating system and must be initiated according to the appropriate
conventions. The operating systems this release supports are:
MVS/ESA
MVS/XA
Additionally, DFSORT operates on these systems as a guest under VM/XA System Product 2.1 or
VM/ESA 1.1 with the ESA feature.
If you use MVS/ESA, DFSORT can use Hipersorting or dataspace sorting, when appropriate, to improve
performance.
If you use MVS/XA, DFSORT can simulate dataspace sorting using virtual dataspace when appropriate.
DFSORT is compatible with all of the IBM processors supported by MVS/XA or MVS/ESA, in addition to
any device they support for program residence. It also operates with any device QSAM or VSAM uses for
input or output.
DFSORT uses the control fields you define as keys in processing. A key is a concept, such as family
name, that you have in mind when you design a record processing strategy for a particular application. A
control field, on the other hand, is a discrete portion of a record that contains the text or symbols corre-
sponding to that information in a form that can be used by DFSORT to identify and sort, or merge the
records. For all practical purposes, you can think of keys as equivalent to the control fields DFSORT uses
in processing.
To arrange your records in a specific order, identify one or more control fields of your records to use as
keys. The sequence in which you list the control fields becomes the order of priority DFSORT uses to
arrange your records. The first control field you specify is called the major control field. Subsequent
control fields are called minor control fields, as in first, second, third minor control fields, and so on.
If two or more records have identical values for the first control field, they are arranged according to the
values in the second. Records with identical values for the first and second are arranged according to the
third, and so on, until a difference is found or no more control fields are available.
Records with identical values for all the control fields specified retain their original input order or are
arranged randomly, depending upon which of the two options, EQUALS or NOEQUALS, is in effect. You
can direct DFSORT to retain the original input order for records with identical values for all control fields
by specifying EQUALS.
Control fields may overlap, or be contained within other control fields (such as a three-digit area code,
within a 10-digit telephone number). They do not need to be contiguous but must be located within the
first 4092 bytes of the record (see Figure 1).
Record
| DFSORT offers several standard collating sequences. You can choose to arrange your records according
| to these standard collating sequences or according to a collating sequence defined in the active locale.
Conceptually, a collating sequence is a specific arrangement of character priority used to determine which
of two values in the same control field of two different records should come first. DFSORT uses EBCDIC,
the standard IBM collating sequence, or the ISCII/ASCII collating sequence when sorting or merging
| records. If locale processing is in effect, DFSORT will use the collating sequence defined in the active
| locale.
The collating sequence for character data and binary data is absolute; character and binary fields are not
interpreted as having signs. For packed decimal, zoned decimal, fixed-point, normalized floating-point,
and the signed numeric data formats, collating is algebraic; each quantity is interpreted as having an alge-
braic sign.
You can modify the standard EBCDIC sequence to collate differently if, for example, you want to allow
alphabetic collating of national characters. An alternate collating sequence can be defined during installa-
tion with the ICEMAC ALTSEQ option, or you can define it yourself at run-time with the ALTSEQ program
control statement. You can also specify a modified collating sequence with an E61 user exit or with an
EFS program.
| You can specify the LOCALE installation or run-time option to use an active locale's collating rules.
| The collate category of a locale is a collection of sequence declarations that defines the relative order
| between collating elements (single character and multi-character collating elements). The sequence dec-
| larations define the collating rules.
| The cultural environment is established by selecting the active locale. The active locale affects the
| behavior of locale-sensitive functions. In particular, the active locale's collating rules affect DFSORT's
| SORT, MERGE, INCLUDE, and OMIT processing as follows:
| The DFSORT option LOCALE specifies whether locale processing is to be used and, if so, designates the
| active locale. Only one locale can be active at a time.
DFSORT Processing
| Unless you use DFSORT Panels to prepare and submit your job (see Panels Guide), you must prepare
job control language (JCL) statements and DFSORT program control statements to invoke DFSORT proc-
essing. JCL statements (see Chapter 2, “Invoking DFSORT with Job Control Language” on page 19) are
processed by your operating system. They describe your data sets to the operating system and initiate
DFSORT processing. DFSORT program control statements (see Chapter 3, “Using DFSORT Program
Control Statements” on page 59) are processed by the DFSORT program. They describe the functions
you want to perform and invoke the processing you request.
| A sort application usually requires intermediate storage as working space during the program run. This
| storage can be one of the following:
| 1. Hiperspace, using DFSORT's Hipersorting feature.
| 2. Work data sets—either allocated dynamically by DFSORT's DYNALLOC facility or specified by the
| user, using JCL DD statements. If specified by the user, the intermediate storage devices and the
| amount of work space must be indicated. Methods for determining the amount of work space to allo-
| cate are explained in Appendix A, “Using Work Space” on page 447.
| 3. A combination of Hiperspace and work data sets.
| Merge and copy applications do not require intermediate storage.
Figure 2 on page 7 illustrates the processing order for record handling, exits, statements, and options.
Use this diagram with the text following it to understand the order DFSORT uses to run your job.
| ┌───────┐ ┌─────────┐
| │SORTIN │ │SORTINnn │
| └───┬───┘ └────┬────┘
| 6 │
| ┌───────┐ │
| │SKIPREC│ │
| └───┬───┘ │
| 6 │
| ┌───┐ ┌───┐ │ ┌───┐
| │E15│ │E15│ │ │E32│
| └─┬─┘ └─┬─┘ │ └─┬─┘
| │ %─────────┘ │ ┌───────┘
| ┌───┴───┐ │ │
| │INCLUDE│ │ │
| │ OMIT │ │ │
| └───┬───┘ │ │
| 6 │ │
| ┌───────┐ │ │
| │ │ │ │
| │STOPAFT│ 6 6
| │ │ ┌────────┐
| └───┬───┘ │ INCLUDE│
| │ │ OMIT │
| │ └────┬───┘
| 6 6
| ┌─────┐ ┌─────┐
| │INREC│ │INREC│
| └──┬──┘ └──┬──┘
| 6 6
| ┌─────┐ ┌─────┐
| │SORT/│ │MERGE│
| │SUM │ │ │
| │ or │ │ │
| │COPY │ │ SUM │
| └──┬──┘ └──┬──┘
| 6 6
| ┌───────┐ ┌────────┐
| │OUTREC │ │ OUTREC │
| └───┬──┬┘ └───┬──┬─┘
| │ └───────────────────┐ │ └───────────────────┐
| 6 6 6 6
| ┌───┐ ┌───┐ ┌───┐ ┌───┐
| │E35│ │E35│ │E35│ │E35│
| └┬─┬┘ └───┘ └┬─┬┘ └───┘
| │ └───────────┐ │ └───────────┐
| 6 6 6 6
| ┌───────┐ ┌───────────────┐ ┌───────┐ ┌───────────────┐
| │SORTOUT│ │OUTFIL STARTREC│ │SORTOUT│ │OUTFIL STARTREC│
| └───────┘ │OUTFIL ENDREC │ └───────┘ │OUTFIL ENDREC │
| └───────┬───────┘ └───────┬───────┘
| │ │
| 6 6
| ┌──────────────────┐ ┌──────────────────┐
| │ OUTFIL INCLUDE │ │ OUTFIL INCLUDE │
| │ OUTFIL OMIT │ │ OUTFIL OMIT │
| │ OUTFIL SAVE │ │ OUTFIL SAVE │
| └────────┬─────────┘ └────────┬─────────┘
| │ │
| 6 6
| ┌──────────────────┐ ┌──────────────────┐
| │ OUTFIL SPLIT │ │ OUTFIL SPLIT │
| └────────┬─────────┘ └────────┬─────────┘
| │ │
| 6 6
| ┌──────────────────┐ ┌──────────────────┐
| │ OUTFIL OUTREC │ │ OUTFIL OUTREC │
| │ OUTFIL Reports │ │ OUTFIL Reports │
| └────────┬─────────┘ └────────┬─────────┘
| │ │
| 6 6
| ┌──────────────────┐ ┌──────────────────┐
| │ OUTFIL Data Sets │ │ OUTFIL Data Sets │
| └──────────────────┘ └──────────────────┘
| If SORTOUT and OUTFIL data sets are not present, the E35 exit must dispose of all the records
| because DFSORT treats these records as deleted. (This is also true if you do not specify OUTFIL
| data sets and DFSORT is invoked with the address of an E35 user exit in the parameter list, because
| SORTOUT will be ignored.)
| 10. DFSORT writes your records to the SORTOUT data set, if present.
| 11. DFSORT performs processing specified in one or more OUTFIL statements, if present:
| DFSORT performs processing specified with the STARTREC and/or ENDREC options. Record
| input for the OUTFIL data sets starts with the record indicated by STARTREC and ends with the
| record indicated by ENDREC.
| DFSORT performs processing specified with the INCLUDE, OMIT, or SAVE option. Records are
| included or omitted from the OUTFIL data sets according to the criteria specified.
| DFSORT performs SPLIT processing. Records are distributed among the OUTFIL data sets as
| evenly as possible.
| DFSORT performs processing specified with the OUTREC, LINES, HEADER1, TRAILER1,
| HEADER2, TRAILER2, SECTIONS, and NODETAIL options. Data records are reformatted and
| report records are generated for the OUTFIL data sets.
| The SORTIN DD statement specifies the input data set (or concatenated input data sets) for a sort or copy
| application. If a SORTIN DD statement is present, it will be used by default for a sort or copy application
| unless you invoke DFSORT from a program with the address of an E15 user exit in the parameter list.
| The SORTINnn DD statements (where nn can be 00 to 99) specify the data sets for a merge application.
| If a SORTINnn DD statement is present, it will be used by default for a merge application unless you
| invoke DFSORT from a program with the address of an E35 user exit in the parameter list.
| “Data Set Considerations” on page 10 contains general information about input data sets. For specific
| information about the SORTIN data set, see “SORTIN DD Statement” on page 47. For specific informa-
| tion about the SORTINnn data sets, see “SORTINnn DD Statement” on page 49.
| The SORTOUT DD statement specifies the single non-OUTFIL output data set for a sort, copy, or merge
| application. OUTFIL processing does not apply to SORTOUT. If a SORTOUT DD statement is present, it
| will be used by default for a sort, copy, or merge application unless you invoke DFSORT from a program
| with the address of an E35 user exit in the parameter list.
| The FNAMES and/or FILES parameters of one or more OUTFIL statements specify the ddnames of the
| OUTFIL data sets for a sort, copy, or merge application. The parameters specified for each OUTFIL state-
| ment define the OUTFIL processing to be performed for the OUTFIL data sets associated with that state-
| ment. Each ddname specified must have a corresponding DD statement.
| Although the ddname SORTOUT can actually be used for an OUTFIL data set, the term “SORTOUT” will
| be used to denote the single non-OUTFIL output data set.
| “Data Set Considerations” contains general information about output data sets. For specific information
| about the SORTOUT data set, see “SORTOUT and OUTFIL DD Statements” on page 52. For specific
| information about the OUTFIL data sets, see “SORTOUT and OUTFIL DD Statements” on page 52 and
| “OUTFIL Control Statements” on page 141.
Unless you use DFSORT Panels to create and submit your jobs, you must describe all data sets (except
those allocated with the DYNALLOC parameter) in DD statements. You must place the DD statements in
the operating system input stream with the job step that allocates DFSORT processing.
DFSORT Panels operates in two modes: foreground and background. Foreground mode uses CLIST
processing instead of JCL, so if you choose this technique you do not need JCL at all. Background mode
creates DFSORT jobs containing the job control language (including DD statements) already coded in the
| DFSORT Panels user profile. This JCL is the same as that which you code yourself. See Panels Guide
| for more information.
| Output from a sort or copy application can be blocked or unblocked QSAM or VSAM data sets, regardless
| of whether the input is QSAM or VSAM. Unless OUTFIL is used to convert variable input to fixed output,
| an output data set must be the same type (fixed or variable) as the input data set.
| BatchPipes/MVS input and output pipes are supported for sort and copy applications.
Merging Records
| Input to a merge application can be up to 16 blocked or unblocked QSAM or VSAM data sets (DFSORT's
Blockset technique might allow more depending on available storage) containing fixed- or variable-length
records. The input data sets can be either QSAM or VSAM, but not both. The records in all input data
sets must already be sorted in the same order as that required for output.
| Output from a merge application can be blocked or unblocked QSAM or VSAM data sets, regardless of
| whether the input is QSAM or VSAM. Unless OUTFIL is used to convert variable input to fixed output, an
| output data set must be the same type (fixed or variable) as the input data sets.
| BatchPipes/MVS input and output pipes are supported for merge applications.
For more information about specific DFSORT data sets, see “Using DD Statements” on page 41.
General Considerations: Your records can be EBCDIC, ISCII/ASCII, Japanese, and data types
you define yourself. To process Japanese data types with DFSORT, you can use the IBM Double Byte
Character Set Ordering Support Program (DBCS Ordering), Licensed Program 5665-360, Release 2.0.
Input and output data sets must be on devices that can be used with QSAM or VSAM.
Standard system data management rules apply to all data set processing. In particular, be aware that
when using fixed standard record format for input data sets, the first short block is treated like an End of
| Volume. See Using Data Sets for more details.
The maximum record length DFSORT can handle is subject to the following limitations:
Record length can never exceed the maximum record length you specify.
Variable-length records are limited to 32 756 bytes.
| VSAM variable-length records are limited to 32 752 bytes.
Fixed-length records are limited to 32 760 bytes.
Variable block-spanned records are limited to 32 767 bytes.
| For a tape work data set sort, the maximum record length is limited to 32 752 bytes with NOEQUALS
| in effect and to 32 748 bytes with EQUALS in effect.
| Note: If AQ format is specified, or CH format is specified and the CHALT option is in effect, the
| maximum record length for variable-length records is 32 767 bytes, less the length of the control fields.
The number of records that can be sorted using a given amount of storage is reduced by:
Processing control fields of different formats
Large numbers of control fields
Large numbers of intermediate data sets.
Providing an Extended Function Support program with an EFS01 routine can limit the record length that
can be used when processing variable-length records.
The minimum block length for tape work data sets is 18 bytes; the minimum record length is 14 bytes.
Padding and Truncation: DFSORT truncates fixed-length records on the right when the output
data set LRECL is smaller than the input data set LRECL.
DFSORT pads fixed-length records with binary zeroes on the right when the output data set LRECL is
larger than the input data set LRECL provided that:
The application is a sort or copy
The Blockset technique is selected
| The output data set is not an OUTFIL data set.
DFSORT does not pad or truncate records returned from an E15 or E35 user exit since it expects the exit
to pad or truncate the records appropriately.
See “Use ICEGENER Instead of IEBGENER” on page 412 for information about padding and truncating
with ICEGENER.
For more information about Blockset and the other DFSORT techniques, see “Specify Efficient Sort/Merge
Techniques” on page 399.
QSAM Considerations
If you use DSN=NULLFILE on your DD statement for an input data set, a system restriction prevents
DFSORT from using the EXCP access method.
Empty input data sets can be used.
If any of the input data sets are on tape without standard labels, DCB parameters must be specified
on their DD statements.
ISO/ANSI Version 1 tape files can only be used as input—never as output.
| DFSORT sets appropriate BUFNO values for the input and output data sets; specifying BUFNO in the
| DD statements for these data sets has no effect.
VSAM Considerations
If a data set is password protected, passwords can be entered at the console or (with some
restrictions) through routines at user exits E18, E38, and E39.
| Note: Passwords cannot be handled in this way for OUTFIL data sets.
The same data set must not be specified for both input and output.
A data set used for input or output must have been previously defined.
| An empty temporary data set must not be specified for input.
| Empty permanent input data sets can be used for sort or copy applications, but not for merge applica-
| tions. If an input data set for a merge application is empty, VSAM returns an open error code (160)
| and DFSORT terminates.
If VSAM data sets are concatenated, the system only processes the first data set.
: VSAM and non-VSAM input data sets must not be specified together for a sort, merge or copy appli-
: cation.
| If output is a VSAM key-sequenced data set (KSDS), the key must be the first control field (or the key
fields must be in the same order as the first control field). VSAM does not allow you to store records
with duplicate primary keys.
Any VSAM exit function available for input data sets can be used except EODAD. See the description
of E18 use with VSAM in Chapter 4, “Using Your Own User Exit Routines” on page 219.
You must build the VSAM exit list with the VSAM EXLST macro instruction giving the addresses of
your routines that handle VSAM exit functions.
| When processing variable-length records with VSAM input and non-VSAM output, the output LRECL
| must be at least 4 bytes greater than the maximum record size defined in the cluster. Non-VSAM
| variable-length records have a record descriptor word (RDW) field 4 bytes long at the beginning of
each record, but VSAM records do not. The record size defined in the VSAM cluster is therefore 4
bytes less than the non-VSAM LRECL.
If a non-empty VSAM output data set was defined without the reuse option, VSAM does not open the
data set and issues OPEN error IEC161I RC84 error code 232(E8):
Reset was specified for a nonreusable data set and the data set
is not empty.
After receiving the OPEN return code, DFSORT reopens the data set for update and one of two things
happens:
– For an entry-sequenced data set (ESDS), DFSORT adds records at the end of the data set.
– For a KSDS, DFSORT inserts records in key order.
| BatchPipes/MVS Considerations
| BatchPipes/MVS data sets can be used for input and output, but are only supported by the Blockset tech-
| nique. If Blockset is not selected for a DFSORT application that uses BatchPipes/MVS data sets,
| DFSORT will issue an error message and terminate.
| If DFSORT determines that a BatchPipes/MVS data set is being used for input or output, it:
| Automatically forces the ABEND option on, to ensure that an ABEND will be generated if an error is
| detected, and
| If an E15, E32, or E35 user exit requests termination, terminates with user ABEND zero instead of
| return code 16.
| If ICETOOL determines that a BatchPipes/MVS data set is being used for input or output, it automatically
| terminates with user ABEND 2222 instead of return code 12.
| Generation of an ABEND in these situations allows for appropriate error propagation by the system to
| other applications that may be accessing the same BatchPipes/MVS data set as DFSORT or ICETOOL.
| If DFSORT or ICETOOL detects an error before determining that a BatchPipes/MVS data set is being
| used or before opening the BatchPipes/MVS data set, appropriate error propagation may not occur. This
| can cause another application to go into a permanent wait for a BatchPipes/MVS data set.
Installation Defaults
When your system programmers installed DFSORT, they selected separate sets of installation (ICEMAC)
parameters to be used by default for the following run-time environments:
JCL used when DFSORT is invoked directly (that is, not through programs) by batch jobs
INV used when DFSORT is invoked through batch programs
TSO used when DFSORT is invoked directly (that is, not through programs) by foreground TSO
users
TSOINV used when DFSORT is invoked through programs by foreground TSO users
The selected defaults can affect the way your applications run, and in many cases can be overridden by
specifying the appropriate run-time parameters (see Appendix B, “Specification/Override of DFSORT
Options” on page 459 for full override details). This book assumes that DFSORT was installed at your
site with the defaults that it was delivered with.
You can use an ICETOOL job similar to the following one to list the installation defaults actually in use at
your site for the four environments and the IBM-supplied defaults they override, where appropriate.
See Chapter 6, “Using ICETOOL” on page 281 and “DEFAULTS Operator” on page 297 for more infor-
mation on using ICETOOL and the DEFAULTS operator.
The functions of the available ICEMAC parameters are summarized below. Installation and Customization
contains complete descriptions of the available ICEMAC parameters, as well as planning considerations
and general information about installing DFSORT. Step-by-step installation procedures are listed in the
DFSORT Program Directory.
Parameter Function
ABCODE Specifies the ABEND code used when DFSORT abends for a critical error
ALTSEQ Alters the normal EBCDIC collating sequence
ARESALL Specifies the number of bytes reserved above 16-megabyte virtual for system use
ARESINV Specifies the number of bytes reserved above 16-megabyte virtual for the invoking
program when DFSORT is program invoked
CFW Specifies whether DFSORT can use cache fast write when processing work data sets
CHALT Translates format CH as well as format AQ, or translates format AQ only
| CHECK Specifies whether record count checking is suppressed for applications that use an E35
| user exit routine without an output data set.
CINV Specifies whether DFSORT can use control interval access for VSAM data sets
COBEXIT Specifies whether the E15 and E35 routines are run with the VS COBOL II libraries
| DIAGSIM Specifies whether a SORTDIAG DD statement is to be simulated for DFSORT applica-
| tions
: DSA Specifies the maximum amount of storage available to DFSORT for dynamic storage
: adjustment of Blockset sort applications.
DSPSIZE Specifies the maximum amount of data space to use for dataspace sorting
| DYNALOC Specifies the default values for device name and number of work data sets to be
| dynamically allocated. These default values are used in conjunction with the ICEMAC
option DYNAUTO and run-time option DYNALLOC
DYNAUTO Specifies whether work data sets are dynamically allocated automatically
DYNSPC Specifies the default primary space allocation for dynamically allocated work data sets
EFS Specifies the name of a user-written Extended Function Support program to be called
by DFSORT
| EQUALS Specifies whether the order of records that collate identically is preserved from input to
| output
ERET Specifies the action taken if DFSORT encounters a critical error
ESTAE Specifies whether DFSORT deletes its ESTAE recovery routine early or uses it for the
entire run
EXCPVR Specifies whether DFSORT can use EXCPVR when reading and writing input, output,
and work data sets
EXITCK Specifies whether DFSORT terminates or continues when it receives certain invalid
return codes from E15 or E35 user exit routines
| EXPMAX Specifies the maximum total amount of available expanded storage to be used at any
| one time by all Hipersorting applications on an MVS/ESA system
| EXPOLD Specifies the maximum total amount of old expanded storage to be used at any one
| time by all Hipersorting applications on an MVS/ESA system
| EXPRES Specifies the minimum amount of available expanded storage to be reserved for use by
| non-Hipersorting applications on an MVS/ESA system
FSZEST Specifies whether DFSORT treats run-time options FILSZ=n and SIZE=n as exact or
estimated file sizes
GENER Specifies the name of the IEBGENER system utility module to be used by ICEGENER
(DFSORT’s facility for IEBGENER jobs)
GNPAD Specifies the action to be taken by ICEGENER for LRECL padding
GNTRUNC Specifies the action to be taken by ICEGENER for LRECL truncation
HIPRMAX Specifies the maximum amount of Hiperspace to use for Hipersorting on an MVS/ESA
system
IDRCPCT Specifies a percentage which represents the approximate amount of data compaction
achieved by using the Improved Data Recording Capability feature of 3480 and 3490
devices.
IEXIT Specifies whether DFSORT passes control to your site's ICEIEXIT routine
IGNCKPT Specifies whether the checkpoint/restart facility is ignored if it is requested at run-time
and the Blockset technique (which does not support the checkpoint/restart facility) can
be used
: IOMAXBF Specifies an upper limit to the amount of buffer space to be used for SORTIN and
: SORTOUT data sets.
INV|JCL|TSO|TSOINV
Specifies the environment for which this set of ICEMAC defaults is used
LIST Specifies whether DFSORT prints control statements
LISTX Specifies whether DFSORT prints control statements returned by an Extended Function
Support program
| LOCALE Specifies whether locale processing is to be used and, if so, designates the active
| locale
MAXLIM Specifies an upper limit to the amount of main storage available to DFSORT below
16-megabyte virtual
MINLIM Specifies a lower limit to the amount of main storage available to DFSORT
MSGCON Specifies the class of program messages DFSORT writes to the master console
MSGDDN Specifies an alternate name for the message data set
MSGPRT Specifies the class of program messages DFSORT writes to the message data set
NOMSGDD Specifies whether DFSORT terminates or continues when the message data set is
required but is not available
| ODMAXBF Specifies an upper limit to the amount of buffer space to be used for each OUTFIL data
| set
OUTREL Specifies whether unused temporary output data set space is released
OUTSEC Specifies whether DFSORT uses automatic secondary allocation for output data sets
that are temporary or new
OVERRGN Specifies the amount of main storage above the REGION value available to Blockset
PARMDDN Specifies an alternate ddname for the DFSORT DFSPARM data set
RESALL Reserves storage for system and application use when SIZE/MAINSIZE=MAX is in
effect
RESINV Reserves storage for programs invoking DFSORT when SIZE/MAINSIZE=MAX is in
effect
| SDB Specifies whether DFSORT should use the system-determined optimum block size for
| output data sets when the block size is zero
| SDBMSG Specifies whether DFSORT and ICETOOL should use the system-determined optimum
| block size for message and list data sets when the block size is zero
SIZE Specifies the maximum amount of main storage available to DFSORT
SMF Specifies whether DFSORT produces SMF type-16 records
SORTLIB Specifies whether DFSORT searches a system or private library for the modules used
with a tape work data set sort or Conventional merge
STIMER Specifies whether DFSORT uses the STIMER macro If DFSORT does not use the
STIMER macro, processor timing data does not appear in SMF records or in the
ICETEXIT statistics
SVC Specifies a user SVC number for DFSORT and allows an installation to use two dif-
ferent releases of DFSORT at the same time
TEXIT Specifies whether DFSORT passes control to your site's ICETEXIT routine
TMAXLIM Specifies an upper limit to the total amount of main storage above and below
16-megabyte virtual available to DFSORT when SIZE/MAINSIZE=MAX is in effect
VERIFY Specifies whether the sequence of output records is verified
VIO Specifies whether virtual allocation of work data sets is accepted
VIRTDSP Specifies whether DFSORT should use virtual dataspace on an MVS/XA system
VLSHRT Allows DFSORT to continue processing when it encounters a variable-length record not
long enough to contain all specified control or compare fields
VSAMBSP Specifies the number of VSAM buffers DFSORT can use
WRKREL Specifies whether unused temporary work data set space is released
WRKSEC Specifies whether DFSORT uses automatic secondary allocation for temporary work
data sets
: Y2PAST Specifies the sliding or fixed century window.
ZDPRINT Specifies whether DFSORT produces printable numbers from positive ZD fields that
result from summarization.
Tables showing all the possible sources of specification and order of override for each option are shown in
Appendix B, “Specification/Override of DFSORT Options” on page 459.
Messages written to the message data set can be either critical error messages, informational error mes-
sages, or diagnostic messages, as determined during installation or run-time.
Messages written to the master console can be either critical error messages or informational error mes-
sages, as determined during installation.
| See Messages, Codes and Diagnosis for complete information about DFSORT messages.
For successful completion, DFSORT passes back a return code of 0 to the operating system or the
invoking program.
| For unsuccessful completion due to an unsupported operating system, DFSORT passes back a return
| code of 24 to the operating system or the invoking program.
For unsuccessful completion with NOABEND in effect, DFSORT passes back a return code of 16 or 20 to
the operating system or the invoking program.
For unsuccessful completion with ABEND in effect, DFSORT issues a user abend with the appropriate
code as specified by ICEMAC option ABCODE (either the error message number or a number between 1
and 99).
| The meanings of the return codes that DFSORT passes back (in register 15) are:
0 Successful completion. DFSORT completed successfully.
16 Unsuccessful completion. DFSORT detected an error that prevented it from completing success-
fully.
20 Message data set missing. ICEMAC option NOMSGDD=QUIT was in effect and neither a
message data set DD statement nor a SYSOUT DD statement was provided.
| 24 Unsupported operating system. This operating system is not supported by this release of
| DFSORT. Only current or subsequent releases of the following systems are supported:
| MVS/XA
| MVS/ESA
Required JCL includes a JOB statement, an EXEC statement, and several DD statements. The state-
ments you need and their exact form depend upon whether you:
Use an EXEC statement in the input job stream or a system macro instruction within another program
to invoke DFSORT
Use EXEC statement cataloged procedures to invoke DFSORT
Specify various DFSORT control statements or PARM options
Want to use program exits to activate routines of your own
Use dynamic link-editing
Want to see diagnostic messages.
DFSORT Panels offers an alternative to coding JCL directly. When you use panels to prepare a job to be
run or saved in a data set, much of the required JCL can be supplied automatically from the contents of
the DFSORT User Profile. DFSORT jobs you prepare for submission in foreground under TSO use CLIST
| processing rather than JCL. See Panels Guide for details on using DFSORT Panels.
The JCL statements and their functions are listed below. Details on coding the individual statements are
presented in subsequent sections.
JCL Statement Description
//JOBLIB DD Defines your program link library if it is not already known to the system
//STEPLIB DD Same as //JOBLIB DD
//SORTLIB DD Defines the data set that contains special load modules if it is not already known to
the system
//SYSOUT DD1 Defines the message data set
//SORTIN DD1 Defines the input data set for a sort or copy
//SORTINnn DD1 Defines the input data sets for a merge
| //SORTOUT DD1 Defines the SORTOUT output data set for a sort, merge, or copy
| //outfil DD Defines an OUTFIL output data set for a sort, merge, or copy
//SORTWKnn DD1 Defines intermediate storage data sets for a sort
//DFSPARM DD1 Contains DFSORT PARM options and program control statements
//SYSIN DD Contains DFSORT program control statements
//SORTCNTL DD1 Same as //SYSIN DD
//SORTDIAG DD Specifies that all messages and program control statements be printed
//SORTCKPT DD Defines the data set for checkpoint records
//SYSUDUMP DD Defines the data set for output from a system ABEND dump routine
//SYSMDUMP DD Same as //SYSUDUMP DD
//SYSABEND DD Same as //SYSUDUMP DD
//SORTSNAP DD Defines the snap dump data set dynamically allocated by DFSORT
//ddname Defines the data set containing exit routines (as specified in the MODS program
control statement).
The following DD statements are only necessary for dynamic link-editing of exit routines
//SYSPRINT DD Defines the message data set for the linkage editor
//SYSUT1 DD Defines the intermediate storage data set for the linkage editor
//SYSLIN DD Defines the data set for control information for the linkage editor
//SYSLMOD DD Defines the data set for output from the linkage editor
//SORTMODS DD Defines the temporary partitioned data set for user
exit routines from SYSIN.
1 These are the default ddnames with which DFSORT was delivered. SYSOUT and DFSPARM may
have been changed during DFSORT installation. You can change all of the indicated ddnames at run
time. For override information, see Appendix B, “Specification/Override of DFSORT Options” on
page 459.
55─//stepname EXEC─┬──PGM=┬SORT──┬─┬─┬─────────────────┐────────────────5
│ └ICEMAN┘ │ │ ┌───,───┐ │
├──PROC=┬SORT─┬─┤ │ 6 │ │
│ └SORTD┘ │ └,PARM='─options┴'┘
└─┬SORT─┬───────┘
└SORTD┘
5────────────────────────────────────┬────────────────────┬────────────5%
│ ┌────────────────┐│
│ 6 ││
└─,─other─parameters┴┘
If you use a cataloged procedure (discussed in detail below), specify PROC=SORT or PROC=SORTD.
You can omit PROC= and simply specify SORT or SORTD. However, PROC= can remind you that a
cataloged procedure is being used.
: If you do not use a cataloged procedure, use PGM= either with the actual name of the sort module
: (ICEMAN) or with one of its aliases: SORT, IERRCO00, or IGHRCO00. Be sure that the alias has not
been changed at your site.
SORT Cataloged Procedure: You can use the supplied SORT cataloged procedure when you
include user routines that require link-editing. Using this procedure without using link-edited user routines
is inefficient because the SORT cataloged procedure allocates linkage editor data sets whether or not you
include user routines.
When you specify EXEC PROC=SORT or EXEC SORT, the following JCL statements are generated:
Line Explanation
00 The stepname of the procedure is SORT. This EXEC statement initiates the program, which is
named ICEMAN.
10 The STEPLIB DD statement defines the data set containing the DFSORT program modules. If
DFSORT was installed as part of the normal system link libraries, the STEPLIB DD statement is
unnecessary. It is needed only if DFSORT resides in a separate link library which is not part of
the “link list.” (Your installation's system programmers can give you this information.) The
STEPLIB DD statement shown assumes that the data set name represented by yyy is cataloged.
20 The SORTLIB DD statement defines a private data set containing the modules needed for a sort
using tape work files or a merge using the Conventional technique. The data set is cataloged, and
the data set name represented by xxx was specified at installation time; it can be SYS1.SORTLIB.
If the modules were installed in a system library and ICEMAC SORTLIB=SYSTEM is used, the
SORTLIB DD statement is unnecessary and is ignored unless dynamic link of user exits is used.
30 Defines an output data set for system use (messages). It is directed to system output class A.
40 Defines SYSPRINT as a dummy data set because linkage editor diagnostic output is not required.
50 Defines a data set for linkage editor output. Any system direct access device is acceptable for the
output. Space for 20 records with an average length of 3600 bytes is requested; this is the
primary allocation. Space for 20 more records is requested if the primary space allocation is not
sufficient; this is the secondary allocation, which is requested each time primary space is
exhausted. The last value is space for a directory, which is required because SYSLMOD is a new
partitioned data set.
60 The SYSLIN data set is used by the program for linkage editor control statements. It is created on
any system direct access device, and it has space for 10 records with an average length of 80
bytes. If the primary space allocation is exhausted, additional space is requested in blocks large
enough to contain 10 records. No directory space is necessary.
70/80 The SYSUT1 DD statement defines a work data set for the linkage editor.
SORTD Cataloged Procedure: You can use the supplied SORTD cataloged procedure when you
do not include user routines or when you include user routines that do not require link-editing.
When you specify EXEC PROC=SORTD or EXEC SORTD, the following JCL statements are generated:
Line Explanation
00 The stepname of the SORTD procedure is SORT
10 The STEPLIB DD statement defines the data set containing the DFSORT program modules. If
DFSORT was installed as part of the normal system link libraries, the STEPLIB DD statement is
unnecessary. It is needed only if DFSORT resides in a separate link library which is not part of
the “link list.” (Your installation's system programmers can give you this information.) The
STEPLIB DD statement shown assumes that the data set name represented by yyy is cataloged.
20 The SORTLIB DD statement defines a private data set that contains the modules needed for a
sort using tape work files or a merge that uses the Conventional technique. The data set name of
the program subroutine library, represented by xxx, is specified at installation time; it can be
SYS1.SORTLIB.
If the modules were installed in a system library and ICEMAC SORTLIB=SYSTEM is used, then
the SORTLIB DD statement is unnecessary and is ignored unless dynamic link edit of user exits is
used.
30 Directs messages to system output class A
If you use the DFSPARM DD statement instead, you can specify both EXEC PARM options and DFSORT
control statements in a single source data set that overrides all other sources. See “DFSPARM DD
Statement” on page 55.
Details of alternate names for PARM options are given under the description of individual options. “Alter-
nate PARM Option Names” on page 40 summarizes the available alternate names.
| DFSORT accepts but does not process the following EXEC/DFSPARM PARM options: BALN, BSMG,
| CRCX, DEBUG, DIAG, L6, L7, NOCOMMAREA, NOIOERR, OSCL, PEER, POLY, PRINT121, RESET.
┌─,────────────────────────────┐
55──,PARM='───6┬─┬─ABEND───┬────────────────┬┴──'──5%
│ └─NOABEND─┘ │
├─ARESALL=──┬─n──┬───────────┤
│ ├─nK─┤ │
│ └─nM─┘ │
├─AVGRLEN=n──────────────────┤
├─BSAM───────────────────────┤
├─┬─CINV───┬─────────────────┤
│ └─NOCINV─┘ │
├─DSPSIZE=──┬─MAX─┬──────────┤
│ └─n───┘ │
├─DYNALLOC──┬──────────────┬─┤
│ └─=─┬─d─────┬──┘ │
│ ├─(d)───┤ │
│ ├─(,n)──┤ │
│ ├─(d,n)─┤ │
│ ├─OFF───┤ │
│ └─(OFF)─┘ │
├─EFS=──┬─name─┬─────────────┤
│ └─NONE─┘ │
├─┬─EQUALS───┬───────────────┤
│ └─NOEQUALS─┘ │
├─EXCPVR=──┬─ALL───┬─────────┤
│ ├─NOWRK─┤ │
│ └─NONE──┘ │
├─E15=COB────────────────────┤
├─E35=COB────────────────────┤
├─FILSZ=──┬─x──┬─────────────┤
│ ├─Ex─┤ │
│ └─Ux─┘ │
├─HIPRMAX=──┬─OPTIMAL─┬──────┤
│ └─n───────┘ │
├─┬─LIST───┬─────────────────┤
│ └─NOLIST─┘ │
├─┬─LISTX───┬────────────────┤
│ └─NOLISTX─┘ │
| ├─LOCALE=──┬─name────┬───────┤
| │ ├─CURRENT─┤ │
| │ └─NONE────┘ │
├─MSGDDN=ddname──────────────┤
├─MSGPRT=──┬─ALL──────┬──────┤
│ ├─CRITICAL─┤ │
│ └─NONE─────┘ │
| ├─ODMAXBF=──┬─n──┬───────────┤
| │ ├─nK─┤ │
| │ └─nM─┘ │
├─┬─OUTREL───┬───────────────┤
│ └─NOOUTREL─┘ │
├─RESALL=──┬─n──┬────────────┤
│ ├─nK─┤ │
│ └─nM─┘ │
├─SIZE=──┬─n──────┬──────────┤
│ ├─nK─────┤ │
│ ├─nM─────┤ │
│ ├─MAX────┤ │
│ ├─MAX-m──┤ │
│ ├─MAX-mK─┤ │
│ └─MAX-mM─┘ │
└─SKIPREC=z──────────────────┘
├──┬─┬─STIMER───┬─┬──┤
│ └─NOSTIMER─┘ │
├─STOPAFT=n────┤
├─┬─WRKREL───┬─┤
│ └─NOWRKREL─┘ │
└─┬─WRKSEC───┬─┘
└─NOWRKSEC─┘
ABEND or NOABEND
55──┬─ABEND───┬─────────────────────────────────────────────────────────────────────5%
└─NOABEND─┘
Temporarily overrides the ERET installation option which specifies whether DFSORT abends or termi-
nates with a return code of 16 if your sort, copy, or merge is unsuccessful.
ABEND specifies that if your sort, copy, or merge is unsuccessful, DFSORT abends with a user
completion code equal to the appropriate message number or with a user-defined
number between 1 and 99, as set during installation with the ICEMAC option
ABCODE=n.
When DEBUG ABEND is in effect, a user abend code of zero may be issued when a
tape work data set sort or Conventional merge is unsuccessful.
NOABEND specifies that an unsuccessful sort, copy, or merge terminates with a return code of 16.
Notes:
1. RC16=ABE and NORC16 can be used instead of ABEND and NOABEND, respectively.
| 2. If DFSORT determines that a BatchPipes/MVS data set is being used, it automatically forces the
| ABEND option on, to ensure that an abend will be generated if an error is detected. This allows
| for appropriate error propagation by the system to other applications that may be accessing the
| same BatchPipes/MVS data set.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options.”
ARESALL
55──ARESALL=──┬─n──┬────────────────────────────────────────────────────────────────5%
├─nK─┤
└─nM─┘
Temporarily overrides the ARESALL installation option, which specifies the number of bytes to be
reserved above 16-megabyte virtual for system use. For more information, see the discussion of the
ARESALL parameter in “OPTION Control Statement” on page 111.
55──AVGRLEN=n───────────────────────────────────────────────────────────────────────5%
Specifies the average input record length in bytes for variable-length record sort applications. For
more information, see the discussion of the AVGRLEN parameter in “OPTION Control Statement” on
page 111.
n specifies the average input record length. The value for n must be between 4 and 32 767 and
must include the 4 byte record descriptor word (RDW).
Default: If AVGRLEN=n is not specified, DFSORT will use one-half of the maximum record length as
the average record length. See Appendix B, “Specification/Override of DFSORT Options” on
page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
BSAM
55──BSAM────────────────────────────────────────────────────────────────────────────5%
| Temporarily bypasses the EXCP access method normally used for input and output data sets. BSAM
| is ignored for VSAM input and output data sets. Note that if Blockset is not selected and BSAM
processing is used with concatenated SORTIN input and both null and non-null data sets are speci-
fied, all null data sets must precede all non-null data sets; otherwise, the results are unpredictable.
Note: This option can degrade performance.
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
CINV or NOCINV
55──┬─CINV───┬──────────────────────────────────────────────────────────────────────5%
└─NOCINV─┘
Temporarily overrides the CINV installation option which specifies whether DFSORT can use control
interval access for VSAM data sets. For more information, see the explanation of the CINV parameter
in “OPTION Control Statement” on page 111.
CINV directs DFSORT to use control interval access when possible for VSAM data sets.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
DSPSIZE
55──DSPSIZE=──┬─MAX─┬───────────────────────────────────────────────────────────────5%
└─n───┘
For MVS/ESA, and MVS/XA installations using DFSORT virtual dataspace, temporarily overrides the
DSPSIZE installation option which specifies the maximum amount of data space to be used for
dataspace sorting. For more information, see the discussion of the DSPSIZE option in “OPTION
Control Statement” on page 111.
MAX specifies that DFSORT dynamically determines the maximum amount of data space that will be
used for dataspace sorting. In this case, DFSORT bases its data space usage on the size of
the file being sorted and, for MVS/ESA only, the paging activity of the system.
n specifies the maximum amount, in megabytes, of data space to be used for dataspace sorting.
n must be a value between 0 and 9999. The actual amount of data space used does not
exceed n, but may be less depending on the size of the file being sorted and, for MVS/ESA
only, the paging activity of the system.
If n is zero, dataspace sorting is not used.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
DYNALLOC
55──DYNALLOC──┬──────────────┬──────────────────────────────────────────────────────5%
└─=─┬─d─────┬──┘
├─(d)───┤
├─(,n)──┤
└─(d,n)─┘
Specifies that DFSORT dynamically allocates needed work space. You do not need to calculate and
use JCL to specify the amount of work space needed by the program.
For more information, see the discussion of DYNALLOC in “OPTION Control Statement” on page 111
and Appendix A, “Using Work Space” on page 447.
| d specifies the device name. You can specify any of the following IBM devices in the same way you
| would specify them in the JCL UNIT parameter, provided the device is supported by your system:
| 3350 series, 3375 series, 3380 series, 3390 series,
| 9345 series, 3400 series, and RAMAC Array DASD
: n specifies the maximum number of requested work data sets. If you specify more than 100, a
: maximum of 100 data sets is used. If you specify 1 and the Blockset technique is selected, a
: maximum of 2 data sets is used. If you specify more than 32 and the Blockset technique is not
: selected, a maximum of 32 data sets is used.
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
DYNALLOC=OFF
55──DYNALLOC=──┬─(OFF)─┬────────────────────────────────────────────────────────────5%
└─OFF───┘
Directs DFSORT not to allocate intermediate workspace dynamically. It overrides the ICEMAC instal-
lation option DYNAUTO=YES or the DYNALLOC parameter (without OFF) specified at run-time. For
more information, see the discussion of the DYNALLOC option in “OPTION Control Statement” on
page 111.
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
EFS
55──EFS=──┬─name─┬──────────────────────────────────────────────────────────────────5%
└─NONE─┘
Temporarily overrides the EFS installation option which specifies whether DFSORT passes control to
an EFS program. See Chapter 7, “Using Extended Function Support” on page 363 for more informa-
tion on EFS.
name specifies the name of the EFS program that will be called to interface with DFSORT.
| Note: If you use locale processing for SORT, MERGE, INCLUDE, or OMIT fields, you must not use
| an EFS program. DFSORT's locale processing may eliminate the need for an EFS program. See
| “OPTION Control Statement” on page 111 for information related to locale processing.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
EQUALS or NOEQUALS
55──┬─EQUALS───┬────────────────────────────────────────────────────────────────────5%
└─NOEQUALS─┘
Temporarily overrides the EQUALS installation option which specifies whether the original sequence of
| records that collate identically for a sort or a merge should be preserved from input to output. For
more information, see the discussion of the EQUALS option in “OPTION Control Statement” on
page 111.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
EXCPVR
55──EXCPVR=──┬─ALL───┬──────────────────────────────────────────────────────────────5%
├─NOWRK─┤
└─NONE──┘
Temporarily overrides the EXCPVR installation option which specifies the data sets for which DFSORT
can use EXCPVR when sorting or copying fixed- and variable-length records with the Blockset tech-
nique. For more information, see the explanation of the EXCPVR parameter in “OPTION Control
Statement” on page 111.
ALL specifies that DFSORT can use EXCPVR for SORTIN, SORTOUT, and SORTWKnn data
sets. DFSORT does not use EXCPVR when it determines that the associated overhead
may cause performance degradation.
NOWRK specifies that DFSORT can use EXCPVR for the SORTIN and SORTOUT data sets only.
DFSORT will not use EXCPVR for SORTWKnn if NOWRK is specified.
NONE specifies that DFSORT cannot use EXCPVR for SORTIN, SORTOUT, or SORTWKnn data
sets.
55──E15=COB─────────────────────────────────────────────────────────────────────────5%
Specifies that your E15 routine is written in COBOL and temporarily overrides the MODS statement for
E15. If you specify E15=COB but do not identify an E15 module with a MODS statement, the
E15=COB is ignored.
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
E35=COB
55──E35=COB─────────────────────────────────────────────────────────────────────────5%
Specifies that your E35 routine is written in COBOL and temporarily overrides the MODS statement for
E35. If you specify E35=COB but do not identify an E35 module with a MODS statement, the
E35=COB is ignored.
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
FILSZ
55──FILSZ=──┬─x──┬──────────────────────────────────────────────────────────────────5%
├─Ex─┤
└─Ux─┘
Specifies either the exact number of records to be sorted or merged, or an estimate of the number of
records to be sorted. This record count is used by DFSORT for two purposes:
1. To check that the actual number of records sorted or merged is equal to the exact number of
records expected. FILSZ=x causes this check to be performed and results in termination with
message ICE047A if the check fails.
2. To determine the input file size for a sort application. DFSORT performs calculations based on
the user supplied record count and other parameters (such as AVGRLEN) to estimate the total
number of bytes to be sorted. This value is important for sort applications, since it is used for
several internal optimizations as well as for dynamic work data set allocation (see OPTION
DYNALLOC). If no input record count (or only an estimate) is supplied for the sort application,
DFSORT attempts to automatically compute the file size to be used for the optimizations and allo-
cations.
The type of FILSZ value specified (x, Ex, Ux, or none) controls the way DFSORT performs the above
two functions, and can have a significant effect on performance and work data set allocation. See
“Specify Input/Output Data Set Characteristics Accurately” on page 400 and “Allocation of Work Data
Sets” on page 450 for more information on file size considerations.
x specifies the exact number of records to be sorted or merged. This value is always used for both
the record check and file size calculations. FILSZ=x can be used to force DFSORT to perform
file size calculations based on x, and to cause DFSORT to terminate the sort or merge applica-
tion if x is not exact.
If the FSZEST=NO installation option is in effect and FILSZ=x is specified, DFSORT terminates if
the actual number of records is different from the specified value (x), the actual number of
records placed in the IN field of message ICE047A (or message ICE054I) before termination.
However, if the FSZEST=YES installation option is in effect, DFSORT treats FILSZ=x like
FILSZ=Ex; it does not terminate when the actual number of records does not equal x.
The specified value (x) must take into account the number of records in the input data sets,
| records to be inserted or deleted by exit E15 or E32, and records to be deleted by the
| INCLUDE/OMIT statement, SKIPREC, and STOPAFT. x must be changed whenever the number
of records to be sorted or merged changes in any way.
FILSZ=0 causes Hipersorting and dynamic allocation of work space not to be used, and results in
termination with the message ICE047A unless the number of records sorted or merged is 0.
Ex specifies an estimated number of records to be sorted. This value is not used for the record
check. It is used for file size calculations, but only if DFSORT could not automatically compute
the file size. In all other cases, this value is ignored by DFSORT. See “Dynamic Allocation of
Work Data Sets” on page 451 for details on exactly when FILSZ=Ex is used or ignored by
DFSORT.
The specified value (x) should take into account the number of records in the input data sets,
| records to be inserted or deleted by exit E15, and records to be deleted by the INCLUDE/OMIT
| statement, SKIPREC, and STOPAFT. x should be changed whenever the number of records to
be sorted changes significantly.
FILSZ=E0 will always be ignored.
Limit: 28 digits (15 significant digits)
Ux specifies the number of records to be sorted. This value is not used for the record check, but is
always used for file size calculations. FILSZ=Ux can be used to force DFSORT to perform file
size calculations based on x, while avoiding termination if x is not exact.
| The FSZEST installation option has no effect on FILSZ=Ux processing.
The specified value (x) should take into account the number of records in the input data sets,
| records to be inserted or deleted by exit E15, and records to be deleted by the INCLUDE/OMIT
| statement, SKIPREC, and STOPAFT. x should be changed whenever the number of records to
be sorted changes significantly.
FILSZ=U0 causes Hipersorting and dynamic allocation of work space not to be used, and can
cause degraded performance or termination with the message ICE046A, if the actual number of
records to be sorted is significantly larger than 0.
Limit: 28 digits (15 significant digits)
Note: Using the FILSZ parameter to supply inaccurate information to DFSORT can negatively affect
DFSORT's performance, and when work space is dynamically allocated, can result in wasted DASD
space or termination with message ICE083A or ICE046A. Therefore, it is important to update the
record count value whenever the number of records to be sorted changes significantly.
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
HIPRMAX
55──HIPRMAX=──┬─OPTIMAL─┬───────────────────────────────────────────────────────────5%
└─n───────┘
For MVS/ESA, temporarily overrides the HIPRMAX installation option, which specifies the maximum
amount of Hiperspace to be committed for Hipersorting. For more information, see the discussion of
the HIPRMAX option in “OPTION Control Statement” on page 111.
| OPTIMAL specifies that DFSORT determines dynamically the maximum amount of Hiperspace to be
| used for Hipersorting.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
LIST or NOLIST
55──┬─LIST───┬──────────────────────────────────────────────────────────────────────5%
└─NOLIST─┘
Temporarily overrides the LIST installation option, which specifies whether DFSORT program control
| statements should be written to the message data set. See Messages, Codes and Diagnosis for full
details on use of the message data set.
LIST specifies that all DFSORT control statements are printed on the message data set.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
LISTX or NOLISTX
55──┬─LISTX───┬─────────────────────────────────────────────────────────────────────5%
└─NOLISTX─┘
Temporarily overrides the LISTX installation option which specifies whether DFSORT writes to the
| message data set the program control statements returned by an EFS program. See Messages,
| Codes and Diagnosis for full details on use of the message data set.
LISTX specifies that control statements returned by an EFS program are printed to the message
data set.
NOLISTX specifies that control statements returned by an EFS program are not printed to the
message data set.
Notes:
1. If EFS=NONE is in effect after final override rules have been applied, NOLISTX will be set in
effect.
2. LISTX and NOLISTX can be used independently of LIST and NOLIST.
| 3. For more information on printing EFS control statements, see Messages, Codes and Diagnosis.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
| LOCALE
:
: 55──LOCALE=─┬─name────┬─────────────────────────────────────────────────────────────5%
: ├─CURRENT─┤
: └─NONE────┘
| Temporarily overrides the LOCALE installation option, which specifies whether locale processing is to
| be used and, if so, designates the active locale. For more information, see the discussion of the
| LOCALE option in “OPTION Control Statement” on page 111.
| name specifies that locale processing is to be used and designates the name of the locale to
| be made active during DFSORT processing.
| The locales are designated using a descriptive name. For example, to set the active
| locale to represent the French language and the cultural conventions of Canada,
| specify LOCALE=FR_CA. You can specify up to 32 characters for the descriptive
| locale name. The locale names themselves are not case-sensitive. See Using Locales
| for complete locale naming conventions.
| You can use IBM-supplied and user-defined locales. See Appendix F, “Locales Sup-
| plied with C/370” on page 501 for examples of some IBM-supplied locales.
| The state of the active locale prior to DFSORT being entered will be restored on
| DFSORT's completion.
| CURRENT specifies that locale processing is to be used, and the current locale active when
| DFSORT is entered will remain the active locale during DFSORT processing.
| NONE specifies that locale processing is not to be used. DFSORT will use the binary
| encoding of the code page defined for your data for collating and comparing.
| Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
| on page 459 for full override details.
| Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
MSGDDN
55──MSGDDN=ddname───────────────────────────────────────────────────────────────────5%
Temporarily overrides the MSGDDN installation option which specifies an alternate ddname for the
message data set. See the explanation of the MSGDDN parameter in “OPTION Control Statement”
on page 111 for more information.
The ddname can be any 1- through 8-character name, but must be unique within the job step; do not
use a name that is used by DFSORT (for example, SORTIN). If the ddname specified is not available
| at run-time, SYSOUT is used instead. For details on using the message data set, see Messages,
| Codes and Diagnosis.
Note: MSGDD can be used instead of MSGDDN.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
MSGPRT
55──MSGPRT=──┬─ALL──────┬───────────────────────────────────────────────────────────5%
├─CRITICAL─┤
└─NONE─────┘
Temporarily overrides the MSGPRT installation option which specifies the class of messages to be
| written to the message data set. See Messages, Codes and Diagnosis for full details on use of the
message data set.
ALL specifies that all messages except diagnostic messages ICE800I to ICE999I are printed
on the message data set. Control statements are printed only if LIST is in effect.
CRITICAL specifies that only critical messages are printed on the message data set. Control state-
ments are printed only if LIST is in effect.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
| ODMAXBF
|
| 55──ODMAXBF=─┬─n──┬─────────────────────────────────────────────────────────────────5%
| ├─nK─┤
| └─nM─┘
| Temporarily overrides the ODMAXBF installation option, which specifies the maximum buffer space
| DFSORT can use for each OUTFIL data set. For more information, see the discussion of the
| ODMAXBF parameter in “OPTION Control Statement” on page 111.
| n specifies that a maximum of n bytes of buffer space is to be used for each OUTFIL data set.
| If you specify less than 262 144, 262 144 is used. If you specify more than 16 777 216,
| 16 777 216 is used.
| Limit: 8 digits
| nK specifies that a maximum of n times 1024 bytes of buffer space is to be used for each
| OUTFIL data set. If you specify less than 256K, 256K is used. If you specify more than
| 16 384K, 16 384K is used.
| Limit: 5 digits
| nM specifies that a maximum of n times 1 048 576 bytes of buffer space is to be used for each
| OUTFIL data set. If you specify 0M, 256K is used. If you specify more than 16M, 16M is
| used.
| Limit: 2 digits
| Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
| on page 459 for full override details.
| Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
OUTREL or NOOUTREL
55──┬─OUTREL───┬────────────────────────────────────────────────────────────────────5%
└─NOOUTREL─┘
Temporarily overrides the OUTREL installation option which specifies whether unused temporary
| output data set space is to be released.
| OUTREL specifies that unused temporary output data set space is released.
| NOOUTREL specifies that unused temporary output data set space is not released.
Note: RLSOUT and NORLSOUT can be used instead of OUTREL and NOOUTREL, respectively.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
RESALL
55──RESALL=──┬─n──┬─────────────────────────────────────────────────────────────────5%
├─nK─┤
└─nM─┘
Temporarily overrides the RESALL installation option which specifies the number of bytes to be
reserved in a REGION for system use when SIZE/MAINSIZE=MAX is in effect. For more information,
see the explanation of the RESALL parameter in “OPTION Control Statement” on page 111.
n specifies that n bytes of storage are to be reserved. If you specify less than 4096, 4096 is
used.
Limit: 8 digits.
nK specifies that n times 1024 bytes of storage are to be reserved. If you specify less than 4K, 4K
is used.
Limit: 5 digits.
nM specifies that n times 1048576 bytes of storage are to be reserved. If you specify 0M, 4K is
used.
Limit: 2 digits.
55──SIZE=──┬─n──────┬───────────────────────────────────────────────────────────────5%
├─nK─────┤
├─nM─────┤
├─MAX────┤
├─MAX-m──┤
├─MAX-mK─┤
└─MAX-mM─┘
Temporarily overrides the SIZE installation option which specifies the amount of main storage avail-
able to DFSORT. See the explanation of the MAINSIZE parameter in “OPTION Control Statement” on
page 111.
: n specifies that n bytes of storage are to be allocated. If you specify more than 2097152000,
: 2097152000 is used.
: Limit: 10 digits.
: nK specifies that n times 1024 bytes of storage are to be allocated. If you specify more than
: 2048000K, 2048000K is used.
: Limit: 7 digits.
: nM specifies that n times 1048576 bytes of storage are to be allocated. If you specify more
: than 2000M, 2000M is used.
: Limit: 4 digits.
MAX instructs DFSORT to calculate the amount of main storage available and allocates this
maximum amount, up to the TMAXLIM or MAXLIM installation value, as appropriate for the
application.
If you specify less than 4K, 4K is used.
MAX-m specifies the RESALL value (m) in bytes. MAX-m instructs DFSORT to calculate the
amount of storage available and allocate this amount up to the MAX value minus the
amount of storage reserved for system and application use (RESALL).
If you specify less than 4096 for m, 4096 is used.
Limit for m: 8 digits.
MAX-mK specifies the RESALL value (m times 1024) in kilobytes. MAX-mK instructs DFSORT to
calculate the amount of storage available and allocate this amount up to the MAX value
minus the amount of storage reserved for system and application use (RESALL).
If you specify less than 4K for m, 4K is used.
Limit for m: 5 digits.
MAX-mM specifies the RESALL value (m times 1048576) in megabytes. MAX-mM instructs the
program to calculate the amount of storage available and allocate this amount up to the
MAX value minus the amount of storage reserved for system and application use
(RESALL).
If you specify 0M for m, 4K is used.
Limit for m: 2 digits.
Note: The forms SIZE(option), CORE=option, and CORE(option) can be used instead of
SIZE=option.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
SKIPREC
55──SKIPREC=z───────────────────────────────────────────────────────────────────────5%
Specifies the number of records (z) you want to skip before starting to sort or copy the input data set.
SKIPREC is typically used to bypass records not processed from the previous DFSORT job. For more
information, see the discussion of the SKIPREC option in “OPTION Control Statement” on page 111.
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
STIMER or NOSTIMER
55──┬─STIMER───┬────────────────────────────────────────────────────────────────────5%
└─NOSTIMER─┘
Temporarily overrides the STIMER installation option which specifies whether DFSORT can use the
STIMER macro.
STIMER specifies that STIMER can be used. Processor-time data appears in SMF records and
ICETEXIT statistics.
NOSTIMER specifies that STIMER cannot be used. Processor-time data does not appear in SMF
records or ICETEXIT statistics.
Note: If a user exit takes checkpoints, then STIMER must not be issued.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
STOPAFT
55──STOPAFT=n───────────────────────────────────────────────────────────────────────5%
Specifies the maximum number of records you want accepted for sorting or copying (that is, read from
| SORTIN or inserted by E15 and not deleted by SKIPREC, E15, or an INCLUDE/OMIT statement). For
more information, see the discussion of the STOPAFT option in “OPTION Control Statement” on
page 111.
Note: If you specify (1) FILSZ=x in the EXEC PARM, or (2) SIZE=x or FILSZ=x on the OPTION or
SORT statement, and the number of records accepted for processing does not equal x, DFSORT
issues an error message and terminates unless FSZEST=YES was specified at installation time.
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
WRKREL
55──┬─WRKREL───┬────────────────────────────────────────────────────────────────────5%
└─NOWRKREL─┘
Temporarily overrides the WRKREL installation option which specifies whether unused temporary
SORTWKnn data set space will be released.
Notes:
1. If you have dedicated certain volumes for SORTWKnn data sets, and you do not want unused
temporary space to be released, you should specify NOWRKREL.
2. RELEASE=ON and RELEASE=OFF can be used instead of WRKREL and NOWRKREL, respec-
tively.
3. If WRKREL is in effect, DFSORT releases space for the SORTWKnn data sets just prior to termi-
nation. Space is released only for those SORTWKnn data sets that were used for the sort appli-
cation.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
WRKSEC
55──┬─WRKSEC───┬────────────────────────────────────────────────────────────────────5%
└─NOWRKSEC─┘
Temporarily overrides the WRKSEC installation option which specifies whether DFSORT uses auto-
matic secondary allocation for temporary JCL SORTWKnn data sets.
WRKSEC specifies that automatic secondary allocation for temporary JCL SORTWKnn data sets
is used and that 25 percent of the primary allocation will be used as the secondary
allocation.
NOWRKSEC specifies that automatic secondary allocation for temporary JCL SORTWKnn data sets
is not used.
Note: SECOND=ON and SECOND=OFF can be used instead of WRKSEC and NOWRKSEC,
respectively.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
Alternate PARM Option Names: For compatibility reasons, the following EXEC/DFSPARM
PARM options can be specified by using the alternate names listed below. See the indicated PARM
options for complete details.
Using DD Statements
A DFSORT job always requires DD statements after the EXEC statement. DD statements fall into two
categories:
System DD statements (discussed in detail in “System DD Statements” on page 44)
Program DD statements (discussed in detail in “Program DD Statements” on page 45).
System DD statements, and some program DD statements, are usually supplied automatically when you
use a cataloged procedure. Others you must always supply yourself.
The DD statement parameters, the conditions under which they are required, and the default values, are
summarized in Figure 8. The subparameters of the DCB parameter (a DD statement parameter) are
described similarly in Figure 9 on page 42.
Notes:
1. Performance is enhanced if the LRECL subparameter of the DCB is accurately specified for variable-
length records. The maximum input record length you can specify for your particular configuration is
given in “Data Set Notes and Limitations” on page 11.
2. When using DFSORT applications, FREE=CLOSE cannot be used on any DD statements.
Duplicate Ddnames: If you specify a particular ddname (such as SORTIN) more than once within
the same step, DFSORT uses the first ddname and ignores subsequent duplicates. Processing continues
normally.
In addition:
SORTWK0, SORTWK1...SORTWK9 can be specified instead of SORTWK00,
SORTWK01...SORTWK09, respectively. If you specify both SORTWKx and SORTWK0x in the same
job step, DFSORT treats them as duplicates, and ignores each usage after the first. For example,
SORTWK2 and SORTWK02 are treated as duplicates. (Only SORTWK2 is used.)
Note: For a tape work data set sort, SORTWKx will not be recognized because of the existing
restriction which allows only SORTWK01, SORTWK02...SORTWK32. However, duplicates of these
accepted ddnames will be ignored.
SORTIN0, SORTIN1...SORTIN9 can be specified instead of SORTIN00, SORTIN01...SORTIN09,
respectively. If you specify both SORTINx and SORTIN0x in the same job step, DFSORT treats them
as duplicates, and ignores each usage after the first. For example, SORTIN2 and SORTIN02 are
treated as duplicates and only SORTIN2 is used.
Note: For a conventional merge, SORTINx will not be recognized because of the existing restriction
which allows only SORTIN01, SORTIN02...SORTIN16. Duplicates of these accepted ddnames will be
ignored.
| Duplicate OUTFIL ddnames are ignored at the OUTFIL statement level as explained in “OUTFIL State-
| ments Notes” on page 184.
Shared Tape Units: The following pairs of DFSORT data sets can be assigned to a single tape unit:
| The SORTIN data set and the SORTWK01 data set (tape work data set sorts only)
| The SORTIN data set and the SORTOUT data set or one OUTFIL data set (sort applications only).
If you want to associate the SORTIN data set with SORTWK01, you can include the parameter
UNIT=AFF=SORTIN in the DD statement for SORTWK01. The AFF subparameter causes the system to
place the data set on the same unit as the dataset with the ddname following the subparameter (SORTIN,
in this case).
| In the same way, you can associate the SORTIN data set with the SORTOUT data set or an OUTFIL data
| set by including UNIT=AFF=SORTIN in the SORTOUT or OUTFIL DD statement.
| SORTINnn tape data sets must all be on different tape units because they are read concurrently.
| SORTOUT and OUTFIL tape data sets must all be on different tape units because they are written concur-
| rently.
System DD Statements
If you choose not to use the SORT or SORTD cataloged procedures to invoke DFSORT, you might need
to supply system DD statements in your input job stream (See also the following section for DD state-
ments dedicated to DFSORT, such as SORTIN). The DD statements contained in the cataloged proce-
dure (or provided by you) are:
//JOBLIB DD Defines your program link library if it is not already known to the system.
//STEPLIB DD Same as //JOBLIB DD.
//SYSIN DD Contains DFSORT control statements, comment statements, blank statements and
remarks when DFSORT is invoked with JCL rather than by another program. It can
also contain user exit routines, in object deck format, to be link-edited by DFSORT.
If you use DFSPARM, then SYSIN is not necessary unless your job requires link-
editing.
The SYSIN data set usually resides in the input stream; however, it can be defined
as a sequential data set or as a member of a partitioned data set.
The data set must be defined with RECFM=F or FB and LRECL=80.
DFSORT supports concatenated SYSIN data sets to the extent that the system
| supports “like” concatenated data sets for BSAM. Refer to Using Data Sets for
| further information about “like” concatenated data sets.
| Note: The OPTION statement keywords EFS, LIST, NOLIST, LISTX, NOLISTX,
| LOCALE, MSGPRT, MSGDDN, SMF, SORTDD, SORTIN, and SORTOUT are used
only when they are passed by an extended parameter list or when in the DFSPARM
data set. If they are specified on an OPTION statement read from the SYSIN or
SORTCNTL data set, the keyword is recognized, but the parameters are ignored.
If you use the DFSPARM DD statement instead, you can specify both EXEC PARM
options and DFSORT control statements in a single source data set that overrides all
other sources. See “DFSPARM DD Statement” on page 55.
If user exit routines are in SYSIN, make sure that:
The END statement is the last control statement.
The user exit routines are arranged in numeric order (for example, E11 before
E15).
The user exit routines are supplied immediately after the END control statement.
Nothing follows the last object deck in SYSIN.
A SORTMODS DD statement is included.
If DFSORT is program invoked, and you supply the DFSORT control statements
through the 24-bit or extended parameter list, SORTCNTL, or DFSPARM, SYSIN
remains the source of user exit routines placed in the system input stream.
//SYSOUT DD Identifies the system output data set for messages. Always use this statement if a
cataloged procedure is not used. If you are invoking DFSORT from another program,
you can specify an alternate ddname for the message data set. (If you are invoking
DFSORT from a COBOL program and are using no ddname other than SYSOUT, the
use of EXHIBIT or DISPLAY in your COBOL program can produce uncertain printing
results.) Before printing DFSORT messages, a skip to a new page is performed.
DFSORT uses RECFM=FBA, LRECL=121, and the specified BLKSIZE for the data set
| attributes. If the BLKSIZE you specify is not a multiple of 121, DFSORT uses
| BLKSIZE=121. If you do not specify the BLKSIZE, DFSORT selects the block size as
| directed by the SDBMSG installation option (see Installation and Customization).
//SYSUDUMP DD Defines the data set for output from a system ABEND dump routine.
| //SYSMDUMP DD Same as //SYSUDUMP DD.
//SYSABEND DD Same as //SYSUDUMP DD.
If you are using the supplied SORT cataloged procedure, the DD statements below are automatically sup-
plied. If you are not using the SORT cataloged procedure and you are using the linkage editor, you must
supply the following DD statements:
//SYSPRINT DD Contains messages from the linkage editor.
//SYSUT1 DD Defines the intermediate storage data set for the linkage editor.
//SYSLIN DD Defines a data set for control information for the linkage editor.
//SYSLMOD DD Defines a data set for output from the linkage editor.
Note: If you do not include user routines, or if you include user routines that do not require link-editing,
you can use the supplied SORTD cataloged procedure. If you include user routines that require link-
editing, you can use the SORT cataloged procedure.
Program DD Statements
Even if you use the SORT or SORTD cataloged procedure to invoke DFSORT, you might need to supply
additional dedicated DD statements. The following list summarizes each of these statements, and a more
detailed explanation of each one follows.
//SORTLIB DD Defines the data set that contains special load modules for DFSORT. Can usually be
omitted.
| //SORTIN DD Defines the input data set for a sorting or copying application. Will not be used for a
| merging application.
| //SORTINnn DD Defines the input data sets for a merging application. Will not be used for a sorting or
| copying application.
//SORTWKnn DD Defines intermediate storage data sets. Usually needed for a sorting application unless
| dynamic allocation is requested. Will not be used for a copying or merging application.
| //SORTOUT DD Defines the SORTOUT output data set for a sorting, merging, or copying application.
| //outfil DD Defines an OUTFIL output data set for a sorting, merging, or copying application.
//SORTCKPT DD Defines the data set used to store the information that the system needs to restart the
sort from the last checkpoint. This is only needed if you are using the checkpoint
facility.
//SORTCNTL DD Defines the data set from which additional or changed DFSORT control statements can
be read when DFSORT is program-invoked. Refer to the SYSIN DD statement for
valid data set attributes.
//DFSPARM DD Defines the data set from which both additional or changed DFSORT program control
statements and EXEC statement PARM options can be read when DFSORT is directly
invoked or program invoked. Refer to the SYSIN DD statement for valid data set attri-
butes.
//SORTDKnn DD Defines the data set used for a VIO SORTWKnn allocation by DFSORT if it is dynam-
ically reallocated; SORTDKnn must never be specified in the job stream.
//SORTDIAG DD Specifies that all messages and control statements are printed. Used primarily for diag-
nostics and debugging.
//SORTSNAP DD Defines the snap dump data set dynamically allocated by DFSORT. SORTSNAP must
never be specified in the job stream.
//SORTMODS DD Defines a temporary partitioned data set. This temporary data set must be large
enough to contain all your user exit routines that appear in SYSIN for a given applica-
tion. If none of your routines appear in SYSIN, this statement is not required. If your
routines are in libraries, you must include DD statements defining the libraries.
DFSORT temporarily transfers the user exit routines in SYSIN to the data set defined
by this DD statement before they are link-edited for processing.
SORTLIB DD Statement: The SORTLIB DD statement can usually be omitted. This statement
describes the data set that contains special DFSORT load modules.
When Required: If ICEMAC option SORTLIB=PRIVATE is in effect or dynamic link edit of user exits is
specified:
For sort applications using tape work data sets
For merge applications for which Blockset cannot be used (see message ICE800I).
The ICEMAC SORTLIB option determines whether DFSORT searches a system library or private library
for the load modules required by tape work data set sorts and Conventional merges.
//SORTLIB DD DSNAME=USORTLIB,DISP=SHR
This example shows DD statement parameters that define a previously cataloged input data set:
DSNAME causes the system to search the catalog for a data set with the name USORTLIB. When the
data set is found, it is associated with the ddname SORTLIB. The control program obtains the
unit assignment and volume serial number from the catalog and, if the volume is not already
mounted, writes a mounting message to the operator.
DISP indicates that the data set existed before this job step, that it should be kept after this job step,
and that it can be used concurrently by several jobs (SHR). None of the jobs should change
the data set in any way.
For information on the parameters used in the SORTLIB DD statement, the conditions under which they
are required, and the default values assumed if a parameter is not included, see Figure 8 on page 41.
The subparameters of the DCB parameter are described in the same detail in Figure 9 on page 42. For
more detailed information, see JCL Reference and JCL User's Guide.
SORTIN DD Statement: The SORTIN DD statement describes the characteristics of the data set in
which the records to be sorted or copied reside and also indicates its location.
When Required: A SORTIN DD statement is required for all sort or copy applications, unless you
provide an E15 user exit that supplies all input to DFSORT and include a RECORD statement in the
program control statements. The SORTIN DD statement is ignored if your program invokes DFSORT and
passes the address of your E15 user exit in the parameter list.
Data Set Characteristics: DFSORT accepts empty and null non-VSAM data sets for sorting and copying
| (be sure to supply DCB parameters). DFSORT also accepts empty permanent VSAM data sets for sorting
| or copying. For non-VSAM data sets, DFSORT examines the DS1LSTAR field in the format-1 DSCB to
determine whether the data set is empty or null. If DS1LSTAR is zero, DFSORT treats the data set as
empty or null. If the data set is a null multivolume data set and the DS1IND80 flag is off in the format-1
DSCB of the first volume of the multivolume data set, DFSORT opens the data set for output to force an
end of file (EOF) mark before using the data set for input.
Note that a null data set is one that has been newly created, but never successfully closed. Null data sets
cannot be processed successfully for a tape work data set sort. The “System Code” field in the data set
| label in the DASD Volume Table of Contents (DSCB in the VTOC) indicates a data set created by the
VSE operating system if it contains the letters DOS or VSE within it. Such data sets are never treated as
null; however, they may be empty. DFSORT cannot process VSE DASD data sets that do not have DOS
or VSE within the System Code field.
With fixed-length records, LRECL must be the same for all data sets. With variable-length records,
LRECL can vary, but the first data set in a concatenation must specify the largest record length.
If the data sets are on unlike devices, you cannot use the EXLST parameter at user exit E18.
If Blockset is not selected and BSAM is used, all null data sets must precede all non-null data sets;
otherwise, the results are unpredictable.
DFSORT forces an EOF mark on all null data sets whose format-1 DSCB DS1IND80 flag is off before
using BSAM to process the null data sets.
If you define a data set using the DUMMY parameter, do not concatenate other data sets to it; the
system ignores data sets concatenated to a DUMMY data set.
If VSAM data sets are concatenated, the system only processes the
: Input cannot consist of both VSAM and non-VSAM data sets.
//SORTIN DD DSNAME=INPUT,DISP=SHR
This example shows DD statement parameters that define a previously cataloged input data set:
DSNAME causes the system to search the catalog for a data set with the name INPUT. When the data
set is found, it is associated with the ddname SORTIN. The control program obtains the unit
assignment and volume serial number from the catalog and, if the volume is not already
mounted, writes a mounting message to the operator.
DISP indicates that the data set existed before this job step, that it should be kept after this job step,
and that it can be used concurrently by several jobs (SHR). None of the jobs should change
the data set in any way.
//SORTIN DD DSN=SORTIN,DISP=(OLD,KEEP),UNIT=349ð,
// VOL=SER=(75836,79661,72945)
If the input data set is contained on more than one reel of magnetic tape, the VOLUME parameter must
be included on the SORTIN DD statement to indicate the serial numbers of the tape reels. In this
example, the input data set is on three reels that have serial numbers 75836, 79661, and 72945.
If a data set is not on a disk or on a standard-labeled tape, you must specify DCB parameters in its DD
statement.
SORTINnn DD Statement: The SORTINnn DD statements describe the characteristics of the data
sets in which records to be merged reside and indicate the locations of these data sets.
When Required: SORTINnn DD statements are always needed for a merge, unless the merge is
invoked from another program and all input is supplied through a routine at user exit E32.
Data Set Characteristics: Input data sets can be either non-VSAM or VSAM, but not both. Empty and
null non-VSAM data sets are accepted. An empty VSAM data set causes a VSAM open error (code 160),
and DFSORT terminates. For non-VSAM data sets, DFSORT examines the DS1LSTAR field in the
format-1 DSCB to determine whether the data set is null or empty. If DS1LSTAR is zero, DFSORT treats
the data set as null or empty. A null data set is one that has been newly created but never successfully
closed. Null data sets cannot be processed successfully by the Conventional merge technique.
BLKSIZE can vary, but for a Conventional merge, SORTIN01 must specify the largest block size.
With fixed-length records, LRECL must be the same for all data sets. With variable-length records,
LRECL can vary.
Data sets can be multivolume but not concatenated. If a SORTINnn data set is multivolume and null,
DFSORT forces an EOF mark on the data set before use.
See “Data Set Notes and Limitations” on page 11 for additional considerations.
//SORTINð1 DD DSNAME=MERGE1,VOLUME=SER=ððð111,DISP=OLD,
// LABEL=(,NL),UNIT=34ðð-3,
// DCB=(RECFM=FB,LRECL=8ð,BLKSIZE=24ð)
//SORTINð2 DD DSNAME=MERGE2,VOLUME=SER=ððð121,DISP=OLD,
// LABEL=(,NL),UNIT=34ðð-3,
// DCB=(RECFM=FB,LRECL=8ð,BLKSIZE=24ð)
//SORTINð3 DD DSNAME=MERGE3,VOLUME=SER=ððð131,DISP=OLD,
// LABEL=(,NL),UNIT=34ðð-3,
// DCB=(RECFM=FB,LRECL=8ð,BLKSIZE=24ð)
//SORTINð1 DD DSNAME=INPUT1,VOLUME=SER=ððð1ð1, \
// UNIT=339ð,DISP=OLD \DCB PARAMETERS
//SORTINð2 DD DSNAME=INPUT2,VOLUME=SER=ððð2ð1, \SUPPLIED FROM
// UNIT=339ð,DISP=OLD \LABELS
: Up to 100 SORTWKnn DD statements can be specified. However, if you specify more than 32 and the
: Blockset technique is not selected, only the first 32 are used.
When Required: One or more SORTWKnn statements are required for each sort application (but not a
merge or copy), unless:
| Input can be contained in main storage
Dynamic work space allocation has been requested (DYNALLOC)
Hipersorting or dataspace sorting is used.
For information on using work data sets, see Appendix A, “Using Work Space” on page 447.
Diagnostic message ICE803I gives information on intermediate storage allocation and use.
Devices: SORTWKnn data sets can be on disk or on tape, but not both. Disk types can be mixed.
Tape must be nine-track unless input is on seven-track tape, in which case work tapes can (but need not)
be seven-track.
//SORTWKð1 DD SPACE=(CYL,(15,5)),UNIT=339ð
If you use the checkpoint/restart facility and need to make a deferred restart, you must make the following
additions to the above statement so that the sort work data set is not lost:
DSNAME=name1,DISP=(NEW,DELETE,CATLG)
Thus the same SORTWKnn DD statement for a deferred restart would be:
//SORTWKð1 DD DSNAME=name1,UNIT=339ð,SPACE=(CYL,(15,5)),
// DISP=(NEW,DELETE,CATLG)
//SORTWKð1 DD UNIT=34ðð-3,LABEL=(,NL)
//SORTWKð2 DD UNIT=34ðð-3,LABEL=(,NL)
//SORTWKð3 DD UNIT=34ðð-3,LABEL=(,NL)
If DFSORT terminates unsuccessfully and the above DD statements have been specified, the intermediate
storage data sets remain in the system until the step has been successfully rerun or until the data sets
have been deleted by some other means.
These parameters specify unlabeled data sets on three 3400 series tape units. Because the DSNAME
parameters are omitted, the system assigns unique names.
| SORTOUT and OUTFIL DD Statements: The SORTOUT and OUTFIL DD statements describe
| the characteristics of the data sets in which the processed records are to be placed and indicate their
| location.
| The SORTOUT DD statement specifies the single non-OUTFIL output data set for a sort, copy, or merge
| application. OUTFIL processing does not apply to SORTOUT.
| The FNAMES and/or FILES parameters of one or more OUTFIL statements specify the ddnames of the
| OUTFIL data sets for a sort, copy, or merge application. The parameters specified for each OUTFIL state-
| ment define the OUTFIL processing to be performed for the OUTFIL data sets associated with that state-
| ment. For specific information about OUTFIL processing, see “OUTFIL Control Statements” on page 141.
| Although the ddname SORTOUT can actually be used for an OUTFIL data set, the term “SORTOUT” will
| be used to denote the single non-OUTFIL output data set.
| When Required: Each ddname specified in an OUTFIL statement requires a corresponding DD state-
| ment for that OUTFIL data set.
| If you do not specify OUTFIL statements, a SORTOUT DD statement is required unless you provide an
| E35 user exit that disposes of all output. A SORTOUT DD statement is ignored if your program invokes
| DFSORT and passes the address of an E35 user exit in the parameter list.
| If you specify OUTFIL statements, you do not have to specify a SORTOUT DD statement or an E35 user
| exit, although you can use either or both.
Data Set Characteristics: See “Data Set Considerations” on page 10 for additional considerations.
| Block size: If SDB=YES is in effect, Blockset uses the system-determined optimum block size in most
| cases when the output data set block size is zero. (See Installation and Customization for a full list of
| restrictions on the use of SDB.) System-determined block size applies to both SMS-managed and
| non-SMS-managed data sets and results in the most efficient use of space for the device on which the
| output data set resides.
| For DASD output data sets, the optimum block size for the output device used is selected based on
| the RECFM and LRECL attributes for the output data set. If these output data set attributes are not
| available from the JFCB or format 1 DSCB, DFSORT will determine them from the SORTIN attributes
| or the RECORD statement as usual and base the system-determined output data set block size on
| these derived values.
| For tape output data sets, system-determined block size is used only for data sets with a label type
| other than AL. The optimum block size is selected based on the RECFM and LRECL attributes for the
| output data set as shown in Figure 10 on page 53 below. If these output data set attributes are not
| available from the JFCB or from the tape label (only for DISP=MOD with AL, SL, or NSL label, when
| appropriate), DFSORT will determine them from the SORTIN attributes or the RECORD statement as
| usual and base the system-determined output data set block size on these derived values.
Figure 10. System-Determined Block Sizes for Tape Output Data Sets
RECFM BLKSIZE is set to:
F or FS LRECL
FB or FBS Highest possible multiple of LRECL that is less than or equal to 32760
V, D, VS, or DS LRECL + 4
VB, DB, VBS, or DBS 32760
| For some jobs, the selection of a larger output data set block size when system-determined block size is
used can require an increase in the amount of storage needed for successful DFSORT processing.
| Applications which require a specific output data set block size should be changed to specify that block
size explicitly. Alternatively, ICEMAC option SDB=NO can be selected to eliminate the use of system-
determined block size for all DFSORT applications.
| If SDB=YES is not in effect, DFSORT selects an appropriate (though not necessarily optimum) block size
| for the output data set based on the available attributes from the output data set, SORTIN, and the
| RECORD statement. The output data set block size will not necessarily be the same as the SORTIN
| block size.
| Reblockable Indicator: DFSORT sets the reblockable indicator in the output data set label when:
| The RECFM, LRECL, and BLKSIZE in a tape label are used only for a tape output data set with
| DISP=MOD, a DD volser present, and an AL, SL, or NSL label, when appropriate.
FREE=CLOSE cannot be specified.
//SORTOUT DD DSN=C9ð546ð.OUTPT,UNIT=339ð,SPACE=(CYL,5),
// DISP=(NEW,CATLG)
DISP specifies the data set unknown to the operating system (NEW) and catalogs (CATLG) it under
the name C905460.OUTPT.
SORTCKPT DD Statement: The SORTCKPT data set can be allocated on any device that oper-
ates with the Basic Sequential Access Method (BSAM). Processing must be restarted only from the last
checkpoint taken.
//SORTCKPT DD DSNAME=CHECK,VOLUME=SER=ððð123,
// DSP=(NEW,KEEP),UNIT=34ðð-3
When you allocate the SORTCKPT data set, you must include at least one work data set.
If the CKPT operand is specified on the OPTION or SORT control statement, more intermediate storage
could be required.
If you want to use the Checkpoint/Restart Facility, refer to “Checkpoint/Restart” on page 497.
SORTCNTL DD Statement: The SORTCNTL data set can be used to supply DFSORT control
statements, comment statements, blank statements, and remarks when DFSORT is invoked from another
program (written, for example, in COBOL or PL/I).
The SORTCNTL data set usually resides in the input stream, but can be defined as a sequential data
set or as a member of a partitioned data set.
The data set must be defined with RECFM=F or FB and LRECL=80.
DFSORT supports concatenated SORTCNTL data sets to the extent that the system supports “like”
| concatenated data sets for BSAM. Refer to Using Data Sets for further information about “like” con-
catenated data sets.
When DFSORT is invoked from a PL/I program, the SORTCNTL or DFSPARM data set must not be
used to supply a new RECORD control statement.
//SORTCNTL DD \
| Notes:
| 1. The OPTION statement keywords EFS, LIST, NOLIST, LISTX, NOLISTX, LOCALE, MSGPRT,
| MSGDDN, SMF, SORTDD, SORTIN, and SORTOUT are used only when they are passed by an
| extended parameter list or when in the DFSPARM data set. If they are specified on an OPTION
| statement read from the SYSIN or SORTCNTL data set, the keyword is recognized, but the parame-
| ters are ignored.
| If your program invokes DFSORT more than once, you can direct DFSORT to read different versions
| of the SORTCNTL data set at each call. See the explanation of the SORTDD parameter in “OPTION
| Control Statement” on page 111.
| 2. If you use the DFSPARM DD statement instead of the SORTCNTL DD statement, you can specify
| both EXEC PARM options and DFSORT control statements in a single source data set that overrides
| all other sources. See “DFSPARM DD Statement.” For override rules, see Appendix B,
| “Specification/Override of DFSORT Options” on page 459.
DFSPARM DD Statement: The DFSPARM DD statement can be used to supply DFSORT program
control statements and EXEC statement PARM options from a single DD source. Because statements in
the DFSPARM data set are read whether DFSORT is program invoked or directly invoked, you can
specify EXEC PARM options when invoking DFSORT from another program (unlike SORTCNTL).
DFSPARM accepts all DFSORT program control statements and all EXEC statement PARM options
(including those ignored by SYSIN and SORTCNTL) and any equivalent options specified on a DFSORT
OPTION statement.
Full override and applicability details are listed below and in Appendix B, “Specification/Override of
DFSORT Options” on page 459.
If you use DFSPARM, SYSIN is not necessary unless your job requires link-editing.
The DFSPARM data set usually resides in the input stream, but it can be defined as a sequential data
set or as a member of a partitioned data set.
The data set must be defined with RECFM=F or FB and LRECL=80.
DFSORT supports concatenated DFSPARM data sets to the extent that the system supports “like”
| concatenated data sets for BSAM. Refer to Using Data Sets for further information about “like” con-
catenated data sets.
When DFSORT is invoked from a PL/I program, the SORTCNTL or DFSPARM data set must not be
used to supply a new RECORD control statement.
Note: The ddname DFSPARM is used throughout this book to refer to this data set source for EXEC
PARM options and DFSORT program control statements. When your system programmers installed
DFSORT, they might have changed this name to one more appropriate for your site with the PARMDDN
option of the ICEMAC installation macro. Verify the correct ddname before attempting to use the features
available with DFSPARM.
General Coding Notes: Coding of parameters in the DFSPARM DD statement follows the same rules
used for the JCL EXEC statement PARM options and the program control statements specified in SYSIN
or SORTCNTL. The following exceptions apply:
Labels are not allowed.
PARM options and program control statements cannot be mixed on the same line, but can be speci-
fied in any order on different lines.
PARM options must be specified without the PARM= keyword and without quote marks.
Commas (or semicolons) are accepted, but not required, to continue PARM options to another line.
Leading blanks are not required for PARM options, but at least one leading blank is required for
program control statements.
//DFSPARM DD \
SORT FIELDS=(1,2,CH,A),STOPAFT=3ðð
ABEND
OPTION SORTIN=DATAIN
STOPAFT=5ðð
In this example the DFSPARM DD data set passes a DFSORT SORT statement, the ABEND and
STOPAFT parameters equivalent to specifying PARM='ABEND,STOPAFT=500' in a JCL EXEC state-
ment, and a DFSORT OPTION statement.
Notes:
1. SORT and OPTION are control statements. ABEND and STOPAFT=500 are PARM options.
2. The PARM option STOPAFT=500 overrides the SORT control statement option STOPAFT=300.
//DFSPARM DD \
SORT FIELDS=(5,2,CH,D),SKIPREC=1ð
STOPAFT=1ðð,BSAM,SKIPREC=5
OPTION SORTIN=DATAIN,SKIPREC=2ð
In this example, the DFSPARM DD data set contains a SORT program control statement, three PARM
options on one line, and an OPTION program control statement.
Note: Because PARM options override program control statements, DFSORT uses SKIPREC=5 and
ignores the other SKIPREC specifications.
For information on the parameters used in the DFSPARM DD statement, the conditions under which they
are required, and any default values assumed if a parameter is omitted, see “Specifying EXEC/DFSPARM
PARM Options” on page 24 and Chapter 3, “Using DFSORT Program Control Statements” on page 59.
SORTDKnn DD Statement: SORTWKnn data sets can be assigned to VIO. If the ICEMAC
parameter VIO is specified or defaults to NO, VIO SORTWKnn data sets are deallocated and reallocated
by DFSORT with the ddname SORTDKnn. The ddname SORTDKnn is reserved for use by DFSORT.
SORTDIAG DD Statement: The SORTDIAG DD statement specifies that all messages, including
diagnostic messages (ICE800I through ICE999I), and control statements are to be written to the message
data set. The statement can be used for all DFSORT techniques and provides information on EXCP
counts, intermediate storage allocation and use, and so on. The SORTDIAG DD statement has no effect
on console messages. The statement is intended as a diagnostic tool.
When SORTDIAG is used, a SYSOUT DD statement or a ddname DD statement (where ddname is the
alternate message data set ddname specified during installation or run-time) should be provided. If
ICEMAC option NOMSGDD=QUIT is in effect and neither an alternate message data set ddname state-
ment nor a SYSOUT ddname statement is provided, DFSORT terminates with a return code of 20.
//SORTDIAG DD DUMMY
SORTSNAP DD Statement: The SORTSNAP DD statement defines the data set where the snap
dumps requested by the ESTAE recovery routine, or the snap dumps requested before or after a call to an
EFS program are printed. SORTSNAP is dynamically allocated by DFSORT whenever it is required. The
ddname, SORTSNAP, is reserved for DFSORT.
See Appendix B, “Specification/Override of DFSORT Options” on page 459 for an explanation of when to
use each source.
DFSORT Panels offers you an alternative to coding program control statements directly. When you use
panels to prepare a job to be run or saved in a data set, you can create the necessary statements in
| correct syntax by entering information and commands online. See Panels Guide for details.
This chapter begins with a summary of DFSORT program control statements and coding rules. A detailed
description of each statement follows.
OMIT Specifies that any records whose fields meet certain criteria are deleted.
| OUTFIL Specifies the records to be included or omitted in multiple output data sets.
All other DFSORT control statements have the same general format, shown in Figure 11 on page 63.
The illustrated format does not apply to control statements you supply in a parameter list. See Chapter 5,
“Invoking DFSORT from a Program” on page 265 for information on the special rules that apply.
The control statements are free-form; that is, the operation definer, operand(s), and comment field can
appear anywhere in a statement, provided they appear in the proper order and are separated by one or
more blank characters. Column 1 of each control statement must be blank, unless the first field is a label.
Label Field: If present, the label must begin in column 1, and must conform to the operating system
requirements for statement labels.
Operation Field: This field can appear anywhere between column 2 and column 71 of the first line. It
contains a word (for example, SORT or MERGE) that identifies the statement type to the program. In the
example below, the operation definer, SORT, is in the operation field of the sample control statement.
Operand Field: The operand field is composed of one or more operands separated by commas or semi-
colons. This field must follow the operation field, and be separated from it by at least one blank. No
blanks are allowed within the parameters, but a blank is required at the end of all parameters. If the
statement occupies more than one line, the operand must begin on the first line. Each operand has an
operand definer, or parameter (a group of characters that identifies the operand type to DFSORT). A
value or values can be associated with a parameter. The three possible operand formats are:
parameter
parameter=value
parameter=(value1,value2...,valuen).
SORT EQUALS,FORMAT=CH,FIELDS=(1ð,3ð,A)
Remark Field: This field can contain any information. It is not required, but if it is present, it must be
separated from the last operand field by at least one blank.
Continuation Column (72): Any character other than a blank in this column indicates that the present
statement is continued on the next line. However, as long as the last character of the operand field on a
line is a comma or semicolon followed by a blank, the program assumes that the next line is a continua-
| tion line. The nonblank character in column 72 is required only when a remark field is to be continued or
when an operand is broken at column 71.
Columns 73 through 80: This field can be used for any purpose.
Continuation Lines
The format of the DFSORT continuation line is shown in Figure 12.
Column 1 must
be blank
│
│ 16 72 73'''''''''''''''8ð
│ │ │ │
6 6 6 6
┌────────────────────────────────────────────────────────────────────────────────────┐
│ │
│ │
│ Continued operand or remarks & Optional use │
│ │ │
│ │ │
│ │ │
│ Continuation column │
│ │
The continuation column and columns 73 through 80 of a continuation line have the same purpose as they
do on the first line of a control statement. Column 1 must be blank.
| A continuation line is treated as a logical extension of the preceding line. Either an operand or a remark
| field can begin on one line and continue on the next. The following rules apply and are demonstrated in
the example.
| If a remark field is broken or is to be started on a new line, column 72 must contain a nonblank
character. The continuation can begin in any column from 2 through 71.
If an operand field is broken after a comma or a semicolon, the continuation column (72) can be left
blank, and the continuation can begin in any column from 2 through 71. If the comma or semicolon is
in column 71 and column 72 contains a nonblank character, the continuation must begin in column 16.
If an operand field is not broken after a comma or semicolon, the operand field must be broken at
column 71. Column 72 must contain a nonblank character. The continuation must begin in column
16.
1 16 72
│ │ │
6 6 6
SORT FIELDS=(5,8,A,2ð,2,D),
FORMAT=CH
OPTION SKIPREC=2,LIST, SKIP 2 RECORDS───LIST CONTROL STATEMENTS───
DYNALLOC USE DYNAMIC ALLOCATION
INCLUDE COND=(1,1ð,CH,EQ,C'STOCKHOLM',AND,21,8,ZD,GT,+5ðð,OR,31,4,CH,N\
E,C'HERR')
Coding Restrictions
The following rules apply to control statement preparation:
Labels, operation definers, and operands must be in uppercase EBCDIC.
Column 1 of each control statement can be used only for a label or for a comment statement that
begins with an asterisk in column 1.
Labels must begin in column 1 and conform to operating system requirements for statement labels.
The entire operation definer must be contained on the first line of a control statement.
The first operand must begin on the first line of a control statement. The last operand in a statement
must be followed by at least one blank.
Blanks are not allowed in operands. Anything following a blank is considered part of the remark field.
In general, values can contain no more than eight alphanumeric characters. Values that specify
record counts (such as those for SKIPREC, STOPAFT, and FILSZ) can contain up to 28 digits, the
| last 15 of which are allowed to be significant (non-zero) digits. Values specified for LOCALE can
| contain up to 32 alphanumeric characters.
Commas, semicolons, and blanks can be used only as delimiters. They can be used in values only if
the values are constants.
Each type of program control statement can appear only once within a single source (for example, the
SYSIN data set).
EFS Restrictions When an EFS Program Is in Effect: In addition to the items above, the
following restrictions apply to control statement preparation for an EFS program.
Non-DFSORT operation definers can be up to 8 bytes long.
An operation definer with no operands is allowed only if:
– It is supplied through SYSIN, SORTCNTL, or DFSPARM.
– It is the only operation definer on a line; column 72 must contain a blank.
| Using Control Statements from Other IBM Programs: The INPFIL control statement, which
| is used by other IBM sort programs, is accepted but not processed. However, control statement errors
| can result from continuation of an INPFIL statement. The information contained in the INPFIL statement
| for other IBM sort programs is supplied to DFSORT with DD statements.
Because DFSORT uses the OPTION control statement, OPTION control statements in any job streams
from other IBM sort programs cause DFSORT to terminate unless the parameters from the other program
conform to the DFSORT OPTION control statement parameters.
┌─,────┐
55──ALTSEQ──CODE=──(───6─fftt─┴──)───────────────────────────────────────────────────────5%
Changes the collating sequence of EBCDIC character data; it changes only the order in which data is
collated, not the data itself. If a modified version of the collating sequence is available by default at your
site, the ALTSEQ statement overrides it.
| When you supply an ALTSEQ statement, DFSORT applies the modified collating sequence to any field
| whose format you specify in SORT, MERGE, INCLUDE, or OMIT as AQ. If you specify AQ without sup-
plying an ALTSEQ statement, DFSORT uses the default available at your site if there is one. Otherwise,
DFSORT uses the standard EBCDIC collating sequence.
| CODE
|
| ┌─,────┐
| 55──CODE=──(───6─fftt─┴──)───────────────────────────────────────────────────────────5%
ff specifies, in hexadecimal, the EBCDIC collating position of the character whose position is to be
changed.
tt specifies, in hexadecimal, the EBCDIC collating position to which the character is to be moved.
1. If CHALT is in effect, control fields with format CH are collated using the ALTSEQ table, in addi-
tion to those with format AQ.
| 2. If you use locale processing for SORT, MERGE, INCLUDE, or OMIT fields, you must not use
| CHALT. If you need alternate sequence processing for a particular field, use format AQ.
3. Using ALTSEQ can degrade performance.
Default: Usually the installation option. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
Example 1
ALTSEQ CODE=(5BEA)
The character $ (X'5B') is to collate at position X'EA', that is, after uppercase Z (X'E9').
Example 2
ALTSEQ CODE=(FðBð,F1B1,F2B2,F3B3,F4B4,F5B5,F6B6,
F7B7,F8B8,F9B9)
The numerals 0 through 9 are to collate before uppercase letters (but after lowercase letters).
Example 3
ALTSEQ CODE=(C1F1,C2F2)
The uppercase A (X'C1') is to collate at the same position as the numeral 1 (X'F1') and the uppercase
B (X'C2') is to collate at the same position as the numeral 2 (X'F2').
Note that this ALTSEQ statement does NOT cause collating of A before or after 1, or of B before or after
2.
| Example 4
| ALTSEQ CODE=(81C1,82C2,83C3,84C4,85C5,86C6,87C7,
| 88C8,89C9,91D1,92D2,93D3,94D4,95D5,96D6,
| 97D7,98D8,99D9,A2E2,A3E3,A4E4,A5E5,A6E6,
| A7E7,A8E8,A9E9)
| Each lowercase letter is to collate at the same position as the corresponding uppercase letter. For
| example, the lowercase a (X'81') is to collate at the same position as the uppercase A (X'C1'). This
| results in case-insensitive collating.
┌─,──────────────────────┐
55──DEBUG───6┬─┬─ABEND───┬──────────┬┴───────────────────────────────────────────────────5%
│ └─NOABEND─┘ │
├─ABSTP────────────────┤
├─BSAM─────────────────┤
├─┬─CFW───┬────────────┤
│ └─NOCFW─┘ │
├─CTRx=n───────────────┤
│ ┌─,─┐ │
├─EFSDPAFT=(───6─n─┴──)─┤
│ ┌─,─┐ │
├─EFSDPBFR=(───6─n─┴──)─┤
├─EQUCOUNT─────────────┤
├─┬─ESTAE───┬──────────┤
│ └─NOESTAE─┘ │
└─NOASSIST─────────────┘
The DEBUG control statement is not intended for regular use; only ABEND, NOABEND, BSAM, and
EQUCOUNT are of general interest. For a tape work sort or a Conventional merge, only the ABEND or
NOABEND parameters of the DEBUG statement are used. For more information about problem diag-
| nosis, see Messages, Codes and Diagnosis.
ABEND or NOABEND
55──┬─ABEND───┬─────────────────────────────────────────────────────────────────────5%
└─NOABEND─┘
Temporarily overrides the ERET installation option which specifies whether DFSORT abends or termi-
nates with a return code of 16, if your sort, copy, or merge is unsuccessful.
ABEND Specifies that if your sort, copy, or merge is unsuccessful, DFSORT abends with a user
completion code equal to the appropriate message number or with a user-defined
number between 1 and 99, as set during installation with the ICEMAC option
ABCODE=n.
When DEBUG ABEND is in effect, a user abend code of zero might be issued when a
tape work data set sort or Conventional merge is unsuccessful.
NOABEND Specifies that an unsuccessful sort, copy, or merge terminates with a return code of 16.
| Note: If DFSORT determines that a BatchPipes/MVS data set is being used, it automatically forces
| the ABEND option on, to ensure that an abend will be generated if an error is detected. This allows
| for appropriate error propagation by the system to other applications that may be accessing the same
| BatchPipes/MVS data set.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
ABSTP
55──ABSTP───────────────────────────────────────────────────────────────────────────5%
Prevents loss of needed information in a dump when Blockset terminates. This option overrides
ERET, ABEND, and NOABEND. If the DFSORT application is unsuccessful, an abend is forced with
a completion code equal to the appropriate message number, or with the user ABEND code set during
installation with the ICEMAC option ABCODE=MSG or ABCODE=n. The message is not written if
NOESTAE is in effect.
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
BSAM
55──BSAM────────────────────────────────────────────────────────────────────────────5%
| Temporarily bypasses the EXCP access method for input and output data sets. BSAM is ignored for
| VSAM input and output data sets. Note that if Blockset is not selected and BSAM processing is used
with concatenated SORTIN input, and both null and non-null data sets are specified, all null data sets
must precede all non-null data sets; otherwise, the results are unpredictable.
Note: This option can degrade performance.
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
CFW or NOCFW
55──┬─CFW───┬───────────────────────────────────────────────────────────────────────5%
└─NOCFW─┘
Temporarily overrides the CFW installation option which specifies whether DFSORT can use cache
| fast write when processing SORTWKnn data sets that reside on devices connected to cached 3990
| control units.
CFW Specifies that DFSORT can use cache fast write when processing SORTWKnn data sets.
55──CTRx=n──────────────────────────────────────────────────────────────────────────5%
Keeps a count of the input and output records, and abends with code 0C1 when the count reaches n.
The numbers that can be assigned to x are:
2 Counts the input records being moved from the input buffer (not used for a copy).
3 Counts the output records being moved to the output buffer (not used for a copy or merge).
4 Counts the input records inserted by E15 (not used for Blockset).
5 Counts the output records deleted by E35 (not used for Blockset).
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
EFSDPAFT
┌─,─┐
55──EFSDPAFT=──(───6─n─┴──)──────────────────────────────────────────────────────────5%
Initiates a SNAP dump after a Major Call to an EFS program. Any combination of the numbers can be
specified.
The numbers have the following meanings:
2 Takes the SNAP dump after Major Call 2 to the EFS program.
3 Takes the SNAP dump after Major Call 3 to the EFS program.
4 Takes the SNAP dump after Major Call 4 to the EFS program.
5 Takes the SNAP dump after Major Call 5 to the EFS program.
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
EFSDPBFR
┌─,─┐
55──EFSDPBFR=──(───6─n─┴──)──────────────────────────────────────────────────────────5%
Initiates a SNAP dump before a Major Call to an EFS program. Any combination of the numbers can
be specified.
The numbers have the following meanings:
2 Takes the SNAP dump before Major Call 2 to the EFS program.
3 Takes the SNAP dump before Major Call 3 to the EFS program.
4 Takes the SNAP dump before Major Call 4 to the EFS program.
5 Takes the SNAP dump before Major Call 5 to the EFS program.
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
EQUCOUNT
55──EQUCOUNT────────────────────────────────────────────────────────────────────────5%
| Determines the number of records having equal keys (that is, duplicate keys) which have been sorted
by the Blockset technique (printed in message ICE184I). For variable-length records, EQUCOUNT
can only be used with either Hiperspace (when Hipersorting is used) or work data sets.
| Notes:
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
ESTAE or NOESTAE
55──┬─ESTAE───┬─────────────────────────────────────────────────────────────────────5%
└─NOESTAE─┘
Temporarily overrides the ESTAE installation option which determines whether DFSORT should delete
its ESTAE recovery routine early or use it for the entire run.
DFSORT normally establishes an ESTAE recovery routine at the beginning of a run. If an abend
occurs and the ESTAE option is in effect, the system passes control to the recovery routine. The
routine terminates the run after attempting to:
If an abend occurs and the ESTAE option is not in effect, these functions might not be performed.
ESTAE specifies that DFSORT can use its ESTAE recovery routine for the entire run.
NOESTAE specifies that DFSORT is to delete its ESTAE recovery routine at a point early in its proc-
essing. If DFSORT terminates or abends before this point is reached, it will not delete its
ESTAE recovery routine; that is, NOESTAE will not be in effect.
Notes:
1. See Appendix E, “DFSORT Abend Processing” on page 497 for more information on the
DFSORT ESTAE recovery routine.
2. EXCPVR is set to NONE if NOESTAE is in effect.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options.”
NOASSIST
55──NOASSIST────────────────────────────────────────────────────────────────────────5%
DFSORT uses System/370-XA Sorting Instructions when possible. If you do not want to use these
instructions, you can temporarily bypass them by specifying this parameter.
Note: This option can degrade performance.
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
Example 1
| SORT FIELDS=(1,4,CH,A)
| DEBUG EQUCOUNT
| Example 2
| SORT FIELDS=(12,2,BI,D)
| DEBUG BSAM,ABEND
| Directs DFSORT to use the BSAM access method for the SORTIN and SORTOUT data sets and to abend
| if the sort application is unsuccessful.
55──END─────────────────────────────────────────────────────────────────────────────────5%
The END control statement allows DFSORT to discontinue reading SYSIN, DFSPARM, or SORTCNTL
before end of file (EOF).
When you link-edit user exit routines dynamically, the END statement marks the end of the DFSORT
control statements and the beginning of exit routine object decks in SYSIN.
Example 1
//SYSIN DD \
SORT FIELDS=(1,6,A,28,5,D),FORMAT=CH
RECORD TYPE=V,LENGTH=(2ðð,,,,8ð)
END
OPTION DYNALLOC
Because the OPTION statement appears after the END statement, it is not read.
Example 2
//SYSIN DD \
SORT FIELDS=(5,8,CH,A)
MODS E15=(E15,1ð24,SYSIN,T)
END
%object deck for E15 user exit here5
The END statement precedes the E15 user exit routine object deck in SYSIN.
| Use an INCLUDE statement if you want only certain records to appear in the output data sets. The
| INCLUDE statement selects the records you want to include.
| You can specify either an INCLUDE statement or an OMIT statement in the same DFSORT run, but not
| both.
| A logical expression is one or more relational conditions logically combined, based on fields in the input
| record, and can be represented at a high level as follows:
|
| 55──relational condition1──┬──────────────────────────────────────────┬─────────────────5%
| │ ┌──────────────────────────────────────┐ │
| └───6─,──┬─AND─┬──,relational condition2─┴──┘
| └─OR──┘
| If the logical expression is true for a given record, the record is included in the output data sets.
| By nesting relational conditions within parentheses, you can create logical expressions of higher com-
| plexity.
| Although comparisons, substring comparison tests, and bit logic tests are explained separately below for
| clarity, they can be combined to form logical expressions.
| The INCLUDE control statement differs from the INCLUDE parameter of the OUTFIL statement in the
| following ways:
| The INCLUDE statement applies to all input records; the INCLUDE parameter applies only to the
| OUTFIL input records for its OUTFIL group.
| FORMAT=f can be specified with the INCLUDE statement but not with the INCLUDE parameter.
| D2 format can be specified with the INCLUDE statement but not with the INCLUDE parameter.
| See “OUTFIL Control Statements” on page 141 for more details on the OUTFIL INCLUDE parameter.
| COND
|
| 55──┬─(logical expression)─┬────────────────────────────────────────────────────────5%
| ├─ALL──────────────────┤
| ├─(ALL)────────────────┤
| ├─NONE─────────────────┤
| └─(NONE)───────────────┘
| logical expression specifies one or more relational conditions logically combined, based on fields
| in the input record. If the logical expression is true for a given record, the
| record is included in the output data sets.
| ALL or (ALL) specifies that all of the input records are to be included in the output data
| sets.
| NONE or (NONE) specifies that none of the input records are to be included in the output data
| sets.
| Default: ALL. See Appendix B, “Specification/Override of DFSORT Options” on page 459 for full
| override details.
| Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
| FORMAT
|
| 55──FORMAT=f────────────────────────────────────────────────────────────────────────5%
| FORMAT=f can be used only when all the input fields in the entire logical expression have the same
| format. The permissible field formats for comparisons are shown in Figure 13 on page 78. SS (sub-
| string) is the only permissible field format for substring comparison tests. BI (unsigned binary) is the
| only permissible field format for bit logic tests.
| Default: None. Must be specified if not included in the COND=(logical expression) parameter. See
| Appendix B, “Specification/Override of DFSORT Options” on page 459 for full override details.
| Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
| Note: If format values are specified in both FORMAT and COND, DFSORT issues an informational
| message, uses the format values from COND (f must be specified for each compare field), and does not
| use the format values from FORMAT.
Relational Condition: The relational condition specifies that a comparison or bit logic test be per-
formed. Relational conditions can be logically combined, with AND or OR, to form a logical expression. If
they are combined, the following rules apply:
AND statements are evaluated before OR statements unless parentheses are used to change the
order of evaluation; expressions inside parentheses are always evaluated first. (Nesting of paren-
theses is limited only by the amount of storage available.)
The symbols & (AND) and | (OR) can be used instead of the words.
Comparisons
Relational Condition Format: Two formats for the relational condition can be used:
55──(p1,m1,f1,──┬─EQ─┬──,──┬─p2,m2,f2─┬──)──────────────────────────────────────────────5%
├─NE─┤ └─constant─┘
├─GT─┤
├─GE─┤
├─LT─┤
└─LE─┘
Fields
p1,m1,f1: These variables specify a field in the input record to be compared either to another field in the
input record or to a constant.
p1 specifies the first byte of the compare field relative to the beginning of the input record.4 The first
data byte of a fixed-length record (FLR) has relative position 1. The first data byte of a variable-length
4 If your E15 user exit routine formats the record, p1 must refer to the record as reformatted by the exit.
(VLR) record has relative position 5 (because the first 4 bytes contain the record descriptor word). All
compare fields must start on a byte boundary, and no compare field can extend beyond byte 4092.
m1 specifies the length of the compare field. Acceptable lengths for different formats are in Figure 13.
f1 specifies the format of the data in the compare field. Permissible formats are given in Figure 13.
If all the compare fields contain the same type of data, this value can be omitted, in which case you
must use the FORMAT=f operand.
p2,m2,f2: These parameters specify another field in the input record with which the p1, m1, and f1 field
will be compared. Permissible comparisons between compare fields with different formats are shown in
Figure 14.
AC, ASL, and AST formats sequence EBCDIC data using the ISCII/ASCII collating sequence.
Constants: A constant can be decimal, character, or hexadecimal. The different formats are shown in
detail below. Permissible comparisons between compare fields and constants are shown in Figure 15.
Decimal Number Format: The format for coding a decimal constant is:
[±]n
When the decimal constant, n, is compared with a compare field of FI format, it cannot be larger than
2147483647 nor smaller than -2147483648.
Character String Format: The format for coding a character string constant is:
C'xx...x'
The value x may be any EBCDIC character (the EBCDIC character string is translated appropriately for
comparison to an AC or AQ field). You can specify up to 256 characters.
If you want to include a single apostrophe in the character string, you must specify it as two single apos-
trophes. Thus:
Required: O'NEILL Specify: C'O''NEILL'
Examples of valid and invalid character string constants are shown below:
| Double-byte data may be used in a character string for INCLUDE/OMIT comparisons. The start of double-
| byte data is delimited by the shift-out (SO) control character (X'0E'), and the end by the shift-in (SI) control
| character (X'0F'). SO and SI control characters are part of the character string and must be paired with
| zero or an even number of intervening bytes. Nested shift codes are not allowed. All characters between
| SO and SI must be valid double-byte characters. No single-byte meaning is drawn from the double-byte
| data.
| Examples of valid and invalid character string constants containing double-byte characters are shown
| below using:
| < to represent SO
| > to represent SI
| Dn to represent a double-byte character
Hexadecimal String Format: The format for coding a hexadecimal string constant is:
X'yy...yy'
The value yy represents any pair of hexadecimal digits. You can specify up to 256 pairs of hexadecimal
digits.
Examples of valid and invalid hexadecimal constants are shown in the following table.
Padding and Truncation: In a field-to-field comparison, the shorter compare field is padded appro-
priately. In a field-to-constant comparison, the constant is padded or truncated to the length of the
compare field.
Character and hexadecimal strings are truncated and padded on the right.
Decimal constants are padded and truncated on the left. Padding is done with zeros in the proper format.
| If locale processing is to be used, the active locale will only be used to process character (CH) compare
| fields and character and hexadecimal constants compared to character (CH) compare fields.
| For more information on locale processing, see “Cultural Environment Considerations” on page 5 or
| LOCALE in “OPTION Control Statement” on page 111.
Example 1
INCLUDE COND=(5,8,GT,13,8,|,1ð5,4,LE,1ððð),FORMAT=CSF
OR
The floating sign number in bytes 105 through 108 is less than or equal to 1000.
Note that all three compare fields have the same format.
Example 2
INCLUDE COND=(1,1ð,CH,EQ,C'STOCKHOLM',
AND,21,8,ZD,GT,+5ðððð,
OR,31,4,CH,NE,C'HERR')
Note that the AND is evaluated before the OR. (“Omitting Records from the Output Data Set—Example”
on page 109 illustrates how parentheses can be used to change the order of evaluation.) Also note that
ending a line with a comma or semicolon followed by a blank indicates that the parameters continue on
the next line, starting in any position from columns 2 through 71.
Example 3
INCLUDE COND=((5,1,CH,EQ,8,1,CH),&,
((2ð,1,CH,EQ,C'A',&,3ð,1,FI,GT,1ð),|,
(2ð,1,CH,EQ,C'B',&,3ð,1,FI,LT,1ðð),|,
(2ð,1,CH,NE,C'A',&,2ð,1,CH,NE,C'B')))
Example 4
INCLUDE COND=(7,2,EQ,C'T2',&,2ð,2,EQ,25,2),FORMAT=CH
This example shows the effect of VLSHRT and NOVLSHRT on INCLUDE/OMIT processing when short
records are present.
compare compare
RDW field A field B
┌─────┬────┬──────────┬─────┬─────────┬─────┐
│ │ │ │ │ │ │
│ │ │ │ │ │ │
│ │ │T1 │ │S1Sx │ │
└─────┴────┴──────────┴─────┴─────────┴─────┘
7 1ð
compare compare
RDW field C field D
┌─────┬────┬──────────┬───────────────────────┬────────┬───┬───────┬────┐
│ │ │ │ │ │ │ │ │
│ │ │T2 │ │ │ │ │ │
└─────┴────┴──────────┴───────────────────────┴────────┴───┴───────┴────┘
7 2ð 25
: Example 5
: INCLUDE COND=(21,2,GE,C'85',OR,21,2,LE,C'ð3'),FORMAT=CH
: This example illustrates how to include records based on a two-digit character year field in bytes 21-22.
: The condition includes records with a value greater than or equal C'85' in bytes 21-22 or with a value less
: than or equal to C'03' in bytes 21-22. This can effectively only include records where the year is between
: 1985 and 2003.
| Relational Condition Format: Two formats for the substring comparison relational condition can
| be used:
|
| 55──(p1,m1,SS,──┬─EQ─┬──,──constant──)──────────────────────────────────────────────────5%
| └─NE─┘
| Fields
| p1,m1: These variables specify the character field in the input record for the substring test.
| p1 specifies the first byte of the character input field for the substring test, relative to the beginning of
| the input record.6 The first data byte of a fixed-length record (FLR) has relative position 1. The first
| data byte of a variable-length (VLR) record has relative position 5 (because the first 4 bytes contain
| the record descriptor word). All fields to be tested must start on a byte boundary and must not extend
| beyond byte 4092.
| m1 specifies the length of the field to be tested. The length can be 1 to 256 bytes.
| Constant: The constant can be a character string or a hexadecimal string. See “Character String
| Format” on page 81 and “Hexadecimal String Format” on page 81 for details.
: If m1 is greater than the length of the constant, the field value will be searched for the constant and the
: condition will be true if a match is found when the EQ comparison operator is specified or if a match is not
: found when the NE comparison operator is specified.
: If m1 is smaller than the length of the constant, the constant will be searched for the field value and the
: condition will be true if a match is found when the EQ comparison operator is specified or if a match is not
: found when the NE comparison operator is specified.
| Example
| INCLUDE FORMAT=SS,COND=(11,6,EQ,C'OK',OR,21,3,EQ,C'J69,L92,J82')
| 6 If your E15 user exit routine formats the record, p1 must refer to the record as reformatted by the exit.
| OR
| Bytes 21 through 23 contain J69, L92 or J82.
While any bit logic test can be specified using either of the two methods, each of them offers unique
advantages not found with the other.
The ability to specify selected bits in a field, by either of the two methods, can greatly reduce the number
of INCLUDE conditions that must be specified to achieve a given result, because the need to account for
unspecified bits is eliminated.
Relational Condition Format: Two formats for the relational condition can be used:
55──(p1,m1,BI,──┬─ALL─────┬──,──mask──)─────────────────────────────────────────────────5%
├─SOME────┤
├─NONE────┤
├─NOTALL──┤
├─NOTSOME─┤
├─NOTNONE─┤
├─BO──────┤
├─BM──────┤
├─BZ──────┤
├─BNO─────┤
├─BNM─────┤
└─BNZ─────┘
Bit operators describe the input field to mask relationship to be tested as follows:
ALL or BO All mask bits are on in the input field
SOME or BM Some, but not all mask bits are on in the input field
NONE or BZ No mask bits are on in the input field
NOTALL or BNO Some or no mask bits are on in the input field
NOTSOME or BNM All or no mask bits are on in the input field
NOTNONE or BNZ All or some mask bits are on in the input field
The first set of operators (ALL, SOME, and so on) are intended for those who like meaningful mnemonics.
The second set of operators (BO, BM, and so on) are intended for those familiar with the conditions asso-
ciated with the Test Under Mask (TM) instruction.
Fields
p1,m1: These variables specify the binary field in the input record to be tested against the mask.
p1 specifies the first byte of the binary input field to be tested against the mask, relative to the begin-
ning of the input record.7 The first data byte of a fixed-length record (FLR) has relative position 1. The
first data byte of a variable-length (VLR) record has relative position 5 (because the first 4 bytes
contain the record descriptor word). All fields to be tested must start on a byte boundary and must not
extend beyond byte 4092.
m1 specifies the length of the field to be tested. The length can be 1 to 256 bytes.
Mask: A hexadecimal string or bit string that indicates the bits in the field selected for testing. If a
mask bit is on (1), the corresponding bit in the field is tested. If a mask bit is off (0), the corresponding bit
in the field is ignored.
Hexadecimal String Format: The format for coding a hexadecimal string mask is:
X'yy...yy'
The value yy represents any pair of hexadecimal digits that constitute a byte (8 bits). Each bit must be 1
(test bit) or 0 (ignore bit). You can specify up to 256 pairs of hexadecimal digits.
Bit String Format: The format for coding a bit string mask is:
B'bbbbbbbb...bbbbbbbb'
The value bbbbbbbb represents 8 bits that constitute a byte. Each bit must be 1 (test bit) or 0 (ignore bit).
You can specify up to 256 groups of 8 bits. The total number of bits in the mask must be a multiple of 8.
A bit mask string can only be used with a bit operator.
7 If your E15 user exit routine formats the record, p1 must refer to the record as reformatted by the exit.
Example 1
INCLUDE COND=(27,1,CH,EQ,C'D',AND,18,1,BI,ALL,B'1ððððððð')
Example 2
INCLUDE COND=(11,1,BI,BM,X'85')
This example illustrates how to only include records in which byte 11 has some, but not all of bits 0, 5 and
7 on. Results for selected field values are shown below:
Figure 21. Bit Operator Example 2: Results for Selected Field Values
11,1,BI Value 11,1,BI Result Action
X'85' False Omit Record
X'C1' True Include Record
X'84' True Include Record
X'00' False Omit Record
Example 3
INCLUDE COND=(11,2,ALL,B'ððð1ðð1ððð11ð1ðð',
OR,21,1,NONE,B'ð1ðð11ðð'),FORMAT=BI
Figure 22. Bit Operator Example 3: Results for Selected Field Values
11,2,BI Value 11,2,BI Result 21,1,BI Value 21,1,BI Result Action
X'1234' True X'4C' False Include Record
X'02C4' False X'81' True Include Record
X'0204' False X'40' False Omit Record
X'F334' True X'00' True Include Record
X'1238' False X'4F' False Omit Record
Relational Condition Format: Two formats for the relational condition can be used:
55──(p1,m1,BI,──┬─EQ─┬──,──constant──)──────────────────────────────────────────────────5%
└─NE─┘
Fields
p1,m1: These variables specify the binary field in the input record to be compared to the bit constant.
p1 specifies the first byte of the binary input field to be compared to the bit constant, relative to the
beginning of the input record.8 The first data byte of a fixed-length record (FLR) has relative position 1.
The first data byte of a variable-length (VLR) record has relative position 5 (because the first 4 bytes
contain the record descriptor word). All fields to be tested must start on a byte boundary and must not
extend beyond byte 4092.
m1 specifies the length of the field to be tested. The length can be 1 to 256 bytes.
8 If your E15 user exit routine formats the record, p1 must refer to the record as reformatted by the exit.
Bit Constant: A bit string constant that specifies the pattern to which the binary field is compared. If
a bit in the constant is 1 or 0, the corresponding bit in the field is compared to 1 or 0, respectively. If a bit
in the constant is . (period), the corresponding bit in the field is ignored.
Bit String Format: The format for coding a bit string constant is:
B'bbbbbbbb...bbbbbbbb'
The value bbbbbbbb represents 8 bits that constitute a byte. Each bit must be 1 (test bit for 1), 0 (test bit
for 0) or . (ignore bit). You can specify up to 256 groups of 8 bits. The total number of bits in the mask
must be a multiple of 8. A bit constant can only be used for bit comparison tests (BI format and EQ or NE
operator).
Padding and Truncation: The bit constant is truncated or padded on the right to the byte length of
the binary field. The padding character is B'00000000' (all bits equal to 0). Note that the padded bytes
are compared to the excess bytes in the binary field; you can ensure that this does not cause unwanted
results by shortening the field length to eliminate the padding characters, or by increasing the length of the
bit constant to specify the exact test pattern you want.
Example 1
| INCLUDE COND=(27,1,CH,EQ,C'D',AND,18,1,BI,EQ,B'1.......')
Example 2
INCLUDE COND=(11,1,BI,NE,B'1ð...1.1')
This example illustrates how to only include records in which byte 11 is not equal to the specified pattern
of bit 0 on, bit 1 off, bit 5 on and bit 7 on. Results for selected field values are shown below:
Figure 23. Bit Comparison Example 2: Results for Selected Field Values
11,1,BI Value 11,1,BI Result Action
X'85' False Omit Record
X'C1' True Include Record
X'84' True Include Record
X'97' False Omit Record
Example 3
INCLUDE COND=(11,2,EQ,B'..ð1....ð......1',
OR,21,1,EQ,B'ð1......'),FORMAT=BI
Figure 24. Bit Comparison Example 3: Results for Selected Field Values
11,2,BI Value 11,2,BI Result 21,1,BI Value 21,1,BI Result Action
X'1221' True X'C0' False Include Record
X'02C4' False X'41' True Include Record
X'1234' False X'00' False Omit Record
X'5F7F' True X'7F' True Include Record
X'FFFF' False X'2F' False Omit Record
Figure 25 on page 92 shows how DFSORT reacts to the result of a relational condition comparison,
depending on whether the statement is INCLUDE or OMIT and whether the relational condition is followed
by an AND or an OR logical operator.
When writing complex statements, the table in Figure 25 helps you get the result that you want.
Note that if NOVLSHRT is in effect and all records do not contain all INCLUDE/OMIT compare fields,
| message ICE015A or ICE218A is issued; that is, you cannot use a complex statement in which one of the
comparisons excludes variable-length records too short to contain other fields in the statement.
If VLSHRT is in effect, DFSORT checks the input record length to ensure all compare fields are present.
If all compare fields for a record are not present, DFSORT processes the record as having failed the
comparison. DFSORT omits the record if the INCLUDE control statement is specified or includes the
record if the OMIT control statement is specified.
See the discussion of VLSHRT/NOVLSHRT in “OPTION Control Statement” on page 111, for further
details.
The INREC control statement allows you to reformat the input records before they are processed; that is,
to define which parts of the input record are to be included in the reformatted input record, in what order
they are to appear, and how they are to be aligned.
You do this by defining one or more fields from the input record. The reformatted input record consists of
only those fields, in the order in which you have specified them, and aligned on the boundaries or in the
columns you have indicated.
You can also insert blanks, binary zeros, character strings, and hexadecimal strings as separators before,
between, and after the input fields in the reformatted input records.
| For information concerning the interaction of INREC and OUTREC, see “INREC Statement Notes” on
| page 97.
FIELDS
:
: ┌─,───────────────────────┐
: 55──FIELDS=──(───6─┬────┬──┬─s───────────┬─┴──)──────────────────────────────────────5%
: └─c:─┘ ├─p,m──┬────┬─┤
: │ └─,a─┘ │
: └─p───────────┘
Specifies the order and alignment of the input and separation fields in the reformatted input record.
c: Indicates the column in which the first position of the associated input or separation field is to
be aligned, relative to the start of the reformatted input record. Unused space preceding the
specified column is padded with EBCDIC blanks. The following rules apply:
Both valid and invalid examples are shown in Figure 26 on page 94.
| s Specifies that a separation field is to appear in the reformatted input record. It can be speci-
fied before or after any input field. Consecutive separation fields can be specified. For
variable-length records, s must not be specified before the first input field (the record
| descriptor word), or after the variable part of the input record. Permissible values are nX, nZ,
| nC'xx...x', and nX'yy...yy'.
| nX Blank separation. n bytes of EBCDIC blanks (X'40') are to appear in the refor-
| matted input records. n can range from 1 to 4095. If n is omitted, 1 is used.
Examples of valid and invalid blank separation are shown in Figure 27.
| nZ Binary zero separation. n bytes of binary zeros (X'00') are to appear in the refor-
| matted input records. n can range from 1 to 4095. If n is omitted, 1 is used.
Examples of valid and invalid binary zero separation are shown in Figure 28.
Figure 30 (Page 1 of 2). Examples of Valid and Invalid Hexadecimal String Separation
Validity Specified Result Length
Valid X'FF' FF 1
Valid X'BF3C' BF3C 2
Valid 3X'00000F' 00000F00000F00000F 9
Valid 4000X'FFFF' FF repeated 8000 times 8000
Invalid X'ABGD' G is not a hexadecimal digit n/a
Invalid X'F1F' Incomplete pair of digits n/a
| Invalid 'BF3C' X identifier missing n/a
Figure 30 (Page 2 of 2). Examples of Valid and Invalid Hexadecimal String Separation
Validity Specified Result Length
| Invalid 'F2F1'X X in wrong place n/a
| Invalid 8000X'01' Too many repetitions. Use two adjacent separation fields instead n/a
| (4000X'01',4000X'01', for example).
Invalid 0X'23AB' 0 is not allowed n/a
Invalid X'' No hexadecimal digits specified n/a
| p,m,a Specifies that an input field is to appear in the reformatted input record.
p Specifies the first byte of the input field relative to the beginning of the input record.9 The
first data byte of a fixed-length record has relative position 1. The first data byte of a
variable-length record has relative position 5 (because the first 4 bytes contain the
| RDW). All fields must start on a byte boundary, and no field can extend beyond byte
| 32 752. For special rules concerning variable-length records, see “INREC Statement
Notes” on page 97.
m Specifies the length of the input field. It must include the sign if the data is signed, and
must be an integer number of bytes. See “INREC Statement Notes” on page 97 for
more information.
a Specifies the alignment (displacement) of the input field in the reformatted input record
relative to the start of the reformatted input record.
Permissible values of a are:
H Halfword aligned. The displacement (p-1) of the field from the beginning of the
reformatted input record, in bytes, is a multiple of two (that is, position 1, 3, 5, and
so forth).
F Fullword aligned. The displacement is a multiple of four (that is, position 1, 5, 9,
and so forth).
D Doubleword aligned. The displacement is a multiple of eight (that is, position 1, 9,
17, and so forth).
Alignment can be necessary if, for example, the data is to be used in a COBOL applica-
tion program where COMPUTATIONAL items are aligned through the SYNCHRONIZED
clause. Unused space preceding aligned fields will always be padded with binary zeros.
| p specifies the variable part of the input record (that part beyond the minimum record length) is
| to appear in the reformatted input record as the last field. Note that if the reformatted input
| record includes only the RDW and the variable part of the input record, “null” records con-
| taining only an RDW may result.
| A value must be specified for p that is less than or equal to the minimum record length
| (RECORD statement L4 value) plus 1 byte.
9 If your E15 user exit reformats the record, p must refer to the record as reformatted by the exit.
DFSORT issues a message and terminates if an INREC statement is specified for a tape work data
set sort or conventional merge application.
Example 1
INREC Method
INCLUDE COND=(5,1,GE,C'M'),FORMAT=CH
INREC FIELDS=(1ð,3,2ð,8,33,11,5,1)
SORT FIELDS=(4,8,CH,A,1,3,FI,A)
SUM FIELDS=(17,4,BI)
OUTREC Method
INCLUDE COND=(5,1,GE,C'M'),FORMAT=CH
OUTREC FIELDS=(1ð,3,2ð,8,33,11,5,1)
SORT FIELDS=(2ð,8,CH,A,1ð,3,FI,A)
SUM FIELDS=(38,4,BI)
The above examples illustrate how a fixed-length input data set is sorted and reformatted for output.
Unnecessary fields are eliminated from the output records using INREC or OUTREC. The SORTIN
LRECL is 80.
Records are also included or excluded by means of the INCLUDE statement, and summed by means of
the SUM statement.
The reformatted input records are fixed length with a record size of 23 bytes. The SORTOUT LRECL
must be specified as 23. The reformatted records, after INREC or OUTREC processing, look as follows:
Position Contents
1-3 Input positions 10 through 12
4-11 Input positions 20 through 27
12-22 Input positions 33 through 43
23 Input position 5
Identical results are achieved with INREC or OUTREC. However, use of OUTREC makes it easier to
code the SORT and SUM statements. In either case, the INCLUDE COND parameters must refer to the
fields of the original input records. However, with INREC, the SUM and SORT FIELDS parameters must
refer to the fields of the reformatted input records, while with OUTREC, the SUM and SORT FIELDS
parameters must refer to the fields of the original input records.
Example 2
INREC FIELDS=(1,35,2Z,36,45)
MERGE FIELDS=(2ð,4,CH,D,1ð,3,CH,D),FILES=3
SUM FIELDS=(36,4,BI,4ð,8,PD)
RECORD TYPE=F,LENGTH=(8ð,,82)
This example illustrates how overflow of a summary field can be prevented when three fixed-length data
sets are merged and reformatted for output. The input record size is 80 bytes. To illustrate the use of the
RECORD statement, assume that SORTIN and SORTOUT are not present (that is, all input/output is
handled by user exits).
The reformatted input records are fixed-length with a record size of 82 bytes (an insignificant increase
from the original size of 80 bytes). They look as follows:
Position Contents
1-35 Input positions 1 through 35
36-37 Binary zeros (to prevent overflow)
38-82 Input positions 36 through 80
The MERGE and SUM statements must refer to the fields of the reformatted input records.
The reformatted output records are identical to the reformatted input records.
| Thus, the 2-byte summary field at positions 36 and 37 in the original input records expands to a 4-byte
| summary field in positions 36 through 39 of the reformatted input/output record before merging. This pre-
vents overflow of this summary field. Note that, if OUTREC were used instead of INREC, the records
would be reformatted after merging, and the 2-byte summary field might overflow.
Note: This method of preventing overflow cannot be used for negative FI summary fields because
padding with zeros rather than ones would change the sign.
Example 3
INREC FIELDS=(2ð,4,12,3)
SORT FIELDS=(1,4,D,5,3,D),FORMAT=CH
| OUTREC FIELDS=(5X,1,4,H,19:1,2,5,3,8ðX'FF')
This example illustrates how a fixed-length input data set can be sorted and reformatted for output. A
more efficient sort is achieved by using INREC to reduce the input records as much as possible before
sorting and using OUTREC to repeat fields and insert padding after sorting. The SORTIN LRECL is 80
bytes.
The reformatted input records are fixed-length, and have a record size of seven bytes (a significant
reduction from the original size of 80 bytes). They look as follows:
Position Contents
1-4 Input positions 20 through 23
5-7 Input positions 12 through 14.
The SORT and OUTREC statements must refer to the fields of the reformatted input records.
The reformatted output records are fixed length, and have a record size of 103 bytes; the SORTOUT
LRECL is specified as 103. They look as follows:
Position Contents
1-5 EBCDIC blanks
6 Binary zero (for H alignment)
7-10 Input positions 20 through 23
11-18 EBCDIC blanks
19-20 Input positions 20 through 21
21-23 Input positions 12 through 14
Thus, the use of INREC and OUTREC allows sorting of 7-byte records rather than 80-byte records, even
though the output records are 103 bytes long.
Example 4
INREC FIELDS=(81ðð,16,1,8ð99,8116,2ðð)
SORT FIELDS=(1,16,CH,A)
OUTREC FIELDS=(17,8ð99,1,16,8116,2ðð)
This example illustrates how you can sort on a field beyond DFSORT's normal limit of byte 4092 by using
INREC and OUTREC.
The “sort” field is at input positions 8100 through 8115. The INREC statement is used to reformat the
input records so that the “sort” field is within the first 4092 bytes. The reformatted input records look as
follows:
Position Contents
1-16 Input positions 8100 through 8115
17-8115 Input positions 1 through 8099
8116-8315 Input positions 8116 through 8315
The SORT statement can now refer to the “sort” field in the reformatted input records. The OUTREC
statement is used to restore the records to their original format.
┌─,───────┐
55──MERGE──FIELDS=──┬─(───6─p,m,f,s─┴──)────────────┬──┬───────────────────────┬─────────5%
│ ┌─,─────┐ │ │ ┌─,──────────────┐ │
├─(───6─p,m,s─┴──)──,──FORMAT=f─┤ └─,──6┬─┬─EQUALS───┬─┬┴──┘
└─┬─COPY───┬───────────────────┘ │ └─NOEQUALS─┘ │
└─(COPY)─┘ ├─FILES=n──────┤
├─┬─FILSZ=x─┬──┤
│ └─SIZE=y──┘ │
├─SKIPREC=z────┤
└─STOPAFT=n────┘
The MERGE control statement must be used when a merge operation is to be performed; this statement
describes the control fields in the input records on which the input data sets have previously been sorted.
| A MERGE statement can also be used to specify a copy application. User labels will not be copied to the
| output data sets.
Up to 16 data sets can be merged. (Blockset may allow more depending on available storage.)
The options available on the MERGE statement can be specified in other sources as well. A table
showing all possible sources for these options and the order of override are given in Appendix B,
“Specification/Override of DFSORT Options” on page 459. When an option can be specified on either the
MERGE or OPTION statement, it is preferable to specify it on the OPTION statement.
| DFSORT accepts but does not process the following MERGE operands: WORK and ORDER.
| DFSORT's collating behavior can be modified according to your cultural environment. The cultural envi-
| ronment is established by selecting the active locale. The active locale's collating rules affect MERGE
| processing as follows:
| DFSORT produces merged records for output according to the collating rules defined in the active
| locale. This provides merging for single- or multi-byte character data, based on defined collating rules
| that retain the cultural and local characteristics of a language.
| If locale processing is to be used, the active locale will only be used to process character (CH) control
| fields.
| For more information on locale processing, see “Cultural Environment Considerations” on page 5 or
| LOCALE in “OPTION Control Statement” on page 111.
| Note: For a merge application, records deleted during an E35 exit routine are not sequence checked. If
| you use an E35 exit routine without an output data set, sequence checking is not performed at the time
the records are passed to the E35 user exit; therefore, you must ensure that input records are in correct
sequence.
FIELDS
┌─,───────┐
55──FIELDS=──(───6─p,m,f,s─┴──)──────────────────────────────────────────────────────5%
Is written exactly the same way for a merge as it is for a sort. The meanings of p, m, f, and s are
described in the discussion of the SORT statement. The defaults for this and the following parameters
are also given there. See “SORT Control Statement” on page 207.
FIELDS=COPY or FIELDS=(COPY)
55──FIELDS=──┬─COPY───┬─────────────────────────────────────────────────────────────5%
└─(COPY)─┘
See the discussion of the COPY parameter on the OPTION statement, in “OPTION Control Statement”
on page 111.
FORMAT=f
55──FORMAT=f────────────────────────────────────────────────────────────────────────5%
See the discussion of the FORMAT operand in “SORT Control Statement” on page 207. Used the
same way for a merge as for a sort.
EQUALS or NOEQUALS
55──┬─EQUALS───┬────────────────────────────────────────────────────────────────────5%
└─NOEQUALS─┘
See the discussion of this operand on the OPTION statement, in “OPTION Control Statement” on
page 111.
FILES=n
55──FILES=n─────────────────────────────────────────────────────────────────────────5%
Specifies the number of input files for a merge when input is supplied through the E32 exit.
Default: None; must be specified when an E32 exit is used.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
FILSZ or SIZE
55──┬─FILSZ=x─┬───────────────────────────────────────────────────────────────────────────────5%
└─SIZE=y──┘
See the discussion of this operand on the OPTION statement, in “OPTION Control Statement” on
page 111.
SKIPREC
55──SKIPREC=z───────────────────────────────────────────────────────────────────────5%
See the discussion of this operand on the OPTION statement, in “OPTION Control Statement” on
page 111.
STOPAFT
55──STOPAFT=n───────────────────────────────────────────────────────────────────────5%
See the discussion of this operand on the OPTION statement, in “OPTION Control Statement” on
page 111.
Example 1
MERGE FIELDS=(2,5,CH,A),FILSZ=29483
FIELDS The control field begins on byte 2 of each record in the input data sets. The field is 5 bytes
long and contains character (EBCDIC) data that has been presorted in ascending order.
Example 2
MERGE FIELDS=(3,8,ZD,E,4ð,6,CH,D)
FIELDS
The major control field begins on byte 3 of each record, is 8 bytes long, and contains zoned decimal
data that is modified by your routine before the merge examines it.
The second control field begins on byte 40, is 6 bytes long, and contains character data in descending
order.
Example 3
MERGE FIELDS=(25,4,A,48,8,A),FORMAT=ZD
FIELDS
The major control field begins on byte 25 of each record, is 4 bytes long, and contains zoned decimal
data that has been placed in ascending sequence.
The second control field begins on byte 48, is 8 bytes long, is also in zoned decimal format, and is
also in ascending sequence. The FORMAT parameter can be used because both control fields have
the same data format.
Example 4
MERGE FIELDS=COPY
FIELDS
The input data set is copied to output. No merge takes place.
┌─,──────────────────────────────────────┐
55──MODS───6─exit=──(──n,m──┬──────────────────┬──)─┴──┬─────────────┬───────────────────5%
| └─,─┬───┬──┬────┬──┘ └─HILEVEL=YES─┘
└─s─┘ └─,e─┘
The MODS statement is needed only when DFSORT passes control to your routines at user exits. The
MODS statement associates user routines with specific DFSORT exits and provides DFSORT with
descriptions of these routines. For details about DFSORT user exits and how user routines can be used,
see Chapter 4, “Using Your Own User Exit Routines” on page 219.
To use one of the user exits, you substitute its three-character name (for example, E31) for the word exit
in the MODS statement format above. You can specify any valid user exit, except E32. (E32 can be
used only in a merge operation invoked from a program; its address must be passed in a parameter list.)
exit
55──exit=──(──n,m──┬──────────────────┬──)──────────────────────────────────────────5%
└─,─┬───┬──┬────┬──┘
└─s─┘ └─,e─┘
The values that follow the exit parameter describe the user routine. These values are:
n specifies the name of your routine (member name if your routine is in a library). You can use any
valid operating system name for your routine. This allows you to keep several alternative routines with
different names in the same library.
m specifies the number of bytes of main storage your routine uses. Include storage obtained (via
GETMAIN) by your routine (or, for example, by OPEN) and the storage required to load the COBOL
library subroutines.
s specifies either the name of the DD statement in your DFSORT job step that defines the library in
which your routine is located or SYSIN if your routine is in the input stream. SYSIN is not valid for
copy processing.
If a value is not specified for s, DFSORT uses the following search order to find the library in which
your routine is located:
e specifies the linkage editor requirements of your routine or indicates that your routine is written in
COBOL. The following values are allowed:
N specifies that your routine has already been link-edited and can be used in the DFSORT run
without further link-editing. This is the default for e. N (specified or defaulted) can be overridden by
| the EXEC PARM parameters 'E15=COB' and 'E35=COB' or by the HILEVEL=YES parameter.
C specifies that your E15 or E35 routine is written in COBOL. If you code C for any other exit, it is
ignored, and N is assumed. Your COBOL-written routine must already have been link-edited.
The COBEXIT option of the OPTION statement specifies whether your COBOL exit routines are
run with the VS COBOL II library.
T specifies that your routine must be link-edited together with other routines to be used in the same
phase (for example, E1n routines) of DFSORT. See “Dynamically Link-Editing User Exit Routines”
on page 229 for additional information. This value is not valid for copy processing.
S specifies that your routine requires link-editing but that it must be link-edited separately from the
other routines (for example, E3n routines) to be used in a particular phase of DFSORT. E11 and
E31 exit routines are the only routines eligible for separate link-editing. See “Dynamically Link-
Editing User Exit Routines” on page 229 for additional information. This value is not valid for copy
processing.
| HILEVEL=YES
|
| 55──HILEVEL=YES─────────────────────────────────────────────────────────────────────5%
| specifies that:
| If you identify an E15 routine and an E35 routine on the MODS statement, specify HILEVEL=YES only
| if both routines are written in COBOL. If you do not identify an E15 or E35 routine on the MODS
| statement, HILEVEL=YES is ignored.
Notes:
1. The s parameter must be the same or omitted for each routine with N or C for the e parameter (library
concatenation is allowed). These routines cannot be placed in SYSIN. Each such routine must be a
load module.
2. Each routine for which T or S is specified for the e parameter can be placed in any library or in
SYSIN; they do not all have to be in the same library or SYSIN (but can be). Some routines can even
be in different libraries (or the same library) and the rest can be in SYSIN. Each such routine, if in a
library, can be either an object deck or a load module; if in SYSIN, it must be an object deck.
3. If the same routine is used in both input (that is, E1n routines) and output (that is, E3n routines)
DFSORT program phases, a separate copy of the routine must be provided for each exit.
| 4. HILEVEL=YES can be used instead of C as the fourth parameter, to indicate that an E15 or E35
| routine is written in COBOL. In this case, if T is specified as the fourth parameter for E15 or E35,
| DFSORT terminates. If you identify an E15 routine and an E35 routine on the MODS statement,
| specify HILEVEL=YES only if both routines are written in COBOL.
| 5. EXEC PARM parameter E15=COB can be used instead of C as the fourth parameter, to indicate that
| an E15 is written in COBOL. In this case, if T is specified as the fourth parameter for E15, DFSORT
| terminates.
| 6. EXEC PARM parameter E35=COB can be used instead of C as the fourth parameter, to indicate that
| an E35 is written in COBOL. In this case, if T is specified as the fourth parameter for E35, DFSORT
| terminates.
| 7. If HILEVEL=YES, E15=COB, or E35=COB is used instead of C as the fourth parameter, to indicate
| that an exit is written in COBOL, the fourth parameter for that exit must be specified as N or not
| specified.
| 8. If a COBOL E15 or E35 is specified for a conventional merge or tape work data set sort, DFSORT
| terminates.
Default: None; must be specified if you use exit routines. N is the default for the fourth parameter.
For information on user exit routines in SYSIN, see “System DD Statements” on page 44.
For details on how to design your routines, refer to “Summary of Rules for User Exit Routines” on
page 227.
When you are preparing your MODS statement, remember that DFSORT must know the amount of main
storage your routine needs so that it can allocate main storage properly for its own use. If you do not
know the exact number of bytes your program requires (including requirements for system services), make
a slightly high estimate. The value of m in the MODS statement is written the same way whether it is an
exact figure or an estimate: you do not precede the value by E for an estimate.
Example 1
MODS E15=(ADDREC,552,MODLIB),E35=(ALTREC,11ð32,MODLIB)
E15 At exit E15, DFSORT transfers control to your own routine. Your routine is in the library defined by
a job control statement with the ddname MODLIB. Its member name is ADDREC and uses 552
bytes.
E35 At exit E35, DFSORT transfers control to your routine. Your routine is in the library defined by the
job control statement with the ddname MODLIB. Its member name is ALTREC and will use 11032
bytes.
Example 2
MODS E15=(COBOLE15,7ððð,,C),
E35=(COBOLE35,7ððð,EXITC,C)
E15 At exit E15, DFSORT transfers control to your own routine. Your routine is written in COBOL and is
in the STEPLIB/JOBLIB or link libraries. Its member name is COBOLE15 and it uses 7000 bytes.
E35 At exit E35, DFSORT transfers control to your routine. Your routine is written in COBOL and is in
the library defined by the job control statement with the ddname EXITC. Its member name is
COBOLE35 and it uses 7000 bytes.
| Use an OMIT statement if you do not want all of the input records to appear in the output data sets. The
| OMIT statement selects the records you do not want to include.
| You can specify either an INCLUDE statement or an OMIT statement in the same DFSORT run, but not
| both.
| A logical expression is one or more relational conditions logically combined, based on fields in the input
| record, and can be represented at a high level as follows:
|
| 55──relational condition1──┬──────────────────────────────────────────┬─────────────────5%
| │ ┌──────────────────────────────────────┐ │
| └───6─,──┬─AND─┬──,relational condition2─┴──┘
| └─OR──┘
| If the logical expression is true for a given record, the record is omitted from the output data sets.
| For complete details on the parameters of the OMIT control statement, see “INCLUDE Control Statement”
| on page 75.
| The OMIT control statement differs from the OMIT parameter of the OUTFIL statement in the following
| ways:
| The OMIT statement applies to all input records; the OMIT parameter applies only to the OUTFIL input
| records for its OUTFIL group.
| FORMAT=f can be specified with the OMIT statement but not with the OMIT parameter.
| D2 format can be specified with the OMIT statement but not with the OMIT parameter.
| See “OUTFIL Control Statements” on page 141 for more details on the OUTFIL OMIT parameter.
| COND
|
| 55──┬─(logical expression)─┬────────────────────────────────────────────────────────5%
| ├─ALL──────────────────┤
| ├─(ALL)────────────────┤
| ├─NONE─────────────────┤
| └─(NONE)───────────────┘
| logical expression specifies one or more relational conditions logically combined, based on fields
| in the input record. If the logical expression is true for a given record, the
| record is omitted from the output data sets.
| ALL or (ALL) specifies that all of the input records are to be omitted from the output data
| sets.
| NONE or (NONE) specifies that none of the input records are to be omitted from the output data
| sets.
| Default: NONE. See Appendix B, “Specification/Override of DFSORT Options” on page 459 for full
| override details.
| Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
| FORMAT
|
| 55──FORMAT=f────────────────────────────────────────────────────────────────────────5%
| FORMAT=f can be used only when all the input fields in the entire logical expression have the same
| format. The permissible field formats for comparisons are shown in Figure 13 on page 78. SS (sub-
| string) is the only permissible field format for substring comparison tests. BI (unsigned binary) is the
| only permissible field format for bit logic tests.
| Default: None. Must be specified if not included in the COND=(logical expression) parameter. See
| Appendix B, “Specification/Override of DFSORT Options” on page 459 for full override details.
| Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
| Note: If format values are specified in both FORMAT and COND, DFSORT issues an informational
| message, uses the format values from COND (f must be specified for each compare field), and does not
| use the format values from FORMAT.
Example 1
OMIT COND=(27,1,CH,EQ,C'D',&,
(22,2,BI,SOME,X'Cðð8',|,
28,1,BI,EQ,B'.1....ð1'))
Note that the AND and OR operators can be written with the AND and OR signs, and that parentheses
are used to change the order in which AND and OR are evaluated.
For additional examples of logical expressions, see “INCLUDE Control Statement” on page 75.
┌─,────────────────────────────┐
| 55──OPTION───6┬─ARESALL=──┬─n──┬───────────┬┴──5%
│ ├─nK─┤ │
│ └─nM─┘ │
| ├─ARESINV=──┬─n──┬───────────┤
│ ├─nK─┤ │
│ └─nM─┘ │
├─AVGRLEN=──n────────────────┤
├─┬─CHALT───┬────────────────┤
│ └─NOCHALT─┘ │
├─┬─CHECK───┬────────────────┤
│ └─NOCHECK─┘ │
├─┬─CINV───┬─────────────────┤
│ └─NOCINV─┘ │
├─CKPT───────────────────────┤
├─COBEXIT=──┬─COB1─┬─────────┤
│ └─COB2─┘ │
├─COPY───────────────────────┤
├─DSPSIZE=──┬─MAX─┬──────────┤
│ └─n───┘ │
├─DYNALLOC──┬──────────────┬─┤
│ └─=─┬─d─────┬──┘ │
│ ├─(d)───┤ │
│ ├─(,n)──┤ │
│ ├─(d,n)─┤ │
│ ├─OFF───┤ │
│ └─(OFF)─┘ │
├─EFS=──┬─name─┬─────────────┤
│ └─NONE─┘ │
├─┬─EQUALS───┬───────────────┤
│ └─NOEQUALS─┘ │
├─EXCPVR=──┬─ALL───┬─────────┤
│ ├─NOWRK─┤ │
│ └─NONE──┘ │
├─┬─FILSZ=──┬─x──┬─┬─────────┤
│ │ ├─Ex─┤ │ │
│ │ └─Ux─┘ │ │
│ └─SIZE=──┬─y──┬──┘ │
│ ├─Ey─┤ │
│ └─Uy─┘ │
├─HIPRMAX=──┬─OPTIMAL─┬──────┤
│ └─n───────┘ │
├─┬─LIST───┬─────────────────┤
│ └─NOLIST─┘ │
├─┬─LISTX───┬────────────────┤
│ └─NOLISTX─┘ │
| ├─LOCALE=──┬─name────┬───────┤
| │ ├─CURRENT─┤ │
| │ └─NONE────┘ │
├─MAINSIZE=──┬─n───┬─────────┤
│ ├─nK──┤ │
│ ├─nM──┤ │
│ └─MAX─┘ │
└─MSGDDN=ddname──────────────┘
Figure 31 (Part 1 of 2). Syntax Diagram for the Option Control Statement
├──┬─MSGPRT=──┬─ALL──────┬─┬──┤
│ ├─NONE─────┤ │
│ └─CRITICAL─┘ │
├─NOBLKSET──────────────┤
├─NOOUTREL──────────────┤
├─NOOUTSEC──────────────┤
├─NOSTIMER──────────────┤
├─NOWRKREL──────────────┤
├─NOWRKSEC──────────────┤
| ├─ODMAXBF=──┬─n──┬──────┤
| │ ├─nK─┤ │
| │ └─nM─┘ │
├─RESALL=──┬─n──┬───────┤
│ ├─nK─┤ │
│ └─nM─┘ │
├─RESINV=──┬─n──┬───────┤
│ ├─nK─┤ │
│ └─nM─┘ │
├─SKIPREC=z─────────────┤
| ├─SMF=──┬─SHORT─┬───────┤
| │ ├─FULL──┤ │
| │ └─NO────┘ │
├─SORTDD=cccc───────────┤
├─SORTIN=ddname─────────┤
├─SORTOUT=ddname────────┤
├─STOPAFT=n─────────────┤
├─USEWKDD───────────────┤
├─┬─VERIFY───┬──────────┤
│ └─NOVERIFY─┘ │
├─┬─VLSHRT───┬──────────┤
│ └─NOVLSHRT─┘ │
: ├─Y2PAST=──┬─s─┬────────┤
: │ └─f─┘ │
| └─┬─ZDPRINT──┬──────────┘
| └─NZDPRINT─┘
Figure 31 (Part 2 of 2). Syntax Diagram for the Option Control Statement
| Note for Syntax Diagram: The keywords EFS, LIST, NOLIST, LISTX, NOLISTX, MSGDDN, MSGPRT,
| SMF, SORTDD, SORTIN, SORTOUT, and USEWKDD are used only when they are specified on the
OPTION control statement passed by an extended parameter list or when specified in the DFSPARM data
set. If they are specified on an OPTION statement read from the SYSIN or SORTCNTL data set, the
keyword is recognized, but the parameters are ignored.
The OPTION control statement allows you to override some of the options available at installation time
(such as EQUALS and CHECK) and to supply other optional information (such as DYNALLOC, COPY,
and SKIPREC).
Some of the options available on the OPTION statement are also available on the SORT or MERGE state-
ment (such as FILSZ and SIZE). It is preferable to specify these options on the OPTION statement. For
override rules, see Appendix B, “Specification/Override of DFSORT Options” on page 459.
| DFSORT accepts but does not process the following OPTION operands: APP, APPEND, BLKSET, DIAG,
| ERASE, NEW, NEWFILE, NODIAG, NOERASE, REP, REPLACE, WRKADR, WRKDEV, and WRKSIZ.
ARESALL
55──ARESALL=──┬─n──┬────────────────────────────────────────────────────────────────5%
├─nK─┤
└─nM─┘
Temporarily overrides the ARESALL installation option which specifies the number of bytes to be
reserved above 16-megabyte virtual for system use.
ARESALL applies only to the amount of main storage above 16-megabyte virtual. This option is
normally not needed because of the large amount of storage available above 16-megabyte virtual (the
default for ARESALL is 0 bytes). The RESALL option applies to the amount of main storage below
16-megabyte virtual.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
ARESINV
55──ARESINV=──┬─n──┬────────────────────────────────────────────────────────────────5%
├─nK─┤
└─nM─┘
Temporarily overrides the ARESINV installation option which specifies the number of bytes to be
reserved for an invoking program's user exits that reside in or use space above 16-megabyte virtual.
The reserved space is not meant to be used for the invoking program's executable code. ARESINV is
used only when DFSORT is dynamically invoked.
ARESINV applies only to the amount of main storage above 16-megabyte virtual. The RESINV option
applies to the amount of main storage below 16-megabyte virtual.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
AVGRLEN
55──AVGRLEN=────n───────────────────────────────────────────────────────────────────5%
| Specifies the average input record length in bytes for variable-length record sort applications. This
| value is used when necessary to determine the input file size. The resulting value is important for sort
applications, since it is used for several internal optimizations as well as for dynamic work data set
allocation (see OPTION DYNALLOC). See “Specify Input/Output Data Set Characteristics Accurately”
on page 400 and “Allocation of Work Data Sets” on page 450 for more information on file size consid-
erations.
n specifies the average input record length. n must be between 4 and 32 767 and must include the
4-byte record descriptor word (RDW).
Note: AVGRLEN=n overrides the L5 value of the RECORD statement if both are specified. The L5
| value is ignored for Blockset. The AVGRLEN value will be ignored if an E15 user exit is present.
Default: If AVGRLEN=n is not specified, DFSORT uses one-half of the maximum record length as the
average record length. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
CHALT or NOCHALT
55──┬─CHALT───┬─────────────────────────────────────────────────────────────────────5%
└─NOCHALT─┘
Temporarily overrides the CHALT installation option which specifies whether format CH fields are
translated by the alternate collating sequence as well as format AQ or just the latter.
CHALT specifies that DFSORT translates character control fields with formats CH and AQ using
the alternate collating sequence.
| Note: If you use locale processing for SORT, MERGE, INCLUDE, or OMIT fields, you must not use
| CHALT. If you need alternate sequence processing for a particular field, use format AQ.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
CHECK or NOCHECK
55──┬─CHECK───┬─────────────────────────────────────────────────────────────────────5%
└─NOCHECK─┘
Temporarily overrides the CHECK installation option which specifies whether the record count should
| be checked for applications that use the E35 user exit routine without an output data set.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
CINV or NOCINV
55──┬─CINV───┬──────────────────────────────────────────────────────────────────────5%
└─NOCINV─┘
Temporarily overrides the CINV installation option which specifies whether DFSORT can use control
interval access for VSAM data sets. The Blockset technique uses control interval access for VSAM
input data sets, when possible, to improve performance.
CINV specifies that DFSORT should use control interval access when possible for VSAM data
sets.
NOCINV specifies that DFSORT should not use control interval access.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
CKPT
55──CKPT────────────────────────────────────────────────────────────────────────────5%
Activates the Checkpoint/Restart facility for sorts that use the Peerage or Vale techniques.
Since CKPT is only supported in the Peerage and Vale techniques, the Blockset technique must be
bypassed for the Checkpoint/Restart facility to be used. Installation option IGNCKPT=NO causes
Blockset to be bypassed when CKPT is specified at run-time. The NOBLKSET option can also be
used to bypass Blockset at run-time.
A SORTCKPT DD statement must be coded when you use the Checkpoint/Restart facility
(see“SORTCKPT DD Statement” on page 54).
| Notes:
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
COBEXIT
55──COBEXIT──┬─COB1─┬───────────────────────────────────────────────────────────────5%
└─COB2─┘
Indicates whether the E15 and E35 routines written in COBOL are run with the VS COBOL II library.
COB1 specifies that E15 and E35 routines written in COBOL are run with the OS/VS COBOL library
or, in some cases, with no COBOL library.
COB2 specifies that E15 and E35 routines written in COBOL are run with the VS COBOL II library.
Note: The AD/CYCLE COBOL/370 environment requires COBEXIT=COB2. See “COBOL User Exit
Requirements” on page 248 for additional information on the use of COBEXIT=COB2.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
COPY
55──COPY────────────────────────────────────────────────────────────────────────────5%
| Causes DFSORT to copy a SORTIN data set or inserted records to the output data sets unless all
| records are disposed of by an E35 exit routine. Records can be edited by E15 and E35 exit routines;
| INCLUDE/OMIT, INREC, OUTREC, and OUTFIL statements; and SKIPREC and STOPAFT parame-
| ters. E35 is entered after each SORTIN or E15 record is copied.
| The following must not be used in copy applications:
If VSAM data sets are concatenated, the system only processes the first data set.
| See message ICE160A in Messages, Codes and Diagnosis for additional restrictions that apply to
copy applications.
| Note: User labels will not be copied to the output data sets.
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
DSPSIZE
55──DSPSIZE=──┬─MAX─┬───────────────────────────────────────────────────────────────5%
└─n───┘
For MVS/ESA and MVS/XA systems using DFSORT virtual dataspace (VIRTDSP=YES specified in
ICEMAC), temporarily overrides the DSPSIZE installation option that specifies the maximum amount of
data space to be used with dataspace sorting. A data space is an area of contiguous virtual storage
that is backed by real, expanded, and auxiliary storage, whichever is necessary as determined by the
system. Because DFSORT is able to sort large pieces of data using data space, CPU time and
elapsed time are reduced.
The amount of data space used by DFSORT is limited to the installation or user-specified DSPSIZE
value and by the IEFUSI exit of your system. DSPSIZE=MAX (IBM-supplied default) means that
DFSORT selects the maximum amount of data space to use based on the size of the input file, and
for MVS/ESA only, the paging activity of the system. You can further limit the amount of data space
that DFSORT uses by specifying a maximum value in megabytes.
If the amount of data space DFSORT decides to use is sufficient, DFSORT sorts your data in main
storage and does not require additional temporary work space. If the amount of data space is not
sufficient, DFSORT uses DASD as temporary work space. Installation option DYNAUTO=NO is
| changed to DYNAUTO=YES whenever dataspace sorting is possible. Hiperspace is not used when
| dataspace sorting is used.
MAX specifies that DFSORT dynamically determines the maximum amount of data space to be used
for dataspace sorting. In this case, DFSORT bases its data space usage on the size of the file
being sorted and, for MVS/ESA systems only, the paging activity of the system.
n specifies the maximum amount, in megabytes, of data space to be used for dataspace sorting.
n must be a value between 0 and 9999. The actual amount of data space used does not
exceed n, but may be less than n depending on the size of the file being sorted and, for
MVS/ESA systems only, the paging activity of the system.
If n is zero, dataspace sorting is not used.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
DYNALLOC
55──DYNALLOC──┬──────────────┬──────────────────────────────────────────────────────5%
└─=─┬─d─────┬──┘
├─(d)───┤
├─(,n)──┤
└─(d,n)─┘
Assigns DFSORT the task of dynamically allocating needed work space. You do not need to calculate
and use JCL to specify the amount of work space needed by the program. DFSORT uses the
dynamic allocation facility of the operating system to allocate work space for you.
Refer to Appendix A, “Using Work Space” on page 447 for guidelines on the use of DYNALLOC.
| d specifies the device name. You can specify any of the following IBM devices in the same way you
| would specify them in the JCL UNIT parameter, provided the device is supported by your system:
| 3350 series, 3375 series, 3380 series, 3390 series,
| 9345 series, 3400 series, and RAMAC Array DASD
| You can also specify a group name, such as DISK or SYSDA.
| Avoid specifying tape, virtual (VIO), or 3390-9 devices; they can degrade performance.
: n specifies the maximum number of requested work data sets. If you specify more than 100, a
: maximum of 100 data sets is used. If you specify 1 and the Blockset technique is selected, a
: maximum of 2 data sets is used. If you specify more than 32 and the Blockset technique is not
: selected, a maximum of 32 data sets is used.
For tape work data sets, the number of volumes specified (explicitly or by default) is allocated to the
program. The program requests standard label tapes.
DYNALLOC is not used if SORTWKnn DD statements are provided unless ICEMAC
DYNAUTO=IGNWKDD is specified and OPTION USEWKDD is not in effect.
If VIO=NO is in effect
Work space can be allocated on nontemporary data sets (DSNAME parameter specified).
If the device (d) you specify is a virtual device and reallocation to a real device fails, DFSORT will
ignore VIO=NO and use the virtual device.
| Note: Message ICE165I gives information about work data set allocation/use.
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
You can specify DYNALLOC without n, without d, or without both. If DYNALLOC is specified without
n, and the IBM–supplied default for the n value of the DYNALOC installation option is chosen, then:
If one of the Blockset techniques is chosen, four work data sets will be requested.
If a technique other than Blockset is chosen, three work data sets will be requested.
55──DYNALLOC═──┬─(OFF)─┬────────────────────────────────────────────────────────────5%
└─OFF───┘
Directs DFSORT not to allocate work space dynamically, overriding that function of ICEMAC installa-
tion option DYNAUTO=YES, or DYNAUTO=IGNWKDD, or the run-time option DYNALLOC (without
OFF). Use this option when you know that an in-core sort can be performed, and you want to sup-
press dynamic allocation of work space.
Note: When Hipersorting or dataspace sorting is in effect, DFSORT uses dynamic allocation when
necessary, even if DYNALLOC=OFF has been specified.
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
EFS
55──EFS=──┬─name─┬──────────────────────────────────────────────────────────────────5%
└─NONE─┘
Temporarily overrides the EFS installation option which specifies whether DFSORT is to pass control
to an Extended Function Support (EFS) program. See Chapter 7, “Using Extended Function Support”
on page 363 for more information.
name specifies the name of the EFS program that will be called to interface with DFSORT.
Notes:
1. EFS is processed only if it is passed on the OPTION control statement in an extended parameter
list or in DFSPARM.
| 2. If you use locale processing for SORT, MERGE, INCLUDE, or OMIT fields, you must not use an
| EFS program. DFSORT's locale processing may eliminate the need for an EFS program. See the
| LOCALE option later in this section for information related to locale processing.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
EQUALS or NOEQUALS
55──┬─EQUALS───┬────────────────────────────────────────────────────────────────────5%
└─NOEQUALS─┘
Temporarily overrides the EQUALS installation option, which specifies whether the original sequence
| of records that collate identically for a sort or a merge should be preserved from input to output.
| For sort applications, the sequence of the output records depends upon the order of:
| For merge applications, the sequence of the output records depends upon the order of:
| The records from a SORTINnn file. Records that collate identically are output in the order of their
| file increments. For example, records from SORTIN01 are output before any records that collate
| identically from SORTIN02.
| The records from an E32 user exit routine for the same file increment number. Records that
| collate identically from E32 are output in the order of their file increments. For example, records
| from the file with increment 0 are output before any records that collate identically from the file
| with increment 4.
Notes:
1. When EQUALS is in effect, the total number of bytes occupied by all control fields must not
exceed 4088.
: 2. Using EQUALS can degrade performance.
3. EQUALS is not used if SUM is specified and a technique other than Blockset is selected.
4. Do not specify EQUALS if variable-length records are sorted using tape work files and the RDW is
part of the control field.
5. The number of records to be sorted cannot exceed 4 294 967 295 (4 gigarecords minus 1); if the
number of records exceeds this number, message ICE121A is issued and DFSORT terminates.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options.”
EXCPVR
55──EXCPVR=──┬─ALL───┬──────────────────────────────────────────────────────────────5%
├─NOWRK─┤
└─NONE──┘
Temporarily overrides the EXCPVR installation option, which specifies the data sets for which
DFSORT can use EXCPVR when sorting or copying fixed- and variable-length records with the
Blockset technique. EXCPVR can reduce the CPU time required for a run.
EXCPVR is not used unless the DFSORT SVC is available.
| Using EXCPVR=ALL provides the largest reduction in required CPU time but can cause other applica-
| tions to be paged in and out. Using EXCPVR=NOWRK causes less page fixing than EXCPVR=ALL
but still improves DFSORT performance. Use EXCPVR=NONE if avoiding higher paging rates is more
important than reducing CPU time.
ALL specifies that DFSORT can use EXCPVR for SORTIN, SORTOUT, and SORTWKnn data
sets.
NOWRK specifies that DFSORT can use EXCPVR for the SORTIN and SORTOUT data sets only.
DFSORT will not use EXCPVR for SORTWKnn data sets if NOWRK is specified.
NONE specifies that DFSORT cannot use EXCPVR for SORTIN, SORTOUT, and SORTWKnn
data sets.
Notes:
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
FILSZ or SIZE
55──┬─FILSZ═──┬─x──┬─┬──────────────────────────────────────────────────────────────5%
│ ├─Ex─┤ │
│ └─Ux─┘ │
└─SIZE═──┬─y──┬──┘
├─Ey─┤
└─Uy─┘
| The FILSZ parameter specifies either the exact number of records to be sorted or merged, or an esti-
mate of the number of records to be sorted. The SIZE parameter specifies either the exact number of
records in the input data sets, or an estimate of the number of records in the input data sets. The
supplied record count is used by DFSORT for two purposes:
1. To check that the actual number of records sorted or merged or the number of records in the input
data sets is equal to the exact number of records expected. FILSZ=x or SIZE=y causes this
check to be performed and results in termination with message ICE047A if the check fails.
2. To determine the input file size for a sort application. DFSORT performs calculations based on
the user supplied record count and other parameters (such as AVGRLEN) to estimate the total
number of bytes to be sorted. This value is important for sort runs, since it is used for several
internal optimizations as well as for dynamic work data set allocation (see OPTION DYNALLOC).
If no input record count (or only an estimate) is supplied for the sort run, DFSORT attempts to
automatically compute the file size to be used for the optimizations and allocations.
The type of FILSZ or SIZE value specified (x/y, Ux/Uy, Ex/Ey, or none) controls the way DFSORT
performs the above two functions, and can have a significant effect on performance and work data set
allocation. See Chapter 8, “Improving Efficiency” on page 397 and “File Size and Dynamic Allocation”
on page 452 for more information on file size considerations.
x or y specifies the exact number of records to be sorted or merged (x) or the exact number of
records in the input data sets (y). This value is always used for both the record check and
the file size calculations. FILSZ=x or SIZE=y can be used to force DFSORT to perform file
size calculations based on x or y, and to cause DFSORT to terminate the sort or merge
application if x or y is not exact.
If the FSZEST=NO installation option is in effect and either FILSZ=x or SIZE=y is specified,
DFSORT terminates if the actual number of records is different from the specified exact
value (x or y). In this case, the actual number of records is placed in the IN field of
message ICE047A (or message ICE054I in some cases) before termination. However, if
the FSZEST=YES installation option is in effect, DFSORT treats FILSZ=x or SIZE=y like
FILSZ=Ex or SIZE=Ey, respectively; it does not terminate when the actual number of
records does not equal x or y.
FILSZ=0 causes Hipersorting and dynamic allocation of work space not to be used, and
results in termination with message ICE047A unless the number of records sorted or
merged is 0. If no E15 user exit is present, SIZE=0 has the same effect in terms of
Hipersorting and dynamic allocation of work space, and results in termination with message
ICE047A unless the number of records in the input data sets is 0.
x specifies the exact number of records to be sorted or merged; it must take into account
the number of records in the input data sets, records to be inserted or deleted by E15
or E32, and records to be deleted by the INCLUDE/OMIT statement, SKIPREC, and
STOPAFT. x must be changed whenever the number of records to be sorted or
merged changes in any way.
y specifies the exact number of records in the input data sets; it must take into account
the number of records to be deleted by STOPAFT. y must be changed whenever the
number of records in the input data sets changes in any way.
Limit: 28 digits (15 significant digits)
x specifies an estimate of the number of records to be sorted; it should take into account
| the number of records in the input data sets, records to be inserted or deleted by E15,
| and records to be deleted by the INCLUDE/OMIT statement, SKIPREC, and
STOPAFT. x should be changed whenever the number of records to be sorted
changes significantly.
y specifies an estimate of the number of records in the input data sets; it should take into
account the number of records to be deleted by STOPAFT. y should be changed
whenever the number of records in the input data sets changes significantly.
Limit: 28 digits (15 significant digits)
Ux or Uy specifies the number of records to be sorted (x) or the number of records in the input data
sets (y). This value is not used for the record check, but is always used for the file size
calculations. FILSZ=Ux or SIZE=Uy can be used to force DFSORT to perform file size
calculations based on x or y, while avoiding termination if x or y is not exact.
| The FSZEST installation option has no effect on FILSZ=Ux or SIZE=Uy processing.
FILSZ=U0 causes Hipersorting and dynamic allocation of work space not to be used, and
may cause degraded performance or termination with message ICE046A, if the actual
number of records to be sorted is significantly larger than 0. If no E15 user exit is present,
SIZE=U0 has the same effect in terms of Hipersorting and dynamic allocation of work
space, and may cause degraded performance or termination with message ICE046A, if the
actual number of records in the input data sets is significantly larger than 0.
x specifies the number of records to be sorted; it should take into account the number of
| records in the input data sets, records to be inserted or deleted by E15, and records to
| be deleted by the INCLUDE/OMIT statement, SKIPREC, and STOPAFT. x should be
changed whenever the number of records to be sorted changes significantly.
y specifies the number of records in the input data sets; it should take into account the
number of records to be deleted by STOPAFT. y should be changed whenever the
number of records in the input data sets changes significantly.
Limit: 28 digits (15 significant digits)
Note: Using the SIZE or FILSZ parameter to supply inaccurate information to DFSORT can nega-
tively affect DFSORT performance, and, when work space is dynamically allocated, can result in
wasted DASD space or termination with message ICE083A or ICE046A. Therefore, it is important to
update the record count value whenever the number of records to be sorted changes significantly.
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
HIPRMAX
55──HIPRMAX=──┬─OPTIMAL─┬───────────────────────────────────────────────────────────5%
└─n───────┘
For MVS/ESA, temporarily overrides the HIPRMAX installation option, which specifies the maximum
amount of Hiperspace to be used for Hipersorting. Hiperspace is a high-performance data space that
resides in expanded storage and is backed by auxiliary storage (if necessary). Because I/O proc-
essing is reduced for Hipersorting, elapsed time, EXCP counts, and channel usage are also reduced.
| Several factors can limit the amount of Hiperspace an application uses:
| The IEFUSI exit can limit the total amount of Hiperspace and data space available to an applica-
| tion.
| HIPRMAX can limit the amount of Hiperspace available to an application, as detailed below.
| Sufficient available expanded storage must be present to back DFSORT's Hiperspaces. Available
| expanded storage means expanded storage that MVS/ESA uses to back new Hiperspace data
| and consists of the following two types:
| 1. Free expanded storage. This is expanded storage not being used by any application.
| 2. Old expanded storage. This is expanded storage used by another application whose data has
| been unreferenced for a sufficiently long time so that MVS/ESA migrates it to auxiliary storage
| to make room for new Hiperspace data.
| The amount of available expanded storage constantly changes, depending upon current system
| activity. Consequently, DFSORT checks the available expanded storage level throughout a
| Hipersorting application and switches from Hiperspace to work data sets if the available expanded
| storage level gets too low.
| Other concurrent Hipersorting applications further limit the amount of available expanded storage.
| A Hipersorting application knows the expanded storage needs of every other Hipersorting applica-
| tion on the system, and does not try to back its Hiperspace data with expanded storage needed
| by another Hipersorting application. This prevents overcommitment of expanded storage
| resources if multiple large concurrent Hipersorting applications start at similar times on the same
| system.
| The installation options EXPMAX, EXPOLD, and EXPRES can also be used to further limit the
| amount of expanded storage available to Hipersorting applications. EXPMAX limits the total
| amount of available expanded storage that can be used at any one time to back DFSORT
| Hiperspaces. EXPOLD limits the total amount of old expanded storage that can be used at any
| one time to back DFSORT Hiperspaces. EXPRES sets aside a specified amount of available
| expanded storage for use by non-Hipersorting applications.
| Some of these limits depend on system and other Hipersorting activity throughout the time a
| Hipersorting application runs. Consequently, the amount of Hiperspace a Hipersorting application
| uses can vary from run to run.
If the amount of Hiperspace available for Hipersorting is insufficient for temporary storage of the
records, intermediate DASD storage is used along with Hiperspace. If the amount of Hiperspace is
too small to improve performance, Hipersorting is not used. DYNAUTO=NO is changed to
DYNAUTO=YES for Hipersorting.
| Hipersorting can cause a small CPU time degradation. When CPU optimization is a concern, you can
use HIPRMAX=0 to suppress Hipersorting.
| OPTIMAL specifies that DFSORT determines dynamically the maximum amount of Hiperspace to be
| used for Hipersorting.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
LIST or NOLIST
55──┬─LIST───┬──────────────────────────────────────────────────────────────────────5%
└─NOLIST─┘
Temporarily overrides the LIST installation option that specifies whether DFSORT program control
| statements should be written to the message data set. See Messages, Codes and Diagnosis for
details on use of the message data set.
LIST specifies that DFSORT control statements are printed to the message data set.
NOLIST specifies that DFSORT control statements are not printed to the message data set.
Note: LIST or NOLIST are processed only if they are passed on the OPTION control statement in an
extended parameter list or in DFSPARM.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
LISTX or NOLISTX
55──┬─LISTX───┬─────────────────────────────────────────────────────────────────────5%
└─NOLISTX─┘
Temporarily overrides the LISTX installation option, that specifies whether DFSORT writes to the
| message data set program control statements that are returned by an EFS program. See Messages,
| Codes and Diagnosis for details on use of the message data set.
LISTX specifies that control statements returned by an EFS program are printed to the message
data set.
NOLISTX specifies that control statements returned by an EFS program are not printed to the
message data set.
Notes:
1. LISTX or NOLISTX are processed only if they are passed on the OPTION control statement in an
extended parameter list or in DFSPARM.
2. If EFS=NONE is in effect after final override rules have been applied, NOLISTX is in effect.
3. LISTX and NOLISTX can be used independently of LIST and NOLIST.
| 4. For more information on printing EFS control statements, see Messages, Codes and Diagnosis.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
: LOCALE
:
: 55──LOCALE=─┬─name────┬─────────────────────────────────────────────────────────────5%
: ├─CURRENT─┤
: └─NONE────┘
| Temporarily overrides the LOCALE installation option, which specifies whether locale processing is to
| be used and, if so, designates the active locale.
| DFSORT's collating behavior can be modified according to your cultural environment. Your cultural
| environment is defined to DFSORT using the X/Open locale model. A locale is a collection of data
| grouped into categories that describes the information about your cultural environment.
| The collate category of a locale is a collection of sequence declarations that defines the relative order
| between collating elements (single character and multi-character collating elements). The sequence
| declarations define the collating rules.
| If locale processing is to be used, the active locale will affect the behavior of DFSORT's SORT,
| MERGE, INCLUDE, and OMIT functions. For SORT and MERGE, the active locale will only be used
| to process character (CH) control fields. For INCLUDE and OMIT, the active locale will only be used
| to process character (CH) compare fields, and character and hexadecimal constants compared to
| character (CH) compare fields.
| name specifies that locale processing is to be used and designates the name of the locale to
| be made active during DFSORT processing.
| The locales are designated using a descriptive name. For example, to set the active
| locale to represent the French language and the cultural conventions of Canada,
| specify LOCALE=FR_CA. You can specify up to 32 characters for the descriptive
| locale name. The locale names themselves are not case-sensitive. See Using Locales
| for complete locale naming conventions.
| You can use IBM-supplied and user-defined locales. See Appendix F, “Locales Sup-
| plied with C/370” on page 501 for examples of some IBM-supplied locales.
| The state of the active locale prior to DFSORT being entered will be restored on
| DFSORT's completion.
| CURRENT specifies that locale processing is to be used, and the current locale active when
| DFSORT is entered will remain the active locale during DFSORT processing.
| NONE specifies that locale processing is not to be used. DFSORT will use the binary
| encoding of the code page defined for your data for collating and comparing.
| Notes:
| 1. LOCALE is processed only if it is passed on the OPTION control statement in an extended param-
| eter list or in DFSPARM.
| 2. To use an IBM-supplied locale, DFSORT must have access to the AD/Cycle LE/370 library con-
| taining the dynamically loadable routines. For example, the data set containing them might be
| called SYS1.SCEERUN. If you are unsure of the name of the data set where the compiled locale
| load modules are installed at your location, contact your system administrator. To use a user-
| defined locale, DFSORT must have access to the load library containing it.
| 3. If you use locale processing for SORT, MERGE, INCLUDE, or OMIT fields:
| VLSHRT is not used for SORT or MERGE
| CHALT, INREC, an EFS program, or an E61 user exit must not be used.
| 4. Locale processing for DFSORT's SORT, MERGE, INCLUDE, and OMIT functions can improve
| performance relative to applications which perform pre- and/or post-processing of data to produce
| the desired collating results. However, locale processing should be used only when required
| because it can show degraded performance relative to collating, using character encoding values.
| 5. DFSORT's locale processing support requires the use of Language Environment for MVS & VM,
| and the use of a locale. In order to run Language Environment for MVS & VM, you need 1700K
| bytes. For a typical locale, you need 11K bytes. However, locale sizes vary significantly, so
| check the storage requirements for the specific locale you plan to use. The storage needed by
| Language Environment for MVS & VM is reduced if modules CEEBINIT, CEEPLPKA, CEEEV003,
| and the locale you plan to use have been included in the Link Pack Area and Extended Link Pack
| Area. See Language Environment for MVS & VM Installation and Customization Guide,
| SC26-4817, for more information.
| Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
| on page 459 for full override details.
| Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
MAINSIZE
55──MAINSIZE=──┬─n───┬──────────────────────────────────────────────────────────────5%
├─nK──┤
├─nM──┤
└─MAX─┘
Temporarily overrides the SIZE installation option that specifies the amount of main storage available
to DFSORT. The value you specify must be greater than the MINLIM value set at DFSORT installa-
tion time.
MAINSIZE applies to the total amount of main storage above and below 16-megabyte virtual.
DFSORT determines how much storage to allocate above and below 16-megabyte virtual, but the total
amount of storage cannot exceed MAINSIZE.
| Storage used for OUTFIL processing will be adjusted automatically, depending upon several factors,
| including:
| OUTFIL processing is subject to the ODMAXBF limit and your system storage limits (for example,
| IEFUSI) but not to DFSORT storage limits, that is, SIZE/MAINSIZE, MAXLIM, and TMAXLIM.
| DFSORT attempts to use storage above 16-megabyte virtual for OUTFIL processing whenever pos-
| sible.
For details on main storage allocation, see “Tuning Main Storage” on page 406.
: n specifies that n bytes of storage are to be allocated. If you specify more that 2097152000,
: 2097152000 is used.
: Limit: 10 digits
: nK specifies that n times 1024 bytes of storage are to be allocated. If you specify more than
: 2048000K, 2048000K is used.
: Limit: 7 digits
: nM specifies that n times 1048576 bytes of storage are to be allocated. If you specify more than
: 2000M, 2000M is used.
: Limit: 4 digits.
: MAX instructs DFSORT to calculate the amount of virtual storage available and allocate an amount
: of storage up to the TMAXLIM or DSA installation values for Blockset sort applications, or up to
: the MAXLIM installation value for other applications (copy, merge, and
: Peerage/Vale/Conventional sort), specified when DFSORT was installed.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
MSGDDN
55──MSGDDN=ddname───────────────────────────────────────────────────────────────────5%
Temporarily overrides the MSGDDN installation option, that specifies an alternate ddname for the
message data set. MSGDDN must be in effect if:
A program that invokes DFSORT uses SYSOUT (for instance, COBOL uses SYSOUT) and you
do not want DFSORT messages intermixed with the program messages.
Your E15 and E35 routines are written in COBOL and you do not want DFSORT messages inter-
mixed with the program messages.
A program invokes DFSORT more than once and you want separate messages for each invoca-
tion of DFSORT.
The ddname can be any 1- through 8- character name but must be unique within the job step; do not
use a name that is used by DFSORT (for example, SORTIN). If the ddname specified is not available
| at run-time, SYSOUT is used instead. For details on use of the message data set, see Messages,
| Codes and Diagnosis.
Note: MSGDDN is processed only if it is passed on the OPTION control statement in an extended
parameter list or in DFSPARM.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
MSGPRT
55──MSGPRT=──┬─ALL──────┬───────────────────────────────────────────────────────────5%
├─CRITICAL─┤
└─NONE─────┘
Temporarily overrides the MSGPRT installation option that specifies the class of messages to be
| written to the message data set. For details on use of the message data set, see Messages, Codes
| and Diagnosis.
ALL specifies that all messages except diagnostic messages (ICE800I to ICE999I) are to be
printed. Control statements print only if LIST is in effect.
CRITICAL specifies that only critical messages will be printed. Control statements print only if LIST
is in effect.
Note: MSGPRT is processed only if it is passed on the OPTION control statement in an extended
parameter list or in DFSPARM.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
55──NOBLKSET────────────────────────────────────────────────────────────────────────5%
Causes DFSORT to bypass the Blockset technique normally used for a sort or merge application.
Using this option generally results in degraded performance.
| Note: Functions such as OUTFIL processing, which are supported only by the Blockset technique,
| cause the NOBLKSET option to be ignored.
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
NOOUTREL
55──NOOUTREL────────────────────────────────────────────────────────────────────────5%
| Temporarily overrides the OUTREL installation option that specifies whether unused temporary output
| data set space is released. NOOUTREL means that unused temporary output data set space is not
released.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
NOOUTSEC
55──NOOUTSEC────────────────────────────────────────────────────────────────────────5%
| Temporarily overrides the OUTSEC installation option that specifies whether automatic secondary allo-
| cation is used for temporary or new output data sets. NOOUTSEC means that automatic secondary
| allocation for output data sets is not used.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
NOSTIMER
55──NOSTIMER────────────────────────────────────────────────────────────────────────5%
Temporarily overrides the STIMER installation option that specifies whether DFSORT can use the
STIMER macro. NOSTIMER means that DFSORT does not use the STIMER macro; processor time
data does not appear in SMF records or in statistics provided to the ICETEXIT termination installation
exit.
If your exits take checkpoints and STIMER=YES is the installation default, you must specify this
parameter.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
NOWRKREL
55──NOWRKREL────────────────────────────────────────────────────────────────────────5%
Temporarily overrides the WRKREL installation option that specifies whether unused temporary
SORTWKnn data set space is released. NOWRKREL means that no unused temporary SORTWKnn
data set space is released.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
NOWRKSEC
55──NOWRKSEC────────────────────────────────────────────────────────────────────────5%
Temporarily overrides the WRKSEC installation option that specifies whether automatic secondary
allocation is to be used for JCL SORTWKnn data sets. NOWRKSEC means that automatic secondary
allocation is not used for JCL SORTWKnn data sets.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
| ODMAXBF
|
| 55──ODMAXBF=─┬─n──┬─────────────────────────────────────────────────────────────────5%
| ├─nK─┤
| └─nM─┘
| Temporarily overrides the ODMAXBF installation option, which specifies the maximum buffer space
| DFSORT can use for each OUTFIL data set. The actual amount of buffer space used for a particular
| OUTFIL data set will not exceed the ODMAXBF limit, but can be less than the limit. OUTFIL proc-
| essing is supported by the Blockset technique for sort, copy, and merge applications.
| The storage used for OUTFIL processing is adjusted automatically according to the total storage avail-
| able, the storage needed for non-OUTFIL processing, and the number of OUTFIL data sets and their
| attributes (for example, block size). OUTFIL processing is subject to the ODMAXBF limit in effect and
| the system storage limits (for example, IEFUSI), but not to the DFSORT storage limits (that is, SIZE,
| MAXLIM, and TMAXLIM). DFSORT attempts to use storage above 16-megabyte virtual for OUTFIL
| processing whenever possible.
| Lowering ODMAXBF below 2M can cause performance degradation for the application, but may be
| necessary if you consider the amount of storage used for OUTFIL processing to be a problem.
| Raising ODMAXBF can improve EXCPs for the application but can also increase the amount of
| storage needed.
| n specifies that a maximum of n bytes of buffer space is to be used for each OUTFIL data set.
| If you specify less than 262 144, 262 144 is used. If you specify more than 16 777 216,
| 16 777 216 is used.
| Limit: 8 digits
| nK specifies that a maximum of n times 1024 bytes of buffer space is to be used for each
| OUTFIL data set. If you specify less than 256K, 256K is used. If you specify more than
| 16 384K, 16 384K is used.
| Limit: 5 digits
| nM specifies that a maximum of n times 1 048 576 bytes of buffer space is to be used for each
| OUTFIL data set. If you specify 0M, 256K is used. If you specify more than 16M, 16M is
| used.
| Limit: 2 digits
| Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
| on page 459 for full override details.
| Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
RESALL
55──RESALL=──┬─n──┬─────────────────────────────────────────────────────────────────5%
├─nK─┤
└─nM─┘
Temporarily overrides the RESALL installation option that specifies the number of bytes to be reserved
in a REGION for system use. Usually, only 4K bytes (the standard default) of main storage must be
available in a region for system use. However, in some cases, this may not be enough; for example,
if your installation does not have BSAM/QSAM modules resident, you have user exits that open data
sets, or you have COBOL exits. RESALL is used only when MAINSIZE/SIZE=MAX is in effect.
RESALL applies only to the amount of main storage below 16-megabyte virtual. The ARESALL option
applies to the amount of main storage above 16-megabyte virtual.
n specifies that n bytes of storage are to be reserved. If you specify less than 4096, 4096 is
used.
Limit: 8 digits.
nK specifies that n times 1024 bytes of storage are to be reserved. If you specify less than 4K, 4K
is used.
Limit: 5 digits.
nM specifies that n times 1 048 576 bytes of storage are to be reserved. If you specify 0M, 4K is
used.
Limit: 2 digits.
Note: A better way to reserve the required storage for user exits activated by the MODS statement is
to use the m parameter of the MODS statement.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
55──RESINV=──┬─n──┬─────────────────────────────────────────────────────────────────5%
├─nK─┤
└─nM─┘
Temporarily overrides the RESINV installation option that specifies the number of bytes to be reserved
in a REGION for the invoking program. RESINV is used only when DFSORT is dynamically invoked
and MAINSIZE/SIZE=MAX is in effect.
RESINV applies only to the amount of main storage below 16-megabyte virtual. The ARESINV option
applies to the amount of main storage above 16-megabyte virtual.
This extra space is usually required for data handling by the invoking program or user exits while
DFSORT is running (as is the case with some PL/I- and COBOL- invoked sort applications). There-
fore, if your invoking program's user exits do not perform data set handling, you do not need to specify
this parameter. The reserved space is not meant to be used for the invoking program's executable
code.
The amount of space required depends upon what routines you have, how the data is stored, and
which access method you use.
Note: A better way to reserve the required storage for user exits is to use the m parameter on the
MODS statement.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
| SIZE
| See FILSZ.
SKIPREC
55──SKIPREC=z───────────────────────────────────────────────────────────────────────5%
Specifies the number of records z you want to skip before starting to sort or copy the input data set.
SKIPREC is usually used if, on a preceding DFSORT run, you have processed only part of the input
data set.
| An application with an input data set that exceeds intermediate storage capacity usually terminates
unsuccessfully. However, for a tape work data set sort, you can use a routine at E16 (as described in
Chapter 4, “Using Your Own User Exit Routines” on page 219) to instruct the program to sort only
those records already read in. It then prints a message giving the number of records sorted. You can
use SKIPREC in a subsequent sort run to bypass the previously-sorted records, sort only the
remaining records, and then merge the output from different runs to complete the application.
1. SKIPREC applies only to records read from SORTIN (not from E15 routines). (See Figure 2 on
page 7.)
2. If SKIPREC=0 is in effect, SKIPREC is not used.
| 3. You may want to consider using the STARTREC parameter of the OUTFIL statement as an alter-
| native to using SKIPREC.
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
| SMF
|
| 55──SMF=─┬─SHORT─┬──────────────────────────────────────────────────────────────────5%
| ├─FULL──┤
| └─NO────┘
| Temporarily overrides the SMF installation option that specifies whether a DFSORT SMF record is to
| be produced as described in Installation and Customization.
| SHORT specifies that DFSORT is to produce a short SMF type-16 record for a successful run. The
| short SMF record does not contain record-length distribution statistics or data set sections.
| FULL specifies that DFSORT is to produce a full SMF type-16 record for a successful run. The
| full SMF record contains the same information as the short record, as well as record-length
| distribution and data set sections, as appropriate.
| NO specifies that DFSORT is not to produce an SMF type-16 record for this run.
| Notes:
| 1. SMF is processed only if it is passed on the OPTION control statement in an extended parameter
| list or in DFSPARM.
| 2. SMF=FULL can degrade performance for a variable-length record application.
| Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
| on page 459 for full override details.
| Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
SORTDD
55──SORTDD=cccc─────────────────────────────────────────────────────────────────────5%
Specifies a four-character prefix for the ddnames to be used when you dynamically invoke DFSORT
more than once in a program step. The four characters replace “SORT” in the following ddnames:
cccc Specifies a four-character prefix. The four characters must all be alphanumeric or national ($,
#, or @). The first character must be alphabetic. The first three characters must not be SYS.
Example: If you use ABC# as replacement characters, DFSORT uses DD statements ABC#IN,
ABC#CNTL, ABC#WKnn, and ABC#OUT instead of SORTIN, SORTCNTL, SORTWKnn, and
SORTOUT.
Notes:
Default: SORT. See Appendix B, “Specification/Override of DFSORT Options” on page 459 for full
override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
SORTIN
55──SORTIN=ddname───────────────────────────────────────────────────────────────────5%
Specifies a ddname to be associated with the SORTIN data set. This allows you to dynamically invoke
| DFSORT more than once in a program step, passing a different ddname for each input data set.
The ddname can be 1 through 8 characters, but must be unique within the job step. Do not use
ddnames reserved for use by DFSORT (such as SYSIN).
Notes:
1. SORTIN is processed only if it is passed on the OPTION control statement in an extended param-
eter list, or in DFSPARM.
2. If both SORTIN=ddname and SORTDD=cccc are specified, ddname is used for the input file. The
same ddname cannot be specified for SORTIN and SORTOUT.
3. If SORTIN is used for a tape work data set sort, DFSORT terminates.
Default: SORTIN, unless SORTDD=cccc is specified in which case ccccIN is the default. See
Appendix B, “Specification/Override of DFSORT Options” on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
SORTOUT
55──SORTOUT=ddname──────────────────────────────────────────────────────────────────5%
Specifies a ddname to be associated with the SORTOUT data set. This allows you to dynamically
| invoke DFSORT more than once in a program step, passing a different ddname for each output data
| set.
The ddname can be 1 through 8 characters, but must be unique within the job step. Do not use
ddnames reserved for use by DFSORT (such as SYSIN).
Notes:
Default: SORTOUT, unless SORTDD=cccc is specified, in which case ccccOUT is the default. See
Appendix B, “Specification/Override of DFSORT Options” on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
STOPAFT
55──STOPAFT=n───────────────────────────────────────────────────────────────────────5%
Specifies the maximum number of records (n) you want accepted for sorting or copying (that is, read
| from SORTIN or inserted by E15 and not deleted by SKIPREC, E15, or the INCLUDE/OMIT state-
| ment). When n records have been accepted, no more records are read from SORTIN; E15 continues
to be entered as if EOF were encountered until a return code of 8 is sent, but no more records are
inserted. If end-of-file is encountered before n records are accepted, only those records accepted up
to that point are sorted or copied.
Notes:
Default: None; optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
USEWKDD
55──USEWKDD─────────────────────────────────────────────────────────────────────────5%
Temporarily overrides the DYNAUTO=IGNWKDD option that specifies that dynamic work data sets are
used even if SORTWKnn DD statements are present. This option allows JCL SORTWKnn data sets
to be used rather than deallocated.
Note: USEWKDD is processed only if it is passed on the OPTION control statement in an extended
parameter list or in DFSPARM.
Default: None, optional. See Appendix B, “Specification/Override of DFSORT Options” on page 459
for full override details.
Applicable Function: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
VERIFY or NOVERIFY
55──┬─VERIFY───┬────────────────────────────────────────────────────────────────────5%
└─NOVERIFY─┘
Temporarily overrides the VERIFY installation option that specifies whether sequence checking of the
final output records must be performed.
55──┬─VLSHRT───┬────────────────────────────────────────────────────────────────────5%
└─NOVLSHRT─┘
Temporarily overrides the VLSHRT installation option that specifies whether DFSORT continues proc-
essing if a variable-length input record is found to be too short to contain all specified SORT or
MERGE control fields, or all specified INCLUDE or OMIT compare fields.
: VLSHRT processing is not meaningful for fixed-length record processing. VLSHRT processing is only
: meaningful for a copy application if an INCLUDE or OMIT statement or an OUTFIL INCLUDE or OMIT
: parameter is specified.
| Notes:
| 1. VLSHRT is not used if an INREC, OUTREC, or SUM statement is specified, if you have an EFS01
| or EFS02 routine, or if locale processing is used for SORT or MERGE fields.
| 2. Unlike the OUTREC statement, the OUTREC parameter of the OUTFIL statement does not force
| NOVLSHRT. Thus, you can use VLSHRT with OUTFIL to eliminate records with the INCLUDE or
| OMIT parameter and reformat the remaining records with the OUTREC parameter. Note that if a
| short OUTFIL OUTREC field is found, DFSORT terminates, even if VLSHRT is in effect.
3. If Blockset is selected:
DFSORT pads “short” control fields with binary zeroes, thus making the order predictable for
records with equal control fields of different lengths.
Padding increases the amount of work space required. If necessary, specify an estimated or
exact file size to aid DFSORT's determination of the work space amount when using DYNALLOC.
4. If Blockset is not selected:
DFSORT terminates if the first byte of the first (major) control field is not included in the
record.
DFSORT does not pad “short” control fields, thus making the order unpredictable for records
with equal control fields of different lengths. However, the work space requirements are mini-
mized.
In certain cases, VLSHRT is not used because of the number and position of the control
fields.
EQUALS is not used if VLSHRT is in effect.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
: Y2PAST
:
: 55──Y2PAST=──┬─s─┬──────────────────────────────────────────────────────────────────5%
: └─f─┘
: Temporarily overrides the Y2PAST installation option that specifies the sliding (s) or fixed (f) century
: window. The century window is used with DFSORT's Y2C, Y2Z, Y2P and Y2D formats to correctly
: interpret two-digit year data values as four-digit year data values.
: s specifies the number of years DFSORT is to subtract from the current year to set the beginning of
: the sliding century window. Since the Y2PAST value is subtracted from the current year, the
: century window slides as the current year changes. For example, Y2PAST=81 would set a
: century window of 1915-2014 in 1996 and 1916-2015 in 1997. s must be a value between 0 and
: 100.
: f specifies the beginning of the fixed century window. For example, Y2PAST=1962 would set a
: century window of 1962-2061. f must be a value between 1000 and 3000.
: Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
: on page 459 for full override details.
: Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
ZDPRINT or NZDPRINT
55──┬─ZDPRINT──┬────────────────────────────────────────────────────────────────────5%
└─NZDPRINT─┘
Temporarily overrides the ZDPRINT installation option that specifies whether positive zoned-decimal
(ZD) fields resulting from summing must be converted to printable numbers (that is, whether the zone
| of the last digit should be changed from a hexadecimal C to a hexadecimal F). See “SUM Control
| Statement” on page 215 for further details on the use of ZDPRINT and NZDPRINT.
Default: Usually the installation default. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Function: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
Example 1
SORT FIELDS=(1,2ð,CH,A)
OPTION SIZE=5ðððð,SKIPREC=5,EQUALS,DYNALLOC
FIELDS The control field begins on the first byte of each record in the input data set, is 20 bytes
long, contains character data, and is to be sorted in ascending order.
SKIPREC Five records are skipped before starting to process the input data set.
| EQUALS The sequence of records that collate identically is preserved from input to output.
DYNALLOC Two data sets (by default) are allocated on SYSDA (by default). The space on the data set
is calculated using the SIZE value in effect.
Example 2
SORT FIELDS=(1,2,CH,A),CKPT
OPTION EQUALS,NOCHALT,NOVERIFY,CHECK
FIELDS The control field begins on the first byte of each record in the input data set, is 2 bytes long,
contains character data, and is to be sorted in ascending order.
| EQUALS The sequence of records that collate identically is preserved from input to output.
NOCHALT Only AQ fields are translated through the ALTSEQ translate table. If CHALT=YES was
specified during installation, then NOCHALT temporarily overrides it.
Example 3
OPTION FILSZ=5ð,SKIPREC=5,DYNALLOC=338ð
SORT FIELDS=(1,2,CH,A),SKIPREC=1,SIZE=2ðð,DYNALLOC=(335ð,5)
This example shows how parameters specified on the OPTION control statement override those specified
on the SORT control statement, regardless of the order of the two statements.
FILSZ DFSORT expects 50 records on the input data set. (Note that there is a difference in
meaning between FILSZ and SIZE and that the OPTION specification of FILSZ is used in
place of SIZE.)
SKIPREC DFSORT causes five records from the beginning of the input file to be skipped.
(SKIPREC=1 on the SORT statement is ignored.)
DYNALLOC DFSORT allocates two work data sets (by default) on an IBM 3380.
FIELDS The control field begins on the first byte of each record in the input data set, is 2 bytes long,
contains character data, and is to be sorted in ascending order.
Example 4
OPTION NOBLKSET
NOBLKSET DFSORT does not use the Blockset technique for a sort or merge.
Example 5
OPTION STOPAFT=1ðð,COBEXIT=COB2
COBEXIT E15 and E35 routines can be run with the VS COBOL II library.
Example 6
OPTION RESINV=32ððð,MSGPRT=NONE,
MSGDDN=SORTMSGS,SORTDD=ABCD,SORTIN=MYINPUT,
SORTOUT=MYOUTPUT,NOLIST
This example illustrates the parameters RESINV, MSGPRT, MSGDDN, SORTDD, SORTIN, SORTOUT,
and NOLIST, and the actions taken when these parameters are supplied on an OPTION statement read
from the SYSIN data set or the SORTCNTL data set. The parameters are recognized, but not used.
MSGPRT=NONE The keyword is ignored, and messages are printed according to the installation-
supplied default.
MSGDDN=SORTMSGS The keyword is ignored, and all messages are written to the SYSOUT data set.
SORTDD=ABCD The keyword is ignored, and the standard prefix SORT is used.
SORTIN=MYINPUT The keyword is ignored, and the ddname SORTIN is used to reference the
input data set.
SORTOUT=MYOUTPUT The keyword is ignored, and the ddname SORTOUT is used to reference the
output data set.
NOLIST The keyword is ignored, and control statements are printed according to the
installation-supplied defaults.
Example 7
OPTION RESINV=32ððð,MSGPRT=CRITICAL,
MSGDDN=SORTMSGS,SORTDD=ABCD,SORTIN=MYINPUT,
SORTOUT=MYOUTPUT,NOLIST
This example illustrates keywords RESINV, MSGPRT, MSGDDN, SORTDD, SORTIN, SORTOUT, and
NOLIST and the actions taken when these keywords are supplied on the OPTION control statement
passed by DFSPARM. These options can also be passed in an extended parameter list, with the appro-
priate syntax changes.
MSGPRT=CRITICAL Only critical messages are printed on the message data set.
SORTIN=MYINPUT The ddname MYINPUT is used to reference the input data set.
SORTOUT=MYOUTPUT The ddname MYOUTPUT is used to reference the output data set.
Example 8
SORT FIELDS=(3,4,CH,A)
OPTION COPY,SKIPREC=1ð,CKPT
MODS E15=(E15,1ð24,MODLIB),E35=(E35,1ð24,MODLIB)
SORT The sort statement is ignored because the COPY option has been specified.
COPY The copy processing is always done on a record-by-record basis. Each record is therefore
read from SORTIN, passed to the E15 exit, passed to the E35 exit, and written to SORTOUT.
(Contrast this with a sort, where all the records are read from SORTIN and passed to the E15
exit before any records are passed to the E35 exit and written to SORTOUT.)
Example 9
SORT FIELDS=(5,4,CH,A)
SUM FIELDS=(12,5,ZD,25,6,ZD)
OPTION ZDPRINT
ZDPRINT The positive summed ZD values are printable because DFSORT uses an F sign for the last
digit.
| OUTFIL control statements allow you to create one or more output data sets for a sort, copy, or merge
| application from a single pass over one or more input data sets. You can use multiple OUTFIL state-
| ments, with each statement specifying the OUTFIL processing to be performed for one or more output
| data sets. OUTFIL processing begins after all other processing ends (that is, after processing for exits,
| options, and other control statements). OUTFIL statements support a wide variety of output data set
| tasks, including:
Creation of multiple output data sets containing unedited or edited records from a single pass over one
or more input data sets.
Creation of multiple output data sets containing different ranges or subsets of records from a single
pass over one or more input data sets. In addition, records that are not selected for any subset can
be saved in a separate output data set.
Conversion of variable-length record data sets to fixed-length record data sets.
Sophisticated editing capabilities, such as hexadecimal display and control of the way numeric fields
are presented with respect to length, leading or suppressed zeros, symbols (for example, the thou-
sands separator and decimal point), leading and trailing positive and negative signs, and so on.
Twenty-six pre-defined editing masks are available for commonly used numeric editing patterns,
encompassing many of the numeric notations used throughout the world. In addition, a virtually unlim-
ited number of numeric editing patterns are available via user-defined editing masks.
: Transformation of two-digit character, zoned decimal, packed decimal or decimal year data to correct
: four-digit character year data using the century window.
Selection of a character or hexadecimal string for output from a lookup table, based on a character,
hexadecimal, or bit string as input (that is, lookup and change).
Highly detailed three-level (report, page, and section) reports containing a variety of report elements
you can specify (for example, current date, current time, page number, character strings, and blank
| lines) or derive from the input records (for example, character fields; edited numeric input fields; record
| counts; and edited totals, maximums, minimums, and averages for numeric input fields).
| Whereas the INCLUDE and OMIT statements apply to all input records, the INCLUDE and OMIT
| parameters apply only to the OUTFIL input records for their OUTFIL group. The INCLUDE and OMIT
| parameters have all of the logical expression capabilities of the INCLUDE and OMIT statements.
| SPLIT splits the output records in rotation among the data sets of an OUTFIL group. The first output
| record is written to the first OUTFIL data set in the group, the second output record is written to the
| second data set, and so on; when each OUTFIL data set has one record, the rotation starts again with
| the first OUTFIL data set.
| OUTREC reformats the output records for an OUTFIL group. OUTREC enables you to rearrange,
| edit, and change the fields of the OUTFIL input records and to insert blanks, zeros, and strings.
| OUTREC is used with CONVERT to change variable-length input records to fixed-length output
| records.
| Whereas the OUTREC statement applies to all input records, the OUTREC parameter applies only to
| the OUTFIL input records for its OUTFIL group. In addition, the OUTREC parameter supports capabil-
| ities (for example, hex display, editing, and lookup/change) that are not supported by the OUTREC
| statement.
| LINES, HEADER1, TRAILER1, HEADER2, TRAILER2, SECTIONS, and NODETAIL indicate that a
| report is to be produced for an OUTFIL group, and specify the details of the report records to be
| produced for the report. Reports can contain report records for a report header (first page), report
| trailer (last page), page header and page trailer (at the top and bottom of each page, respectively),
| and section headers and trailers (before and after each section, respectively).
| Data records for the report result from the inclusion of OUTFIL input records. All of the capabilities of
| the OUTREC parameter are available to create reformatted data records from the OUTFIL input
| records. Each set of sequential OUTFIL input records, with the same binary value for a specified field,
| results in a corresponding set of data records that is treated as a section in the report.
| The length for the data records must be equal to or greater than the maximum report record length.
| OUTFIL data sets used for reports must have or will be given ASA control character format ('A' as in,
| for example, RECFM=FBA or RECFM=VBA), and must allow an extra byte in the LRECL for the car-
| riage control character that DFSORT will add to each report and data record. DFSORT uses these
| carriage control characters to control page ejects and the placement of the lines in your report
| according to your specifications. Note that DFSORT uses appropriate carriage controls (for example,
| C'-' for triple space) when possible, to reduce the number of report records written. Although these
| carriage control characters may not be shown when you view an OUTFIL data set (depending upon
| how you view it), they will be used if you print the report.
| Notes:
| 1. DFSORT accepts but does not process the following OUTFIL operands: BLKSIZE=value,
| BUFLIM=value, BUFOFF=value, CARDS=value, CLOSE=value, DISK, ESDS, EXIT, FREEOUT,
| KSDS, LRECL=value, NOTPMK, OPEN=value, OUTPUT, PAGES=value, PRINT, PUNCH, REUSE,
| RRDS, SPAN, SYSLST, TAPE, and TOL.
| 2. Sample syntax is shown throughout this section. Complete OUTFIL statement examples are shown
| and explained under “OUTFIL Features—Examples” on page 186.
| FNAMES
|
| 55──FNAMES=──┬─ddname───────────┬───────────────────────────────────────────────────5%
| │ ┌─,────────┐ │
| └─(──6──ddname──┴─)─┘
| Specifies ddnames associated with the OUTFIL data sets for this OUTFIL statement. The ddnames
| specified using the FNAMES and FILES parameters constitute the output data sets for this OUTFIL
| group to which all of the other parameters for this OUTFIL statement apply.
| If FNAMES specifies the ddname in effect for the SORTOUT data set (that is, whichever is in effect
| among SORTOUT, name from SORTOUT=name, or ccccOUT from SORTDD=cccc), DFSORT will
| treat the data set associated with that ddname as an OUTFIL data set rather than as the SORTOUT
| data set.
| ddname specifies a 1- through 8-character ddname. A DD statement must be present for this
| ddname.
| Sample Syntax:
| OUTFIL FNAMES=(OUT1,OUT2,PRINTER,TAPE)
| OUTFIL FNAMES=BACKUP
| Default for FNAMES: If neither FNAMES nor FILES is specified for an OUTFIL statement, the default
| ddname is SORTOUT or ccccOUT if SORTDD=cccc is in effect.
| FILES
|
| 55──FILES=──┬─d─────────────┬───────────────────────────────────────────────────────5%
| ├─dd────────────┤
| ├─OUT───────────┤
| │ ┌─,─────┐ │
| └─(──6┬─d───┬┴─)─┘
| ├─dd──┤
| └─OUT─┘
| Specifies suffixes for ddnames to be associated with the OUTFIL data sets for this OUTFIL statement.
| The ddnames specified using the FNAMES and FILES parameters constitute the output data sets for
| this OUTFIL group to which all of the other parameters for this OUTFIL statement apply.
| If FILES specifies the ddname in effect for the SORTOUT data set (that is, whichever is in effect
| among SORTOUT, name from SORTOUT=name, or ccccOUT from SORTDD=cccc), DFSORT will
| treat the data set associated with that ddname as an OUTFIL data set rather than as the SORTOUT
| data set.
| d specifies the 1-character suffix to be used to form the ddname SORTOFd or ccccOFd if
| SORTDD=cccc is in effect. A DD statement must be present for this ddname.
| dd specifies the 2-character suffix to be used to form the ddname SORTOFdd or ccccOFdd if
| SORTDD=cccc is in effect. A DD statement must be present for this ddname.
| OUT specifies the suffix OUT is to be used to form the ddname SORTOUT or ccccOUT if
| SORTDD=cccc is in effect. A DD statement must be present for this ddname.
| Sample Syntax:
| OUTFIL FILES=(1,2,PR,TP)
| OUTFIL FILES=OUT
| Default for FILES: If neither FNAMES nor FILES is specified for an OUTFIL statement, the default
| ddname is SORTOUT or ccccOUT if SORTDD=cccc is in effect.
| STARTREC
|
| 55──STARTREC=n──────────────────────────────────────────────────────────────────────5%
| Specifies the OUTFIL input record at which OUTFIL processing is to start for this OUTFIL group.
| OUTFIL input records before this starting record are not included in the data sets for this OUTFIL
| group.
| n specifies the relative record number. The value for n starts at 1 (the first record) and is limited to 28
| digits (15 significant digits).
| Sample Syntax:
| OUTFIL FNAMES=SKIP2ð,STARTREC=21
| Default for STARTREC: 1.
| ENDREC
|
| 55──ENDREC=n────────────────────────────────────────────────────────────────────────5%
| Specifies the OUTFIL input record at which OUTFIL processing is to end for this OUTFIL group.
| OUTFIL input records after this ending record are not included in the data sets for this OUTFIL group.
| The ENDREC value must be equal to or greater than the STARTREC value if both are specified on
| the same OUTREC statement.
| n specifies the relative record number. The value for n starts at 1 (the first record) and is limited to 28
| digits (15 significant digits).
| Sample Syntax:
| OUTFIL FNAMES=TOP1ð,ENDREC=1ð
| OUTFIL FNAMES=FRONT,ENDREC=5ðð
| OUTFIL FNAMES=MIDDLE,STARTREC=5ð1,ENDREC=22ð5
| OUTFIL FNAMES=BACK,STARTREC=22ð6
| Default for ENDREC: The last OUTFIL input record.
| INCLUDE
|
| 55──INCLUDE=─┬─(logical expression)─┬───────────────────────────────────────────────5%
| ├─ALL──────────────────┤
| ├─(ALL)────────────────┤
| ├─NONE─────────────────┤
| └─(NONE)───────────────┘
| Selects the records to be included in the data sets for this OUTFIL group.
| Notes:
| 1. The INCLUDE statement applies to all input records; the INCLUDE parameter applies only to the
| OUTFIL input records for its OUTFIL group.
| 2. FORMAT=f can be specified with the INCLUDE statement, but not with the INCLUDE parameter.
| 3. D2 format can be specified with the INCLUDE statement, but not with the INCLUDE parameter.
| logical expression specifies one or more relational conditions logically combined based on fields in
| the OUTFIL input record. If the logical expression is true for a given record, the
| record is included in the data sets for this OUTFIL group.
| Any logical expression that is valid for the COND parameter of the INCLUDE
| control statement is also valid here. See “INCLUDE Control Statement” on
| page 75 for complete details.
| ALL or (ALL) specifies that all of the OUTFIL input records are to be included in the data sets
| for this OUTFIL group.
| NONE or (NONE) specifies that none of the OUTFIL input records are to be included in the data sets
| for this OUTFIL group.
| Sample Syntax:
| OUTFIL FNAMES=J69,INCLUDE=(5,3,CH,EQ,C'J69')
| OUTFIL FNAMES=J82,INCLUDE=(5,3,CH,EQ,C'J82')
| Default for INCLUDE: ALL.
| OMIT
|
| 55──OMIT=─┬─(logical expression)─┬──────────────────────────────────────────────────5%
| ├─ALL──────────────────┤
| ├─(ALL)────────────────┤
| ├─NONE─────────────────┤
| └─(NONE)───────────────┘
| Selects the records to be omitted from the data sets for this OUTFIL group.
| Notes:
| 1. The OMIT statement applies to all input records; the OMIT parameter applies only to the OUTFIL
| input records for its OUTFIL group.
| 2. FORMAT=f can be specified with the OMIT statement, but not with the OMIT parameter.
| 3. D2 format can be specified with the OMIT statement, but not with the OMIT parameter.
| logical expression specifies one or more relational conditions logically combined based on fields in
| the OUTFIL input record. If the logical expression is true for a given record, the
| record is omitted from the data sets for this OUTFIL group.
| Any logical expression valid for the COND parameter of the OMIT control state-
| ment is also valid here. See “OMIT Control Statement” on page 108 for complete
| details.
| ALL or (ALL) specifies that all of the OUTFIL input records are to be omitted from the data sets
| for this OUTFIL group.
| NONE or (NONE) specifies that none of the OUTFIL input records are to be omitted from the data
| sets for this OUTFIL group.
| Sample Syntax:
| OUTFIL FILES=ð1,OMIT=NONE
| OUTFIL OMIT=(5,1,BI,EQ,B'11ð.....')
| OUTFIL FNAMES=(OUT1,OUT2),
| OMIT=(7,2,CH,EQ,C'32',OR,18,3,CH,EQ,C'XYZ')
| Specifies that OUTFIL input records not included for any other OUTFIL group are to be included in the
| data sets for this OUTFIL group. SAVE operates in a global fashion over all of the other OUTFIL
| statements for which SAVE is not specified, enabling you to keep any OUTFIL input records that
| would not be kept otherwise.
| Sample Syntax:
| OUTFIL INCLUDE=(8,6,CH,EQ,C'ACCTNG'),FNAMES=GP1
| OUTFIL INCLUDE=(8,6,CH,EQ,C'DVPMNT'),FNAMES=GP2
| OUTFIL SAVE,FNAMES=NOT1OR2
| Default for SAVE: None; must be specified.
| SPLIT
|
| 55──SPLIT───────────────────────────────────────────────────────────────────────────5%
| Splits the output records in rotation among the data sets of this OUTFIL group. Thus for an OUTFIL
| group with n data sets, the first OUTFIL data set in the group will receive records 1, 1+n, 1+2n, ..., the
| second data set will receive records 2, 2+n, 2+2n, ..., and so on for each data set in the group, until all
| of the output records have been written. As a result, the records will be split as evenly as possible
| among all of the data sets in the group.
| The SPLIT parameter cannot be used with any of the report parameters (LINES, HEADER1,
| TRAILER1, HEADER2, TRAILER2, SECTIONS, and NODETAIL) since it doesn't make sense to split
| up the records of a report.
| Sample Syntax:
| OUTFIL FNAMES=(PIPE1,PIPE2,PIPE3,PIPE4),SPLIT
| OUTFIL FNAMES=(TAPE1,TAPE2),SPLIT,
| INCLUDE=(8,2,ZD,EQ,27),OUTREC=(5X,1,75)
| Default for SPLIT: None; must be specified.
| OUTREC
|
| ┌─,────────────────────────────┐
| 55──OUTREC=(──6─┬────┬──┬─s────────────────┬─┴─)─────────────────────────────────────5%
| └─c:─┘ ├─p,m─┬────┬───────┤
| │ └─,a─┘ │
| ├─p────────────────┤
| ├─p,m,HEX──────────┤
| ├─p,HEX────────────┤
: ├─p,m,Y2x──────────┤
| ├─p,m,f─┬───────┬──┤
| │ └─,edit─┘ │
| └─p,m,lookup───────┘
| Specifies how the records in the data sets for this OUTFIL group are to be reformatted. OUTREC can
| define which parts of the OUTFIL input record are included in the reformatted OUTFIL output record,
| in what order the parts appear, how they are aligned, and how they are edited or changed. You can
| also insert separators before, between, and after the input fields.
| You can use the OUTREC parameter in conjunction with the CONVERT parameter to convert
| variable-length record data sets to fixed-length record data sets.
| The OUTREC parameter can be used with any or all of the report parameters (LINES, HEADER1,
| TRAILER1, HEADER2, TRAILER2, SECTIONS, and NODETAIL) to produce reports. The report
| parameters specify the report records to be produced, while the OUTREC parameter specifies the
| reformatted data records to be produced. DFSORT uses ASA carriage control characters to control
| page ejects and the placement of the lines in your report, according to your specifications.
| When you create an OUTFIL report, the length for the data records must be equal to or greater than
| the maximum report record length. You can use the OUTREC parameter to force a length for the data
| records that is longer than any report record; you can then either let DFSORT compute and set the
| LRECL, or ensure that the computed LRECL is equal to the existing or specified LRECL. Remember
| to allow an extra byte in the LRECL for the ASA carriage control character.
| For example, if your data records are 40 bytes, but your longest report record is 60 bytes, you can use
| an OUTREC parameter such as:
| OUTREC=(1,4ð,8ð:X)
| DFSORT will then set the LRECL to 81 (1 byte for the ASA carriage control character plus 80 bytes
| for the length of the data records), and pad the data records with blanks on the right.
| Note: The OUTREC statement applies to all input records, whereas the OUTREC parameter of the
| OUTFIL statement applies only to the OUTFIL input records for its OUTFIL group. The OUTREC
| parameter of the OUTFIL statement provides features such as HEX, edit, and change that are not
| available with the OUTREC statement.
| You can choose to include any or all of the following in your reformatted OUTFIL output records:
| The reformatted OUTFIL output record consists of the separation and input fields you select, in the
| order in which you specify them, aligned on the boundaries or in the columns you indicate, and edited
| or changed in the ways you specify.
| c: specifies the column in which the first position of the associated input or separation field
| is to appear, relative to the start of the reformatted OUTFIL output record. Count the
| RDW (variable-length output records only) but not the carriage control character (for
| reports) when specifying c:. That is, 1: indicates the first byte of the data in fixed-length
| output records and 5: indicates the first byte of the data in variable-length output records.
| Unused space preceding the specified column is padded with EBCDIC blanks. The fol-
| lowing rules apply:
| c must not overlap the previous input field or separation field in the reformatted
| OUTFIL output record.
| For variable-length records, c: must not be specified before the first input field (the
| record descriptor word) nor after the variable part of the OUTFIL input record.
| The colon (:) is treated like the comma (,) or semicolon (;) for continuation to another
| line.
| See Figure 26 on page 94 for examples of valid and invalid column alignment.
| s specifies that a separation field is to appear in the reformatted OUTFIL output record. It
| can be specified before or after any input field. Consecutive separation fields may be
| specified. For variable-length records, s must not be specified before the first input field
| (the record descriptor word) or after the variable part of the OUTFIL input record. Per-
| missible values are nX, nZ, nC'xx...x', and nX'yy...yy'.
| p,m,a specifies that an unedited input field is to appear in the reformatted OUTFIL output
| record.
| p specifies the first byte of the input field relative to the beginning of the
| OUTFIL input record. The first data byte of a fixed-length record has relative
| position 1. The first data byte of a variable-length record has relative position
| 5, because the first four bytes are occupied by the RDW. All fields must start
| on a byte boundary, and no field can extend beyond byte 32 752. See
| H Halfword aligned. The displacement (p-1) of the field from the beginning
| of the reformatted OUTFIL input record, in bytes, is a multiple of 2 (that
| is, position 1, 3, 5, and so forth).
| F Fullword aligned. The displacement is a multiple of 4 (that is, position 1,
| 5, 9, and so forth).
| D Doubleword aligned. The displacement is a multiple of 8 (that is, posi-
| tion 1, 9, 17, and so forth).
| Alignment can be necessary if, for example, the data is used in a COBOL
| application program where COMPUTATIONAL items are aligned through the
| SYNCHRONIZED clause. Unused space preceding aligned fields are always
| padded with binary zeros.
| p specifies the unedited variable part of the OUTFIL input record (that part beyond the
| minimum record length) is to appear in the reformatted OUTFIL output record as the last
| field. Note that if the reformatted OUTFIL record includes only the RDW and the variable
| part of the OUTFIL input record, “null” records containing only an RDW may result.
| A value must be specified for p that is less than or equal to the minimum OUTFIL input
| record length plus 1 byte.
| p,m,HEX specifies the hexadecimal representation of an input field is to appear in the reformatted
| OUTFIL output record.
| m specifies the length in bytes of the input field. The value for m must be 1 to
| 16 376.
| HEX requests hexadecimal representation of the input field. Each byte of the input
| field is replaced by its two-byte equivalent. For example, the characters AB
| would be replaced by C1C2.
| p,HEX specifies the hexadecimal representation of the variable part of the OUTFIL input record
| (that part beyond the minimum record length) is to appear in the reformatted OUTFIL
| output record as the last field. Note that if the reformatted OUTFIL record includes only
| the RDW and the variable part of the OUTFIL input record, “null” records containing only
| an RDW may result.
: p,m,Y2x specifies the four-digit character year representation of a two-digit year input field is to
: appear in the reformatted OUTFIL output record.
: Y2x requests four-digit character year representation of the input field for one of
: the two-digit Y2 field formats shown in the table below.
: The century window established by the Y2PAST option in effect will be used to produce
: the correct four-digit character year for output. For example, the control statements:
: OPTION COPY
: OUTFIL FNAMES=NEW,OUTREC=(2X,1,2,C' = ',1,2,Y2C,8ð:X)
: in conjunction with a century window of 1915-2014, would result in the following output in
: the NEW data set:
: 23 = 1923
: 98 = 1998
: ðð = 2ððð
: ð2 = 2ðð2
: 15 = 1915
: 14 = 2ð14
| p A value must be specified for p that is less than or equal to the minimum record length plus
| 1 byte.
| HEX requests hexadecimal representation of the variable part of the OUTFIL input record. Each
| byte of the input field is replaced by its two-byte equivalent. For example, the characters
| AB would be replaced by C1C2.
| Sample Syntax:
| Fixed input records:
| OUTFIL FNAMES=(OUT1,OUT2),
| OUTREC=(1:5,1ð,15:8C'ð',25:2ð,15,8ð:X)
| p,m,f,edit specifies that an edited numeric input field is to appear in the reformatted OUTFIL output
| record. You can edit BI, FI, PD, ZD, and CSF/FS fields using either pre-defined edit masks
| (M0-M25) or specific edit patterns you define. You can control the way the output fields look
| with respect to length, leading or suppressed zeros, symbols (for example, the thousands
| separator and decimal point), leading and trailing positive and negative signs, and so on.
| m specifies the length in bytes of the numeric field. The length must include the
| sign, if the data is signed. See Figure 32 for permissible length values.
| edit
|
| 55───┬─Mn───────────────────────────┬──────────────────────────────5
| └──┬─EDIT=─┬──┬─(pattern)───┬──┘
| └─EDxy=─┘ └─('pattern')─┘
|
| 5──┬────────────────────────────┬──┬───────────────────┬──────────5%
| └─,─┬─SIGNS=─┬─(lp,ln,tp,tn)─┘ └─,LENGTH=─┬─n───┬──┘
| └─SIGNz=─┘ └─(n)─┘
| Specifies how the numeric field is to be edited for output. If an Mn, EDIT, or
| EDxy parameter is not specified, the numeric field is edited using the M0 edit
| mask.
| The implied length of the edited output field depends on the number of
| digits and characters needed for the pattern of the particular edit mask
| used. The LENGTH parameter can be used to change the implied
| length of the edited output field.
| The number of digits needed depends on the format and length of the
| numeric field as follows:
| The length of the output field can be represented as follows for each
| pattern, where d is the number of digits needed, as shown in
| Figure 35, and the result is rounded down to the nearest integer:
| OUTFIL OUTREC=(5,7,ZD,M5)
| Determine the specific pattern and its length, using the preceding
| tables.
| Map the digits of the numeric value to the pattern.
| If the value is positive, replace the leading and trailing signs (if
| any) with the characters for positive values shown in Figure 34 on
| page 154. Otherwise, replace the leading and trailing signs (if
| any) with the characters for negative values shown in that same
| table.
| Replace all digits before the first non-zero (I) or significant digit (T)
| with blanks.
| Float the leading sign (if any) to the right, next to the first non-zero
| (I) or significant digit (T).
| EDIT specifies an edit pattern for presenting numeric data. If the pre-
| defined edit masks (M0-M25) are not suitable for presenting your
| numeric data, EDIT gives you the flexibility to define your own edit pat-
| terns. The elements you use to specify the pattern are the same as
| those used for the edit masks: I, T, S, and printable characters.
| However, S will not be recognized as a sign indicator unless the
| SIGNS parameter is also specified.
| The implied length of the edited output field is the same as the length
| of the pattern. The LENGTH parameter can be used to change the
| implied length of the edited output field.
| To illustrate conceptually how DFSORT produces the edited output
| from the numeric value, consider the following example:
| OUTFIL OUTREC=(1,5,ZD,EDIT=(\\I/ITTTCR))
| Map the digits of the numeric value to the pattern, padding on the
| left with zeros, if necessary.
| If the value is positive, replace the leading and trailing signs (if
| any) with the characters for positive values specified by the SIGNS
| parameter and replace any characters between the last digit and
| the trailing sign (if any) with blanks. Otherwise, replace the
| leading and trailing signs (if any) with the characters for negative
| values specified by the SIGNS parameter and keep any characters
| between the last digit and the trailing sign (if any).
| Replace all digits before the first non-zero (I) or significant digit (T)
| with blanks.
| Float all characters (if any) before the first digit in the pattern to the
| right, next to the first non-zero (I) or significant digit (T).
| SIGNS specifies the sign values to be used when editing numeric values
| according to the edit mask (Mn) or pattern (EDIT or EDxy). You can
| specify any or all of the four sign values. Any value not specified must
| be represented by a comma. Blank will be used for any sign value
| you do not specify. As examples, SIGNS=(+,-) specifies + for lp, - for
| ln, blank for tp, and blank for tn; SIGNS=(,,+,-) specifies blank for lp,
| blank for ln, + for tp, and - for tn.
| If you want to use any of the following characters as sign values, you
| must enclose them in single apostrophes: comma, blank, or unbal-
| anced left or right parentheses. A single apostrophe must be specified
| as four single apostrophes (that is, two single apostrophes enclosed in
| single apostrophes).
| A semicolon cannot be substituted for a comma as the delimiter
| between sign characters.
| SIGNz specifies the sign values to be used when editing numeric values
| according to the edit pattern (EDIT or EDxy). SIGNz is a special vari-
| ation of SIGNS which allows another character to be substituted for S
| in the pattern. For example, if you use SIGNX instead of SIGNS, you
| must use X in the pattern instead of S to identify a sign. If EDIT is
| specified, z must not be I or T. If EDxy is specified, z must not be the
| same character as either x or y. You can select z from: A-Z, #, $, @,
| and 0-9.
| LENGTH specifies the length of the edited output field. If the implied length of
| the edited output field produced using an edit mask or edit pattern is
| not suitable for presenting your numeric data, LENGTH can be used to
| make the edited output field shorter or longer.
| n specifies the length of the edited output field. The value for n
| must be between 1 and 22.
| LENGTH does not change the pattern used, only the length of the
| resulting edited output field. For example, as discussed previously for
| Mn, if you specify:
| OUTFIL OUTREC=(5,1,ZD,M4)
| the pattern will be C'ST' rather than C'ST.TT' because the digit
| length is 1. Specifying:
| OUTFIL OUTREC=(5,1,ZD,M4,LENGTH=5)
| will change the pattern to C' ST', not to C'ST.TT'.
| If you specify a value for n that is shorter than the implied length, trun-
| cation will occur after editing. For example, if you specify:
| OUTFIL OUTREC=(1,5,ZD,EDIT=($IIT.TT),LENGTH=5)
| with a value of C'12345', editing according to the specified $IIT.TT
| pattern will produce C'$123.45', but the specified length of 5 will trun-
| cate this to C'23.45'.
: If you specify a value for n that is longer than the implied length,
: padding on the left with blanks will occur after editing. For example, if
| you specify:
| OUTFIL OUTREC=(1,5,ZD,EDIT=($IIT.TT),LENGTH=1ð)
| with a value of C'12345', editing according to the specified $IIT.TT
| pattern will produce C'$123.45', but the specified length of 10 will pad
| this to C' $123.45'.
| Sample Syntax:
| OUTFIL FNAMES=OUT1,OUTREC=(5:21,8,ZD,M19,25:46,5,ZD,M13)
| OUTFIL FILES=1,OUTREC=(5,2,BI,C' \ ',18,2,BI,8ð:X),
| ENDREC=2ððð,OMIT=(5,2,BI,EQ,18,2,BI)
| OUTFIL FILES=(2,3),
| OUTREC=(11:35,6,FS,SIGNS=(,,+,-),LENGTH=1ð,
| 31:8,4,PD,EDIT=(\\II,IIT.TTXS),SIGNS=(,,+,-))
| p,m,lookup specifies that a character or hexadecimal string from a lookup table is to appear in the refor-
| matted OUTFIL output record. You can use p,m,lookup to select a specified character or
| hexadecimal string for the output field based on matching an input value against character,
| hexadecimal, or bit constants.
| m specifies the length in bytes of the input field to be compared to the find-
| constants. The value for m must be 1 to 64 if character or hexadecimal find-
| constants are used, or 1 if bit find-constants are used.
| lookup
|
| ┌──
─────────┐
| 55──CHANGE=(v──6,find,set┴─)─┬──────────────────────┬──────────────5%
| └─,NOMATCH=(─┬─set─┬─)─┘
| └─q,n─┘
| Specifies how the input field is to be changed to the output field, using a lookup
| table.
| NOMATCH specifies the action to be taken if an input field value does not
| match any of the find-constants. If you do not specify NOMATCH,
| and no match is found for any input value, DFSORT will terminate
| processing.
| If you specify NOMATCH, it must follow CHANGE.
| Sample Syntax:
| OUTFIL FILES=1,
| OUTREC=(11,1,
| CHANGE=(6,
| C'R',C'READ',
| C'U',C'UPDATE',
| X'FF',C'EMPTY',
| C'A',C'ALTER'),
| NOMATCH=(11,6),
| 4X,
| 21,1,
| CHANGE=(1ð,
| B'.1......',C'VSAM',
| B'.ð......',C'NON-VSAM'))
| CONVERT
|
| 55──CONVERT─────────────────────────────────────────────────────────────────────────5%
| Specifies that variable-length OUTFIL input records are to be converted to fixed-length OUTFIL output
| records for this OUTFIL group. You must use the OUTREC parameter to define the reformatted
| records; all OUTREC parameters are allowed except p and p,HEX. Remember that the data for the
| variable-length input records starts at position 5 (after the RDW), while the data for the fixed-length
| output records starts at position 1 (no RDW).
| All OUTFIL data sets for which CONVERT is used must have or will be given fixed-length record
| formats.
| If CONVERT is specified for fixed-length input records, it will not be used.
| Sample Syntax:
| OUTFIL FNAMES=VTOF,CONVERT,OUTREC=(1:5,14,35:32,8,5ð:22,6)
| Default for CONVERT: None; must be specified.
| LINES
|
| 55──LINES=n─────────────────────────────────────────────────────────────────────────5%
| Specifies the number of lines per page to be used for the reports produced for this OUTFIL group.
| DFSORT uses ASA carriage control characters to control page ejects and the placement of the lines
| in your report, according to your specifications.
| n specifies the number of lines per page. The value for n must be between 1 and 255.
| However, n—or the default for n if LINES is not specified—must be greater than or equal to
| the number of lines needed for each of the following:
| Sample Syntax:
| OUTFIL FNAMES=RPT1,LINES=5ð
| Default for LINES: None; must be specified, unless HEADER1, TRAILER1, HEADER2, TRAILER2,
| SECTIONS, or NODETAIL is specified, in which case the default for LINES is 60.
| HEADER1
|
| ┌─,──────────────────────────────────┐
| 55──HEADER1=(──6─┬────┬──┬─r──────────────────────┬─┴─)──────────────────────────────5%
| └─c:─┘ ├─p,m────────────────────┤
| ├─┬─DATE───────────────┬─┤
| │ ├─&DATE──────────────┤ │
| │ └──┬─DATE=──┬─(abcd)─┘ │
| │ └─&DATE=─┘ │
| ├─┬─TIME──────────────┬──┤
| │ ├─&TIME─────────────┤ │
| │ └──┬─TIME=──┬─(abc)─┘ │
| │ └─&TIME=─┘ │
| └─┬─PAGE──┬──────────────┘
| └─&PAGE─┘
| Specifies the report header to be used for the reports produced for this OUTFIL group. The report
| header appears by itself as the first page of the report. DFSORT uses ASA carriage control charac-
| ters to control page ejects and the placement of the lines in your report, according to your specifica-
| tions.
| You can choose to include any or all of the following report elements in your report header:
| The report header consists of the elements you select, in the order in which you specify them, and in
| the columns or lines you specify.
| c: specifies the column in which the first position of the associated report element is to
| appear, relative to the start of the data in the report record. Ignore the RDW (variable-
| length report records only) and carriage control character when specifying c:. That is, 1:
| indicates the first byte of the data in the report record for both fixed-length and variable-
| length report records.
| Unused space preceding the specified column is padded with EBCDIC blanks. The fol-
| lowing rules apply:
| r specifies that blanks or a character string are to appear in the report record, or that a
| new report record is to be started in the header, with or without intervening blank lines.
| These report elements can be specified before or after any other report elements. Con-
| secutive character strings or blank lines can be specified. Permissible values are nX,
| n'xx...x', nC'xx...x', /.../ and n/.
| p,m specifies that an unedited input field, from the first OUTFIL input record for which a data
| record appears in the report, is to appear in the report record.
| p specifies the first byte of the input field relative to the beginning of the
| OUTFIL input record. The first data byte of a fixed-length record has relative
| position 1. The first data byte of a variable-length record has relative position
| 5, because the first four bytes are occupied by the RDW. All fields must start
| on a byte boundary, and no field can extend beyond byte 32 752. See
| “OUTFIL Statements Notes” on page 184 for special rules concerning
| variable-length records.
| m specifies the length in bytes of the input field. The value for m must be
| between 1 and 256.
| DATE specifies that the current date is to appear in the report record in the form 'mm/dd/yy',
| where mm represents the month (01-12), dd represents the day (01-31), and yy repres-
| ents the last two digits of the year (for example, 95).
| DATE=(abcd) specifies that the current date is to appear in the report record in the form 'adbdc',
| where a, b, and c indicate the order in which the month, day, and year are to appear and
| whether the year is to appear as two or four digits, and d is the character to be used to
| separate the month, day and year.
| For a, b, and c, use M to represent the month (01-12), D to represent the day (01-31), Y
| to represent the last two digits of the year (for example, 95), or 4 to represent the four
| digits of the year (for example, 1995). M, D, and Y or 4 can each be specified only
| once. Examples: DATE=(DMY.) would produce a date of the form 'dd.mm.yy' which on
| March 29, 1995, would appear as '29.03.95'. DATE=(4MD-) would produce a date of the
| form 'yyyy-mm-dd' which on March 29, 1995, would appear as '1995-03-29'.
| a, b, c, and d must be specified.
| TIME specifies that the current time is to appear in the report record in the form 'hh:mm:ss',
| where hh represents the hour (00-23), mm represents the minutes (00-59), and ss
| represents the seconds (00-59).
| TIME=(abc) specifies that the current time is to appear in the report record in the form 'hhcmmcss'
| (24-hour time) or 'hhcmmcss xx' (12-hour time).
| If ab is 24, the time is to appear in the form 'hhcmmcss' (24-hour time) where hh repres-
| ents the hour (00-23), mm represents the minutes (00-59), ss represents the seconds
| (00-59), and c is the character used to separate the hours, minutes, and seconds.
| Example: TIME=(24.) would produce a time of the form 'hh.mm.ss' which at 08:25:13 pm
| would appear as '20.25.13'.
| If ab is 12, the time is to appear in the form 'hhcmmcss xx' (12-hour time) where hh
| represents the hour (01-12), mm represents the minutes (00-59), ss represents the
| seconds (00-59), xx is am or pm, and c is the character used to separate the hours,
| minutes, and seconds. Example: TIME=(12.) would produce a time of the form
| 'hh.mm.ss xx' which at 08:25:13 pm would appear as '08.25.13 pm'.
| ab and c must be specified.
| PAGE specifies that the page number is to appear in the report record. The page number for
| the report header appears as ' 1'.
| If HEADER1 is specified with PAGE, PAGE for the report header (first page) will be
| ' 1' and PAGE for the next page (second page) will be ' 2'. If HEADER1 is
| specified without PAGE, PAGE for the page after the report header (second page) will be
| ' 1' (typical of a report with a cover sheet).
| Sample Syntax:
| OUTFIL FNAMES=(RPT1,RPT2),
| HEADER1=(3ð:'January Report',4/,
| 28:'Prepared on ',DATE,//,
| 32:'at ',TIME,//,
| 28:'using DFSORT''S OUTFIL',5/,
| 1ð:'Department: ',12,8,5ð:'Page:',PAGE)
| Specifies the report trailer to be used for the reports produced for this OUTFIL group. The report
| trailer appears by itself as the last page of the report. DFSORT uses ASA carriage control characters
| to control page ejects and the placement of the lines in your report, according to your specifications.
| You can choose to include any or all of the following report elements in your report trailer:
| The report trailer consists of the elements you select, in the order in which you specify them, and in
| the columns or lines you specify.
| r specifies that blanks or a character string are to appear in the report record, or that a
| new report record is to be started in the trailer, with or without intervening blank lines.
| These report elements can be specified before or after any other report elements.
| Consecutive character strings or blank lines can be specified. Permissible values are
| nX, n'xx...x', nC'xx...x', /.../, and n/.
| p,m specifies that an unedited input field, from the last OUTFIL input record for which a
| data record appears in the report, is to appear in the report record.
| &DATE &DATE can be used instead of DATE. See &DATE under HEADER1.
| &TIME &TIME can be used instead of TIME. See &TIME under HEADER1.
| PAGE specifies that the current page number is to appear in the report record. The page
| number for the trailer appears as 6 digits, right-justified, with leading zeros suppressed.
| For example, if the page is numbered 12, it appears as ' 12'.
| COUNT specifies that the count of data records in the report is to appear in the report record.
| The count appears as 8 digits, right-justified, with leading zeros suppressed. For
| example, if there are 6810 data records in the report, the count appears as
| ' 6810'.
| SUBCOUNT specifies that the running count of data records in the report is to appear in the report
| record. The running count appears as 8 digits, right-justified, with leading zeros sup-
| pressed.
| For TRAILER1, the running count is the same as the count, so SUBCOUNT produces
| the same value as COUNT.
| TOTAL specifies that an edited total, for the values of a numeric input field in all data records
| of the report, is to appear in the report record.
| TOT can be used instead of TOTAL.
| p,m,f,edit specifies the numeric input field for which the total is to be produced and
| how the output field (that is, the total) is to be edited.
: See p,m,f,edit under OUTREC for further details. However, note PD0 is
: not allowed for TOTAL and that for TOTAL, the number of digits needed
| with Mn edit masks is the maximum for that format type rather than the
| actual length of the field, as follows:
| MIN specifies that an edited minimum, for the values of a numeric input field in all data
| records of the report, is to appear in the report record.
| p,m,f,edit specifies the numeric input field for which the minimum is to be produced
| and how the output field (that is, the minimum) is to be edited.
: See p,m,f,edit under OUTREC for further details. However, note that
: PD0 is not allowed for MIN.
| MAX specifies that an edited maximum, for the values of a numeric input field in all data
| records of the report, is to appear in the report record.
| p,m,f,edit specifies the numeric input field for which the maximum is to be produced
| and how the output field (that is, the maximum) is to be edited.
: See p,m,f,edit under OUTREC for further details. However, note that
: PD0 is not allowed for MAX.
| AVG specifies that an edited average, for the values of a numeric input field in all data
| records of the report, is to appear in the report record. The average (or mean) is
| calculated by dividing the total by the count and rounding down to the nearest integer.
| For example:
| +23ð5 / 152 = +15
| -23ð5 / 152 = -15
| p,m,f,edit specifies the numeric input field for which the average is to be produced
| and how the output field (that is, the average) is to be edited.
: See p,m,f,edit under OUTREC for further details. However, note that
: PD0 is not allowed for AVG.
| SUBTOTAL specifies that an edited running total, for the values of a numeric input field in all data
| records of the report, is to appear in the report record.
| SUBTOT or SUB can be used instead of SUBTOTAL.
| For TRAILER1, the running total is the same as the total, so SUBTOTAL produces the
| same value as TOTAL.
| p,m,f,edit specifies the numeric input field for which the running total is to be
| produced and how the output field (that is, the running total) is to be
| edited.
| See p,m,f,edit under TOTAL for further details.
| SUBMIN specifies that an edited running minimum, for the values of a numeric input field in all
| data records of the report, is to appear in the report record.
| For TRAILER1, the running minimum is the same as the minimum, so SUBMIN
| produces the same value as MIN.
| p,m,f,edit specifies the numeric input field for which the running minimum is to be
| produced and how the output field (that is, the running minimum) is to be
| edited.
: See p,m,f,edit under OUTREC for further details. However, note that
: PD0 is not allowed for SUBMIN.
| SUBMAX specifies that an edited running maximum, for the values of a numeric input field in all
| data records of the report, is to appear in the report record.
| For TRAILER1, the running maximum is the same as the maximum, so SUBMAX
| produces the same value as MAX.
| p,m,f,edit specifies the numeric input field for which the running maximum is to be
| produced and how the output field (that is, the running maximum) is to be
| edited.
: See p,m,f,edit under OUTREC for further details. However, note that
: PD0 is not allowed for SUBMAX.
| SUBAVG specifies that an edited running average, for the values of a numeric input field in all
| data records of the report, is to appear in the report record.
| For TRAILER1, the running average is the same as the average, so SUBAVG
| produces the same value as AVG.
| p,m,f,edit specifies the numeric input field for which the running average is to be
| produced and how the output field (that is, the running average) is to be
| edited.
: See p,m,f,edit under OUTREC for further details. However, note that
: PD0 is not allowed for SUBAVG.
| Sample Syntax:
| OUTFIL FNAMES=RPT,
| TRAILER1=(5/,
| 1ð:'Summary of Report for Division Revenues',3/,
| 1ð:'Number of divisions reporting: ',COUNT,2/,
| 1ð:'Total revenue: ',TOTAL=(25,5,PD,M5),2/,
| 1ð:'Lowest revenue: ',MIN=(25,5,PD,M5),2/,
| 1ð:'Highest revenue: ',MAX=(25,5,PD,M5),2/,
| 1ð:'Average revenue: ',AVG=(25,5,PD,M5))
| Specifies the page header to be used for the reports produced for this OUTFIL group. The page
| header appears at the top of each page of the report, except for the report header page (if any) and
| report trailer page (if any). DFSORT uses ASA carriage control characters to control page ejects and
| the placement of the lines in your report, according to your specifications.
| You can choose to include any or all of the following report elements in your page header:
| The page header consists of the elements you select, in the order in which you specify them, and in
| the columns or lines you specify.
| p,m specifies that an unedited input field, from the first OUTFIL input record for which a data
| record appears on the page, is to appear in the report record. See p,m under HEADER1
| for further details.
| &DATE &DATE can be used instead of DATE. See &DATE under HEADER1.
| &TIME &TIME can be used instead of TIME. See &TIME under HEADER1.
| &TIME=(abc) &TIME=(abc) can be used instead of TIME=(abc). See &TIME=(abc) under HEADER1.
| PAGE specifies that the current page number is to appear in the OUTFIL report record. The
| page number for the header appears as 6 digits, right-justified, with leading zeros sup-
| pressed. For example, if the page is numbered 3, it appears as ' 3'.
| Sample Syntax:
| OUTFIL FNAMES=STATUS,
| HEADER2=(5:'Page ',PAGE,' of Status Report for ',DATE=(MD4/),
| ' at ',TIME=(12:),2/,
| 1ð:'Item ',2ð:'Status ',35:'Count',/,
| 1ð:'-----',2ð:'------------',35:'-----'),
| OUTREC=(1ð:6,5,
| 2ð:14,1,CHANGE=(12,
| C'S',C'Ship',
| C'H',C'Hold',
| C'T',C'Transfer'),
| NOMATCH=(C'\Check Code\'),
| 36:39,4,ZD,M1ð,
| 132:X)
| Default for HEADER2: None; must be specified.
| TRAILER2
|
| ┌─,─────────────────────────────────────────────┐
| 55──TRAILER2=(──6─┬────┬──┬─r─────────────────────────────────┬─┴─)──────────────────5%
| └─c:─┘ ├─p,m───────────────────────────────┤
| ├─┬─DATE───────────────┬────────────┤
| │ ├─&DATE──────────────┤ │
| │ └──┬─DATE=──┬─(abcd)─┘ │
| │ └─&DATE=─┘ │
| ├─┬─TIME──────────────┬─────────────┤
| │ ├─&TIME─────────────┤ │
| │ └──┬─TIME=──┬─(abc)─┘ │
| │ └─&TIME=─┘ │
| ├─┬─PAGE──┬─────────────────────────┤
| │ └─&PAGE─┘ │
| ├─COUNT─────────────────────────────┤
| ├─SUBCOUNT──────────────────────────┤
| ├─┬─TOTAL=─┬──(p,m,f─┬───────┬─)────┤
| │ └─TOT=───┘ └─,edit─┘ │
| ├─MIN=──(p,m,f─┬───────┬─)──────────┤
| │ └─,edit─┘ │
| ├─MAX=──(p,m,f─┬───────┬─)──────────┤
| │ └─,edit─┘ │
| ├─AVG=──(p,m,f─┬───────┬─)──────────┤
| │ └─,edit─┘ │
| ├─┬─SUBTOTAL=─┬──(p,m,f─┬───────┬─)─┤
| │ ├─SUBTOT=───┤ └─,edit─┘ │
| │ └─SUB=──────┘ │
| ├─SUBMIN=──(p,m,f─┬───────┬─)───────┤
| │ └─,edit─┘ │
| ├─SUBMAX=──(p,m,f─┬───────┬─)───────┤
| │ └─,edit─┘ │
| └─SUBAVG=──(p,m,f─┬───────┬─)───────┘
| └─,edit─┘
| Specifies the page trailer to be used for the reports produced for this OUTFIL group. The page trailer
| appears at the very bottom of each page of the report (as specified or defaulted by the LINES value),
| except for the report header page (if any) and report trailer page (if any). DFSORT uses ASA carriage
| control characters to control page ejects and the placement of the lines in your report, according to
| your specifications.
| You can choose to include any or all of the following report elements in your page trailer:
| – Running total, minimum, maximum, or average for each specified ZD, PD, BI, FI, or CSF/FS
| numeric input field in the data records up to this point, edited to contain signs, decimal points,
| leading zeros or no leading zeros, and so on.
| The page trailer consists of the elements you select, in the order in which you specify them, and in the
| columns or lines you specify.
| p,m specifies that an unedited input field, from the last OUTFIL input record for which a
| data record appears on the page, is to appear in the report record. See p,m under
| TRAILER1 for further details.
| &DATE &DATE can be used instead of DATE. See &DATE under HEADER1.
| &TIME &TIME can be used instead of TIME. See &TIME under HEADER1.
| &PAGE &PAGE can be used instead of PAGE. See &PAGE under TRAILER1.
| COUNT specifies that the count of data records on the page is to appear in the report record.
| The count appears as 8 digits, right-justified, with leading zeros suppressed. For
| example, if page 1 has 40 records, page 2 has 40 records, and page 3 has 26
| records, COUNT will show ' 40' for page 1, ' 40' for page 2, and
| ' 26' for page 3.
| SUBCOUNT specifies that the running count of data records up to this point in the report is to
| appear in the report record. The running count appears as 8 digits, right-justified, with
| leading zeros suppressed. The running count accumulates the count for all pages up
| to and including the current page. For example, if page 1 has 40 records, page 2 has
| 40 records, and page 3 has 26 records, SUBCOUNT will show ' 40' for page 1,
| ' 80' for page 2, and ' 106' for page 3.
| TOTAL specifies that an edited total, for the values of a numeric input field in the data records
| on the page, is to appear in the report record.
| TOT can be used instead of TOTAL.
| MIN specifies that an edited minimum, for the values of a numeric input field in the data
| records on the page, is to appear in the report record.
| MAX specifies that an edited maximum, for the values of a numeric input field in the data
| records on the page, is to appear in the report record.
| AVG specifies that an edited average, for the values of a numeric input field in the data
| records on the page, is to appear in the report record.
| SUBTOTAL specifies that an edited running total, for the values of a numeric input field in the data
| records up to this point in the report, is to appear in the report record. The running
| total accumulates the total for all pages up to and including the current page. For
| example, if the total for a selected numeric field is +200 for page 1, -250 for page 2,
| and +90 for page 3, SUBTOTAL will be +200 for page 1, -50 for page 2, and +40 for
| page 3.
| SUBTOT or SUB can be used instead of SUBTOTAL.
| SUBMIN specifies that an edited running minimum, for the values of a numeric input field in the
| data records up to this point in the report, is to appear in the report record. The
| running minimum selects the minimum from all pages up to and including the current
| page. For example, if the minimum for a selected numeric field is +200 for page 1,
| -250 for page 2, and +90 for page 3, SUBMIN will be +200 for page 1, -250 for page
| 2, and -250 for page 3.
| SUBMAX specifies that an edited running maximum, for the values of a numeric input field in the
| data records up to this point in the report, is to appear in the report record. The
| running maximum selects the maximum from all pages up to and including the current
| page. For example, if the maximum for a selected numeric field is -100 for page 1,
| +250 for page 2, and +90 for page 3, SUBMAX will be -100 for page 1, +250 for page
| 2, and +250 for page 3.
| SUBAVG specifies that an edited running average, for the values of a numeric input field in the
| data records up to this point in the report, is to appear in the report record. The
| running average computes the average for all pages up to and including the current
| page. For example, if the count of data records and total for a selected numeric field
| are 60 and +2205 for page 1, respectively, 60 and -6252 for page 2, respectively, and
| 23 and -320 for page 3, respectively, SUBAVG will be +36 for page 1, -33 for page 2,
| and -30 for page 3.
| Sample Syntax:
| OUTFIL FNAMES=STATS,
| STARTREC=3,
| OUTREC=(2ð:23,3,PD,M16,
| 3ð:4ð,3,PD,M16,
| 8ð:X),
| TRAILER2=(/,2:'Average on page:',
| 2ð:AVG=(23,3,PD,M16),
| 3ð:AVG=(4ð,3,PD,M16),/,
| 2:'Average so far:',
| 2ð:SUBAVG=(23,3,PD,M16),
| 3ð:SUBAVG=(4ð,3,PD,M16))
| Default for TRAILER2: None; must be specified.
| SECTIONS
|
| ┌─,───────────────────────────────────────────┐
| │ ┌─,────────────────────────────────────┐ │
| 55──SECTIONS=──(──6p,m──6┬─SKIP=─┬─P──┬───────────────────────┬┴─┴─)──────────────────5%
| │ ├─L──┤ │
| │ └─nL─┘ │
| │ ┌─,───┐ │
| ├─HEADER3=(──6field┴─)─┬───────────┬──┤
| │ └─,PAGEHEAD─┘ │
| │ ┌─,───┐ │
| └─TRAILER3=(──6field┴─)───────────────┘
| Specifies the section break processing to be used for the reports produced for this OUTFIL group. A
| section break field divides the report into sets of sequential OUTFIL input records with the same binary
| value for that field, which result in corresponding sets of data records (that is, sections) in the report.
| A break is said to occur when the binary value changes. Of course, since a break can occur in any
| record, the data records of a section can be split across pages in your report.
| For each section break field you specify, you can choose to include any or all of the following:
| DFSORT uses ASA carriage control characters to control page ejects and the placement of the lines
| in your report, according to your specifications.
| If multiple section break fields are used, they are processed in first-to-last order, in the same way they
| would be sorted by these fields. In fact, the input data set is generally sorted by the section break
| fields, to group the records with the same section break values together for the report. This sorting
| can be done by the same application that produces the report or by a previous application.
| A break in section break field 1 results in a break in section break fields 2 through n. A break in
| section break 2 results in a break in section break fields 3 through n, and so on. The section headers
| appear before each section in first-to-last order, whereas the section trailers appear in last-to-first
| order. For example, if section break fields represented by B1 with header H3A and trailer T3A, B2
| with header H3B and trailer T3B, and B3 with header H3C and trailer T3C are specified in order, the
| following can appear:
| H3A (header for B1=1 section)
| H3B (header for B2=1 section)
| H3C (header for B3=1 section)
| data records for B1=1, B2=1, B3=1 (new B1, B2, and B3 section)
| T3C (trailer for B3=1 section)
| H3C (header for B3=2 section)
| data records for B1=1, B2=1, B3=2 (new B3 section)
| T3C (trailer for B3=2 section)
| T3B (trailer for B2=1 section)
| H3B (header for B2=2 section)
| H3C (header for B3=1 section)
| data records for B1=1, B2=2, B3=1 (new B2 and B3 section)
| T3C (trailer for B3=1 section)
| T3B (trailer for B2=2 section)
| T3A (trailer for B1=1 section)
| H3A (header for B1=2 section)
| H3B (header for B2=2 section)
| H3C (header for B3=ð section)
| data records for B1=2, B2=2, B3=ð (new B1, B2, and B3 section)
| T3C (trailer for B3=ð section)
| H3C (header for B3=1 section)
| data records for B1=2, B2=2, B3=1 (new B3 section)
| T3C (trailer for B3=1 section)
| T3B (trailer for B2=2 section)
| T3A (trailer for B1=2 section)
| p,m specifies a section break field in the OUTFIL input records to be used to divide the report
| into sections. Each set of sequential OUTFIL input records, with the same binary value
| for the section break field, results in a corresponding set of data records. Each such set
| of data records is treated as a section in the report. A break is said to occur when the
| binary value changes.
| SKIP
|
| 55──SKIP=─┬─P──┬────────────────────────────────────────────────────────────────────5%
| ├─L──┤
| └─nL─┘
| Specifies, for reports produced for this OUTFIL group, that either:
| Each section for the associated section break field is to appear on a new page, or
| One or more blank lines is to appear after each section associated with this section break field,
| when it is followed by another section on the same page.
| Thus, you can use SKIP to specify how sections will be separated from each other.
| L specifies that one blank line is to appear between sections on the same page. L is the
| same as 1L.
| nL specifies that n blank lines are to appear between sections on the same page. You can
| specify from 1 to 255 for n.
| Sample Syntax:
| OUTFIL FNAMES=(PRINT,TAPE),
| SECTIONS=(1ð,2ð,SKIP=P,
| 42,1ð,SKIP=3L)
| HEADER3
|
| ┌─,──────────────────────────────────┐
| 55──HEADER3=(──6─┬────┬──┬─r──────────────────────┬─┴─)──────────────────────────────5%
| └─c:─┘ ├─p,m────────────────────┤
| ├─┬─DATE───────────────┬─┤
| │ ├─&DATE──────────────┤ │
| │ └──┬─DATE=──┬─(abcd)─┘ │
| │ └─&DATE=─┘ │
| ├─┬─TIME──────────────┬──┤
| │ ├─&TIME─────────────┤ │
| │ └──┬─TIME=──┬─(abc)─┘ │
| │ └─&TIME=─┘ │
| └─┬─PAGE──┬──────────────┘
| └─&PAGE─┘
| Specifies the section header to be used with the associated section break field for the reports
| produced for this OUTFIL group. The section header appears before the first data record of each
| section. DFSORT uses ASA carriage control characters to control page ejects and the placement of
| the lines in your report, according to your specifications.
| You can choose to include any or all of the following report elements in your section header:
| The section header consists of the elements you select, in the order in which you specify them, and in
| the columns or lines you specify.
| p,m specifies that an unedited input field, from the first OUTFIL input record for which a data
| record appears in the section, is to appear in the report record. See p,m under
| HEADER1 for further details.
| &DATE &DATE can be used instead of DATE. See &DATE under HEADER1.
| &TIME &TIME can be used instead of TIME. See &TIME under HEADER1.
| &TIME=(abc) &TIME=(abc) can be used instead of TIME=(abc). See &TIME=(abc) under HEADER1.
| PAGE specifies that the current page number is to appear in the OUTFIL report record. The
| page number for the header appears as 6 digits, right-justified, with leading zeros sup-
| pressed. For example, if the page is numbered 3, it appears as ' 3'.
| Sample Syntax:
| OUTFIL FNAMES=STATUS1,
| HEADER2=(1ð:'Status Report for all departments',5X,
| '- ',&PAGE,' -'),
| SECTIONS=(1ð,8,
| HEADER3=(2/,1ð:'Report for department ',1ð,8,' on ',&DATE,2/,
| 1ð:' Number',25:'Average Time',/,
| 1ð:'Completed',25:' (in days)',/,
| 1ð:'---------',25:'------------')),
| OUTREC=(1ð:21,5,ZD,M1ð,LENGTH=9,
| 25:38,4,ZD,EDIT=(III.T),LENGTH=12,
| 132:X)
| PAGEHEAD
|
| 55──PAGEHEAD────────────────────────────────────────────────────────────────────────5%
| Specifies that the section header to be used with the associated section break field is to appear at the
| top of each page of the report, except for the report header page (if any) and report trailer page (if
| any), as well as before each section. If you do not specify PAGEHEAD, the section header appears
| only before each section; so if a section is split between pages, the section header appears only in the
| middle of the page. PAGEHEAD can be used when you want HEADER3 to be used as a page
| header as well as a section header.
| If PAGEHEAD is specified for a section break field for which HEADER3 is not also specified,
| PAGEHEAD will not be used.
| Sample Syntax:
| OUTFIL FNAMES=STATUS2,
| HEADER2=(1ð:'Status Report for all departments',5X,
| '- ',&PAGE,' -'),
| SECTIONS=(1ð,8,
| HEADER3=(2/,1ð:'Report for department ',1ð,8,' on ',&DATE,2/,
| 1ð:' Number',25:'Average Time',/,
| 1ð:'Completed',25:' (in days)',/,
| 1ð:'---------',25:'------------'),
| PAGEHEAD,SKIP=P),
| OUTREC=(1ð:21,5,ZD,M1ð,LENGTH=9,
| 25:38,4,ZD,EDIT=(III.T),LENGTH=12,
| 132:X)
| TRAILER3
|
| ┌─,─────────────────────────────────────────────┐
| 55──TRAILER3=(──6─┬────┬──┬─r─────────────────────────────────┬─┴─)──────────────────5%
| └─c:─┘ ├─p,m───────────────────────────────┤
| ├─┬─DATE───────────────┬────────────┤
| │ ├─&DATE──────────────┤ │
| │ └──┬─DATE=──┬─(abcd)─┘ │
| │ └─&DATE=─┘ │
| ├─┬─TIME──────────────┬─────────────┤
| │ ├─&TIME─────────────┤ │
| │ └──┬─TIME=──┬─(abc)─┘ │
| │ └─&TIME=─┘ │
| ├─┬─PAGE──┬─────────────────────────┤
| │ └─&PAGE─┘ │
| ├─COUNT─────────────────────────────┤
| ├─SUBCOUNT──────────────────────────┤
| ├─┬─TOTAL=─┬──(p,m,f─┬───────┬─)────┤
| │ └─TOT=───┘ └─,edit─┘ │
| ├─MIN=──(p,m,f─┬───────┬─)──────────┤
| │ └─,edit─┘ │
| ├─MAX=──(p,m,f─┬───────┬─)──────────┤
| │ └─,edit─┘ │
| ├─AVG=──(p,m,f─┬───────┬─)──────────┤
| │ └─,edit─┘ │
| ├─┬─SUBTOTAL=─┬──(p,m,f─┬───────┬─)─┤
| │ ├─SUBTOT=───┤ └─,edit─┘ │
| │ └─SUB=──────┘ │
| ├─SUBMIN=──(p,m,f─┬───────┬─)───────┤
| │ └─,edit─┘ │
| ├─SUBMAX=──(p,m,f─┬───────┬─)───────┤
| │ └─,edit─┘ │
| └─SUBAVG=──(p,m,f─┬───────┬─)───────┘
| └─,edit─┘
| Specifies the section trailer to be used with the associated section break field for the reports produced
| for this OUTFIL group. The section trailer appears after the last data record of each section.
| DFSORT uses ASA carriage control characters to control page ejects and the placement of the lines
| in your report, according to your specifications.
| You can choose to include any or all of the following report elements in your section trailer:
| – Running total, minimum, maximum, or average for each specified ZD, PD, BI, FI, or CSF/FS
| numeric input field in the data records up to this point, edited to contain signs, decimal points,
| leading zeros or no leading zeros, and so on.
| The section trailer consists of the elements you select, in the order in which you specify them, and in
| the columns or lines you specify.
| p,m specifies that an unedited input field, from the last OUTFIL input record for which
| a data record appears in the section, is to appear in the report record. See p,m
| under TRAILER1 for further details.
| &DATE &DATE can be used instead of DATE. See &DATE under HEADER1.
| &TIME &TIME can be used instead of TIME. See &TIME under HEADER1.
| &PAGE &PAGE can be used instead of PAGE. See &PAGE under TRAILER1.
| COUNT specifies that the count of data records in the section is to appear in the report
| record. The count appears as 8 digits, right-justified, with leading zeros sup-
| pressed. For example, if the first section has 40 records, the second section has
| 40 records, and the third section has 26 records, COUNT will show ' 40' for
| the first section, ' 40' for the second section, and ' 26' for the third
| section.
| SUBCOUNT specifies that the running count of data records up to this point in the report is to
| appear in the report record. The running count appears as 8 digits, right-justified,
| with leading zeros suppressed. The running count accumulates the count for all
| sections up to and including the current section. For example, if the first section
| has 40 records, the second section has 40 records, and the third section has 26
| records, SUBCOUNT will show ' 40' for the first section, ' 80' for the
| second section, and ' 106' for the third section.
| TOTAL specifies that an edited total, for the values of a numeric input field in the data
| records in the section, is to appear in the report record.
| TOT can be used instead of TOTAL.
| MIN specifies that an edited minimum, for the values of a numeric input field in the
| data records in the section, is to appear in the report record.
| MAX specifies that an edited maximum, for the values of a numeric input field in the
| data records in the section, is to appear in the report record.
| AVG specifies that an edited average, for the values of a numeric input field in the data
| records in the section, is to appear in the report record.
| SUBTOTAL specifies that an edited running total, for the values of a numeric input field in the
| data records up to this point in the report, is to appear in the report record. The
| running total accumulates the total for all sections up to and including the current
| section. For example, if the total for a selected numeric field is +200 for the first
| section, -250 for the second section and +90 for the third section, SUBTOTAL will
| be +200 for the first section, -50 for the second section and +40 for the third
| section.
| SUBTOT or SUB can be used instead of SUBTOTAL.
| SUBMIN specifies that an edited running minimum, for the values of a numeric input field in
| the data records up to this point in the report, is to appear in the report record.
| The running minimum selects the minimum from all sections up to and including
| the current section. For example, if the minimum for a selected numeric field is
| +200 for the first section, -250 for the second section and +90 for the third section,
| SUBMIN will be +200 for the first section, -250 for the second section and -250 for
| the third section.
| SUBMAX specifies that an edited running maximum, for the values of a numeric input field in
| the data records up to this point in the report, is to appear in the report record.
| The running maximum selects the maximum from all sections up to and including
| the current section. For example, if the maximum for a selected numeric field is
| -100 for the first section, +250 for the second section and +90 for the third section,
| SUBMAX will be -100 for the first section, +250 for the second section and +250
| for the third section.
| SUBAVG specifies that an edited running average, for the values of a numeric input field in
| the data records up to this point in the report, is to appear in the report record.
| The running average computes the average for all sections up to and including the
| current section. For example, if the count of data records and total for a selected
| numeric field are 60 and +2205 for the first section, respectively, 60 and -6252 for
| the second section, respectively, and 23 and -320 for the third section, respec-
| tively, SUBAVG will be +36 for the first section, -33 for the second section and -30
| for the third section.
| Sample Syntax:
| OUTFIL FNAMES=SECRPT,
| INCLUDE=(11,4,CH,EQ,C'SSD'),
| SECTIONS=(3,5,SKIP=P,
| HEADER3=(2:'Department: ',3,5,4X,'Date: ',&DATE,2/),
| TRAILER3=(2/,2:'The average for ',3,5,' is ',
| AVG=(4ð,3,PD,M12),/,
| 2:'The overall average so far is ',
| SUBAVG=(4ð,3,PD,M12)),
| 45,8,SKIP=3L,
| HEADER3=(4:'Week Ending ',45,8,2/,
| 4:'Item Number',2ð:'Completed',/,
| 4:'-----------',2ð:'---------'),
| TRAILER3=(4:'The item count for week ending ',45,8,
| ' is ',COUNT)),
| OUTREC=(11:16,4,22:4ð,3,PD,M12,12ð:X)
| NODETAIL
|
| 55──NODETAIL────────────────────────────────────────────────────────────────────────5%
| Specifies that data records are not to be output for the reports produced for this OUTFIL group. With
| NODETAIL, the data records are completely processed with respect to input fields, statistics, counts,
| sections breaks, and so on, but are not written to the OUTFIL data set and are not included in line
| counts for determining the end of a page. You can use NODETAIL to summarize the data records
| without actually showing them.
| Sample Syntax:
| OUTFIL FNAMES=SUMMARY,NODETAIL,
| HEADER2=(' Date: ',DATE=(DMY.),4X,'Page: ',PAGE,2/,
| 1ð:'Division',25:' Total Revenue',/,
| 1ð:'--------',25:'-----------------'),
| SECTIONS=(3,5,
| TRAILER3=(1ð:3,5,
| 25:TOTAL=(25,4,FI,M19,
| LENGTH=17))),
| TRAILER1=(5/,1ð:'Summary of Revenue ',4/,
| 12:'Number of divisions reporting is ',
| COUNT,/,
| 12:'Total revenue is ',
| TOTAL=(25,4,FI,M19))
| Default for NODETAIL: None; must be specified.
| Default for OUTFIL Statements: None; must be specified. Multiple OUTFIL statements can be specified
| in the same and different sources; override is at the ddname level.
| DFSORT uses appropriate carriage controls (for example, C'-' for triple space) when possible to
| reduce the number of report records written. Although these carriage control characters may not be
| shown when you view an OUTFIL data set (depending on how you view it), they will be used if you
| print the report. If you are creating a report for viewing and want blank lines to appear, specify a line
| of blanks instead of using n/. For example, instead of specifying:
| OUTFIL FNAMES=RPT,
| HEADER2=(2/,'start of header',2/,'next line')
| which will result in blank lines for the printer, but not for viewing, specify:
| OUTFIL FNAMES=RPT,
| HEADER2=(X,/,X,/,'start of header',/,X,/,'next line')
| When defining variable-length OUTFIL output or data records with OUTREC, you must explicitly
| specify the 4-byte RDW at the beginning of the record. When defining variable-length OUTFIL report
| records, you must not specify the 4-byte RDW at the beginning of the record.
| If there are no OUTFIL input records for an OUTFIL group, the headers and trailers appear without
| any data records. Blanks will be used for any specified unedited input fields, and zero values will be
| used for any specified statistics fields.
| If a variable-length OUTFIL input record is too short to contain a specified unedited input field for a
| report header or trailer, blanks will be used for the missing bytes. If a variable-length OUTFIL input
| record is too short to contain a specified section break field or statistics field, zeros will be used for the
| missing bytes, intentionally or unintentionally.
| If a page number overflows 6 digits (&PAGE), a count or running count overflows 8 digits (COUNT,
| SUBCOUNT, AVG, SUBAVG), or a total or running total overflows 15 digits (TOTAL, SUBTOTAL,
| AVG, SUBAVG), the overflowing value will be truncated to the number of digits allowed, intentionally
| or unintentionally.
| The VLSHRT option can be used with the INCLUDE and OMIT parameters of OUTFIL in the same
| way that it can be used with the INCLUDE and OMIT statements (see “INCLUDE/OMIT Statement
| Notes” on page 91 under “INCLUDE Control Statement” on page 75 for details). However, unlike the
| OUTREC statement, the OUTREC parameter of OUTFIL does not force NOVLSHRT. Thus, you can
| use VLSHRT with OUTFIL to eliminate records with the INCLUDE or OMIT parameter and reformat
| the remaining records with the OUTREC parameter. Note that if a short OUTFIL OUTREC field is
| found, DFSORT will terminate processing even if VLSHRT is in effect.
| Multiple OUTFIL statements can be specified in the same and different sources. If a ddname occurs
| more than once in the same source, the ddname is associated with the first OUTFIL group in which it
| appears. For example, if the following is specified in SYSIN:
| OUTFIL FNAMES=(OUT1,OUT2),INCLUDE=(1,1,CH,EQ,C'A')
| OUTFIL FNAMES=(OUT3,OUT1),SAVE
| OUT1 and OUT2 are processed as part of the first OUTFIL group, that is, with INCLUDE. OUT3 is
| processed as part of the second OUTFIL group, that is, with SAVE; but OUT1 is not because it is a
| duplicate ddname.
| If a ddname occurs in more than one source, the ddname is associated with the highest source
| OUTFIL group in which it appears. For example, if the following is specified in DFSPARM:
| OUTFIL FNAMES=(OUT1,OUT2),INCLUDE=(1,1,CH,EQ,C'A')
| and the following is specified in SYSIN:
| OUTFIL FNAMES=(OUT3,OUT1),SAVE
| OUT1 and OUT2 are processed as part of the DFSPARM OUTFIL group, that is, with INCLUDE.
| OUT3 is processed as part of the SYSIN OUTFIL group, that is, with SAVE; but OUT1 is not because
| it is an overridden ddname.
| OUTFIL statements cannot be passed to or returned from an EFS program. The D2 format cannot be
| specified in the INCLUDE or OMIT parameter of an OUTFIL statement.
| OUTFIL Features—Examples
| Example 1
| OPTION COPY
| OUTFIL INCLUDE=(15,6,CH,EQ,C'MSGðð5'),FNAMES=Mðð5
| OUTFIL INCLUDE=(15,6,CH,EQ,C'MSGð22'),FNAMES=Mð22
| OUTFIL INCLUDE=(15,6,CH,EQ,C'MSGð28'),FNAMES=Mð28
| OUTFIL INCLUDE=(15,6,CH,EQ,C'MSG115'),FNAMES=M115
| OUTFIL SAVE,FNAMES=UNKNOWN
| This example illustrates how records can be distributed to different OUTFIL data sets based on criteria you
| specify:
| Input records with MSG005 in bytes 15 through 20 will be written to the OUTFIL data set associated
| with ddname M005.
| Input records with MSG022 in bytes 15 through 20 will be written to the OUTFIL data set associated
| with ddname M022.
| Input records with MSG028 in bytes 15 through 20 will be written to the OUTFIL data set associated
| with ddname M028.
| Input records with MSG115 in bytes 15 through 20 will be written to the OUTFIL data set associated
| with ddname M115.
| Input records with anything else in bytes 15 through 20 will be written to the OUTFIL data set associ-
| ated with ddname UNKNOWN
| Example 2
| SORT FIELDS=(18,5,ZD,D)
| OUTFIL FNAMES=(V,VBU1,VBU2)
| OUTFIL FNAMES=(F,FBU1),
| CONVERT,OUTREC=(11,3,X,18,5,X,X'ðððððððF')
| This example illustrates how multiple sorted output data sets can be created and how a variable-length
| record data set can be converted to a fixed-length record data set:
| The first OUTFIL statement writes the variable-length input records to the variable-length OUTFIL data
| sets associated with ddnames V, VBU1, and VBU2.
| The second OUTFIL statement reformats the variable-length input records to fixed-length output
| records and writes them to the fixed-length OUTFIL data sets associated with ddnames F and FBU1.
| CONVERT is used to indicate that a variable-length data set is to be converted to a fixed-length data
| set; OUTREC is used to describe how the variable-length input records are to be reformatted as fixed-
| length output records.
| Example 3
| SORT FIELDS=(15,6,ZD,A)
| OUTFIL FNAMES=USA,
| HEADER2=(5:'Parts Completion Report for USA',2/,
| 5:'Printed on ',DATE,
| ' at ',TIME=(12:),3/,
| 5:'Part ',2ð:'Completed',35:' Value ($)',/,
| 5:'------',2ð:'---------',35:'------------'),
| OUTREC=(5:15,6,ZD,M11,
| 2ð:3,4,ZD,M12,LENGTH=9,
| 35:38,8,ZD,M18,LENGTH=12,
| 132:X)
| OUTFIL FNAMES=FRANCE,
| HEADER2=(5:'Parts Completion Report for France',2/,
| 5:'Printed on ',DATE=(DM4/),
| ' at ',TIME,3/,
| 5:'Part ',2ð:'Completed',35:' Value (F)',/,
| 5:'------',2ð:'---------',35:'------------'),
| OUTREC=(5:15,6,ZD,M11,
| 2ð:3,4,ZD,M16,LENGTH=9,
| 35:38,8,ZD,M22,LENGTH=12,
| 132:X)
| OUTFIL FNAMES=DENMARK,
| HEADER2=(5:'Parts Completion Report for Denmark',2/,
| 5:'Printed on ',DATE=(DMY-),
| ' at ',TIME=(24.),3/,
| 5:'Part ',2ð:'Completed',35:' Value (kr)',/,
| 5:'------',2ð:'---------',35:'------------'),
| OUTREC=(5:15,6,ZD,M11,
| 2ð:3,4,ZD,M13,LENGTH=9,
| 35:38,8,ZD,M19,LENGTH=12,
| 132:X)
| This example illustrates how reports for three different countries can be produced from sorted fixed-length
| input records. The reports differ only in the way that date, time, and numeric formats are specified:
| 1. The first OUTFIL statement produces a report that has the date, time, and numeric formats commonly
| used in the United States.
| 2. The second OUTFIL statement produces a report that has the date, time, and numeric formats com-
| monly used in France.
| 3. The third OUTFIL statement produces a report that has the date, time, and numeric formats commonly
| used in Denmark.
| Of course, any one of the three reports can be produced by itself using a single OUTFIL statement instead
| of three OUTFIL statements. (This may be necessary if you are sorting character data according to a
| specified locale for that country.)
| The FNAMES parameter specifies the ddname (USA, FRANCE, DENMARK) associated with the fixed-
| length data set for that report.
| The HEADER2 parameter specifies the page header to appear at the top of each page for that report,
| which will consist of:
| A line of text identifying the report. Note that all English text in the report can be replaced by text in
| the language of that country.
| A blank line (2/).
| A line of text showing the date and time. Note that variations of the DATE, DATE=(abcd), TIME, and
| TIME=(abc) operands are used to specify the date and time in the format commonly used in that
| country.
| Two blank lines (3/).
| Two lines of text showing headings for the columns of data. Note that the appropriate currency
| symbol can be included in the text.
| The OUTREC parameter specifies the three columns of data to appear for each input record as follows:
| A 6-byte edited numeric value produced by transforming the ZD value in bytes 15 through 20
| according to the pattern specified by M11. M11 is a pattern for showing integers with leading zeros.
| A 9-byte (LENGTH=9) edited numeric value produced by transforming the ZD value in bytes 3 through
| 6 according to the pattern for integer values with thousands separators commonly used in that country.
| M12 uses a comma for the thousands separator. M16 uses a blank for the thousands separator. M13
| uses a period for the thousands separator.
| A 12-byte (LENGTH=12) edited numeric value produced by transforming the ZD value in bytes 38
| through 45 according to the pattern for decimal values with thousands separators and decimal separa-
| tors commonly used in that country. M18 uses a comma for the thousands separator and a period for
| the decimal separator. M22 uses a blank for the thousands separator and a comma for the decimal
| separator. M19 uses a period for the thousands separator and a comma for the decimal separator.
| Figure 33 on page 153 shows the 26 pre-defined edit masks (M0-M25) you can choose from.
| 132:X is used at the end of the OUTREC parameter to ensure that the data records are longer than the
| report records. This will result in an LRECL of 132 for the fixed-length OUTFIL data sets (1 byte for the
| ASA control character and 131 bytes for the data).
| Example 4
| SORT FIELDS=(3,1ð,A,16,13,A),FORMAT=CH
| OUTFIL FNAMES=WEST,
| INCLUDE=(42,6,CH,EQ,C'West'),
| HEADER1=(5/,18:' Western Region',3/,
| 18:'Profit and Loss Report',3/,
| 18:' for ',&DATE,3/,
| 18:' Page',&PAGE),
| OUTREC=(6:16,13,24:31,1ð,ZD,M5,LENGTH=2ð,75:X),
| SECTIONS=(3,1ð,SKIP=P,
| HEADER3=(2:'Division: ',3,1ð,5X,'Page:',&PAGE,2/,
| 6:'Branch Office',24:' Profit/(Loss)',/,
| 6:'-------------',24:'--------------------'),
| TRAILER3=(6:'=============',24:'====================',/,
| 6:'Total',24:TOTAL=(31,1ð,ZD,M5,LENGTH=2ð),/,
| 6:'Lowest',24:MIN=(31,1ð,ZD,M5,LENGTH=2ð),/,
| 6:'Highest',24:MAX=(31,1ð,ZD,M5,LENGTH=2ð),/,
| 6:'Average',24:AVG=(31,1ð,ZD,M5,LENGTH=2ð),/,
| 3/,2:'Average for all Branch Offices so far:',
| X,SUBAVG=(31,1ð,ZD,M5))),
| TRAILER1=(8:'Page ',&PAGE,5X,'Date: ',&DATE,5/,
| 8:'Total Number of Branch Offices Reporting: ',
| COUNT,2/,
| 8:'Summary of Profit/(Loss) for all',
| ' Western Division Branch Offices',2/,
| 12:'Total:',
| 22:TOTAL=(31,1ð,ZD,M5,LENGTH=2ð),/,
| 12:'Lowest:',
| 22:MIN=(31,1ð,ZD,M5,LENGTH=2ð),/,
| 12:'Highest:',
| 22:MAX=(31,1ð,ZD,M5,LENGTH=2ð),/,
| 12:'Average:',
| 22:AVG=(31,1ð,ZD,M5,LENGTH=2ð))
| This example illustrates how a report can be produced with a header and trailer page and sections of
| columns of data, from a sorted subset of fixed-length input records.
| The FNAMES parameter specifies the ddname (WEST) associated with the fixed-length data set for the
| report.
| The INCLUDE parameter specifies the records to be selected for the report.
| The HEADER1 parameter specifies the report header to appear as the first page of the report, which will
| consist of five blank lines (5/) followed by four lines of text, each separated by 2 blank lines (3/). The last
| two lines of text will show the date (&DATE) and page number (&PAGE), respectively.
| The OUTREC parameter specifies the two columns of data to appear for each selected input record as
| follows:
| The character string from bytes 16 through 28 of the input record.
| A 20-byte (LENGTH=20) edited numeric value produced by transforming the ZD value in bytes 31
| through 40 according to the pattern specified by M5.
| The SECTIONS parameter specifies the section break field (3,10), page ejects between sections
| (SKIP=P), the header (HEADER3) to appear before each section and the trailer (TRAILER3) to appear
| after each section. The section header will consist of a line of text showing the page number, a blank line
| (2/) and two lines of text showing the headings for the columns of data. The section trailer will consist of a
| line of text separating the data from the trailer, lines of text showing the total (TOTAL), minimum (MIN),
| maximum (MAX) and average (AVG) for the data in the section as edited numeric values, two blank lines,
| and a line of text showing the running average (SUBAVG) for all of the data records in the report up to
| this point.
| The TRAILER1 parameter specifies the report trailer to appear as the last page of the report, which will
| consist of a line of text showing the page and date, four blank lines (5/), a text line showing the count of
| data records in the report, a blank line, a line of text, a blank line, and lines of text showing the total,
| minimum maximum and average for all of the data in the report as edited numeric values.
| 75:X is used at the end of the OUTREC parameter to ensure that the data records are longer than the
| report records. This will result in an LRECL of 76 for the fixed-length OUTFIL data set (1 byte for the ASA
| control character and 75 bytes for the data).
| Western Region
| for ð5/11/95
| Page 1
| Total: 25,312,257.22
| Lowest: (32,434.31)
| Highest: 5,412,3ðð.ð5
| Average: 1,4ð6,236.51
| Example 5
| SORT FIELDS=(6,5,CH,A)
| OUTFIL FNAMES=STATUS,
| HEADER2=(1:C'PAGE ',&PAGE,C' OF STATUS REPORT FOR ',&DATE,2/,
| 6:C'ITEM ',16:C'STATUS ',31:C'PARTS',/,
| 6:C'-----',16:C'------------',31:C'-----'),
| OUTREC=(1,4,
| 1ð:6,5,
| 2ð:14,1,CHANGE=(12,
| C'1',C'SHIP',
| C'2',C'HOLD',
| C'3',C'TRANSFER'),
| NOMATCH=(C'\CHECK CODE\'),
| 37:39,1,BI,M1ð,
| 12ð:X)
| This example illustrates how a report can be produced with a page header and columns of data from
| sorted variable-length input records, using a lookup table.
| The FNAMES parameter specifies the ddname (STATUS) associated with the variable-length data set for
| the report.
| The HEADER2 parameter specifies the page header to appear at the top of each page, which will consist
| of a line of text showing the page number (&PAGE) and date (&DATE), a blank line (2/), and two lines of
| text showing headings for the columns of data.
| The OUTREC parameter specifies the RDW and three columns of data to appear for each input record as
| follows (remember that byte 5 is the first byte of data for variable-length records):
| The character string from bytes 6 through 10 of the input record
| A character string produced by finding a match for byte 14 of the input record in the table defined by
| CHANGE (lookup and change). NOMATCH indicates the character string to be used if byte 14 does
| not match any of the entries in the CHANGE table.
| An edited numeric value produced by transforming the BI value in byte 39 according to the pattern
| specified by M10.
| With variable-length input records, you must account for the RDW when specifying the c: values for
| OUTREC, but not for headers or trailers. The 1: used for the first line of HEADER2 causes it to start in
| the first data byte (by contrast, 5: must be used to specify the first OUTREC data byte for variable-length
| records). Also, since 6: is used for the ITEM heading, 10: must be used for the ITEM data to get the
| heading and data to line up in columns.
| 120:X is used at the end of the OUTREC parameter to ensure that the data records are longer than the
| report records. This will result in a maximum LRECL of 121 for the variable-length OUTFIL data set (1
| byte for the ASA control character and a maximum of 120 bytes for the data).
| Example 6
| OPTION COPY
| OUTFIL FNAMES=(PIPE1,PIPE2,PIPE3,PIPE4,PIPE5),SPLIT
| This example illustrates how output records can be split as evenly as possible among a set of
| BatchPipes/MVS pipes. The first record will be written to the writer associated with PIPE1, the second to
| PIPE2, the third to PIPE3, the fourth to PIPE4, the fifth to PIPE5, the sixth to PIPE1, and so on until all of
| the records have been written.
| Example 7
| OPTION COPY
| OUTFIL FNAMES=RANGE1,ENDREC=1ðððððð
| OUTFIL FNAMES=RANGE2,STARTREC=1ððððð1,2ðððððð
| OUTFIL FNAMES=RANGE3,STARTREC=2ððððð1,3ðððððð
| OUTFIL FNAMES=RANGE4,STARTREC=3ððððð1,4ðððððð
| OUTFIL FNAMES=(RANGE5,EXTRA),STARTREC=4ððððð1
| This example illustrates how specific ranges of output records can be written to different output data sets.
| A typical application might be database partitioning.
| The first 1 million records will be written to the data set associated with RANGE1, the second million to
| RANGE2, the third million to RANGE3, and the fourth million to RANGE4. The remaining records will be
| written to both the data set associated with RANGE5 and the data set associated with EXTRA (SAVE or
| STARTREC=4000001 will accomplish the same purpose in this case).
| Note that the INCLUDE, OMIT, and SAVE parameters of OUTFIL can also be used to select records to be
| written to different output data sets, based on criteria you specify.
: Example 8
: OPTION COPY,Y2PAST=26
: OUTFIL FNAMES=Y4,
: OUTREC=(1,19,
: 21,2,PDð,M11,C'/', transform mm
: 22,2,PDð,M11,C'/', transform dd
: 2ð,2,Y2P, transform yy to yyyy
: 24,57)
: This example illustrates how to transform an existing data set with a packed decimal date field of the form
: P'yymmdd' (X'0yymmddC') in bytes 20-23 into a new data set with a character date field of the form
: C'mm/dd/yyyy' in bytes 20-29. yy represents the two-digit year, yyyy represents the four-digit year, mm
: represents the month, dd represents the day, and C represents a positive sign.
: The input data set has an LRECL of 80 and the Y4 data set will have an LRECL of 86.
: The Y2PAST=26 option sets the century window to be used to transform two-digit years into four-digit
: years. If the current year is 1996, the century window will be 1970 to 2069. Using this century window,
: the input and output fields might be as follows:
: Input Field (HEX) Output Field (CH)
: 2ð 2ð
: | |
: ðð2ð5ð5F ð5/ð5/2ðð2
: ð95ð823C ð8/23/1995
: ð98ð316C ð3/16/1998
: ðððð316F ð3/16/2ððð
The OUTREC control statement allows you to reformat the input records before they are output. That is,
to define which parts of the input record are included in the reformatted output record, in what order they
are to appear, and how they are to be aligned.
You do this by defining one or more fields from the input record. The reformatted output record consists
of those fields only, in the order in which you have specified them, and aligned on the boundaries or in the
columns you have indicated.
You can also insert blanks, binary zeros, character strings, and hexadecimal strings as separators before,
between, and after the input fields, in the reformatted output records.
| For information concerning the interaction of INREC and OUTREC, see “INREC Statement Notes” on
| page 97 and “OUTREC Statement Notes” on page 199.
| The OUTREC statement differs from the OUTREC parameter of the OUTFIL statement in the following
| ways:
| The OUTREC statement applies to all input records; the OUTREC parameter applies only to the
| OUTFIL input records for its OUTFIL group.
| The OUTREC parameter supports capabilities (for example, hex display, editing, and lookup/change)
| that are not supported by the OUTREC statement.
| See “OUTFIL Control Statements” on page 141 for complete details on the OUTFIL OUTREC parameter.
FIELDS
|
| ┌─,───────────────────────┐
| 55──FIELDS=──(───6─┬────┬──┬─s───────────┬─┴──)──────────────────────────────────────5%
| └─c:─┘ ├─p,m──┬────┬─┤
| │ └─,a─┘ │
| └─p───────────┘
Specifies the order and alignment of the input and separation fields in the reformatted output records.
c: indicates the column in which the first position of the associated input or separation field is to
be aligned, relative to the start of the reformatted output record. Unused space preceding the
specified column is padded with EBCDIC blanks. The following rules apply:
The colon (:) is treated like the comma (,) or semicolon (;) for continuation to another line.
See Figure 26 on page 94 for examples of valid and invalid column alignment.
| s specifies that a separation field is to appear in the reformatted output record. It can be speci-
fied before or after any input field. Consecutive separation fields may be specified. For
variable-length records, s must not be specified before the first input field (the record
descriptor word) or after the variable part of the input record. Permissible values are nX, nZ,
nC'xx...x', and nX'yy...yy'.
| nX Blank separation. n bytes of EBCDIC blanks (X'40') are to appear in the refor-
| matted output records. n can range from 1 to 4095. If n is omitted, 1 is used.
See Figure 27 on page 94 for examples of valid and invalid blank separation.
| nZ Binary zero separation. n bytes of binary zeros (X'00') are to appear in the refor-
| matted output records. n can range from 1 to 4095. If n is omitted, 1 is used.
See Figure 28 on page 94 for examples of valid and invalid binary zero sepa-
ration.
| nC'xx...x' Character string separation. n repetitions of the character string constant
| (C'xx...x') are to appear in the reformatted output records. n can range from 1 to
| 4095. If n is omitted, 1 is used. x can be any EBCDIC character. You can
specify from 1 to 256 characters.
If you want to include a single apostrophe in the character string, you must specify
it as two single apostrophes:
Required: O'NEILL Specify: C'O''NEILL'
See Figure 29 on page 95 for examples of valid and invalid character string sep-
aration.
nX'yy...yy' Hexadecimal string separation. n repetitions of the hexadecimal string constant
| (X'yy...yy') are to appear in the reformatted output records. n can range from 1
to 4095. If n is omitted, 1 is used.
The value yy represents any pair of hexadecimal digits. You can specify from 1 to
256 pairs of hexadecimal digits.
See Figure 30 on page 95 for examples of valid and invalid hexadecimal string
separation.
| p,m,a specifies that an input field is to appear in the reformatted output record.
p specifies the first byte of the input field relative to the beginning of the input record.10 The
first data byte of a fixed-length record has relative position 1. The first data byte of a
variable-length record has relative position 5, because the first four bytes are occupied by
| the RDW. All fields must start on a byte boundary, and no field may extend beyond byte
| 32 752. See the following “OUTREC Statement Notes” on page 199 for special rules con-
cerning variable-length records.
m specifies the length of the input field. It must include the sign if the data is signed and
must be a whole number of bytes. See “OUTREC Statement Notes” on page 199 for
more information.
10 If INREC is specified, p must refer to the record as reformatted by INREC. If your E15 user exit reformats the record, and INREC
is not specified, p must refer to the record as reformatted by your E15 user exit.
a specifies the alignment (displacement) of the input field in the reformatted output record
relative to the start of the reformatted output record.
The permissible values of a are:
H Halfword aligned. The displacement (p-1) of the field from the beginning of the refor-
matted input record, in bytes, is a multiple of 2 (that is, position 1, 3, 5, and so
forth).
F Fullword aligned. The displacement is a multiple of 4 (that is, position 1, 5, 9, and
so forth).
D Doubleword aligned. The displacement is a multiple of 8 (that is, position 1, 9, 17,
and so forth).
Alignment can be necessary if, for example, the data is to be used in a COBOL
application program where COMPUTATIONAL items are aligned through the SYN-
CHRONIZED clause. Unused space preceding aligned fields are always padded
with binary zeros.
| p specifies the variable part of the input record (that part beyond the minimum record length) is
| to appear in the reformatted output record as the last field. Note that if the reformatted output
| record includes only the RDW and the variable part of the input record, “null” records con-
| taining only an RDW may result.
| A value must be specified for p that is less than or equal to the minimum record length
| (RECORD statement L4 value) plus 1 byte.
The variable part of the input record (that part beyond the minimum record length) can be included in
the reformatted output record as the last part. In this case, a value must be specified for pn that is
| less than or equal to the minimum record length (RECORD statement L4 value) plus 1 byte, and mn
and an must be omitted. If INREC and OUTREC are both specified, either both must specify position-
only for the last part, or neither must specify position-only for the last part.
Note that, if the reformatted input includes only the RDW and the variable part of the input record,
“null” records containing only an RDW might result.
The reformatted output records are in the format specified by OUTREC regardless of whether INREC
was specified.
Fields referenced in OUTREC statements can overlap each other or control fields.
If input is variable records, the output is also variable. This means that each record is given the
correct RDW by DFSORT before output.
When OUTREC is specified, your E35 user exit routine must refer to fields in the reformatted output
record.
DFSORT issues a message and terminates processing if an OUTREC statement is specified for a
tape work data set sort or conventional merge application.
When you specify OUTREC, VLSHRT is not used. If VLSHRT is specified, it is ignored.
Example 1
OUTREC FIELDS=(11,32)
This statement specifies that the output record is to contain 32 bytes beginning with byte 11 of the input
record. This statement can be used only with fixed-length input records, because it does not include the
first 4 bytes.
Example 2
OUTREC FIELDS=(1,4,11,32,D,1ð1)
This statement is for variable-length records of minimum length 100 bytes, and specifies that the output
record is to contain an RDW plus 32 bytes of the input record starting at byte 11 (aligned on a doubleword
boundary, relative to the start of the record) plus the entire variable portion of the input record.
| Note that no extra comma is coded to indicate the omission of the first alignment parameter. If you do
| include an extra comma, DFSORT issues a message and terminates processing.
Example 3
OUTREC FIELDS=(1,42,D,1ð1)
This statement is for variable-length records of minimum length 100 bytes, and specifies that the output
record should contain an RDW plus the first 38 data bytes of the input record plus the entire variable
portion of the input record.
The 'D' parameter has no effect because the first field is always placed at the beginning of the output
record.
Example 4
SORT FIELDS=(2ð,4,CH,D,1ð,3,CH,D)
OUTREC FIELDS=(7:2ð,4,C' FUTURE ',2ð,2,1ð,3,1Z,1,9,13,7,24,57,6X'FF')
This example illustrates how a fixed-length input data set can be sorted and reformatted for output. The
SORTIN LRECL is 80 bytes.
The reformatted output records are fixed-length with a record size of 103 bytes and are shown below.
The SORTOUT LRECL must be specified as 103.
Position Contents
1-6 EBCDIC blanks for column alignment
7-10 Input positions 20 through 23
11-18 Character string: C' FUTURE '
19-20 Input positions 20 through 21
21-23 Input positions 10 through 12
24 Binary zero
25-33 Input positions 1 through 9
34-40 Input positions 13 through 19
41-97 Input positions 24 through 80
98-103 Hexadecimal string: X'FFFFFFFFFFFF'
Example 5
SORT FIELDS=(12,4,PD,D)
RECORD TYPE=V,LENGTH=(,,,1ðð)
OUTREC FIELDS=(1,7,5Z,5X,28,8,6X,1ð1)
This example illustrates how a variable-length input data set can be sorted and reformatted for output.
The variable part of the input records is included in the output records. The minimum input record size is
100 bytes and the maximum input record size (SORTIN LRECL or maximum record size for VSAM) is 200
bytes.
The reformatted output records are variable-length with a maximum record size of 131 bytes. The refor-
matted records are shown below:
Position Contents
1-4 RDW (input positions 1 through 4)
5-7 Input positions 5 through 7
8-12 Binary zeros
Example 6
MERGE FIELDS=(28,4,BI,A)
OUTREC FIELDS=(1,4,5Z,5X,5,3,28,8,6Z)
This example illustrates how input files can be merged and reformatted for output. The variable part of the
input records is not to be included in the output records. The SORTINnn LRECL is 50 bytes.
The reformatted output records are variable-length with a maximum record size of 31 bytes and look as
follows. The SORTOUT LRECL must be greater than or equal to 31 bytes.
Position Contents
1-4 RDW (input positions 1 through 4)
5-9 Binary zeros
10-14 EBCDIC blanks
15-17 Input positions 5 through 7
18-25 Input positions 28 through 35
26-31 Binary zeros
55─RECORD─┬─TYPE=┬F┬───────────────────────────────────────────────────┬───5%
│ ├V┤ │
│ └D┘ │
│ │
├┬───────┬─────LENGTH=(┬─L1──────────────────────────────┬)──┤
│└TYPE=F,┘ │ │ │
│ ├┬──┬,─L2─────────────────────────┤ │
│ │└L1┘ │ │
│ └┬──┬,┬──┬,─L3────────────────────┘ │
│ └L1┘ └L2┘ │
│ │
└┬─────────┬───LENGTH=(┬─L1──────────────────────────────┬)──┘
└TYPE=┬V┬,┘ │ │
└D┘ ├┬──┬,─L2─────────────────────────┤
│└L1┘ │
├┬──┬,┬──┬,─L3────────────────────┤
│└L1┘ └L2┘ │
├┬──┬,┬──┬,┬──┬,─L4───────────────┤
│└L1┘ └L2┘ └L3┘ │
├┬──┬,┬──┬,┬──┬,┬──┬,L5───────────┤
│└L1┘ └L2┘ └L3┘ └L4┘ │
├┬──┬,┬──┬,┬──┬,┬──┬,┬──┬,─L6─────┤
│└L1┘ └L2┘ └L3┘ └L4┘ └L5┘ │
└┬──┬,┬──┬,┬──┬,┬──┬,┬──┬,┬──┬,─L7┘
└L1┘ └L2┘ └L3┘ └L4┘ └L5┘ └L6┘
The RECORD control statement describes the format and lengths of the records being processed. It is
required when:
You include user exit routines that change record lengths during a DFSORT program run.
All of the input is supplied through a user exit.
| Input and SORTOUT record length information is unavailable.
A sort is invoked from a program written in PL/I.
| VSAM input and VSAM SORTOUT data sets are used.
Note: L4 through L7 apply only to variable-length records.
| If you are working with VSAM input and non-VSAM SORTOUT data sets, DFSORT requires the RECORD
| TYPE=x statement only for tape work data set sorts or Conventional merges. If you do not specify the
| record type with VSAM input and non-VSAM SORTOUT data sets, DFSORT continues processing using:
| The record type from the non-VSAM SORTOUT data set
| A record type of F (for fixed), if the record type is not available from the non-VSAM SORTOUT data
| set
| A record type of F (for fixed), if there is no SORTOUT data set.
| Note: OUTFIL data sets have no effect on the determination of the record type DFSORT uses for
| non-OUTFIL processing.
If you do specify a record type with a VSAM input data set, DFSORT uses your specified record type to
process your data sets.
The RECORD control statement can also be used when sorting variable-length records to supply the
minimum and average record lengths to the program.
TYPE
55──TYPE=x──────────────────────────────────────────────────────────────────────────5%
DFSORT accepts the alternate values FB, VB, and DB as equivalents for F, V, and D, respectively.
For QSAM records, the format you specify in the TYPE operand must be the same as the format you
used in the RECFM subparameter of the DCB parameter on the SORTIN and SORTOUT DD state-
ments (described in Chapter 2, “Invoking DFSORT with Job Control Language” on page 19), or that
given on the data set label. If the formats are not the same or TYPE is not specified, the program
uses the format given in the data set label/DD statement.
Default: Required when SORTIN or SORTINnn RECFM is unavailable, or DFSORT defaults to
SORTIN or SORTINnn record format. See Appendix B, “Specification/Override of DFSORT Options”
on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
LENGTH
55──LENGTH=──(───────────────────────────────────────────────────────────────────────5
5──┬─L1───────────────────────────────────────────────────────────────────┬──)──────5%
├─┬────┬──,──L2────────────────────────────────────────────────────────┤
│ └─L1─┘ │
├─┬────┬──,──┬────┬──,──L3─────────────────────────────────────────────┤
│ └─L1─┘ └─L2─┘ │
├─┬────┬──,──┬────┬──,──┬────┬──,──L4──────────────────────────────────┤
│ └─L1─┘ └─L2─┘ └─L3─┘ │
├─┬────┬──,──┬────┬──,──┬────┬──,──┬────┬──,──L5───────────────────────┤
│ └─L1─┘ └─L2─┘ └─L3─┘ └─L4─┘ │
├─┬────┬──,──┬────┬──,──┬────┬──,──┬────┬──,──┬────┬──,──L6────────────┤
│ └─L1─┘ └─L2─┘ └─L3─┘ └─L4─┘ └─L5─┘ │
└─┬────┬──,──┬────┬──,──┬────┬──,──┬────┬──,──┬────┬──,──┬────┬──,──L7─┘
└─L1─┘ └─L2─┘ └─L3─┘ └─L4─┘ └─L5─┘ └─L6─┘
Is required when you change record lengths at one or more user exits, or when the SORTIN or
SORTINnn record length (LRECL or VSAM RECSZ) is unavailable.
Note: L4 through L7 apply only to variable-length records.
L1 Input record length. For variable-length records, maximum input record length.
Notes:
Default: the SORTIN or SORTINnn record length. For VSAM data sets, the maximum record
size (RECSZ value).
L2 Record length after E15. For variable-length records, maximum record length after E15.
Notes:
Default: L1.
L3 Output record length.
Note: L3 is ignored if the record length (LRECL or VSAM RECSZ) is available from
| SORTOUT, or if E35, INREC, OUTREC, and OUTFIL are not used.
Default: One of the following:
1. SORTOUT record length if available
2. L2 if available and applicable
3. SORTIN or SORTINnn record length if available
4. L1.
Default: The minimum length needed to contain all control fields. This number must be at
least 18 bytes if the maximum input record length is greater than 18 bytes; otherwise,
DFSORT sets L4 to 18 bytes.
Notes:
1. You can drop values from the right. For example, LENGTH=(80,70,70,70).
2. You can omit values from the middle or left, provided you indicate their omission by a comma or
semicolon. For example, LENGTH=(,,,30,80).
3. Parentheses are optional when L1 alone is specified. If any of L2 through L7 is specified, with or
without L1, parentheses are required.
Example 1
MODS E15=(INEX,1ððð,EXIT),E35=(OUTEX,2ððð,EXIT)
RECORD TYPE=F,LENGTH=(6ð,4ð,5ð)
LENGTH The records in the input data set are each 60 bytes long. User exit E15 is used to change the
records to 40 bytes in the sort phase and user exit E35 is used to change the records to 50
bytes in the final merge phase.
Example 2
RECORD TYPE=V,LENGTH=(2ðð,175,18ð,5ð,8ð)
TYPE The records in the input data set are EBCDIC variable-length.
LENGTH The maximum length of the records in the input data set is 200 bytes. In the sort phase, you
reduce the maximum record length to 175 bytes. You add five bytes to each record in the final
merge phase, making the maximum record length in the output data set 180 bytes. The
minimum record length handled by the sort phase is 50 bytes and the average record length is
80 bytes.
Example 3
RECORD TYPE=V,LENGTH=(2ðð,,,,8ð)
TYPE The records in the input data set are EBCDIC variable-length records.
LENGTH The maximum length of the records in the input data set is 200 bytes. You do not change
record lengths, so you omit L2 and L3; L4 is also omitted. The average record length is 80
bytes.
┌─,───────┐
55──SORT──FIELDS=──┬─(───6─p,m,f,s─┴──)────────────┬──────────────────────────────────────5
│ ┌─,─────┐ │
├─(───6─p,m,s─┴──)──,──FORMAT=f─┤
└─┬─COPY───┬───────────────────┘
└─(COPY)─┘
5──┬─────────────────────────────────────┬──────────────────────────────────────────────5%
│ ┌─,────────────────────────────┐ │
└─,──6┬─CKPT───────────────────────┬┴──┘
├─DYNALLOC──┬──────────────┬─┤
│ └─=─┬─d─────┬──┘ │
│ ├─(d)───┤ │
│ ├─(,n)──┤ │
│ ├─(d,n)─┤ │
│ ├─OFF───┤ │
│ └─(OFF)─┘ │
├─┬─EQUALS───┬───────────────┤
│ └─NOEQUALS─┘ │
├─┬─FILSZ=──┬─x──┬─┬─────────┤
│ │ ├─Ex─┤ │ │
│ │ └─Ux─┘ │ │
│ └─SIZE=──┬─y──┬──┘ │
│ ├─Ey─┤ │
│ └─Uy─┘ │
├─SKIPREC=z──────────────────┤
└─STOPAFT=n──────────────────┘
The SORT control statement must be used when a sorting application is performed; this statement
describes the control fields in the input records on which the program sorts. A SORT statement can also
| be used to specify a copy application. User labels will not be copied to the output data sets.
The options available on the SORT statement can be specified in other sources as well. A table showing
all possible sources for these options and the order of override is given in Appendix B,
“Specification/Override of DFSORT Options” on page 459.
When an option can be specified on either the SORT or OPTION statement, it is preferable to specify it on
the OPTION statement.
| DFSORT accepts but does not process the following SORT operands: WORK and ORDER.
| DFSORT's collating behavior can be modified according to your cultural environment. The cultural envi-
| ronment is established by selecting the active locale. The active locale's collating rules affect SORT proc-
| essing as follows:
| DFSORT produces sorted records for output according to the collating rules defined in the active
| locale. This provides sorting for single- or multi-byte character data, based on defined collating rules
| that retain the cultural and local characteristics of a language.
| If locale processing is to be used, the active locale will only be used to process character (CH) control
| fields.
| For more information on locale processing, see “Cultural Environment Considerations” on page 5 or
| LOCALE in “OPTION Control Statement” on page 111.
FIELDS
┌─,───────┐
55──FIELDS=(───6─p,m,f,s─┴──)────────────────────────────────────────────────────────5%
Requires four facts about each control field in the input records: the position of the field within the
record, the length of the field, the format of the data in the field, and the sequence into which the field
is to be sorted. These facts are communicated to DFSORT by the values of the FIELDS operand,
represented by p, m, f, and s.
All control fields must be located within the first 4092 bytes of a record. However, INREC and
OUTREC can be used to rearrange the records such that fields beyond the first 4092 bytes can be
sorted as illustrated by “Example 4” on page 100.
Control fields must not extend beyond the shortest record to be sorted unless VLSHRT is in effect.
The collected control fields (comprising the control word) must not exceed 4092 bytes (or 4088 bytes
when EQUALS is in effect). The FIELDS operand can be written in two ways.
Use the first FIELDS operand format to describe control fields that contain different data formats; use
the second format (explained in the discussion of the FORMAT parameter later in this section) to
describe SORT fields that contain data of the same format. The second format is optional; if you
prefer, you can always use the first format.
The program examines the major control field first, and it must be specified first. The minor control
fields are specified following the major control field. p, m, f, and s describe the control fields. The text
that follows gives specifications in detail.
p specifies the first byte of a control field relative to the beginning of the input record.11
The first data byte of a fixed-length record has relative position 1. The first data byte of a variable-
length record has relative position 5. The first 4 bytes contain the record descriptor word. All
control fields, except binary, must begin on a byte boundary. The first byte of a floating-point field
is interpreted as a signed exponent; the rest of the field is interpreted as the fraction.
Note that the beginning of a variable-length record must include a 4-byte RDW that precedes the
actual record. This is also true for VSAM input records, for which DFSORT supplies the neces-
sary RDW on input to the program and removes it again at output (if output is to a VSAM data
set). You should therefore always add four to the byte position in variable-length records.
Fields containing binary values are described in a “bytes.bits” notation as follows:
1. First, specify the byte location relative to the beginning of the record and follow it with a
period.
2. Then, specify the bit location relative to the beginning of that byte. Remember that the first
(high-order) bit of a byte is bit 0 (not bit 1); the remaining bits are numbered 1 through 7.
Thus, 1.0 represents the beginning of a record. A binary field beginning on the third bit of the
third byte of a record is represented as 3.2. When the beginning of a binary field falls on a byte
boundary (say, for example, on the fourth byte), you can write it in one of three ways:
4.ð
4.
4
11 If INREC is specified, p must refer to the record as reformatted by INREC. If your E15 user exit reformats the record, and INREC
is not specified, p must refer to the record as reformatted by your E15 user exit.
│ │ │ │
│%───────────────byte 1────────────────5│%───────────────byte 2────────────────5│%────────────────byte 3─────────────────5│
│ bits ð - 7 │ bits ð - 7 │ bits ð - 7 │
┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬─────┬────┬────┬────┬─────┬────┬────┬────┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴─────┴────┴────┴────┴─────┴────┴────┴────┘
m specifies the length of the control field. Values for all control fields except binary fields must be
expressed in integer numbers of bytes. Binary fields can be expressed in the notation “bytes.bits”.
The length of a binary control field that is an integer value (d) can be expressed in one of three
ways:
d.ð
d.
d
The number of bits specified must not exceed 7. A control field 2 bits long would be represented
as 0.2.
The total number of bytes occupied by all control fields must not exceed 4092 (or, when the
EQUALS option is in operation, 4088 bytes). When you determine the total, count a binary field
as occupying an entire byte if it occupies any part of it. For example, a binary field that begins on
byte 2.6 and is 3 bits long occupies two bytes. All fields must be completely contained within the
first 4092 bytes of the record.
f specifies the format of the data in the control field. Acceptable control field lengths (in bytes) and
available formats are shown in Figure 39.
: CSF/FS, Y2 and PD0 format fields can only be used if Blockset is selected.
: The century window established by the Y2PAST option in effect will be used to produce the correct
: order for Y2 format fields. For example, the control statement:
: SORT FIELDS=(1,2,Y2C,A)
: in conjunction with a century window of 1915-2014, would result in the following correct two-character
: year data ordering:
: 15, 28, 95, 99, ðð, ð5, 14
The AC format sequences EBCDIC data using the ISCII/ASCII collating sequence.
If you specify more than one control field and all the control fields contain the same type of data, you
can omit the f parameters and use the optional FORMAT operand, described below.
All floating-point data must be normalized before the program can collate it properly. You can use an
E15 or E61 user exit to do this during processing. If you use E61, specify the E option for the value of
s in the FIELDS operand for each control field you are going to modify with this user exit.
s specifies how the control field is to be ordered. The valid codes are:
A ascending order
D descending order
E control fields to be modified
Specify E if you include an E61 user exit to modify control fields before the program sorts them.
After an E61 user exit modifies the control fields, DFSORT collates the records in ascending order
using the formats specified.13
13 With a conventional merge or a tape work data set sort, control fields for which E is specified are treated as binary byte format
regardless of the actual format(s) specified.
For information on how to add a user exit, see Chapter 4, “Using Your Own User Exit Routines” on
page 219.
Default: None; must be specified. See Appendix B, “Specification/Override of DFSORT Options” on
page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
FORMAT
55──FORMAT=f────────────────────────────────────────────────────────────────────────5%
FORMAT=f can be used only when all the control fields in the entire FIELDS expression have the
same format. The permissible field formats are shown under the description of 'f' for fields.
If you have specified the COPY operand, FORMAT=f cannot be specified.
Default: None; must be specified if not included in FIELDS parameter. See Appendix B,
“Specification/Override of DFSORT Options” on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
Note: If format values are specified in both FORMAT and FIELDS, DFSORT issues an information
message, uses the format values from FIELDS (f must be specified for each control field), and does
not use the format values from FORMAT.
FIELDS=COPY or FIELDS=(COPY)
55──FIELDS=──┬─COPY───┬─────────────────────────────────────────────────────────────5%
└─(COPY)─┘
See the discussion of the COPY parameter on the OPTION statement, discussed in “OPTION Control
Statement” on page 111.
CKPT
55──CKPT────────────────────────────────────────────────────────────────────────────5%
See the discussion of this operand on the OPTION statement, discussed in “OPTION Control
Statement” on page 111.
DYNALLOC
55──DYNALLOC──┬──────────────┬──────────────────────────────────────────────────────5%
└─=─┬─d─────┬──┘
├─(d)───┤
├─(,n)──┤
├─(d,n)─┤
├─OFF───┤
└─(OFF)─┘
See the discussion of this parameter in “OPTION Control Statement” on page 111.
EQUALS or NOEQUALS
55──┬─EQUALS───┬────────────────────────────────────────────────────────────────────5%
└─NOEQUALS─┘
See the discussion of this parameter in “OPTION Control Statement” on page 111.
FILSZ or SIZE
55──┬─FILSZ=──┬─x──┬─┬──────────────────────────────────────────────────────────────5%
│ └─Ex─┘ │
└─SIZE=──┬─y──┬──┘
└─Ey─┘
See the discussion of this parameter in “OPTION Control Statement” on page 111.
SKIPREC
55──SKIPREC=z───────────────────────────────────────────────────────────────────────5%
See the discussion of this parameter in “OPTION Control Statement” on page 111.
STOPAFT
55──STOPAFT=n───────────────────────────────────────────────────────────────────────5%
See the discussion of this parameter in “OPTION Control Statement” on page 111.
Example 1
SORT FIELDS=(2,5,FS,A),FILSZ=29483
FIELDS The control field begins on the second byte of each record in the input data set, is five bytes
long, and contains floating sign data. It is to be sorted in ascending order.
Example 2
| SORT FIELDS=(7,3,CH,D,1,5,FI,A,398.4,7.6,BI,D,99.ð,23ð.2,
| BI,A,452,8,FL,A),DYNALLOC=(339ð,4)
FIELDS The first four values describe the major control field. It begins on byte 7 of each record, is
3 bytes long, and contains character (EBCDIC) data. It is to be sorted in descending
order.
The next four values describe the second control field. It begins on byte 1, is 5 bytes long,
contains fixed-point data, and is to be sorted in ascending order.
The third control field begins on the fifth bit (bits are numbered 0 through 7) of byte 398.
The field is 7 bytes and 6 bits long (occupies 9 bytes), and contains binary data to be
placed in descending order.
The fourth control field begins on byte 99, is 230 bytes and 2 bits long, and contains
binary data. It is to be sorted in ascending order.
The fifth control field begins on byte 452, is 8 bytes long, contains normalized floating-point
data, which is to be sorted in ascending order. If the data in this field were not normal-
ized, you could specify E instead of A and include your own E61 user exit routine to nor-
malize the field before the program examined it.
| DYNALLOC Four work data sets are allocated on 3390. The space on each data set is calculated
using the FILSZ value.
Example 3
SORT FIELDS=(3,8,ZD,E,4ð,6,CH,D)
FIELDS The first four values describe the major control field. It begins on byte 3 of each record, is 8
bytes long, and contains zoned decimal data that is modified by your routine before sort exam-
ines the field.
The second field begins on byte 40, is 6 bytes long, contains character (EBCDIC) data, and is
sorted in descending sequence.
Example 4
SORT FIELDS=(25,4,A,48,8,A),FORMAT=ZD,EQUALS
FIELDS The major control field begins on byte 25 of each record, is 4 bytes long, contains zoned
decimal data (FORMAT=ZD), and is to be sorted in ascending sequence.
The second control field begins on byte 48, is 8 bytes long, has the same data format as the
first field, and is also to be sorted in ascending order.
FORMAT The FORMAT=f option can be used because both control fields have the same data format. It
would also be correct to write this SORT statement as follows:
SORT FIELDS=(25,4,ZD,A,48,8,ZD,A),EQUALS
EQUALS specifies that the sequence of equal collating records is to be preserved from input to output.
Example 5
SORT FIELDS=COPY
FIELDS The input data set is copied to the output data set without sorting or merging.
: Example 6
: SORT FIELDS=(12,1,Y2D,A,13,2,PD,A)
: FIELDS Sorts a packed decimal date field of the form yydddF. yy represents the two-digit year, ddd
: represents the day and F represents a positive sign. The first control field begins on byte 12 of
: each record, is 1 byte long and is to be sorted in ascending sequence using the century window
: in effect to interpret the two-digit years as four-digit years. The second control field begins on
: byte 13 of each record, is 2 bytes long, contains packed decimal data, and is to be sorted in
: ascending sequence.
┌─,─────┐
55──SUM──FIELDS=──┬─(───6─p,m,f─┴──)──────────┬──────────────────────────────────────────5%
│ ┌─,───┐ │
├─(───6─p,m─┴──),──FORMAT=f─┤
└─┬─NONE───┬───────────────┘
└─(NONE)─┘
| The SUM control statement specifies that, whenever two records are found with equal sort or merge
| control fields, the contents of their summary fields are to be added, the sum is to be placed in one of the
records, and the other record is to be deleted.
FIELDS
┌─,─────┐
55──FIELDS=──(───6─p,m,f─┴──)────────────────────────────────────────────────────────5%
p specifies the first byte of the field relative to the beginning of the input record.14 The first data
byte of a fixed-length record has relative position 1. The first data byte of a variable-length
record has relative position 5, as the first four bytes are occupied by the RDW. All fields
must start on a byte boundary, and no field can extend beyond byte 4092.
m specifies the length in bytes of the summary fields to be added. See below for permissible
length values.
14 If INREC is specified, p must refer to the record as reformatted by INREC. If your E15 user exit reformats the record, and INREC
is not specified, p must refer to the record as reformatted by your E15 user exit.
NONE or (NONE)
| eliminates records with duplicate keys. Only one record with each key is kept and no
| summing is performed.
| Note: ICETOOL's SELECT operator can perform the same function as SUM FIELDS=NONE, as well
| as other functions related to records with duplicate keys.
Default: None; must be specified.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
FORMAT
55──FORMAT=f────────────────────────────────────────────────────────────────────────5%
FORMAT=f can be used only when all the summary fields in the entire FIELDS expression have the
same format. The permissible field formats are shown under the description of 'f' for FIELDS.
Default: None. Must be specified if not included in the FIELDS parameter. See Appendix B,
“Specification/Override of DFSORT Options” on page 459 for full override details.
Applicable Functions: See Appendix B, “Specification/Override of DFSORT Options” on page 459.
Note: If format values are specified in both FORMAT and FIELDS, DFSORT issues an information
message, uses the format values from FIELDS (f must be specified for each summary field), and does not
use the format values from FORMAT.
Summary fields must not be control fields. They must not overlap control fields, or each other, and
must not overlap the RDW.
: FL values to be summed can be normalized or unormalized. However, the resulting FL values are
: always normalized. Normalization processing by the hardware can produce different sums for FL
: values summed in different orders.
: Exponent overflow for summed FL values results in an exponent overflow exception (0CC ABEND)
: Exponent underflow for summed FL values results in a true zero result.
When records are summed, you can predict which record is to receive the sum (and be retained) and
| which record is to be deleted only when EQUALS is in effect, overflow does not occur, and the
BLOCKSET technique is used. In this case, the first record (based on the sequence described under
the discussion of the EQUALS or NOEQUALS parameter of the “OPTION Control Statement” on
page 111) is chosen to contain the sum.
Fields other than summary fields remain unchanged and are taken from the record that receives the
sum.
: If overflow occurs for BI, FI, PD or ZD values, the two records involved are left unsummed. That is,
: the contents of the records are left undisturbed, neither record is deleted, and the records are still
: available for summing. Overflow does not prevent further summing.
DFSORT issues a message and terminates processing if a SUM statement is specified for a tape work
data set sort or Conventional merge.
Example 1
SUM FIELDS=(21,8,PD,11,4,FI)
This statement designates an 8-byte packed decimal field at byte 21, and a 4-byte fixed-integer field at
byte 11, as summary fields.
| Example 2
| SUM FIELDS=NONE
Example 3
SUM FIELDS=(41,8,49,4),FORMAT=ZD
OPTION ZDPRINT
| These statements illustrate the use of the FORMAT operand and the ZDPRINT option. The SUM state-
| ment designates two zoned decimal fields, one 8 bytes long starting at byte 41, and the other 4 bytes long
| starting at byte 49. As a result of the ZDPRINT option, the positive summed ZD values will be printable.
| Note, however, that the ZDPRINT option does not affect ZD values which are not summed due to overflow
| or unique keys. The next example shows how to use OUTFIL to make all summary fields printable.
| Example 4
| SUM FIELDS=(41,8,49,4),FORMAT=ZD
| OUTFIL OUTREC=(1,4ð,41,8,ZD,M11,49,4,ZD,M11,53,28)
| These statements illustrate the use of the OUTFIL statement to ensure that all positive ZD summary fields
| in the output data set are printable. Whereas the ZDPRINT option affects only positive summed ZD fields,
| OUTFIL can be used to edit positive or negative BI, FI, PD, or ZD values, whether they are summed or
| not. OUTFIL can also be used to produce multiple output data sets, reports, and so on. See “OUTFIL
| Control Statements” on page 141 for complete details about OUTFIL processing.
| Note: For purposes of illustration, this example assumes that the input records are 80 bytes long.
DFSORT can pass program control to your own routines at points in the executable code called user exits.
Your user exit routines can perform a variety of functions including deleting, inserting, altering, and sum-
marizing records.
If you need to perform these tasks, you should be aware that DFSORT already provides extensive facili-
| ties for working with your data in the various DFSORT program control statements. See the discussions
| of the INCLUDE, OMIT, INREC, OUTFIL, OUTREC, and SUM program control statements in Chapter 3,
| “Using DFSORT Program Control Statements” on page 59. You might decide that using a program
control statement to work with your records is more appropriate to your needs.
Although this chapter discusses only routines written in assembler or COBOL, you can write your exit
routines in any language that can:
Pass and accept the address into general register 1 of a:
– Record
– Full word of zeros
– Parameter list.
Pass a return code in register 15.
You can easily activate user exit routines at run-time with the MODS program control statement (see
“MODS Control Statement” on page 105). Alternatively, under certain circumstances you can also acti-
vate a user exit routine by passing the address of your exit routine in the invocation parameter list. See
Chapter 5, “Invoking DFSORT from a Program” on page 265 for details.
Parameters that affect the way user exit routines are handled include:
The MODS program control statement, explained in “MODS Control Statement” on page 105
The COBEXIT option of the ICEMAC installation macro, explained in “Installation Defaults” on page 13
The E15=COB and E35=COB PARM options of the EXEC statement, explained in “Specifying
EXEC/DFSPARM PARM Options” on page 24
The COBEXIT option of the OPTION program control statement, explained in “OPTION Control
Statement” on page 111
The ICEMAC installation option EXITCK, explained in “E15/E35 Return Codes and EXITCK” on
page 262.
Note: To avoid ambiguity in this chapter, it is assumed that the IBM default, EXITCK=STRONG, was
selected at your site.
Certain user exit routines can be written in COBOL, using a special interface. If you write your exit rou-
tines in PL/I, you must use the PL/I subroutine facilities.
You might need to reserve space to be used by your exits. See “Use Main Storage Efficiently” on
page 405 for more information about storage.
Figure 41 on page 222, Figure 42, and Figure 43 on page 224 summarize the functions of user exit rou-
tines and the exits and phases with which they can be associated.
Figure 43. Functions of Routines at Program User Exits (Copy and Merge)
Functions Copy Merge
| Open/Initialize E15, E31 user exits E31 user exit
| Modify control fields N/A E61 user exit
| Insert E15, E35 user exits E32, E35 user exits
| Delete/alter E15, E35 user exits E35 user exit
| Sum records E35 user exit E35 user exit1
| Handle special I/O conditions:
| QSAM/BSAM and VSAM SORTIN(nn) E38 user exit E38 user exit
| QSAM/BSAM and VSAM SORTOUT E39 user exit E39 user exit
Close/housekeeping E35, E37 user exits E35, E37 user exits
Terminate DFSORT E15, E35 user exits E32, E35 user exits
Note:
1. The SUM control statement can be used instead of your own routine to sum records.
To check labels on input files, use the E18 and E38 user exits.
When an E61 user exit is used, the subsequent comparisons always arrange the modified control fields in
ascending order.
Note: Although you are altering control fields before a compare, your original records are not altered.
Summing Records
| You can sum records for output by using the E35 user exit. However, you can also use DFSORT's SUM
program control statement to accomplish this without a user exit. See “SUM Control Statement” on
page 215.
You can use these exits to incorporate your own or your site’s I/O error recovery routines into DFSORT.
Your read and write error routines must reside in a partitioned data set (library). Your library routines are
brought into main storage with their associated phases. When DFSORT encounters an uncorrectable I/O
error, it passes the same parameters as those passed by QSAM/BSAM or VSAM. If no user routines are
supplied and an uncorrectable read or write error is encountered, DFSORT issues an error message and
then terminates.
With QSAM/BSAM, the following information is passed to your synchronous error routine:
General registers 0 and 1 are unchanged; they contain the information passed by QSAM/BSAM, as
documented in the data management publications.
General register 14 contains the return address of DFSORT.
General register 15 contains the address of your error routine.
VSAM will go directly to any routine specified in the EXLST macro you passed to DFSORT via the E18,
| E38, or E39 user exit, as appropriate. Your routine must return to VSAM via register 14. For details, see
| Macro Instructions for Data Sets or Using Data Sets.
Routines for Read Errors: You must associate these routines with the E18 and E38 user exits. They
must pass certain control block information back to DFSORT to tell it whether to accept the record as it is,
skip the block, or request termination. They can also attempt to correct the error.
| Routines for Write Errors: You must associate these routines with the E19 and E39 user exits. These
| routines can perform any necessary abnormal end-of-task operations for SORTOUT before DFSORT is
| terminated.
| VSAM User Exit Functions: There are three user exits that can be used with VSAM SORTIN,
| SORTINnn, and SORTOUT data sets (but not with OUTFIL data sets), to supply passwords or a user exit
| list to journal a VSAM data set. They can carry out other VSAM exit functions except EODAD. The user
| exits are E18 for sort SORTIN, E38 for merge SORTINnn or copy SORTIN, and E39 for SORTOUT.
Terminating DFSORT
You can write an exit routine to terminate DFSORT before all records have been processed. You must
associate these routines with the E15, E16, E32, and E35 user exits.
| Note: If a user exit requests termination for an application using a BatchPipes/MVS data set, DFSORT
| will terminate with user abend zero. This allows for appropriate error propagation by the system to other
| applications that may be accessing the same BatchPipes/MVS data set.
– If the user exit is entered with 24-bit addressing in effect, DFSORT passes clean (zeros in the first
8 bits) 24-bit addresses to the user exit. Such a user exit must pass 24-bit addresses back to
DFSORT. These must be clean 24-bit addresses if the user exit returns to DFSORT with 31-bit
addressing in effect.
– If the user exit is entered with 31-bit addressing in effect, DFSORT passes clean 24-bit addresses
to the user exit. Such a user exit must pass 31-bit addresses or clean 24-bit addresses back to
DFSORT. The only exception is when the high-order byte is used to identify an optional address
being passed (for example, E18 SYNAD address). In this case, DFSORT cleans the 24-bit
address.
| Note: For a conventional merge or tape work data set sort application, user exits:
| – must reside below 16-megabyte virtual
| – must use 24-bit addressing mode
| – must not use a user exit address constant.
DFSORT includes the names and locations of your user exits in the list of modules to be run during each
phase. No user exit is loaded more than once in a program phase, but the same user exit can appear in
different phases. For example, you can use the same Read Error user exit in both phases, but not twice
in one phase.
The length you specify for a user exit must include storage for the user exit itself as well as any storage
used by the user exit outside of the load modules such as I/O buffers or COBOL library subroutines. If
you specify a ddname for a user exit in the MODS statement, it must match the DD statement that defines
the library containing that user exit. For example:
The general registers used by DFSORT for linkage and communication of parameters observe operating
system conventions. When your routine gets control, the general registers have the following contents:
Register Contents
1 DFSORT places the address of a parameter list in this register.
13 DFSORT places the address of a standard save area in this register. The area can be
used to save contents of registers used by your user exit. The first word of the area con-
tains the characters SM1 in its three low-order bytes.
14 Contains the address of DFSORT return point.
15 Contains the address of your user exit. This register can be used as a base register for
your user exit; your user exit can also use it to pass return codes to DFSORT.
You can return control to DFSORT by performing a branch to the DFSORT return point address in register
14 or by using a RETURN macro instruction. The RETURN instruction can also be used to set return
codes when multiple actions are available at a user exit.
Your user exit must save all the general registers it uses. You can use the SAVE macro instruction to do
this. If you save registers, you must also restore them; you can do this with the RETURN macro instruc-
tion.
Linkage Examples: When calling your user exit, DFSORT places the return address in general reg-
ister 14 and your routine's entry point address in general register 15. DFSORT has already placed the
register's save area address in general register 13. DFSORT then makes a branch to your routine.
Your routine for the E15 user exit might incorporate the following assembler instructions:
ENTRY E15
.
.
E15 SAVE (5,9)
.
.
RETURN (5,9)
This coding saves and restores the contents of general registers 5 through 9. The macro instructions are
expanded into the following assembler language code:
ENTRY E15
.
.
E15 STM 5,9,4ð(13)
.
.
LM 5,9,4ð(13)
BR 14
If multiple actions are available at a user exit, your routine sets a return code in general register 15 to
inform DFSORT of the action it is to take. The following macro instruction can be used to return to
DFSORT with a return code of 12 in register 15:
RETURN RC=12
A full explanation of linkage conventions and the macro instructions discussed in this section is in Applica-
tion Development Macro Reference.
Dynamic link-editing does not support AMODE 31 or RMODE 31 for the link-edit option T. The user exits
that are link-edited together by DFSORT are not loaded above 16-megabyte virtual and cannot be entered
in 31-bit addressing mode. User exits link-edited with the S option retain the AMODE and RMODE attri-
butes of the object modules and are loaded above or below 16-megabyte virtual depending upon the load
module's RMODE; they are entered in the addressing mode of the user exit.
Notes:
1. The Blockset technique is not used for dynamic link-editing.
2. Dynamic link-editing cannot be used with copy.
When the link-edit option T is specified for a user exit routine, that routine must contain an entry point
whose name is that of the associated program user exit. This is to accommodate special DFSORT
dynamic link-edit requirements. For example, when the link-edit option T is specified on the MODS state-
ment for E35, the following assembler instructions must be included in the user exit routine associated
with the E35 user exit:
ENTRY E35
E35 .
.
or
E35 CSECT
.
.
In all other circumstances, the user exit is not required to have an entry point that has the same name as
that of the associated program user exit.
E15 User Exit: Passing or Changing Records for Sort and Copy
Applications
If you write your E15 user exit in COBOL, see “COBOL User Exit Routines” on page 247 and “COBOL
E15 User Exit: Passing or Changing Records for Sort” on page 250.
The ICEMAC installation option EXITCK affects the way DFSORT interprets certain return codes from user
exit E15. To avoid ambiguity, this section assumes that the IBM default, EXITCK=STRONG, was selected
at your site. For complete information about E15 return codes in various situations with
EXITCK=STRONG and EXITCK=WEAK, see “E15/E35 Return Codes and EXITCK” on page 262.
DFSORT enters the E15 user exit routine each time a new record is brought into the input phase.
DFSORT continues to enter E15 (even when there are no input records) until the user exit tells DFSORT,
with a return-code of 8, not to return.
If your E15 user exit is inserting variable-length records, you must be sure they contain a 4-byte RDW at
the beginning of each record before the routine passes it to DFSORT. The format of an RDW is
described in Using Data Sets or System Programming Reference. (Alternatively, you can declare the
records as fixed-length and pad them to the maximum length.)
Notes:
1. If you use the E15 user exit to pass all your records to DFSORT, you can omit the SORTIN DD
statement, in which case you must include a RECORD statement in the program control statements.
2. If you invoke DFSORT from an assembler program and pass the address of your E15 user exit in the
parameter list, DFSORT ignores the SORTIN data set and terminates if you specify E15 in a MODS
statement.
| 3. If you omit the SORTIN DD statement, or it is ignored, all input records are passed to DFSORT
through your routine at user exit E15. The address of each input record in turn is placed in general
register 1, and you return to DFSORT with a return code of 12. When DFSORT returns to the E15
user exit after the last record has been passed, you return to DFSORT with a return code of 8 in
register 15, which indicates “do not return.”
4. DFSORT continues to reenter your E15 user exit until a return code of 8 is received. However, if
STOPAFT is in effect, no additional records are inserted to DFSORT after the STOPAFT count is
satisfied (even if you pass back a return code of 12).
5. An RDW must be built for variable-length VSAM records (see Using Data Sets).
Information DFSORT Passes to Your Routine at E15 User Exit: Your E15 user exit
routine is entered each time a new record is brought into the input phase. DFSORT passes two words to
your routine each time it is entered:
The address of the new record. End of input is reached when there are no more records to pass to
your E15 user exit; DFSORT indicates end of input by setting this address to zero before entering your
E15 user exit. If there are no records in the input data set (or no input data set), this address is zero
the first time your E15 is entered.
After end of input is reached, DFSORT continues to enter your user exit routine until you pass back a
return code of 8.
Your E15 user exit must not change the address of the new record.
The user exit address constant. If you invoked DFSORT with a user exit address constant in the
parameter list, the address constant is passed to your E15 user exit the first time it is entered. This
address constant can be changed by your E15 user exit any time it is entered; the address constant is
passed along on subsequent entries to your E15 user exit and also on the first entry to your E35 user
exit. For example, you can obtain a dynamic storage area, use it in your E15 user exit, and pass its
address to your E35 user exit.
| Note: The user exit address constant must not be used for a Conventional merge or tape work data set
| sort application.
In general register 1, DFSORT places the address of a parameter list that contains the record address and
the user address constant.
The list is two fullwords long and begins on a fullword boundary. The format of the parameter list is:
| E15 Return Codes: Your E15 routine must pass a return code to DFSORT. Following are the return
codes for the E15 user exit:
Return Code Description
00 (X'00') No Action/Record Altered
04 (X'04') Delete Record
08 (X'08') Do Not Return
12 (X'0C') Insert Record
16 (X'10') Terminate DFSORT
0: No Action
If you want DFSORT to retain the record unchanged, place the address of the record in general reg-
ister 1 and return to DFSORT with a return code of 0 (zero).
0: Record Altered
If you want to change the record before passing it back to DFSORT, your routine must move the
record into a work area, perform whatever modification you want, place the address of the modified
record in general register 1, and return with a return code of 0 (zero). If your routine changes record
size, you must communicate that fact to DFSORT on a RECORD statement. (For details of the
RECORD statement, see “RECORD Control Statement” on page 203 and Application Development
Macro Reference for further information about the length indicator and the RDW.)
4: Delete Record
If you want DFSORT to delete the record from the input data set, return to DFSORT with a return
code of 4. You need not place the address of the record in general register 1.
8: Do Not Return
| DFSORT continues to return control to the user routine until it receives a return code of 8. After that,
| the user exit is not used again during the DFSORT application. You need not place an address in
general register 1 when you return with a return code of 8. Unless you are inserting records after the
end of the data set, you must pass a return code of 8 when the program indicates the end of the data
set. It does this by passing your routine a zero address in the parameter list.
If your user exit routine passes a return code of 8 to DFSORT when input records still remain to be
processed, the remaining records are processed by DFSORT, but are not passed to your user exit.
can insert more records at that point or alter the current record. You can make insertions after the last
record in the input data set (after DFSORT places a zero address in the parameter list). DFSORT
keeps returning to your routine until you pass a return code of 8.
16: Terminate DFSORT
If you want to terminate DFSORT, return with a code of 16. DFSORT then returns to its calling
program or to the system with a return code of 16.
See “E15/E35 Return Codes and EXITCK” on page 262 for complete details of the meanings of return
codes in various situations.
| E16 Return Codes: Your E16 routine must pass a return code to DFSORT. Following are the return
codes for the E16 user exit:
Return Code Description
00 (X'00') Sort Current Records Only
04 (X'04') Try to Sort Additional Records
08 (X'08') Terminate DFSORT
8: Terminate DFSORT
If you want DFSORT to terminate, return with a return code of 8. DFSORT then returns to its calling
program or to the system with a return code of 16.
Using E18 User Exit with QSAM/BSAM: Your routines at this user exit can pass DFSORT a
parameter list containing the specifications for three data control block (DCB) fields: SYNAD, EXLST, and
EROPT. Your E18 user exit routine can also pass a fourth DCB field (EODAD) to DFSORT.
Note: If you are using a disk sorting technique, the EROPT option is ignored.
Your routines are entered at the beginning of each phase so that DFSORT can obtain the parameter lists.
The routines are entered again during processing of the phase at the points indicated in the parameter
lists. For example, if you choose the EXLST option, DFSORT enters your E18 user exit routine early in
the sort (input) phase. DFSORT picks up the parameter list including the EXLST address. Later in the
phase, DFSORT enters your routine again at the EXLST address when the data set is opened.
Information Your Routine Passes to DFSORT at E18 User Exit: Before returning control to DFSORT,
your routine passes the DCB fields in a parameter list by placing the parameter list address in general
register 1. The parameter list must begin on a fullword boundary and be a whole number of fullwords
long. The high-order byte of each word must contain a character code that identifies the parameter. One
or more of the words can be omitted. A word of all zeros marks the end of the list.
SYNAD
Contains the location of your read synchronous error routine. This routine is entered only after the
operating system has tried unsuccessfully to correct the error. The routine must be assembled as part
of your E18 user exit routine. When the routine receives control, it must not store registers in the save
area pointed to by register 13.
EXLST
Contains the location of a list of pointers to routines that you want used to check labels and accom-
plish other tasks not handled by data management. The list, and the routines to which it points, must
be included in your read error routine. This parameter can only be used for EXLST routines associ-
ated with opening the first SORTIN data set.
EROPT
Indicates what action DFSORT must take when it encounters an uncorrectable read error. The three
possible actions and the codes associated with them are:
If you include this parameter in the DCB field list, you must place one of the above codes in byte 4 of
the word. Bytes 2 and 3 of the word must contain zeros.
When you use the EROPT option, the SYNAD field and the EODAD field must contain the appropriate
address in bytes 2 through 4. Or, if no routine is available, bytes 2 and 3 must contain zeros, and
byte 4 must contain X'01'. You can use the assembler instruction DC AL3(1) to set up bytes 2
through 4.
EODAD
Contains the address of your end-of-file routine. If you specify EODAD, you must include the end-of-
file routine in your own routine.
| A full description of these DCB fields is contained in Macro Instructions for Data Sets.
Using E18 User Exit with VSAM: If input to DFSORT is a VSAM data set, you can use the E18
user exit to perform various VSAM user exit functions and to insert passwords in VSAM input ACBs.
E18 User Exit Restrictions: If passwords are to be entered through a user exit and Blockset is not
selected, the data set cannot be opened during the initialization phase. This means that
MAINSIZE|SIZE=MAX must not be used because the program cannot make the necessary calculations.
Information Your Routine Passes to DFSORT at E18 User Exit: When you return to DFSORT, you
must place the address of a parameter list in general register 1:
If QSAM parameters are passed instead, they are accepted but ignored.
Either address entry can be omitted; if they both are included, they can be in any order.
E18 Password List: A password list included in your routine must have the following format:
8 bytes: ddname
8 bytes: Password
The last byte of the ddname field is destroyed by DFSORT. This list must not be altered at any time
during the program. MAINSIZE|SIZE=MAX must not be used if this function is used.
E18 User Exit List: The VSAM user exit list must be built using the VSAM EXLST macro instruction
giving the addresses of your routines handling VSAM user exit functions. VSAM branches directly to your
routines which must return to VSAM via register 14.
Any VSAM user exit function available for input data sets can be used except EODAD. If you need to do
EODAD processing, write a LERAD user exit and check for X'04' in the FDBK field of the RPL. This will
indicate input EOD. This field must not be altered when returning to VSAM because it is also needed by
DFSORT.
Figure 45 shows an example of code your program can use to return control to DFSORT.
ENTRY E18
.
.
E18 LA 1,PARMLST
RETURN
CNOP ð,4
PARMLST DC X'ð1'
DC AL3(SER)
DC X'ð2'
DC AL3(LST)
DC X'ð3'
DC X'ðððð8ð' EROPT CODE
DC A(ð)
DC X'ð4'
DC AL3(QSAMEOD)
DC X'ð5'
DC AL3(VSAMEXL)
DC X'ð6'
DC AL3(PWDLST)
DC A(ð)
.
.
VSAMEXL EXLST SYNAD=USYNAD,LERAD=ULERAD
PWDLST DC H'1'
DC CL8'SORTIN' SORTIN DDNAME
DC CL8'INPASS' SORTIN PASSWORD
USYNAD ... VSAM SYNCH ERROR RTN
ULERAD ... VSAM LOGIC ERROR RTN
SER ... QSAM ERROR RTN
LST DC X'85',AL3(RTN) EXLST ADDRESS LIST1
RTN ... EXLST ROUTINE
QSAMEOD ... QSAM END OF FILE ROUTINE
Using E19 User Exit with QSAM/BSAM: Your routines at this user exit can pass DFSORT a
parameter list containing the specifications for two DCB fields (SYNAD and EXLST). Your routines are
entered first early in the input phase so that DFSORT can obtain the parameter lists. The routines are
entered again later in the phase at the points indicated by the options in the parameter lists.
Information Your Routine Passes to DFSORT at E19 User Exit: Before returning control to DFSORT,
your routine passes the DCB fields in a parameter list by placing the parameter list address in general
register 1. The list must begin on a fullword boundary and must be a whole number of fullwords long.
The first byte of each word must contain a character code that identifies the parameter. Either word can
be omitted. A word of all zeros indicates the end of the list.
SYNAD
This field contains the location of your write synchronous error routine. This routine is entered only
after the operating system has unsuccessfully tried to correct the error. It must be assembled as part
of your own routine.
EXLST
The EXLST field contains the location of a list of pointers. These pointers point to routines that are
used to process labels and accomplish other tasks not handled by data management. This list, and
the routines to which it points, must be included as part of your own routine.
| A full description of these DCB fields can be found in Macro Instructions for Data Sets.
Notes:
1. Routine E61 will not be used with EFS fields that have a D1 format.
2. Although your E61 routine alters control fields before a compare, your original records are not altered.
| 3. If locale processing is used for SORT or MERGE fields, an E61 user exit must not be used.
| DFSORT's locale processing may eliminate the need for an E61 user exit. See “OPTION Control
| Statement” on page 111 for information related to locale processing.
15 With a conventional merge or a tape work data set sort, control fields for which E is specified are treated as binary byte format
regardless of the actual format(s) specified.
Some Uses of E61 User Exit: Your routine can normalize floating-point control fields or change
any other type of control field in any way that you desire. You need to be familiar with the standard data
formats used by the operating system before modifying control fields.
If you want to modify the collating sequence of EBCDIC data, for example, to permit the alphabetic col-
lating of national characters, you can do so without the need for an E61 user exit routine by using the
ALTSEQ control statement (as described in “ALTSEQ Control Statement” on page 67).
Information DFSORT Passes to Your Routine at E61 User Exit: DFSORT places the
address of a parameter list in general register 1. The list begins on a fullword boundary and is three
fullwords long. The parameter list for the E61 user exit is as follows:
The control field length allows you to write a more generalized modification routine.
To alter the control field, change the control field image at the indicated address (changing the address
itself will have no effect).
The control field number is relative to all fields in the SORT or MERGE statement. For example, if you
specify:
SORT FIELDS=(4,2,CH,A,8,1ð,CH,E,25,2,BI,E)
field numbers 2 and 3 will be passed to user exit E61.
For all fields except binary, the total number of bytes DFSORT passes to your routine is equal to the
length specified in the m parameter of the SORT or MERGE statement.
All binary fields passed to your routine contain a whole number of bytes; all bytes that contain any bits of
the control field are passed. If the control field is longer than 256 bytes, DFSORT splits it into fields of
256 bytes each and passes them one at a time to your routine.
Your routine cannot physically change the length of the control field. If you must increase the length for
collating purposes, you must previously specify that length in the m parameter of the SORT or MERGE
statement. If you must shorten the control field, you must pad it to the specified length before returning it
to DFSORT. Your routine must return the field to DFSORT with the same number of bytes that it con-
tained when your routine was entered.
When user exit E61 is used, records are always ordered into ascending sequence. If you need some
other sequence, you can modify the fields further; for example, if after carrying out your planned modifica-
tion for a binary control field, and before handing back control to DFSORT, you reverse all bits, the field is,
in effect, collated in descending order as illustrated by the E61 example in Figure 53 on page 247.
Note that if E61 is used to resolve ISCII/ASCII collating for special alphabetic characters, substituted char-
acters must be in EBCDIC, but the sequencing depends upon the byte value of the ISCII/ASCII translation
for the substituted character.
If input is variable-length records, you must be sure the beginning of each record contains a 4-byte RDW
| before merged. The format of an RDW is described in Macro Instructions for Data Sets. (Alternatively,
you can declare the records as fixed-length and pad them to the maximum length.)
Information DFSORT Passes to Your Routine at E32 User Exit: Your E32 user exit
routine is entered each time the merge program requires a new input record. DFSORT passes a two-
word parameter list to your routine. The address of the list is in general register 1.
The file increment is 0,4,8,...,N–4, where N is four times the number of input files. Thus, the increment 0
(zero) represents the first input file, 4 the second file, 8 the third, and so on.
Your routine must provide a separate input buffer for each input file used. An input buffer containing the
first record for a file must not be altered until you have passed the first record from each file to DFSORT.
E32 Return Codes: Your E32 routine must pass a return code to DFSORT. Following are the return
codes for the E32 user exit:
Return Code Description
08 (X'08') End of the data set requested (no record returned)
12 (X'0C') Insert record
16 (X'10') Terminate DFSORT
The ICEMAC installation option EXITCK effects the way DFSORT interprets certain return codes from user
exit E35. To avoid ambiguity, this section assumes that the IBM default, EXITCK=STRONG, was selected
at your site. For complete details of the meaning of E35 return codes in various situations with
EXITCK=STRONG and EXITCK=WEAK, see “E15/E35 Return Codes and EXITCK” on page 262.
| DFSORT enters the E35 user exit routine each time it prepares to place a record in the output area.
Notes:
| 1. If you use the E35 user exit to dispose of all your output records, you can omit the SORTOUT DD
| statement.
| 2. If you invoke DFSORT from a program and you pass the address of your E35 user exit in the param-
| eter list:
| DFSORT ignores the SORTOUT data set (but not any OUTFIL data sets).
| DFSORT terminates if you specify E35 in a MODS statement.
| 3. If you omit the SORTOUT DD statement or it is ignored, and you do not specify any OUTFIL data
| sets, your E35 user exit routine must dispose of each output record and return to DFSORT with a
| return code of 4. When DFSORT returns to your routine after you have disposed of the last record,
return to DFSORT with a return code of 8 to indicate “do not return.”
4. If your E35 user exit routine is inserting variable-length records, you must be sure the beginning of
each record contains the 4-byte RDW before the routine passes the record to DFSORT. The format
of an RDW is described in Managing Non-VSAM Data Sets or System Programming Reference.
(Alternatively, you can declare the records as fixed-length and pad them to the maximum length.)
5. Remember that if input records are variable-length from a VSAM data set, they will have been prefixed
by a 4-byte RDW.
6. After records have been put into the output area, their lengths cannot be increased.
| 7. For a merge application, records deleted by an E35 user exit routine are not sequence-checked. If
| you use an E35 user exit routine without an output data set, sequence checking is not performed. In
this case, you must ensure that the records are sequenced correctly.
Information DFSORT Passes to Your Routine at E35 User Exit: Your E35 user exit
routine is entered each time DFSORT prepares to place a record (including the first record) in the output
area. DFSORT passes three words to your routine:
The address of the record leaving DFSORT, which usually follows the record in the output area.
End of input is reached when there are no more records to pass to your E35 user exit; DFSORT
indicates end of input by setting this address to zero before entering your E35 user exit.
After end of input is reached, DFSORT continues to enter your user exit routine until a return code of
8 is passed back.
Your E35 user exit must not change the address of the record leaving DFSORT.
The address of a record in the output area is zero the first time your routine is entered because
there is no record in the output area at that time. It remains zero provided you pass a return code of
4 (delete record) to DFSORT.
Note: If the record pointed to is variable-length, it has an RDW at this point even if output is to a
VSAM data set.
The user exit address constant is passed to your user exit exactly as it was set by your E15 user
exit or invoking program's parameter list.
| Note: The user exit address constant must not be used for a Conventional merge or tape work data set
| sort application.
In general register 1, DFSORT places the address of a parameter list. That parameter list contains the
two record addresses and the user exit address constant. The list is three fullwords long and begins on a
fullword boundary. The format of the parameter list is:
E35 Return Codes: Your E35 routine must pass a return code to DFSORT. Following are the return
codes for the E35 user exit:
Return Code Description
00 (X'00') No Action/Record Altered
04 (X'04') Delete Record
08 (X'08') Do Not Return
12 (X'0C') Insert Record
16 (X'10') Terminate DFSORT
0: No Action
If you want DFSORT to retain the record unchanged, load the address of the record leaving DFSORT
in general register 1 and return to DFSORT with a return code of 0 (zero).
0: Record Altered
If you want to change the record before having it placed in the output data set, move the record to a
work area, make the change, load the address of the modified record into general register 1, and
return to DFSORT with a return code of 0 (zero). If you change record size, you must communicate
that fact to DFSORT in a RECORD statement.
4: Delete Record
Your routine can delete the record leaving DFSORT by returning to DFSORT with a return code of 4.
You need not place an address in general register 1.
8: Do Not Return
| DFSORT keeps returning to your routine until you pass a return code of 8. After that, the user exit is
| not used again during the DFSORT application. When you return with a return code of 8, you need
not place an address in general register 1. Unless you are inserting records after the end of the data
set, you must pass a return code of 8 when DFSORT indicates the end of the data set. This is done
by passing a zero as the address of the record leaving DFSORT.
| If you do not have an output data set and would usually return with a return code of 8 before EOF,
you can avoid getting the ICE025A message by specifying NOCHECK on the OPTION control state-
ment (if CHECK=NO had not already been specified at installation time).
If your user exit routine passes a return code of 8 to DFSORT when input records still remain to be
processed, the remaining records are processed by DFSORT, but are not passed to your user exit.
See “E15/E35 Return Codes and EXITCK” on page 262 for complete details of the meanings of return
codes in various situations.
Summing Records at E35 User Exit: You can use the SUM control statement to sum records.
| However, you can sum records for output by changing the record in the output area and then, if you want,
by deleting the record leaving DFSORT. DFSORT returns to your routine with the address of a new
record leaving DFSORT, and the same record remains in the output area, so that you can continue
summing. If you do not delete the record leaving DFSORT, that record is added to the output area, and
its address replaces the address of the previous record in the output area. DFSORT returns with the
address of a new record leaving DFSORT.
Using E38 User Exit with VSAM: This user exit can be used during a merge or copy to insert
VSAM passwords into VSAM input ACBs and to perform various VSAM user exit functions. The following
example shows code your program can use to return control to DFSORT.
ENTRY E38
.
.
E38 LA 1,PARMLST
RETURN
CNOP ð,4
PARMLST DS ðH
DC X'ð5'
DC AL3(VSAMEXL)
DC X'ð6'
DC AL3(PWDLST)
DC A(ð)
.
.
VSAMEXL EXLST SYNAD=USYNAD,LERAD=ULERAD
PWDLST DC H'2'
DC CL8'SORTINð1' SORTINð1 DDNAME
DC CL8'INPASS1' SORTINð1 PASSWORD
DC CL8'SORTINð2' SORTINð2 DDNAME
DC CL8'INPASS2' SORTINð2 PASSWORD
USYNAD ... VSAM SYNCH ERROR RTN
ULERAD ... VSAM LOGIC ERROR RTN
Using E39 User Exit with QSAM/BSAM: The technique is the same as for E19 for
QSAM/BSAM. See “E19 User Exit: Handling Output to Work Data Sets” on page 236 for details.
| Using E39 User Exit with VSAM: For VSAM, this user exit can be used to insert VSAM pass-
| words into the VSAM SORTOUT ACB and to perform various VSAM user exit functions. The example
below shows code your program can use to return control to DFSORT.
ENTRY E39
.
.
E39 LA 1,PARMLST
RETURN
CNOP ð,4
PARMLST DS ðH
DC X'ð5'
DC AL3(VSAMEXL)
DC X'ð6'
DC AL3(PWDLST)
DC A(ð)
.
.
VSAMEXL EXLST SYNAD=USYNAD,LERAD=ULERAD
PWDLST DC H'1'
DC CL8'SORTOUT' SORTOUT DDNAME
DC CL8'OUTPASS' SORTOUT PASSWORD
USYNAD ... VSAM SYNCH ERROR RTN
ULERAD ... VSAM LOGIC ERROR RTN
E15 CSECT
\ IF A RECORD IS GREATER THAN 2ð4 BYTES, TRUNCATE IT TO 2ð4 BYTES.
\ IF A RECORD IS LESS THAN 2ð4 BYTES, PAD IT OUT TO 2ð4 BYTES.
\ ALL OF THE RESULTING RECORDS WILL BE 2ð4 BYTES LONG
\ (4 BYTES FOR THE RDW AND 2ðð BYTES OF DATA).
USING E15,12 SHOW BASE REG
STM 14,12,12(13) SAVE ALL REGS EXCEPT 13
LA 12,ð(ð,15) SET BASE REG
ST 13,SAVE15+4 SAVE BACKWARD POINTER
LA 14,SAVE15 SET FORWARD POINTER
ST 14,8(13) IN SAVE AREA
LR 13,14 SET OUR SAVE AREA
LR 2,1 SAVE PARM LIST POINTER
L 3,ð(,2) LOAD ADDR OF RECORD
LTR 3,3 EOF
BZ EOF YES - DO NOT RETURN
LH 4,ð(,3) GET RDW
CH 4,CON2ð4 IS RDW EQ 2ð4
BE ACCEPT YES-ACCEPT IT
BL PAD LESS THAN 2ð4-PAD
LH 4,CON2ð4 LIMIT LENGTH TO 2ð4
B TRUNC MORE THAN 2ð4-TRUNCATE
PAD DS ðH PAD OR TRUNCATE
MVI DATA,X'ðð' ZERO OUT THE BUFFER
MVC DATA+1(199),DATA
BCTR 4,ð DECREASE RDW FOR EXECUTE
TRUNC DS ðH PAD OR TRUNCATE
EX 4,MVPAD MOVE RECORD INTO PAD/TRUNCATE BUFFER
MVC NEWRDW(2),CON2ð4 SET NEW RDW TO 2ð4
LA 3,BUFFER POINT TO PADDED/TRUNCATED RECORD
ACCEPT DS ðH
SR 15,15 SET RC=ð
LR 1,3 SET RECORD POINTER
B GOBACK
EOF LA 15,8 EOF - SET RC=8
GOBACK L 13,4(,13)
L 14,12(,13)
LM 2,12,28(13) RESTORE REGS
BR 14 RETURN
MVPAD MVC BUFFER(\-\),ð(3) FOR EXECUTE
SAVE15 DS 18F
CON2ð4 DC H'2ð4'
BUFFER DS ðH
NEWRDW DS H NEW RDW OF 2ð4
DC H'ð'
DATA DC XL2ðð'ðð' BUFFER FOR PADDING/TRUNCATING
END
E16 CSECT
LA 15,ð SET RETURN CODE
BR 14
END
E35 CSECT
\ IF A RECORD IS GREATER THAN 2ð4 BYTES, TRUNCATE IT TO 2ð4 BYTES.
\ IF A RECORD IS LESS THAN 2ð4 BYTES, PAD IT OUT TO 2ð4 BYTES.
\ ALL OF THE RESULTING RECORDS WILL BE 2ð4 BYTES LONG
\ (4 BYTES FOR THE RDW AND 2ðð BYTES OF DATA).
USING E35,12 SHOW BASE REG
STM 14,12,12(13) SAVE ALL REGS EXCEPT 13
LA 12,ð(ð,15) SET BASE REG
ST 13,SAVE15+4 SAVE BACKWARD POINTER
LA 14,SAVE15 SET FORWARD POINTER
ST 14,8(13) IN SAVE AREA
LR 13,14 SET OUR SAVE AREA
LR 2,1 SAVE PARM LIST POINTER
L 3,ð(,2) LOAD ADDR OF RECORD
LTR 3,3 EOF
BZ EOF YES - DO NOT RETURN
LH 4,ð(,3) GET RDW
CH 4,CON2ð4 IS RDW EQ 2ð4
BE ACCEPT YES-ACCEPT IT
BL PAD LESS THAN 2ð4-PAD
LH 4,CON2ð4 LIMIT LENGTH TO 2ð4
B TRUNC MORE THAN 2ð4-TRUNCATE
PAD DS ðH PAD OR TRUNCATE
MVI DATA,X'ðð' ZERO OUT THE BUFFER
MVC DATA+1(199),DATA
BCTR 4,ð DECREASE RDW FOR EXECUTE
TRUNC DS ðH PAD OR TRUNCATE
EX 4,MVPAD MOVE RECORD INTO PAD/TRUNCATE BUFFER
MVC NEWRDW(2),CON2ð4 SET NEW RDW TO 2ð4
LA 3,BUFFER POINT TO PADDED/TRUNCATED RECORD
ACCEPT DS ðH
SR 15,15 SET RC=ð
LR 1,3 SET RECORD POINTER
B GOBACK
EOF LA 15,8 EOF - SET RC=8
GOBACK L 13,4(,13)
L 14,12(,13)
LM 2,12,28(13) RESTORE REGS
BR 14 RETURN
MVPAD MVC BUFFER(\-\),ð(3) FOR EXECUTE
SAVE15 DS 18F
CON2ð4 DC H'2ð4'
BUFFER DS ðH
NEWRDW DS H NEW RDW OF 2ð4
DC H'ð'
DATA DC XL2ðð'ðð' BUFFER FOR PADDING/TRUNCATING
END
COBOL Requirements for Copy Processing: For copy processing, all sort requirements
apply except for the following restrictions:
When you directly invoke DFSORT and COBEXIT=COB2 is in effect, you can use either a separately
compiled COBOL E15 user exit or a separately compiled COBOL E35 user exit, but not both.
When you invoke DFSORT from a VS COBOL II program, the following limitations apply when
FASTSRT is in effect for:
– Input only: You can use a separately compiled E15 user exit, but not a separately compiled E35
user exit.
– Output only: You can use a separately compiled E35 user exit, but not a separately compiled E15
user exit.
– Input and output: You can use either a separately compiled E15 or a separately compiled E35,
but not both together (when COBEXIT=COB2).
If separately compiled E15 and E35 user exits are found together, DFSORT copy processing termi-
nates. Message ICE161A is issued.
COBOL Storage Requirements: If you are running COBOL user exits compiled with the RES
compile-time option, make sure that you have enough storage available for the COBOL library subrou-
tines. (This does not apply if the library has been installed resident.)
Besides the minimum DFSORT main storage requirements, you need an additional 40K bytes of storage
in your REGION for the OS/VS COBOL library subroutines and 150K bytes for the VS COBOL II library
subroutines. Most of the VS COBOL II library subroutines can be resident above 16-megabyte virtual.
However, whether you can actually load the VS COBOL II library subroutines above 16-megabyte virtual
| depends on how they were installed. In order to run Language Environment for MVS & VM, you need
| 1200K bytes. You can minimize the storage needed by Language Environment for MVS & VM below
| 16-megabyte virtual by loading the COBPACKS above 16-megabyte virtual. See Language Environment
| for MVS & VM Installation and Customization Guide, SC26-4817, for more information.
Under certain conditions, DFSORT can use all the storage in your REGION below 16-megabyte virtual,
thus leaving no room to load the COBOL library subroutines required during processing of your user exit.
Main storage is available above 16-megabyte virtual unless the TMAXLIM or SIZE/MAINSIZE options
specify an extremely high value (for example, your system limit for main storage above 16-megabyte
virtual). In that case, you can use the ARESALL or ARESINV option to release storage.
During processing, the actual amount of storage required for the COBOL library subroutines depends on
the functions performed in the COBOL user exit. You must add a minimum of 40K bytes to the size of the
user exit when running with the OS/VS COBOL library subroutines and, in most cases, 20K bytes when
| running with the VS COBOL II library or Language Environment for MVS & VM. If the user exit does I/O,
additional storage must be reserved for the I/O buffers. Additional storage for buffers is specified by the m
| parameter on the MODS statement. A VS COBOL II or COBOL/370 user exit requires less storage than a
similar OS/VS COBOL user exit because DFSORT automatically releases storage for some of the COBOL
library subroutines before the user exit is called.
When SIZE/MAINSIZE=MAX is in effect, an alternative way to release storage is to use the RESALL or
RESINV option.
Note: You might need to release an additional 70K bytes of storage when you are:
Calling both E15 and E35 user exits
Running with nonresident VS COBOL II library subroutines
Performing a sort with DFSORT residing above 16-megabyte virtual.
This can be done by adding 70K bytes more to one of the following:
The m parameter of the MODS statement for the E35 user exit (m = E35 user exit size + 20K + 70K)
The RESALL option when SIZE/MAINSIZE=MAX is in effect.
| DFSORT enters the E15 user exit routine each time a new record is brought into the input phase.
DFSORT continues to enter E15 (even when there are no input records) until the user exit tells DFSORT,
with a return code of 8, not to return.
Notes:
1. If both E15 and E35 user exits are used, they must be in the same version of COBOL.
| 2. If you use the E15 user exit to pass all your records to DFSORT, you can omit the SORTIN DD
| statement, in which case you must include a RECORD statement in the program control statements.
3. If you omit the SORTIN DD statement, all input records are passed to DFSORT through your COBOL
E15 user exit. You return to DFSORT with a return code of 12. When DFSORT returns to the E15
user exit after the last record has been passed, you return to DFSORT with a return code of 8 in
register 15, which indicates “do not return.”
4. DFSORT continues to reenter your E15 user exit until a return code of 8 is received. However, if
STOPAFT is in effect, no additional records are inserted to DFSORT after the STOPAFT count is
satisfied (even if you pass back a return code of 12).
5. You cannot use dynamic link-editing with a COBOL E15 user exit.
E15 Interface with COBOL: Each time the E15 user exit is called, DFSORT supplies the following
fields:
Record flags
New record
Length of the new record (for variable-length records)
Length of user exit area
User exit area.
When E15 returns to DFSORT, the E15 user exit provides to DFSORT some or all of the fields mentioned
below. The first field is required; the others can be modified as appropriate.
RETURN-CODE (assigned by the user exit by setting the COBOL special register RETURN-CODE)
Return record
Length of the return record (for VLR)
Length of user exit area
User Exit area.
For more information on how these fields are used in a COBOL E15 user exit, see “E15 LINKAGE
SECTION Fields for Fixed-Length and Variable-Length Records” on page 252.
Figure 54 details the interface to COBOL for the E15 user exit.
┌────────────────────┐
R1──────5│ │ ┌──────────────┐
│Pointer to Record │────────5│ Record Flags │
│Flags │ └───4 bytes────┘
│ │
├──────4 bytes───────┤
│ │ ┌──────────────┐
│Pointer to New │────────5│ New Record │
│Record │ └───\ bytes────┘
│ │
├──────4 bytes───────┤
│ │ ┌───────────────┐
│Pointer to Return │────────5│ Return Record │
│Record │ └───\ bytes─────┘
│ │
├──────4 bytes───────┤
│ │ ┌───────────────┐
│Pointer to Dummy │────────5│ Dummy Field │
│Field │ └───4 bytes─────┘
│ │
├──────4 bytes───────┤
│ │ ┌───────────────┐
│Pointer to Dummy │────────5│ Dummy Field │
│Field │ └───4 bytes─────┘
│ │
├──────4 bytes───────┤ ┌──────────────────────────┐
│ │ │ VLR: Length of New Record│
│Pointer to Length of│────────5├───4 bytes────────────────┤
│New Record │ │ FLR: Dummy Field │
│ │ └───4 bytes────────────────┘
├──────4 bytes───────┤ ┌─────────────────────────────┐
│ │ │ VLR: Length of Return Record│
│Pointer to Length of│────────5├───4 bytes───────────────────┤
│Return Record │ │ FLR: Dummy Field │
│ │ └───4 bytes───────────────────┘
├──────4 bytes───────┤
│ │ ┌───────────────┐
│Pointer to Dummy │────────5│ Dummy Field │
│Field │ └───4 bytes─────┘
│ │
├──────4 bytes───────┤
│ │ ┌─────────────────────────┐
│Pointer to Length of│────────5│ Length of User Exit Area│
│User Exit Area │ └───2 bytes───────────────┘
│ │
├──────4 bytes───────┤
│ Pointer to │ ┌───────────────┐
│ User Exit Area │────────5│ User Exit Area│
│ │ └───256 bytes───┘
└──────4 bytes───────┘
Number of Bytes
\ — VLR: Number of bytes is given by the corresponding length field
FLR: Number of bytes is equal to the LRECL
E15 LINKAGE SECTION Examples: Figure 55 is an example of the LINKAGE SECTION code for a
fixed-length record (FLR) data set with a logical record length (LRECL) of 100. The example shows the
layout of the fields passed to your COBOL routine.
LINKAGE SECTION.
ð1 RECORD-FLAGS PIC 9(8) COMPUTATIONAL.
88 FIRST-REC VALUE ðð.
88 MIDDLE-REC VALUE ð4.
88 END-REC VALUE ð8.
ð1 NEW-REC PIC X(1ðð).
ð1 RETURN-REC PIC X(1ðð).
ð1 UNUSED1 PIC 9(8) COMPUTATIONAL.
ð1 UNUSED2 PIC 9(8) COMPUTATIONAL.
ð1 UNUSED3 PIC 9(8) COMPUTATIONAL.
ð1 UNUSED4 PIC 9(8) COMPUTATIONAL.
ð1 UNUSED5 PIC 9(8) COMPUTATIONAL.
ð1 EXITAREA-LEN PIC 9(4) COMPUTATIONAL.
ð1 EXITAREA.
ð5 EAREA OCCURS 1 TO 256 TIMES
DEPENDING ON EXITAREA-LEN PIC X.
Figure 55. LINKAGE SECTION Code Example for E15 (Fixed-Length Records)
Figure 56 is an example of the LINKAGE SECTION code for a variable-length record (VLR) data set with
a maximum LRECL of 200. The example shows the layout of the fields passed to your COBOL routine.
LINKAGE SECTION.
ð1 RECORD-FLAGS PIC 9(8) COMPUTATIONAL.
88 FIRST-REC VALUE ðð.
88 MIDDLE-REC VALUE ð4.
88 END-REC VALUE ð8.
ð1 NEW-REC.
ð5 NREC OCCURS 1 TO 2ðð TIMES
DEPENDING ON NEW-REC-LEN PIC X.
ð1 RETURN-REC.
ð5 RREC OCCURS 1 TO 2ðð TIMES
DEPENDING ON RETURN-REC-LEN PIC X.
ð1 UNUSED1 PIC 9(8) COMPUTATIONAL.
ð1 UNUSED2 PIC 9(8) COMPUTATIONAL.
ð1 NEW-REC-LEN PIC 9(8) COMPUTATIONAL.
ð1 RETURN-REC-LEN PIC 9(8) COMPUTATIONAL.
ð1 UNUSED3 PIC 9(8) COMPUTATIONAL.
ð1 EXITAREA-LEN PIC 9(4) COMPUTATIONAL.
ð1 EXITAREA.
ð5 EAREA OCCURS 1 TO 256 TIMES
DEPENDING ON EXITAREA-LEN PIC X.
Figure 56. LINKAGE SECTION Code Example for E15 (Variable-Length Record)
E15 LINKAGE SECTION Fields for Fixed-Length and Variable-Length Records: The
fields in the LINKAGE SECTION are used by DFSORT and your routine as stated below. For clarity, the
field names from Figure 56 have been used.
To give your COBOL routine the status of the passed records, DFSORT uses the record flags field
(RECORD-FLAGS) in the following way:
0 (FIRST-REC) The new record is the first passed record.
4 (MIDDLE-REC) The new record is not the first passed record.
8 (END-REC) All records have been passed to your routine or there were no records to pass.
DFSORT places the next input record in the new record field (NEW-REC). A VLR does not contain an
RDW, but DFSORT places the length of this VLR in the new record length field (NEW-REC-LEN).
The value in the NEW-REC-LEN field is the length of the record only and does not include the 4 bytes
for the RDW.
When your routine places an insertion/replacement record in the return record field (RETURN-REC),
the VLR must not contain an RDW; your routine must place the length of this record in the return
record length field (RETURN-REC-LEN). The value of the RETURN-REC-LEN field is the length of
the record only and must not include the 4 bytes for the RDW.
Each time DFSORT calls your COBOL E15 or COBOL E35 user exit, it passes the user exit a
256-byte user exit area field (EXITAREA). The first time the user exit area field is passed to your
COBOL E15 user exit, it contains 256 blanks, and the user exit area length field (EXITAREA-LEN)
contains 256.
Any changes you make to the user exit area field or user exit area length fields are passed back both
to your COBOL E15 user exit and your COBOL E35 user exit.
Notes:
1. Do not set the user exit area length field to more than 256 bytes.
2. If the data used for input was not created by a COBOL run, you need to know the LRECL defined
for your data set. For a VLR, the maximum length of the record defined in your COBOL user exit
is 4 bytes less than the LRECL value, because COBOL does not include the RDW as part of the
record. (Each VLR begins with an RDW field of 4 bytes. The RDW is not included in the record
passed to your COBOL user exit.)
3. You need to code only up to the last field that your routine actually uses (for example, up to
RETURN-REC if you do not use the user exit area).
| E15 Return Codes: Your COBOL E15 routine must pass a return code to DFSORT in the
| RETURN-CODE field, a COBOL special register. Following are the return codes for the E15 user exit:
Return Code Description
00 (X'00') No Action
04 (X'04') Delete Record
08 (X'08') Do Not Return
12 (X'0C') Insert Record
16 (X'10') Terminate DFSORT
20 (X'14') Alter or Replace Record
0: No Action
If you want DFSORT to retain the record unchanged, return with RETURN-CODE set to 0.
4: Delete Record
If you want DFSORT to delete the record, return with RETURN-CODE set to 4.
8: Do Not Return
| DFSORT continues to enter your routine until you return with RETURN-CODE set to 8. After that, the
| user exit is not used again during the DFSORT application. Unless you are inserting records after the
end of the data set, you must set RETURN-CODE to 8 when DFSORT indicates the end of the data
set, which it does by entering your routine with the record flags field set to 8.
If your user exit routine passes a return code of 8 to DFSORT when input records still remain to be
processed, the remaining records are processed by DFSORT but are not passed to your user exit.
DFSORT returns to your routine with the same record as before in the new record field, allowing your
routine to insert more records or handle the new record.
You can also insert records after the end of the data set. DFSORT keeps returning to your routine as
long as you pass it a RETURN-CODE of 12 and until you return with a RETURN-CODE set to 8.
16: Terminate DFSORT
If you want to terminate DFSORT, return with RETURN-CODE set to 16. DFSORT then returns to its
calling program or to the system with a return code of 16.
Note: If your routine changes record size, you must indicate the new size on the RECORD state-
ment.
See “E15/E35 Return Codes and EXITCK” on page 262 for complete details of the meanings of return
codes in various situations.
E15 Procedure Division Requirements: When coding the PROCEDURE DIVISION, the fol-
lowing requirements must be met:
To return control to DFSORT, you must use the GOBACK statement.
In the USING option of the PROCEDURE DIVISION header, you must specify each 01-level name in
the LINKAGE SECTION. You must specify each name in order up to the last one you plan to use
even when you do not use all the 01-level names preceding the header.
Examples:
For the FLR example, Figure 55 on page 252, you would code:
PROCEDURE DIVISION USING RECORD-FLAGS, NEW-REC,
RETURN-REC, UNUSED1, UNUSED2, UNUSED3,
UNUSED4, UNUSED5, EXITAREA-LEN, EXITAREA.
For the VLR example, Figure 56 on page 252, you would code:
PROCEDURE DIVISION USING RECORD-FLAGS, NEW-REC,
RETURN-REC, UNUSED1, UNUSED2,
NEW-REC-LEN, RETURN-REC-LEN,
UNUSED3, EXITAREA-LEN, EXITAREA.
| DFSORT enters the E35 user exit routine each time it prepares to place a record in the output area.
When DFSORT indicates the end of the data set (record flags field set to 8), you must set
RETURN-CODE to 8 (unless you are inserting records after the end of the data set); otherwise, DFSORT
continues to enter E35.
Notes:
1. If both E15 and E35 user exits are used, they must be in the same version of COBOL.
| 2. If you use the E35 user exit to dispose of all your output records, you can omit the SORTOUT DD
| statement.
| 3. If you omit the SORTOUT DD statement and you do not specify any OUTFIL data sets, your E35 user
exit routine must dispose of each output record and return to DFSORT with a return code of 4. When
DFSORT returns to your routine after you have disposed of the last record, return to DFSORT with a
return code of 8 to indicate “do not return.”
4. You cannot use dynamic link-editing with a COBOL E35 user exit.
E35 Interface with COBOL: Each time your E35 user exit is called, DFSORT supplies the fol-
lowing fields:
Record flags
Record leaving DFSORT
Length of record leaving DFSORT (for variable-length records)
Length of user exit area
User Exit area.
When your E35 user exit returns to DFSORT, the E35 user exit provides to DFSORT some or all of the
fields mentioned below. The first field is required; the others can be modified as appropriate.
RETURN-CODE (assigned by the user exit by setting the COBOL special register RETURN-CODE)
Return record
Length of return record (for variable-length records)
Length of user exit area
User exit area.
For more information on how these fields are used in a COBOL E35 user exit, see “E35 LINKAGE
SECTION Fields for Fixed-Length and Variable-Length Records” on page 257.
Figure 57 details the interface to COBOL for the E35 user exit.
┌─────────────────────┐
R1──────5│ │ ┌──────────────┐
│Pointer to Record │───────5│ Record Flags │
│Flags │ └───4 bytes────┘
│ │
├──────4 bytes────────┤
│ │ ┌──────────────────────┐
│Pointer to Record │───────5│ Record Leaving DFSORT│
│Leaving DFSORT │ └───\ bytes────────────┘
│ │
├──────4 bytes────────┤
│ │ ┌───────────────┐
│Pointer to Return │───────5│ Return Record │
│Record │ └───\ bytes─────┘
│ │
├──────4 bytes────────┤
│ │ ┌──────────────────────┐
│Pointer to Record in │───────5│ Record in Output Area│
│Output Area │ └───\ bytes────────────┘
│ │
├──────4 bytes────────┤
│ │ ┌───────────────┐
│Pointer to Dummy │───────5│ Dummy Field │
│Field │ └───4 bytes─────┘
│ │
├──────4 bytes────────┤ ┌─────────────────────────────────────┐
│ │ │ VLR: Length of Record Leaving DFSORT│
│Pointer to Length of │───────5├───4 bytes───────────────────────────┤
│Record Leaving DFSORT│ │ FLR: Dummy Field │
│ │ └───4 bytes───────────────────────────┘
├──────4 bytes────────┤ ┌─────────────────────────────┐
│ │ │ VLR: Length of Return Record│
│Pointer to Length of │───────5├───4 bytes───────────────────┤
│Return Record │ │ FLR: Dummy Field │
│ │ └───4 bytes───────────────────┘
├──────4 bytes────────┤ ┌──────────────────────────────────────┐
│ │ │ VLR: Length of Record in Output Area │
│Pointer to Length of │───────5├───4 bytes────────────────────────────┤
│Record in Output Area│ │ FLR: Dummy Field │
│ │ └───4 bytes────────────────────────────┘
├──────4 bytes────────┤
│ │ ┌─────────────────────────┐
│Pointer to Length of │───────5├─Length of User Exit Area│
│User Exit Area │ └───2 bytes───────────────┘
│ │
├──────4 bytes────────┤
│ │ ┌───────────────┐
│Pointer to User │───────5│ User Exit Area│
│ Exit Area │ └───256 bytes───┘
└──────4 bytes────────┘
Number of Bytes
\ — VLR: Number of bytes is given by the corresponding length field
FLR: Number of bytes is equal to the LRECL
E35 LINKAGE SECTION Examples: Figure 58 is an example of the LINKAGE SECTION code for a
fixed-length record (FLR) data set with a logical record length (LRECL) of 100. The example shows the
layout of the fields passed to your COBOL routine.
LINKAGE SECTION.
ð1 RECORD-FLAGS PIC 9(8) COMPUTATIONAL.
88 FIRST-REC VALUE ðð.
88 MIDDLE-REC VALUE ð4.
88 END-REC VALUE ð8.
ð1 LEAVING-REC PIC X(1ðð).
ð1 RETURN-REC PIC X(1ðð).
ð1 OUTPUT-REC PIC X(1ðð).
ð1 UNUSED1 PIC 9(8) COMPUTATIONAL.
ð1 UNUSED2 PIC 9(8) COMPUTATIONAL.
ð1 UNUSED3 PIC 9(8) COMPUTATIONAL.
ð1 UNUSED4 PIC 9(8) COMPUTATIONAL.
ð1 EXITAREA-LEN PIC 9(4) COMPUTATIONAL.
ð1 EXITAREA.
ð5 EAREA OCCURS 1 TO 256 TIMES
DEPENDING ON EXITAREA-LEN PIC X.
Figure 58. LINKAGE SECTION Code Example for E35 (Fixed-Length Records)
Figure 59 is an example of the LINKAGE SECTION code for a variable-length record (VLR) data set with
a maximum LRECL of 200. The example shows the layout of the fields passed to your COBOL routine.
LINKAGE SECTION.
ð1 RECORD-FLAGS PIC 9(8) COMPUTATIONAL.
88 FIRST-REC VALUE ðð.
88 MIDDLE-REC VALUE ð4.
88 END-REC VALUE ð8.
ð1 LEAVING-REC.
ð5 LREC OCCURS 1 TO 2ðð TIMES
DEPENDING ON LEAVING-REC-LEN PIC X.
ð1 RETURN-REC.
ð5 RREC OCCURS 1 TO 2ðð TIMES
DEPENDING ON RETURN-REC-LEN PIC X.
ð1 OUTPUT-REC.
ð5 OREC OCCURS 1 TO 2ðð TIMES
DEPENDING ON OUTPUT-REC-LEN PIC X.
ð1 UNUSED1 PIC 9(8) COMPUTATIONAL.
ð1 LEAVING-REC-LEN PIC 9(8) COMPUTATIONAL.
ð1 RETURN-REC-LEN PIC 9(8) COMPUTATIONAL.
ð1 OUTPUT-REC-LEN PIC 9(8) COMPUTATIONAL.
ð1 EXITAREA-LEN PIC 9(4) COMPUTATIONAL.
ð1 EXITAREA.
ð5 EAREA OCCURS 1 TO 256 TIMES
DEPENDING ON EXITAREA-LEN PIC X.
Figure 59. LINKAGE SECTION Code Example for E35 (Variable-Length Records)
E35 LINKAGE SECTION Fields for Fixed-Length and Variable-Length Records: The
fields in the LINKAGE SECTION are used by DFSORT and your routine as stated below. For clarity, the
field names from Figure 59 have been used.
To give your COBOL routine the status of the passed records, DFSORT uses the record flags field
(RECORD-FLAGS) in the following way:
0 (FIRST-REC) The record leaving DFSORT is the first passed record.
4 (MIDDLE-REC) The record leaving DFSORT is not the first passed record.
8 (END-REC) There is no record leaving DFSORT to pass; all records have been passed to
your routine or there were no records to pass.
DFSORT places the next output record, which usually follows the record in the output area, in the
record leaving field (LEAVING-REC). A VLR does not contain an RDW; DFSORT places the length of
this VLR in the record-leaving length field (LEAVING-REC-LEN). The value in the
LEAVING-REC-LEN field is the length of the record only and does not include the 4 bytes for the
RDW.
When your routine places an insertion or replacement record in the return record field
(RETURN-REC), the VLR must not contain an RDW; your routine must place the length of this record
in the return record length field (RETURN-REC-LEN). The value in the RETURN-REC-LEN field is the
length of the record only and does not include the 4 bytes for the RDW.
DFSORT places the record already in the output area in the record in output area field
(OUTPUT-REC). A VLR does not contain an RDW. DFSORT places the length, not including the 4
bytes for RDW, of this VLR in the record in output area length field (OUTPUT-REC-LEN).
DFSORT passes your COBOL E35 routine a 256-byte user exit area field (EXITAREA) that can
contain information passed by your COBOL E15 routine. If no information is passed in the EXITAREA
field by your COBOL E15 routine the first time the field is passed to your COBOL E35 routine,
EXITAREA contains 256 blanks, and the user exit area length field (EXITAREA-LEN) contains 256.
Any changes you make to the user exit area field or user exit area length field are passed back to
your COBOL E35 routine each time it is called by DFSORT.
Notes:
1. Do not set the user exit area length field to more than 256 bytes.
2. VLR records have a 4-byte RDW field at the beginning of each record. The maximum record
length plus the RDW will be the length defined for the LRECL attribute of your output data set.
COBOL programs do not use the RDW and, therefore, the maximum length defined in your
COBOL user exit is 4 bytes less than the LRECL value.
3. You need to code only up to the last field your routine actually uses (for example, up to
OUTPUT-REC-LEN if you do not use the user exit area).
| E35 Return Codes: Your COBOL E35 routine must pass a return code to DFSORT in the
| RETURN-CODE field, a COBOL special register. Following are the return codes for the E35 exit:
Return Code Description
00 (X'00') No Action
04 (X'04') Delete Record
08 (X'08') Do Not Return
12 (X'0C') Insert Record
16 (X'10') Terminate DFSORT
20 (X'14') Alter or Replace Record
0: No Action
If you want DFSORT to retain the record leaving DFSORT unchanged, return with RETURN-CODE
set to 0.
4: Delete Record
If you want DFSORT to delete the record leaving DFSORT, return with RETURN-CODE set to 4.
8: Do Not Return
| DFSORT keeps returning to your routine until you pass a RETURN-CODE set to 8. After that, the
| user exit is not used again during the DFSORT application. Unless you are inserting records after the
end of the data set, you must set RETURN-CODE to 8 when DFSORT indicates the end of the data
set. This is done by entering your routine with the record flags field set to 8.
If your user exit routine passes a return code of 8 to DFSORT when input records still remain to be
| processed, the remaining records are processed by DFSORT but are not passed to your user exit.
| If you do not have an output data set and would usually return with a return code of 8 before EOF,
you can avoid getting the ICE025A message by specifying NOCHECK on the OPTION control state-
ment (if CHECK=NO had not already been specified at installation time).
| DFSORT returns to your routine with the inserted record in the record output area field and with the
same record as before in the record leaving DFSORT field. In this way, your routine can insert more
records or handle the record leaving DFSORT.
You can also insert records after the end of the data set. DFSORT keeps returning to your routine as
long as you pass it a RETURN-CODE 12 and until you return with RETURN-CODE set to 8.
DFSORT does not perform sequence checking for DASD work data set sorts. For tape work data set
sorts, DFSORT does not perform sequence checking on inserted records unless you delete the record
leaving DFSORT and then replace it.
Note: If your routine changes record size, you must indicate the new size on the RECORD state-
ment.
See “E15/E35 Return Codes and EXITCK” on page 262 for complete details of the meanings of return
codes in various situations.
E35 Procedure Division Requirements: When coding the PROCEDURE DIVISION, the fol-
lowing requirements must be met:
To return control to DFSORT, you must use the GOBACK statement.
In the USING option of the PROCEDURE DIVISION header, you must specify each 01-level name in
the LINKAGE SECTION. You must specify each name in order up to the last one you plan to use
even when you do not use all the 01-level names preceding the header.
Examples:
For the FLR example, Figure 58 on page 257, you would code:
IDENTIFICATION DIVISION.
PROGRAM-ID.
CE15.
ENVIRONMENT DIVISION.
DATA DIVISION.
LINKAGE SECTION.
ð1 RECORD-FLAGS PIC 9(8) COMPUTATIONAL.
88 FIRST-REC VALUE ðð.
88 MIDDLE-REC VALUE ð4.
88 END-REC VALUE ð8.
ð1 NEW-REC.
ð5 NFILL1 PIC X(1ð).
ð5 NEW-DEPT PIC X(3).
ð5 NFILL2 PIC X(87).
ð1 RETURN-REC.
ð5 RFILL1 PIC X(1ð).
ð5 RETURN-DEPT PIC X(3).
ð5 RFILL2 PIC X(87).
IF END-REC
MOVE 8 TO RETURN-CODE
GO TO BACK-TO-SORT.
ELSE
MOVE ð TO RETURN-CODE.
BACK-TO-SORT.
GOBACK.
IDENTIFICATION DIVISION.
PROGRAM-ID.
CE35.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
ð1 INSERT-DONE PIC 9(1) VALUE ð.
ð1 K22-REC.
ð5 K22-MANAGER PIC X(2ð) VALUE "J. DOE".
ð5 K22-DEPT PIC X(3) VALUE "K22".
ð5 K22-FUNC PIC X(2ð) VALUE "ACCOUNTING".
ð5 K22-LATER PIC X(3ð) VALUE SPACES.
ð1 LEAVING-VAR-LEN PIC 9(8) COMPUTATIONAL.
LINKAGE SECTION.
ð1 RECORD-FLAGS PIC 9(8) COMPUTATIONAL.
88 FIRST-REC VALUE ðð.
88 MIDDLE-REC VALUE ð4.
88 END-REC VALUE ð8.
ð1 LEAVING-REC.
ð5 LREC-MANAGER PIC X(2ð).
ð5 LREC-DEPT PIC X(3).
ð5 LREC-FUNC PIC X(2ð).
ð5 LREC-LATER OCCURS 1 TO 157 TIMES
DEPENDING ON LEAVING-VAR-LEN PIC X.
ð1 RETURN-REC.
ð5 RREC OCCURS 1 TO 2ðð TIMES
DEPENDING ON RETURN-REC-LEN PIC X.
ð1 OUTPUT-REC.
ð5 OREC OCCURS 1 TO 2ðð TIMES
DEPENDING ON OUTPUT-REC-LEN PIC X.
ð1 UNUSED1 PIC 9(8) COMPUTATIONAL.
ð1 LEAVING-REC-LEN PIC 9(8) COMPUTATIONAL.
ð1 RETURN-REC-LEN PIC 9(8) COMPUTATIONAL.
ð1 OUTPUT-REC-LEN PIC 9(8) COMPUTATIONAL.
IF END-REC
MOVE 8 TO RETURN-CODE
GO TO BACK-TO-SORT.
IF INSERT-DONE EQUAL TO 1
MOVE ð TO RETURN-CODE
GO TO BACK-TO-SORT.
SUBTRACT 43 FROM LEAVING-REC-LEN
GIVING LEAVING-VAR-LEN.
IF LREC-DEPT GREATER THAN K22-DEPT
MOVE 1 TO INSERT-DONE
MOVE 43 TO RETURN-REC-LEN
MOVE K22-REC TO RETURN-REC
MOVE 12 TO RETURN-CODE
ELSE
MOVE ð TO RETURN-CODE.
BACK-TO-SORT.
GOBACK.
Notes:
1. You can determine whether EXITCK=STRONG or EXITCK=WEAK is in effect from message ICE132I
or by using the DEFAULTS operator of ICETOOL.
2. Use of EXITCK=WEAK can make it difficult to detect errors in the logic of your E15 and E35 user exit
routines.
3. EXITCK=WEAK is treated like EXITCK=STRONG if tape work data sets are specified for a sort appli-
cation or if the Blockset technique is not selected for a merge application.
Figure 63. E15 With a SORTIN Data Set Before End of Input
E15 Return Code Meaning with EXITCK=STRONG or EXITCK=WEAK
0 No action/record altered
4 Delete record
8 Do not return
12 Insert record
16 Terminate DFSORT
20 (COBOL only) Alter/replace record
All others Invalid
Figure 64. E15 With a SORTIN Data Set After End of Input
Meaning with Meaning with
E15 Return Code EXITCK=STRONG EXITCK=WEAK
0 Invalid Do not return
4 Invalid Do not return
8 Do not return Do not return
12 Insert record Insert record
16 Terminate DFSORT Terminate DFSORT
20 (COBOL only) Invalid Do not return
All others Invalid Invalid
Figure 65. E35 With a SORTOUT or OUTFIL Data Set Before End of Input
Meaning with EXITCK=STRONG
E35 Return Code or EXITCK=WEAK
0 No action/record altered
4 Delete record
8 Do not return
12 Insert record
16 Terminate DFSORT
20 (COBOL only) Alter/replace record
All others Invalid
Figure 66. E35 Without a SORTOUT or OUTFIL Data Set Before End of Input
Meaning with Meaning with
E35 Return Code EXITCK=STRONG EXITCK=WEAK
0 Invalid Delete record
4 Delete record Delete record
8 Do not return Do not return
12 Invalid Delete record
16 Terminate DFSORT Terminate DFSORT
20 (COBOL only) Invalid Delete record
All others Invalid Invalid
Figure 67. E35 With a SORTOUT or OUTFIL Data Set After End of Input
Meaning with Meaning with
E35 Return Code EXITCK=STRONG EXITCK=WEAK
0 Invalid Do not return
4 Invalid Do not return
8 Do not return Do not return
12 Insert record Insert record
16 Terminate DFSORT Terminate DFSORT
20 (COBOL only) Invalid Do not return
All others Invalid Invalid
Figure 68. E35 without a SORTOUT or OUTFIL Data Set After End of Input
Meaning with Meaning with
E35 Return Code EXITCK=STRONG EXITCK=WEAK
0 Invalid Do not return
4 Invalid Do not return
8 Do not return Do not return
12 Invalid Do not return
16 Terminate DFSORT Terminate DFSORT
20 (COBOL only) Invalid Do not return
All others Invalid Invalid
DFSORT can be invoked dynamically from programs written in COBOL or PL/I. Specific information on
dynamic invocation is covered in the COBOL and PL/I programming guides. JCL requirements are the
same as those for assembler.
This section explains what you need to know to initiate DFSORT from within your assembler program
using a system macro instruction instead of an EXEC job control statement in the input stream. Specific
restrictions on invoking DFSORT from PL/I and COBOL are listed in “Restrictions for Dynamic Invocation”
on page 280.
You can specify one of three system macro instructions to pass control to the program: LINK, ATTACH,
or XCTL.
When you issue one of these instructions, the first load module of DFSORT is brought into main storage.
The linkage relationship between your program and DFSORT differs according to which of the instructions
you have used. For a complete description of the macro instructions and how to use them, refer to Appli-
cation Development Guide and Application Development Macro Reference.
| If you are invoking DFSORT repeatedly (for example, from an E15 or E35 user exit), you must always
wait for the last invoked sort to end before you can give control back to any of your user exits in an
earlier invoked sort.
This form, with a trailing blank separately defined, allows you to refer to the last byte of the statement
(SORT statement end address) by the name SORTEND.
Note: Assembler requires two single apostrophes to represent one single apostrophe.
Format of the 24-Bit Parameter List: Figure 69 on page 269 shows the format of the 24-bit
parameter list and the pointer containing its address which you must pass to DFSORT. Detailed specifica-
tions for each of the entries in the parameter list follow.
For full override and applicability details, see Appendix B, “Specification/Override of DFSORT Options” on
page 459.
┌────────────────────┐
│ Register 1 │
└──────────────────┬─┘
│
┌─────┴──────────┬────────────────────────────┐
│ X'8ð' │ Address of parameter list │
└────────────────┴───────────────┬────────────┘
│
Offset Byte 1 Byte 2 │ Bytes 3 and 4
6
(Hex) (Dec) ┌────────────────┬───────────────┬─────────────────────────────────────┬─────┐
─2 ─2 │ Unused │ Unused │ Length of parameter list in bytes. │Notes│
├────────────────┼───────────────┴─────────────────────────────────────┼─────┤
2 2 │ X'ðð' │ Starting address of SORT or MERGE statement image. │ 1,3 │
6 6 │ X'ðð' │ Ending address of SORT or MERGE statement image. │ 1,5 │
├────────────────┼─────────────────────────────────────────────────────┼─────┤
A 1ð │ X'ðð' │ Starting address of RECORD statement image. │ 1,3 │
E 14 │ X'ðð' │ Ending address of RECORD statement image. │ 1,5 │
├────────────────┼─────────────────────────────────────────────────────┼─────┤
12 18 │ X'ðð' │ Address of E15 or E32 routine (zeros if none). │ 1 │
├────────────────┼─────────────────────────────────────────────────────┼─────┤
16 22 │ X'ðð' │ Address of E35 routine (zeros if none) │ 1 │
├────────────────┼─────────────────────────────────────────────────────┼─────┤
1A 26 │ X'ð2' │ Starting address of MODS statement image. │ 2,3 │
1E 3ð │ X'ðð' │ Ending address of MODS statement image. │ 2,5 │
├────────────────┼─────────────────────────────────────────────────────┼─────┤
22 34 │ X'ðð' │ Main storage value. │ 2 │
├────────────────┼─────────────────────────────────────────────────────┼─────┤
26 38 │ X'ð1' │ Reserved storage value. │ 2 │
├────────────────┼─────────────────────────────────────────────────────┼─────┤
2A 42 │ X'ð3' │ Address of 8-character message ddname. │ 2 │
├────────────────┼─────────────────────────────────────────────────────┼─────┤
2E 46 │ X'ð4' │ Number of input files (MERGE with E32). │ 2,4 │
├────────────────┼─────────────────────────────────────────────────────┼─────┤
32 5ð │ X'ð5' │ Starting address of DEBUG statement image. │ 2,3 │
36 54 │ X'ðð' │ Ending address of DEBUG statement image. │ 2,5 │
├────────────────┼─────────────────────────────────────────────────────┼─────┤
3A 58 │ X'ð6' │ Starting address of ALTSEQ statement image. │ 2,3 │
3E 62 │ X'ðð' │ Ending address of ALTSEQ statement image. │ 2,5 │
├────────────────┼─────────────────────────────────────────────────────┼─────┤
42 66 │ X'F6' │ Address of 256-byte ALTSEQ translation table. │ 2 │
├────────────────┼─────────────────────────────────────────────────────┼─────┤
46 7ð │ X'F7' │ User exit address constant. │ 2 │
├────────────────┼─────────────────────────────────────────────────────┼─────┤
4A 74 │ X'FD' │ The three bytes after X'FD' are ignored. │ 2 │
├────────────────┼─────────────────────────────────────────────────────┼─────┤
4E 78 │ X'FE' │ Address of a pointer to 1ð4─byte ESTAE work area │ │
│ │ (or zeros). │ 2 │
├────────────────┼─────────────────────────────────────────────────────┼─────┤
52 82 │ X'FF' │ Message option. │ 2 │
├────────────────┴─────────────────────────────────────────────────────┼─────┤
56 86 │ 4-character prefix for "SORT" DD statement names. │ 2 │
├────────────────┬─────────────────────────────────────────────────────┼─────┤
5A 9ð │ X'ð7' │ Starting address of SUM statement image. │ 2,3 │
5E 94 │ X'ðð' │ Ending address of SUM statement image. │ 2,5 │
├────────────────┼─────────────────────────────────────────────────────┼─────┤
62 98 │ X'ð8' │ Starting address of INCLUDE or OMIT statement image.│ 2,3 │
66 1ð2 │ X'ðð' │ Ending address of INCLUDE or OMIT statement image. │ 2,5 │
├────────────────┼─────────────────────────────────────────────────────┼─────┤
6A 1ð6 │ X'ð9' │ Starting address of OUTREC statement image. │ 2,3 │
6E 11ð │ X'ðð' │ Ending address of OUTREC statement image. │ 2,5 │
├────────────────┼─────────────────────────────────────────────────────┼─────┤
72 114 │ X'ðA' │ Starting address of INREC statement image. │ 2,3 │
76 118 │ X'ðð' │ Ending address of INREC statement image. │ 2,5 │
├────────────────┼─────────────────────────────────────────────────────┼─────┤
7A 122 │ X'ðB' │ Starting address of OUTFIL statement image. │ 2,3 │
7E 126 │ X'ðð' │ Ending address of OUTFIL statement image. │ 2,5 │
└────────────────┴─────────────────────────────────────────────────────┴─────┘
2. Optional entry. Can appear anywhere after the required entries. The displayed offset is for identifica-
tion purposes only—the actual offset of this entry can vary. Optional entries must be consecutive but
can appear in any order.
3. A specific control statement. Shown for illustrative purposes only. Any control statement in the fol-
lowing list can be passed using this entry: SORT or MERGE, RECORD, ALTSEQ, DEBUG, MODS,
SUM, INREC, OUTREC, INCLUDE or OMIT, and OUTFIL.
4. Required entry if the MERGE statement is present and input is supplied through an E32 user exit.
This entry is not required if the FILES option of the MERGE statement is specified.
5. Required entry. Contains the ending address for a control statement and must immediately follow the
entry containing the starting address for that same control statement.
42-45 Message ddname. The first byte must contain X'03'. The next three bytes contain the address
of an 8-byte DD statement name for the message data set, padded with blanks on the right if
necessary. The name can be any valid DD statement name, but must be unique.
You can use this option to temporarily override the MSGDDN installation option. For full over-
| ride details, see Appendix B, “Specification/Override of DFSORT Options” on page 459. For
| details on the use of the message data set, see Messages, Codes and Diagnosis.
46-49 Number of input files to a merge. This entry is needed only if the MERGE statement is present
without the FILES option and input to the merge is supplied through the E32 user exit. The
first byte must contain X'04'. The next three bytes contain the number of files in hexadecimal.
For full override and applicability details, see Appendix B, “Specification/Override of DFSORT
Options” on page 459.
50-53 The starting address of the DEBUG statement image. Must be in the last three bytes. The
first byte must contain X'05'.
54-57 The ending address of the DEBUG statement image. Must be in the last three bytes. The first
byte must contain X'00'.
58-61 The starting address of the ALTSEQ statement image. Must be in the last three bytes. The
first byte must contain X'06'.
62-65 The ending address of the ALTSEQ statement image. Must be in the last three bytes. The
first byte must contain X'00'.
66-69 The address of a 256-byte translate table supplied instead of an ALTSEQ statement. The first
byte must contain X'F6'. If this parameter is present, the X'06' parameter is ignored. For full
override and applicability details, see Appendix B, “Specification/Override of DFSORT Options”
on page 459.
70-73 User exit address constant. These 4 bytes are passed to E15 (at offset 4 in the E15 parameter
list) or to E35 (at offset 8 in the E35 parameter list) after DFSORT replaces the X'F7' with an
X'00'.
| Note: The user exit address constant must not be used for a Conventional merge or tape
| work data set sort application.
74-77 X'FD' in the first byte (the VLSHRT option) specifies that DFSORT is to continue processing if
it finds a variable-length input record too short to contain all specified control fields or compare
fields. For full details of this option, see the discussion of the VLSHRT parameter in “OPTION
Control Statement” on page 111. You can use this option to temporarily override the VLSHRT
installation option. For full override and applicability details, see Appendix B,
“Specification/Override of DFSORT Options” on page 459.
78-81 If the first byte contains X'FE', you can use the next three bytes to pass an address of a
104-byte field save area where ESTAE information is saved. These bytes must contain zeros if
the ESTAE information is not saved.
If a system or user exit abend occurs, the DFSORT ESTAE recovery routine will copy the first
104 bytes of the SDWA into this area before returning to any higher level ESTAE recovery
routines.
For more information on the DFSORT ESTAE recovery routine, see Appendix E, “DFSORT
Abend Processing” on page 497
82-85 The message option. The first byte must contain X'FF'. The following three bytes contain the
characters NOF, (I), or (U). You can use this option to temporarily override the MSGPRT
installation option.
NOF Messages and control statements are not printed. Critical messages are written to the master
console.
(I) All messages except diagnostic messages (ICE800I to ICE999I) are printed. Critical messages
are also written to the master console. Control statements are printed only if LIST is in effect.
(U) Only critical messages are printed. They are also written to the master console. Control state-
ments are not printed (NOLIST is forced).
| All messages are written to the message data set. For details on use of the message data set, see
| Messages, Codes and Diagnosis. For full override and applicability details, see Appendix B,
“Specification/Override of DFSORT Options” on page 459.
For compatibility reasons, the forms (NO, (AP, (AC, (CC, (CP, and (PC are also accepted.
The following list shows the equivalent specifications for these alternate forms.
| 86-89 Four characters, which replace “SORT” in the following ddnames: SORTIN, SORTOUT,
| SORTINn, SORTINnn, SORTOFn, SORTOFnn, SORTWKn, SORTWKnn, and SORTCNTL.
You must use this option when you dynamically invoke DFSORT more than once in a program
step.
The four characters must all be alphanumeric or national ($, #, or @) characters. The first
character must be alphabetic, and the reserved names DIAG, BALN, OSCL, POLY, CRCX,
PEER, LIST, and SYSc (where c is any alphanumeric character) must not be used. Otherwise,
the four characters are ignored.
| Example: If you use ABC# as replacement characters, DFSORT uses statements ABC#IN, ABC#CNTL,
| ABC#WKnn, and ABC#OUT instead of SORTIN, SORTCNTL, SORTWKnn, and SORTOUT.
Note: This parameter is equivalent to the SORTDD=cccc run-time option.
90-93 The starting address of the SUM statement image. Must be in the last three bytes. The first
byte must contain X'07'.
94-97 The ending address of the SUM statement image. Must be in the last three bytes. The first
byte must contain X'00'.
98-101 The starting address of the INCLUDE or OMIT statement image. Must be in the last three
bytes. The first byte must contain X'08'.
102-105 The ending address of the INCLUDE or OMIT statement image. Must be in the last three
bytes. The first byte must contain X'00'.
106-109 The starting address of the OUTREC statement image. Must be in the last three bytes. The
first byte must contain X'09'.
110-112 The ending address of the OUTREC statement image. Must be in the last three bytes. The
first byte must contain X'00'.
114-116 The starting address of the INREC statement image. Must be in the last three bytes. The first
byte must contain X'0A'.
118-121 The ending address of the INREC statement image. Must be in the last three bytes. The first
byte must contain X'00'.
122-125 The starting address of the OUTFIL statement image. Must be in the last three bytes. The
first byte must contain X'0B'.
126-129 The ending address of the OUTFIL statement image. Must be in the last three bytes. The first
byte must contain X'00'.
For full override and applicability details, see Appendix B, “Specification/Override of DFSORT Options” on
page 459.
Format of the Extended Parameter List: Figure 71 on page 274 shows the format of the
extended parameter list and the pointer, which you must pass to DFSORT, containing its address.
The first parameter must be specified. A 4-byte field containing X'FFFFFFFF' must be used to indicate
the end of the parameter list. It can be coded anywhere after the first parameter.
If a parameter is specified, it must appear in the indicated position and must contain a 31-bit address or a
clean (the first 8 bits containing zeros) 24-bit address. If a parameter is not specified, it is treated as if it
were specified as zeros. For full override and applicability details, see Appendix B, “Specification/Override
of DFSORT Options” on page 459.
┌───────────────────────┐
│ Register 1 │
└───────────────────┬───┘
│
(Hex) (Dec) Bit ð
│
6
┌─────────┬─────────────────────────────────────────────────────────────┐
ð ð │ ð │ Address of control statement area (zero if none) │
├─────────┼─────────────────────────────────────────────────────────────┤
4 4 │ f │ Address of user exit E15 or E32 (zeros if none) │
├─────────┼─────────────────────────────────────────────────────────────┤
8 8 │ f │ Address of user exit E35 (zeros if none) │
├─────────┴─────────────────────────────────────────────────────────────│
C 12 │ Address of user exit constant (zeros if none) │
├───────────────────────────────────────────────────────────────────────┤
1ð 16 │ Address of ALTSEQ translation table (zeros if none) │
├───────────────────────────────────────────────────────────────────────┤
14 2ð │ Address of ESTAE area pointer (zeros if none) │
├─────────┬─────────────────────────────────────────────────────────────┤
18 24 │ f │ Address of user exit E18 (zeros if none) │
├─────────┼─────────────────────────────────────────────────────────────┤
1C 28 │ f │ Address of user exit E39 (zeros if none) │
├─────────┴─────────────────────────────────────────────────────────────┤
2ð 32 │ 4-character call identifier (zeros if none) │
├───────────────────────────────────────────────────────────────────────┤
24 36 │ X'FFFFFFFF' │
└───────────────────────────────────────────────────────────────────────┘
Detailed specifications for each of the entries in the parameter list follow:
Byte Explanation
0-3 Required. The address of the area containing the DFSORT control statements, if any; otherwise,
all zeros. The high order bit must be 0 to identify this as an extended parameter list.
Refer to the previous section for the format of the control statement area. Note that the area must
start with a two-byte length field.
If you specify this parameter as zeros, you must supply all the required control statements in
DFSPARM or SORTCNTL.
4-7 Optional. The address of the E15 or E32 user exit routine that your program has placed in main
storage (for example, via LOAD), if any; otherwise, all zeros.
f (bit 0) has the following meaning:
0 = Enter the user exit with 24-bit addressing in effect
(AMODE 24).
1 = Enter the user exit with 31-bit addressing in effect
(AMODE 31).
Note: If the Blockset or Peerage/Vale technique is not selected, the user exit is always entered
with 24-bit addressing in effect (AMODE 24).
8-11 Optional. The address of the E35 user exit routine that your program has placed in main storage
(for example, via LOAD), if any; otherwise, all zeros.
f (bit 0) has the following meaning:
0 = Enter the user exit with 24-bit addressing in effect
(AMODE 24).
1 = Enter the user exit with 31-bit addressing in effect
(AMODE 31).
Note: If the Blockset or Peerage/Vale technique is not selected, the user exit is always entered
with 24-bit addressing in effect (AMODE 24).
12-15 Optional. This field will be passed to the E15 or E35 user exit routines.
| Note: The user exit address constant must not be used for a Conventional merge or tape work
| data set sort application.
16-19 Optional. The address of a 256-byte alternate collating sequence table supplied instead of an
ALTSEQ statement, if any; otherwise, all zeros. You can use this option to override any alternate
collating sequence table specified at installation. For full override and applicability details, see
Appendix B, “Specification/Override of DFSORT Options” on page 459.
20-23 Optional. The address of a 4-byte field containing the address of a 112-byte work area where
ESTAE information is saved, or all zeros if the ESTAE information is not saved.
If a system or user exit abend occurs, the DFSORT recovery routine will copy the first 112 bytes of
the software diagnostic work area (SDWA) into this area before returning to your ESTAE recovery
routine.
24-27 Optional. The address of the E18 user exit routine that your program has placed in main storage
(for example, via LOAD), if any; otherwise, all zeros.
Note: This parameter is ignored for a merge application and for a tape work data set sort applica-
tion.
f (bit 0) has the following meaning:
0 = Enter the user exit with 24-bit addressing in effect
(AMODE 24).
1 = Enter the user exit with 31-bit addressing in effect
(AMODE 31).
Note: If the Blockset or Peerage/Vale technique is not selected, the user exit is always entered
with 24-bit addressing in effect (AMODE 24).
28-31 Optional. The address of the E39 user exit routine that your program has placed in main storage
(for example, via LOAD), if any; otherwise, all zeros.
Note: This parameter is ignored for a conventional merge application and for a tape work data set
sort application.
f (bit 0) has the following meaning:
0 = Enter the user exit with 24-bit addressing in effect (AMODE 24).
1 = Enter the user exit with 31-bit addressing in effect (AMODE 31).
Note: If the Blockset or Peerage/Vale technique is not selected, the user exit is always entered
with 24-bit addressing if effect (AMODE 24).
32-35 Optional. 4 characters to be used as an identifier for this call to DFSORT. This field can be used
to uniquely identify each call to DFSORT from a program that calls DFSORT more than once.
DFSORT prints message ICE200I to display the field identifier exactly as you specify it; the field is
not checked for valid characters.
If the field identifier is specified, it must appear in the indicated position. If the identifier field con-
tains zeros (X'00000000'), or X'FFFFFFFF' is used to end the parameter list before or at the field
identifier, DFSORT does not print message ICE200I.
Note: The list can be ended after any parameter. The last parameter in the list must be followed by
X'FFFFFFFF'.
If you provide an E15 user exit routine address in the parameter list, DFSORT ignores the SORTIN data
set; your E15 routine must pass all input records to DFSORT. The same applies to a merge if you specify
an E32 routine address. This means that your routine must issue a return code of 12 (insert record) until
the input data set is complete, and then a return code of 8 (“do not return”).
| DFSORT ignores the SORTOUT data set if you provide an E35 routine address in the parameter list.
| Unless you use OUTFIL processing, your routine is then responsible for disposing of all output records. It
must issue a return code of 4 (delete record) for each record in the output data set. When the program
has deleted all the records, your routine issues a return code of 8 (“do not return”).
When DFSORT is done, it passes control to the routine that invoked it.
When a single task attaches two or more program applications, you must modify the standard ddnames so
that they are unique. For ways of doing this, and for the rules of override, see Appendix B,
“Specification/Override of DFSORT Options” on page 459.
If you ATTACH more than one DFSORT application from the same program, you must wait for each to
complete before attaching the next unless DFSORT and your user exits are installed re-entrant.
When you initiate DFSORT via XCTL, you must give special consideration to the area where the param-
eter list, address list, optional parameters, and modification routines (if any) are stored. This information
must not reside in the module that issues the XCTL because the module is overlaid by DFSORT.
There are two ways to overcome this problem. First, the control information can reside in a task that
attaches the module that issues the XCTL. Second, the module issuing the XCTL can first issue a
GETMAIN macro instruction and place the control information in the main storage area it obtains. This
area is not overlaid when the XCTL is issued. The address of the control information in the area must be
passed to DFSORT in general register 1.
Figure 72 on page 277 shows the format of the 24-bit parameter list you would use to specify the main
storage option for a sort application.
Figure 72. Specifying the Main Storage Option (24-Bit Parameter List)
Figure 73 shows the format of the 24-bit parameter list that you would use for a merge application when
you want to supply input through an E32 routine and give control to the ESTAE routine if the program
fails.
Figure 73. Specifying E32 and ESTAE Routine (24-Bit Parameter List)
Figure 74 on page 278 shows how a 24-bit parameter list might appear in main storage. General register
1 contains a pointer to the address of the parameter list which is at location 1000. The address points to
the parameter list which begins at location 1006. The first 2-byte field of the parameter list contains,
right-justified in hexadecimal, the number of bytes in the list (36 decimal).
┌──┬──┬──┬──┐
Reg 1│ðð│ðð│1ð│ðð│(pointer to address)
└──┴──┴──┴┬─┘
┌───────┘
6
┌──┬──┬──┬──┐
1ððð│8ð│ðð│1ð│ð6│(address of parameter list)
└──┴──┴──┴┬─┘
┌────┘
6
┌──┬──┬──┬──┐
1ðð4│ðð│ðð│ðð│24│ 1ð36
├──┼──┼──┼──┤ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
1ðð8│ðð│ðð│1ð│36├──────────────5 │#│S│O│R│T│#│F│I│E│L│D│S│=│
├──┼──┼──┼──┤ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤
1ððC│ðð│ðð│1ð│5B│ │(│1│ð│,│1│5│,│C│H│,│A│)│,│
├──┼──┼──┼──┤ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┘
1ð1ð│ðð│ðð│1ð│5C├────────────┐ │F│I│L│S│Z│=│4│7│8│ð│6│#│
├──┼──┼──┼──┤ │ └─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘
1ð14│ðð│ðð│1ð│75│ │ 1ð5B
├──┼──┼──┼──┤ │
1ð18│ðð│ðð│2ð│ðð│ │ 1ð5C
├──┼──┼──┼──┤ │ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
1ð1C│ðð│ðð│3ð│ðð│ └──5│#│R│E│C│O│R│D│#│L│E│N│G│T│H│
├──┼──┼──┼──┤%┐ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┴─┘
1ð2ð│A │B │C │# │ │ │=│1│ð│ð│,│T│Y│P│E│=│F│#│
├──┼──┼──┼──┤ │ └─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘
1ð24│ðð│ðð│65│9ð│ │Optional 1ð75
├──┼──┼──┼──┤ │
1ð2C│FF│( │U │) │ │
└──┴──┴──┴──┘%┘
Parameter List
The first two fullwords in the parameter list point to the beginning (location 1036) and end (location 105B)
of the SORT control statement. The next two fullwords point to the beginning (location 105C) and end
(location 1075) of the RECORD statement.
The fifth and sixth fullwords in the list contain the entry point addresses for the E15 user exit (location
2000) and E35 user exit (location 3000).
The next fullword in the list contains four characters to replace the letters 'SORT' in the ddnames of
standard DD statements.
The next two fullwords in the list specify a main storage value for this application and a message option.
The example in Figure 75 on page 279 shows, in assembler language, how to code the parameters and
statement images needed for the 24-bit parameter list in Figure 74. It also shows how to pass control to
DFSORT.
The example in Figure 76 on page 280 shows, in assembler language, how to use an extended param-
eter list to code parameters and statement images and how to pass control to DFSORT.
.
.
.
LA R1,PL1 SET ADDRESS OF PARAMETER LIST
\ TO BE PASSED TO SORT/MERGE
ST R2,PL4 SET ADDRESS OF GETMAINED AREA
\ TO BE PASSED TO E15
LINK EP=SORT INVOKE SORT/MERGE
.
.
.
PL1 DC A(CTLST) ADDRESS OF CONTROL STATEMENTS
PL2 DC A(E15) ADDRESS OF E15 ROUTINE
PL3 DC A(ð) NO E35 ROUTINE
PL4 DS A USER EXIT ADDRESS CONSTANT
PL5 DC F'-1' INDICATE END OF LIST
CTLST DS ðH CONTROL STATEMENTS AREA
DC AL2(CTL2-CTL1) LENGTH OF CHARACTER STRING
CTL1 DC C' SORT FIELDS=(4,5,CH,A)'
DC C' OPTION '
DC C'RESINV=2ð48,FILSZ=E25ððð,MSGDDN=MSGOUT '
DC C' OMIT COND=(5,8,EQ,13,8),FORMAT=FI '
DC C' RECORD TYPE=F,LENGTH=8ð '
CTL2 EQU \
OUT DCB DDNAME=SYSOUT,... MYSORT USES SYSOUT
E15 DS ðH E15 ROUTINE
.
.
.
BR R14 RETURN TO SORT/MERGE
\ MAPPING OF PARAMETER LIST PASSED TO E15 FROM SORT/MERGE
SRTLST DS A ADDRESS OF RECORD
GMA DS A ADDRESS OF AREA GETMAINED BY
\ MYSORT
.
.
.
Merge Restriction
Merge applications cannot be done when DFSORT is invoked from a PL/I program.
Copy Restrictions
Copy applications cannot be done when DFSORT is invoked from a PL/I program.
If you invoke DFSORT from a COBOL program, the following restrictions apply:
If using OS/VS COBOL, a copy application cannot be done.
If using VS COBOL II, the OPTION COPY statement can be placed in either the COBOL II
IGZSRTCD data set or the DFSORT SORTCNTL or DFSPARM data set.
If using the COBOL II FASTSRT compile-time option for any part or all of the COBOL SORT state-
ment, a copy application can be done.
If using the COBOL MERGE statement, a copy application cannot be done.
See “COBOL Requirements for Copy Processing” on page 248 for user exit requirements.
Overview
This chapter describes ICETOOL, a multi-purpose DFSORT utility. ICETOOL uses the capabilities of
DFSORT to perform multiple operations on one or more data sets in a single job step. These operations
include the following:
Creating multiple copies of sorted, edited, or unedited input data sets
Creating output data sets containing subsets of input data sets based on various criteria for character
and numeric field values or the number of times unique values occur
Creating output data sets containing different field arrangements of input data sets
| Creating list data sets showing character and numeric fields in a variety of simple, tailored, and sec-
| tioned report formats, allowing control of title, date, time, page numbers, headings, lines per page, field
formats, and total, maximum, minimum and average values for the columns of numeric data
Printing messages that give statistical information for selected numeric fields such as minimum,
maximum, average, total, count of values, and count of unique values
Printing messages that identify invalid decimal values
Creating a list data set showing the DFSORT installation defaults in use
Creating list data sets showing unique values for selected character and numeric fields and the
number of times each occurs, in a variety of simple and tailored report formats
Creating list and output data sets for records with: duplicate values, non-duplicate values, or values
that occur n times, less than n times or more than n times
Using three different modes (stop, continue, and scan) to control error checking and actions after error
detection for groups of operators.
ICETOOL/DFSORT Relationship
ICETOOL is a batch front-end utility that uses the capabilities of DFSORT to perform the operations you
request.
ICETOOL is comprised of twelve operators that perform sort, copy, statistical, and report operations. Most
of the operations performed by ICETOOL require only simple JCL and operator statements. Some
| ICETOOL operations require or allow you to specify complete DFSORT control statements (such as
| SORT, INCLUDE, and OUTFIL) to take full advantage of DFSORT's capabilities.
ICETOOL automatically calls DFSORT with the particular DFSORT control statements and options
required for each operation (such as DYNALLOC for sorting).
ICETOOL also produces messages and return codes describing the results of each operation and any
errors detected. Although you generally do not need to look at the DFSORT messages produced as a
result of an ICETOOL run, they are available in a separate data set if you need them.
ICETOOL can be called directly or from a program. ICETOOL allows operator statements (and com-
ments) to be supplied in a data set or in a parameter list passed by a calling program. For each operator
supplied in the parameter list, ICETOOL puts information in the parameter list pertaining to that operation,
thus allowing the calling program to use the information derived by ICETOOL.
DEFAULTS Prints the DFSORT installation defaults in a separate list data set.
| DISPLAY Prints the values or characters of specified numeric or character fields in a separate list data
| set. Simple, tailored, or sectioned reports can be produced.
MODE Three modes are available which can be set or reset for groups of operators:
OCCUR Prints each unique value for specified numeric or character fields and how many times it
occurs in a separate list data set. Simple or tailored reports can be produced. The values
printed can be limited to those for which the value count meets specified criteria (for
example, only duplicate values or only non-duplicate values).
RANGE Prints a message containing the count of values in a specified range for a specified numeric
field in a data set.
SELECT Selects records from a data set for inclusion in an output data set based on meeting criteria
for the number of times specified numeric or character field values occur (for example, only
duplicate values or only non-duplicate values).
STATS Prints messages containing the minimum, maximum, average, and total for specified
numeric fields in a data set.
UNIQUE Prints a message containing the count of unique values for a specified numeric or character
field.
VERIFY Examines specified decimal fields in a data set and prints a message identifying each invalid
value found for each field.
Invoking ICETOOL
ICETOOL can be invoked in the following three ways:
Directly (that is, not from a program) using the TOOLIN Interface
From a program using the TOOLIN Interface
From a program using the Parameter List Interface.
With the TOOLIN Interface, you supply ICETOOL statements in a data set defined by the TOOLIN DD
statement. ICETOOL prints messages in the data set defined by the TOOLMSG DD statement.
With the Parameter List Interface, your program supplies ICETOOL statements in a parameter list.
ICETOOL prints messages in the data set defined by the TOOLMSG DD statement and also puts informa-
tion in the parameter list for use by your program.
MODE STOP
VERIFY FROM(DATA1) ON(22,7,PD)
DISPLAY FROM(DATA1) LIST(SALARIES) -
TITLE('Employee Salaries') DATE TIME -
HEADER('Employee Name') HEADER('Salary') -
ON(1,2ð,CH) ON(22,7,PD) BLANK -
AVERAGE('Average Salary')
STATS FROM(DATA1) ON(22,7,PD)
RANGE FROM(DATA1) ON(22,7,PD) LOWER(2ðððð)
RANGE FROM(DATA1) ON(22,7,PD) HIGHER(19999) LOWER(4ðððð)
RANGE FROM(DATA1) ON(22,7,PD) HIGHER(4ðððð)
OCCUR FROM(DATA1) LIST(SALARIES) -
TITLE('Employees Receiving Each Salary') DATE TIME -
HEADER('Salary') HEADER('Employee Count') -
ON(22,7,PD) ON(VALCNT) BLANK
Assume that you specify DD statements with the following ddnames for the indicated data sets:
DATA1 A data set containing the name, salary, department, location and so on, of each of your
employees. The name field is in positions 1 through 20 in character format and the
salary field is in positions 22 through 28 in packed decimal format.
SALARIES A SYSOUT data set.
\ GROUP 1
MODE CONTINUE
COPY FROM(DATA1) TO(DATA2)
COPY FROM(MSTR1) TO(MSTR2)
SELECT FROM(DATA1) TO(SMALLDPT) ON(3ð,4,CH) LOWER(1ð)
UNIQUE FROM(MSTR1) ON(3ð,4,CH)
\ GROUP 2
MODE STOP
COPY FROM(DATA1) TO(TEMP1) USING(NEW1)
COPY FROM(DATA1) TO(TEMP2) USING(NEW2)
COPY FROM(DATA1) TO(TEMP3) USING(NEW3)
SORT FROM(CONCAT) TO(FINALD,FINALP) USING(FINL)
Assume that you specify DD statements with the following ddnames for the indicated data sets:
DATA1 A data set containing the name, salary, department, location, and so
on, of each of your employees. The department field is in positions 30
through 33 in character format.
MSTR1 Master data set containing only the name and department of each of
your employees. The department field is in positions 30 through 33 in
character format.
UNIQUE Prints a message in the TOOLMSG data set showing the number of unique
departments.
MODE STOP If an error is found while processing one of the group 2 operators, subse-
quent group 2 operators are not processed; that is, each group 2 operator
is dependent on the success of previous group 2 operators.
COPY The three COPY operators create an output data set for the employees in
each department containing only name and department. Note that the
ddname requested by the USING(xxxx) operand is xxxxCNTL. For
example, USING(NEW1) requests ddname NEW1CNTL.
SORT Sorts the three output data sets created by the COPY operators along with
the master name/department data set and creates permanent and
SYSOUT data sets containing the resulting sorted records.
You can combine both of these examples into a single ICETOOL job step.
TOOLMSG DD Statement Defines the ICETOOL message data set for all operations. ICETOOL mes-
sages and statements appear in this data set. ICETOOL uses RECFM=FBA,
| LRECL=121 and the specified BLKSIZE for the TOOLMSG data set. If the
| BLKSIZE you specify is not a multiple of 121, ICETOOL uses BLKSIZE=121. If
| you do not specify the BLKSIZE, ICETOOL selects the block size as directed
| by the SDBMSG installation option (see Installation and Customization).
The TOOLMSG DD statement must be present.
DFSMSG DD Statement Defines the DFSORT message data set for all operations. The DFSORT mes-
sages and control statements from all ICETOOL calls to DFSORT appear in
this data set. Refer to the discussion of SYSOUT in “System DD Statements”
on page 44 for details.
The DFSMSG DD statement must be present.
Note: A SYSOUT data set should be used for DFSMSG. If you define
DFSMSG as a temporary or permanent data set, you will only see the
DFSORT messages from the last call to DFSORT unless you allocate a new
data set using a disposition of MOD.
TOOLIN DD statement Defines the ICETOOL statement data set which must have the following
attributes: RECFM=F or RECFM=FB and LRECL=80.
If the TOOLIN Interface is used, the TOOLIN DD statement must be present.
If the Parameter List Interface is used, the TOOLIN DD statement is not
required and is ignored if present.
indd DD Statement Defines the input data set for an operation. Refer to “SORTIN DD Statement”
on page 47 for details. ICETOOL imposes the additional restriction that the
LRECL of this data must be at least 4.
An indd DD statement must be present for each unique indd name specified in
each FROM operand.
outdd DD Statement Defines an output data set for a COPY, SELECT, or SORT operation. Refer
to “SORTOUT and OUTFIL DD Statements” on page 52 for details.
An outdd DD statement must be present for each unique outdd name specified
in each TO operand.
| listdd DD Statement Defines the list data set for a DEFAULTS, DISPLAY, or OCCUR operation.
| For each listdd data set, ICETOOL uses RECFM=FBA, LRECL=121 (for
| DEFAULTS) or the LRECL specified in the WIDTH operand or calculated as
| needed if WIDTH is not specified (DISPLAY and OCCUR), and the specified
| block size. If the BLKSIZE you specify is not a multiple of the LRECL,
| ICETOOL uses BLKSIZE=LRECL. If you do not specify BLKSIZE, ICETOOL
| selects the block size as directed by the SDBMSG installation option (see
| Installation and Customization).
A listdd DD statement must be present for each unique listdd name specified
in each LIST operand.
xxxxCNTL DD Statement Defines the DFSORT control statement data set for a SORT, COPY, or
COUNT operation. Refer to “SORTCNTL DD Statement” on page 54 for more
details.
An xxxxCNTL DD statement must be present for each unique xxxx specified in
each USING operand.
JCL Restrictions
You should avoid using ddnames reserved for ICETOOL and DFSORT in ICETOOL operands (FROM,
TO, LIST). In general, you should also avoid supplying DD statements with ddnames reserved for
DFSORT when using ICETOOL because doing so can cause unpredictable results. Specifically:
SORTCNTL should not be used as a ddname in ICETOOL operators nor should it be supplied as a
DD statement. A xxxxCNTL DD statement should only be supplied when you specify a USING(xxxx)
operand.
SYSIN, SORTCNTL, SORTIN, SORTOUT, SORTINnn, and xxxxINnn (where xxxx is specified in a
USING operand) should not be used as ddnames in ICETOOL operators nor supplied as DD state-
ments.
TOOLMSG, DFSMSG, TOOLIN, SYSUDUMP, and SYSABEND should not be used as ddnames in
ICETOOL operators.
SORTWKnn and xxxxWKnn (where xxxx is specified in a USING operand) should not be used as
ddnames in ICETOOL operators. DD statements for these ddnames should only be supplied as work
data sets to override dynamic allocation for ICETOOL operators OCCUR, SELECT, SORT, and
UNIQUE, if appropriate.
DFSPARM (or the ddname specified for ICEMAC option PARMDDN) should not be used as a ddname
in ICETOOL operators. It should only be used as a DD statement to override DFSORT options for all
operators, if appropriate. Refer to “DFSPARM DD Statement” on page 55 for details.
| xxxxOFnn (where xxxx is specified in a USING operand) is required as the ddname when an OUTFIL
| statement in the xxxxCNTL data set specifies FILES=nn. To avoid this requirement, use the
| FNAMES=ddname operand rather than the FILES=nn operand in OUTFIL statements, and include a
| DD statement for the specified ddname. See “OUTFIL Control Statements” on page 141 for details of
| the FNAMES operand.
ICETOOL Statements
Each operation must be described to ICETOOL using an operator statement. Additionally, ICETOOL
allows comment statements and blank statements. An explanation of the general rules for coding
ICETOOL statements is given below followed by a detailed discussion of each operator.
Parentheses must be used where shown. Commas or semicolons must be used where commas are
shown.
Operands can be in any order.
Columns 1-72 are scanned; columns 73-80 are ignored.
Continuation can be indicated by a dash (-) after the operator or after any operand. The next operand
must then be specified on the next line. For example:
SORT FROM(INDD) -
USING(ABCD) -
TO(OUTPUT1,OUTPUT2,OUTPUT3)
Any characters specified after the dash are ignored. Each operand must be completely specified on
one line.
A statement with an asterisk (*) in column 1 is treated as a comment statement. It is printed with the
other ICETOOL statements, but otherwise not processed. A statement with blanks in columns 1 through
72 is treated as a blank statement. It is ignored since ICETOOL prints blank lines where appropriate.
COPY Operator
|
| ┌─,─────┐
| 55──COPY──FROM(indd)──┬─TO(──6─outdd─┴─)──────────────┬──┬─────────────┬──────────────────5
| ├─USING(xxxx)──────────────────┤ └─VSAMTYPE(x)─┘
| │ ┌─,─────┐ │
| └─TO(──6─outdd─┴─)──USING(xxxx)─┘
| 5──┬─────────────────┬──┬────────┬──────────────────────────────────────────────────────5%
| ├─LOCALE(name)────┤ └─SERIAL─┘
| ├─LOCALE(CURRENT)─┤
| └─LOCALE(NONE)────┘
| DFSORT is called to copy the indd data set to the outdd data sets; the DFSORT control statements in
| xxxxCNTL are used if USING(xxxx) is specified. You can use DFSORT control statements and options in
| the xxxxCNTL data set to copy a subset of the input records (INCLUDE or OMIT statement; SKIPREC and
| STOPAFT options; OUTFIL INCLUDE, OMIT, STARTREC, ENDREC, and SPLIT operands; user exit rou-
| tines), reformat records for output (INREC and OUTREC statements, OUTFIL OUTREC operand, user exit
| routines), and so on.
| If an INCLUDE or OMIT statement or an OUTFIL INCLUDE or OMIT operand is specified in the xxxxCNTL
| data set, the active locale's collating rules affect INCLUDE and OMIT processing, as explained in the “Cul-
| tural Environment Considerations” discussion in “INCLUDE Control Statement” on page 75.
FROM(indd)
Specifies the ddname of the input data set to be read by DFSORT for this operation. An indd DD
statement must be present and must define an input data set that conforms to the rules for DFSORT's
SORTIN data set.
Refer to “JCL Restrictions” on page 289 for more information regarding the selection of ddnames.
| TO(outdd,...)
| Specifies the ddnames of the output data sets to be written by DFSORT for this operation. From 1 to
| 10 outdd names can be specified. An outdd DD statement must be present for each outdd name
| specified. If a single outdd data set is specified, DFSORT is called once to copy the indd data set to
| the outdd data set, using SORTOUT processing; the outdd data set must conform to the rules for
| DFSORT's SORTOUT data set. If multiple outdd data sets are specified and SERIAL is not specified,
| DFSORT is called once to copy the indd data set to the outdd data sets, using OUTFIL processing;
| the outdd data sets must conform to the rules for DFSORT's OUTFIL data sets.
| TO and USING can both be specified. If USING is not specified, TO must be specified. If TO is not
| specified, USING must be specified.
A ddname specified in the FROM operand must not also be specified in the TO operand.
Refer to “JCL Restrictions” on page 289 for more information regarding the selection of ddnames.
USING(xxxx)
| Specifies the first 4 characters of the ddname for the control statement data set to be used by
| DFSORT for this operation. If this operand is specified, an xxxxCNTL DD statement must be present
| and the control statements in it must conform to the rules for DFSORT's SORTCNTL data set.
| TO and USING can both be specified. If USING is not specified, TO must be specified. If TO is not
| specified, USING(xxxx) must be specified and the xxxxCNTL data set must contain either one or more
| OUTFIL statements or a MODS statement for an E35 routine that disposes of all records. Other state-
| ments are optional.
Refer to “JCL Restrictions” on page 289 for more information regarding the selection of ddnames.
VSAMTYPE(x)
Specifies the record format for a VSAM input data set; x must be either F for fixed-length records or V
for variable-length records.
For details on when VSAMTYPE(x) is required, see “RECORD Control Statement” on page 203. If
you supply your own DFSORT RECORD statement, it will override the record format information
passed by ICETOOL for this operand.
| LOCALE(name)
| Specifies that locale processing is to be used and designates the name of the locale to be made
| active during DFSORT processing. LOCALE(name) can be used to override the LOCALE installation
| option. For complete details on LOCALE(name), see the discussion of the LOCALE operand in
| “OPTION Control Statement” on page 111.
| LOCALE(CURRENT)
| Specifies that locale processing is to be used, and the current locale active when DFSORT is entered
| will remain the active locale during DFSORT processing. LOCALE(CURRENT) can be used to over-
| ride the LOCALE installation option. For complete details on LOCALE(CURRENT), see the discussion
| of the LOCALE operand in “OPTION Control Statement” on page 111.
| LOCALE(NONE)
| Specifies that locale processing is not to be used. DFSORT will use the binary encoding of the code
| page defined for your data for collating and comparing. LOCALE(NONE) can be used to override the
| LOCALE installation option. For complete details on LOCALE(NONE), see the discussion of the
| LOCALE operand in “OPTION Control Statement” on page 111.
| SERIAL
| Specifies that OUTFIL processing is not to be used when multiple outdd data sets are specified.
| DFSORT is called multiple times and uses SORTOUT processing; the outdd data sets must conform
| to the rules for DFSORT's SORTOUT data set. SERIAL is not recommended because the use of
| serial processing (that is, multiple calls to DFSORT) instead of OUTFIL processing can degrade per-
| formance and imposes certain restrictions as detailed below. SERIAL is ignored if a single outdd data
| set is specified.
| DFSORT is called to copy the indd data set to the first outdd data set using the DFSORT control
| statements in the xxxxCNTL data set if USING(xxxx) is specified. If the first copy is successful,
| DFSORT is called as many times as necessary to copy the first outdd data set to the second and
| subsequent outdd data sets. Therefore, for maximum efficiency, use a DASD data set as the first in a
| list of outdd data sets on both DASD and tape. If more than one outdd data set is specified, DFSORT
| must be able to read the first outdd data set after it is written in order to copy it to the other outdd data
| sets. Do not use a SYSOUT or DUMMY data set as the first in a list of outdd data sets because:
| if the first data set is SYSOUT, DFSORT abends when it tries to copy the SYSOUT data set to the
| second outdd data set.
| if the first data set is DUMMY, DFSORT copies the empty DUMMY data set to the other outdd
| data sets, with the result that all outdd data sets are then empty.
| COPY Examples
| Although the COPY operators in the examples below could all be contained in a single ICETOOL job step,
| they are shown and discussed separately for clarity.
| Example 1
| \ Method 1
| COPY FROM(MASTER) TO(PRINT,TAPE,DASD)
| \ Method 2
| COPY FROM(MASTER) TO(DASD,TAPE,PRINT) SERIAL
| This example shows two different methods for creating multiple output data sets.
| Method 1 requires one call to DFSORT, one pass over the input data set, and allows the output data sets
| to be specified in any order. The COPY operator copies all records from the MASTER data set to the
| PRINT (SYSOUT), TAPE, and DASD data sets, using OUTFIL processing.
| Method 2 requires three calls to DFSORT, three passes over the input data set, and imposes the
| restriction that the SYSOUT data set must not be the first TO data set. The COPY operator copies all
| records from the MASTER data set to the DASD data set and then copies the resulting DASD data set to
| the TAPE and PRINT (SYSOUT) data sets. Since the first TO data set is processed three times (written,
| read, read), placing the DASD data set first is more efficient than placing the TAPE data set first. PRINT
| must not be the first in the TO list because a SYSOUT data set cannot be read.
| Example 2
| \ Method 1
| COPY FROM(IN) TO(DEPT1) USING(DPT1)
| COPY FROM(IN) TO(DEPT2) USING(DPT2)
| COPY FROM(IN) TO(DEPT3) USING(DPT3)
| \ Method 2
| COPY FROM(IN) USING(ALL3)
| This example shows two different methods for creating subsets of an input data set. Assume that:
| The DPT1CNTL data set contains:
| INCLUDE COND=(5,3,CH,EQ,C'Dð1')
| The DPT2CNTL data set contains:
| INCLUDE COND=(5,3,CH,EQ,C'Dð2')
| The DPT3CNTL data set contains:
| INCLUDE COND=(5,3,CH,EQ,C'Dð3')
| The ALL3CNTL data set contains:
| OUTFIL FNAMES=DEPT1,INCLUDE=(5,3,CH,EQ,C'Dð1')
| OUTFIL FNAMES=DEPT2,INCLUDE=(5,3,CH,EQ,C'Dð2')
| OUTFIL FNAMES=DEPT3,INCLUDE=(5,3,CH,EQ,C'Dð3')
| Method 1 requires three calls to DFSORT and three passes over the input data set:
| The first COPY operator copies the records from the IN data set that contain D01 in positions 5-7 to
| the DEPT1 data set.
| The second COPY operator copies the records from the IN data set that contain D02 in positions 5-7
| to the DEPT2 data set.
| The third COPY operator copies the records from the IN data set that contain D03 in positions 5-7 to
| the DEPT3 data set.
| Method 2 accomplishes the same result as method 1, but because it uses OUTFIL statements instead of
| TO operands, requires only one call to DFSORT and one pass over the input data set.
| Example 3
| The COPY operator copies all records from the VSAMIN data set to the VSAMOUT data set. The VSAM
| records are treated as variable-length.
COUNT Operator
55──COUNT──FROM(indd)──┬─────────────┬──┬─────────────┬──┬─────────────────┬────────────5%
| └─USING(xxxx)─┘ └─VSAMTYPE(x)─┘ ├─LOCALE(name)────┤
| ├─LOCALE(CURRENT)─┤
| └─LOCALE(NONE)────┘
DFSORT is called to copy the indd data set to ICETOOL's E35 user exit. The DFSORT control state-
ments in xxxxCNTL are used if USING(xxxx) is specified. You can use a DFSORT INCLUDE or OMIT
statement in the xxxxCNTL data set to count a subset of the input records.
| If an INCLUDE or OMIT statement is specified in the xxxxCNTL data set, the active locale's collating rules
| affect INCLUDE and OMIT processing as explained in the “Cultural Environment Considerations” dis-
| cussion in “INCLUDE Control Statement” on page 75.
ICETOOL prints a message containing the record count as determined by its E35 user exit.
You must not supply your own DFSORT MODS statement because it would override the MODS statement
passed by ICETOOL for this operator.
Note: The record count is also printed for the DISPLAY, OCCUR, RANGE, SELECT, STATS, UNIQUE,
and VERIFY operators.
FROM(indd)
See the discussion of this operand on the COPY statement in “COPY Operator” on page 291.
USING(xxxx)
Specifies the first 4 characters of the ddname for the control statement data set to be used by
DFSORT for this operation. If this operand is used, an xxxxCNTL DD statement must be present and
the control statements in it:
Refer to “JCL Restrictions” on page 289 for more information regarding the selection of ddnames.
VSAMTYPE(x)
See the discussion of this operand on the COPY statement in “COPY Operator” on page 291.
| LOCALE(name)
| See the discussion of this operand on the COPY statement in “COPY Operator” on page 291.
| LOCALE(CURRENT)
| See the discussion of this operand on the COPY statement in “COPY Operator” on page 291.
| LOCALE(NONE)
| See the discussion of this operand on the COPY statement in “COPY Operator” on page 291.
COUNT Example
For the following example, assume that the CTL1CNTL data set contains a DFSORT INCLUDE statement.
| COUNT FROM(IN1)
| COUNT FROM(IN2) USING(CTL1)
The first COUNT operator prints a message containing the count of records in the IN1 data set.
The second COUNT operator prints a message containing the count of records included from the IN2 data
set.
DEFAULTS Operator
55──DEFAULTS──LIST(listdd)──────────────────────────────────────────────────────────────5%
DFSORT enables you to maintain separate sets of installation defaults for four different run-time environ-
ments as follows:
JCL (ICEAM1 module) - for batch JCL directly invoked applications
INV (ICEAM2 module) - for batch program invoked applications
TSO (ICEAM3 module) - for TSO directly invoked applications
TSOINV (ICEAM4 module) - for TSO program invoked applications
Each installation default has two or more possible values; DFSORT is shipped with a set of IBM-supplied
defaults that can be modified using the ICEMAC macro. The DEFAULTS operator provides an easy way
to determine the installation defaults selected when DFSORT was installed. See Installation and
Customization for a complete discussion of the various installation defaults and how they can be modified
using the ICEMAC macro.
The value for each parameter (for each of the four installation environments) is shown as it is set in the
ICEAM1, ICEAM2, ICEAM3, and ICEAM4 modules loaded from the STEPLIB, JOBLIB, or link library. For
any value that is different from the IBM-supplied value, the IBM-supplied value is shown below it.
The control character occupies the first byte of each record. The title and headings are always printed; p
is the page number. The parameter name column occupies 10 bytes, each of the parameter value
columns occupies 20 bytes, and 5 blanks appear between columns.
LIST(listdd)
Specifies the ddname of the list data set to be produced by ICETOOL for this operation. A listdd DD
statement must be present. ICETOOL uses RECFM=FBA, LRECL=121 and the specified BLKSIZE
| for the list data set. If the BLKSIZE you specify is not a multiple of 121, ICETOOL uses
| BLKSIZE=121. If you do not specify the BLKSIZE, ICETOOL selects the block size as directed by the
| SDBMSG installation option (see Installation and Customization).
Refer to “JCL Restrictions” on page 289 for more information regarding the selection of ddnames.
DEFAULTS Example
DEFAULTS LIST(OPTIONS)
Prints, in the OPTIONS data set, the DFSORT installation defaults. The OPTIONS output starts on a new
page and looks as follows (the first few parameters are shown with illustrative values):
The title and appropriate heading lines appear at the top of each subsequent page. The specified and
IBM-supplied ALTSEQ tables are printed separately on the last page.
DISPLAY Operator
|
| ┌──
────────────────────────┐
| 55──DISPLAY──FROM(indd)───6┬─ON(p,m,f)────────────┬┴──LIST(listdd)──┬─────────────────┬───5
| ├─ON(p,m,f,formatting)─┤ └─TITLE('string')─┘
| ├─ON(p,m,HEX)──────────┤
| ├─ON(VLEN)─────────────┤
| └─ON(NUM)──────────────┘
| ┌──
────────────────────┐
| 5──┬──────┬──┬────────────┬──┬───────────┬──┬───────┬───6┬──────────────────┬┴────────────5
| └─PAGE─┘ ├─DATE───────┤ ├─TIME──────┤ ├─BLANK─┤ ├─HEADER('string')─┤
| └─DATE(abcd)─┘ └─TIME(abc)─┘ └─PLUS──┘ ├─HEADER(NONE)─────┤
| └─NOHEADER─────────┘
| 5──┬──────────┬──┬─────────────────┬──┬───────────────────┬──┬───────────────────┬───────5
| └─LINES(n)─┘ └─TOTAL('string')─┘ └─MAXIMUM('string')─┘ └─MINIMUM('string')─┘
| 5──┬───────────────────┬──┬──────────┬──┬─────────────┬──┬──────────┬────────────────────5
| └─AVERAGE('string')─┘ └─LIMIT(n)─┘ └─VSAMTYPE(x)─┘ └─WIDTH(n)─┘
| 5──┬──────────────┬──┬──────────────────┬──┬──────────────────┬──────────────────────────5
| └─BREAK(p,m,f)─┘ └─BTITLE('string')─┘ └─BTOTAL('string')─┘
| 5──┬────────────────────┬──┬────────────────────┬──┬────────────────────┬───────────────5%
| └─BMAXIMUM('string')─┘ └─BMINIMUM('string')─┘ └─BAVERAGE('string')─┘
| Prints the values or characters of specified numeric or character fields in a separate list data set. Simple,
| tailored, and sectioned reports can be produced. From 1 to 20 fields can be specified, but the resulting
| list data set line length must not exceed the limit specified by the WIDTH operand or 2048 bytes if WIDTH
| is not specified. The record number can be printed as a special field.
| DFSORT is called to copy the indd data set to ICETOOL's E35 user exit. ICETOOL uses its E35 user exit
| to print appropriate titles, headings and data in the list data set.
You must not supply your own DFSORT MODS, INREC, or OUTREC statement since they would override
the DFSORT statements passed by ICETOOL for this operator.
| Specifying formatting items or the PLUS or BLANK operand, which can “compress” the columns
| of output data, can enable you to include more fields in your report, up to a maximum of 20, if your
| line length is limited by the character width your printer or display supports.
Simple Report: You can produce a simple report by specifying just the required operands. For
example, if you specify FROM and LIST operands, and ON operands for 10-byte character and 7-byte
zoned decimal fields, the output in the list data set can be represented as follows:
(p,m,f) (p,m,f)
characters sddddddddddddddd
. .
. .
. .
A control character occupies the first byte of each list data set record. Left-justified standard headings are
printed at the top of each page to indicate the contents of each column, followed by a line for each record
showing the characters and numbers in the fields of that record.
The fields are printed in columns in the same order in which they are specified in the DISPLAY statement.
All fields are left-justified. For numeric fields, leading zeros are printed, a − is used for the minus sign,
and a + is used for the plus sign.
| HEADER operands can be used to change or suppress the headings. Formatting items or the PLUS or
| BLANK operand can be used to change the appearance of numeric fields in the report. PLUS, BLANK,
and HEADER operands can be used to change the width of the columns for numeric and character fields
and the justification of headings and fields.
The NOHEADER operand can be used to create list data sets containing only data records. Data sets
created in this way can be processed further by other operators (for example, STATS or UNIQUE) using
CH format for character values or CSF/FS format for numeric values.
TOTAL, MAXIMUM, MINIMUM, and AVERAGE can be used to print statistics for numeric fields after the
columns of data.
Tailored Report: You can tailor the output in the list data set using various operands that control
title, date, time, page number, headings, lines per page, field formats, and total, maximum, minimum, and
average values for the columns of numeric data. The optional operands can be used in many different
combinations to produce a wide variety of report formats. For example, if you specify FROM, LIST,
BLANK, TITLE, PAGE, DATE, TIME, HEADER and AVERAGE operands, and ON operands for 10-byte
character and 7-byte zoned decimal fields, the output in the list data set can be represented as follows:
header header
---------- --------
characters sd
. .
. .
. .
average sd
A control character occupies the first byte of each list data set record. The title line is printed at the top of
each page of the list data set. It contains the elements you specify (title string, page number, date and
time) in the order in which you specify them. Eight blanks appear between title elements. A blank line is
printed after the title line.
Your specified headings (underlined) are printed after the title line on each page to indicate the contents of
each column, followed by a line for each record showing the characters and numbers in the fields of that
record. Headings for character fields are left-justified and headings for numeric fields are right-justified.
Your specified statistical lines (total, maximum, minimum, and average, and their associated strings) are
printed for each numeric field after the columns of data.
The fields are printed in columns in the same order in which they are specified in the DISPLAY statement.
Character fields are left-justified and numeric fields are right-justified. For numeric fields, leading zeros are
suppressed, a − is used for the minus sign, and a blank is used for the plus sign (you can specify PLUS
rather than BLANK if you want a + to be used for the plus sign).
| Formatting items can be used to change the appearance of individual numeric fields in the report with
| respect to separators, decimal point, decimal places, and signs; division by 1000, 1000 000 (1000*1000),
| 1000 000 000 (1000*1000*1000), 1024, 1048 576 (1024*1024), or 1073 741 824 (1024*1024*1024); leading
| strings, floating strings, and trailing strings.
The column widths are dynamically adjusted according to the length of the headings and the maximum
number of bytes needed for the character or numeric data.
| Sectioned Report: You can produce a sectioned report (simple or tailored) by including a BREAK
| operand to indicate the break field to be used to divide the report into sections. Each set of sequential
| input records (previously sorted on the break field and other fields, as appropriate), with the same value
| for the specified break field, results in a corresponding set of data lines that is treated as a section in the
| report. Optional break operands can be used to modify the break title for each section (the break value is
| always printed as part of the break title) and to print statistics for each section. For example, if you add
| BTITLE, BREAK, BMAXIMUM, and BMINIMUM to the operands for the tailored report discussed above,
| each section of the output in the list data set starts on a new page and can be represented as follows:
| btitle bvalue
| header header
| ---------- --------
| characters sd
| . .
| . .
| . .
| bmaximum sd
| bminimum sd
| The final page showing the overall statistics starts on a new page and can be represented as follows:
| header header
| ---------- --------
| average sd
FROM(indd)
Specifies the ddname of the input data set to be read by DFSORT for this operation. An indd DD
statement must be present and must define an input data set that conforms to the rules for DFSORT's
SORTIN data set. In addition, the LRECL of the data set must be at least 4.
ON(p,m,f)
Specifies the position, length, and format of a numeric or character field to be used for this operation.
'(p,m,f)' is used for the standard column heading (see HEADER('string'), HEADER(NONE) and
NOHEADER for alternative heading options).
p specifies the first byte of the field relative to the beginning of the input record. p is 1 for the first
data byte of a fixed-length record and 5 for the first data byte of a variable-length record as illustrated
below (RRRR represents the 4-byte record descriptor word):
| m specifies the length of the field in bytes. A field must not extend beyond position 32 752 or beyond
| the end of a record. The maximum length for a field depends on its format.
f specifies the format of the field as shown below.
A maximum of 15 digits is allowed. If a CSF/FS value with 16 digits is found, ICETOOL issues an
error message and terminates the operation.
If a decimal value contains an invalid digit (A-F), ICETOOL identifies the bad value in a message
and prints asterisks for that value, and for the total, maximum, minimum and average (if specified)
for that field, in the list data set. If the number of bad values reaches the LIMIT for invalid decimal
values, ICETOOL terminates the operation. If the LIMIT operand is not specified, a default of 200
is used for the invalid decimal value limit.
A value is treated as positive if its sign is F, E, C, A, 8, 6, 4, 2, or 0.
A value is treated as negative if its sign is D, B, 9, 7, 5, 3, or 1.
| ON(p,m,f,formatting)
| Specifies the position, length, and format of a numeric or character field to be used for this operation
| and how the data for this field is to be formatted for printing. '(p,m,f)' is used for the standard column
| heading (see HEADER('string'), HEADER(NONE) and NOHEADER for alternative heading options). If
| the PLUS operand is not specified, the BLANK operand is automatically used. Column widths are
| dynamically adjusted according to the maximum number of bytes needed for the formatted data.
| See ON(p,m,f) for a discussion of p, m and f.
| formatting
|
| ┌─,─────────────┐
| 55───6─┬─mask──────┬─┴───────────────────────────────────────────────────────────5%
| ├─┬─/K──┬───┤
| │ ├─/M──┤ │
| │ ├─/G──┤ │
| │ ├─/KB─┤ │
| │ ├─/MB─┤ │
| │ └─/GB─┘ │
| ├─L'string'─┤
| ├─F'string'─┤
| └─T'string'─┘
| specifies formatting items that indicate how the data for this field is to be formatted for printing.
| For each ON field, formatting items can be specified in any order and combination, but each item
| can only be specified once, and only one division item (/K, /M, /G, /KB, /MB or /GB) can be speci-
| fied. The column width is dynamically adjusted to accommodate the maximum bytes to be
| inserted as a result of all formatting items specified.
| mask
| specifies an edit mask to be applied to the numeric data for this field. Thirty-three pre-defined
| edit masks are available, encompassing many of the numeric notations throughout the world
| with respect to separators, decimal point, decimal places, signs, and so forth. ICETOOL edits
| the data according to the selected mask. If other formatting items are specified but mask is
| not, the default mask of A0 is applied to the data.
| The attributes of each group of masks is shown below.
| The table below describes the available masks and shows how the values 12345678 and
| -1234567 would be printed for each mask. In the pattern:
| x is used to represent a trailing sign that will be blank for a positive value or - for a nega-
| tive value
| y is used to represent a leading sign that will be blank for a positive value or ( for a nega-
| tive value
| z is used to represent a trailing sign that will be blank for a positive value or ) for a nega-
| tive value
| Leading zeros are suppressed except when inappropriate. For example, 00000 is shown as 0
| with A1 and as 0.00 with C1.
| The leading sign appears to the left of the first non-suppressed digit of the formatted value.
| For example, -000001 is shown as -1 with A2 and as -0,01 with C2.
| /K
| specifies division of the numeric data for this field by 1000 before formatting. The resulting
| values are rounded down to the nearest integer. For example, -1234567890 is shown as
| -1 234 567 with ON(1,11,FS,/K,A3) and as (1 234 567) with ON(1,11,FS,/K,E3).
| /M
| specifies division of the numeric data for this field by 1000 000 (1000*1000) before formatting.
| The resulting values are rounded down to the nearest integer. For example, -123456789 is
| shown as -1.23 with ON(31,10,FS,/M,C4) and as (1.23) with ON(31,10,FS,/M,F4).
| /G
| specifies division of the numeric data for this field by 1000 000 000 (1000*1000*1000) before
| formatting. The resulting values are rounded down to the nearest integer. For example,
| 1234567898765 is shown as 1'234 with ON(15,13,ZD,/G,A4).
| /KB
| specifies division of the numeric data for this field by 1024 before formatting. The resulting
| values are rounded down to the nearest integer. For example, 1234567890 is shown as
| 1 205 632 with ON(45,10,ZD,/KB,A3).
| /MB
| specifies division of the numeric data for this field by 1048 576 (1024*1024) before formatting.
| The resulting values are rounded down to the nearest integer. For example, 123456789 is
| shown as 117 with ON(60,9,FS,/MB).
| /GB
| specifies division of the numeric data for this field by 1073 741 824 (1024*1024*1024) before
| formatting. The resulting values are rounded down to the nearest integer. For example,
| 1234567898765 is shown as 1,149 with ON(15,13,ZD,/GB,A1).
| L'string'
| specifies a leading string to appear at the beginning of the character or numeric data column
| for this field. For example, 'DFSORT ' is shown as '**DFSORT ' with ON(1,8,CH,L'**').
| The string (1 to 10 characters) must be enclosed in single apostrophes. To include a single
| apostrophe (') in the string, specify two single apostrophes ('').
| F'string'
| specifies a floating string to appear to the left of the first non-blank character of the formatted
| numeric data for this field. For example, 0001234 is shown as $12.34 with
| ON(9,7,ZD,C1,F'$').
| The string (1 to 10 characters) must be enclosed in single apostrophes. To include a single
| apostrophe (') in the string, specify two single apostrophes ('').
| T'string'
| specifies a trailing string to appear at the end of the character or numeric data column for this
| field. For example, 'DFSORT ' is shown as '**DFSORT ***' with ON(1,8,CH,L'**',T'***').
ON(p,m,HEX)
Specifies the position and length of a character field to be used for this operation and printed in
hexadecimal format (00—FF for each byte). '(p,m,HEX)' is used for the standard column heading.
See HEADER('string'), HEADER(NONE), and NOHEADER for alternative heading options.
See ON(p,m,f) for a discussion of p.
| m specifies the length of the field in bytes. A field must not extend beyond position 32 752 or beyond
the end of a record. A field can be 1 to 50 bytes.
ON(VLEN)
Equivalent to specifying ON(1,2,BI); a two-byte binary field starting at position 1. For variable-length
records, ON(VLEN) represents the record-length for each record. 'RECORD LENGTH' is used for
the standard column heading. See HEADER('string'), HEADER(NONE), and NOHEADER for alterna-
tive heading options.
ON(NUM)
Specifies that the record number is to be printed. The record number starts at 1 and is incremented
by 1 for each record printed in the list data set. 'RECORD NUMBER' is used for the standard
column heading. See HEADER('string'), HEADER(NONE), and NOHEADER for alternative heading
options.
LIST(listdd)
| Specifies the ddname of the list data set to be produced by ICETOOL for this operation. A listdd DD
| statement must be present. ICETOOL sets the attributes of the list data set as follows:
TITLE('string')
Specifies printing of a title string in the title line. The title line is printed at the top of each page of the
list data set. It contains the elements you specify (title string, page number, date and time) in the
order in which you specify them. Eight blanks appear between title elements. A blank line is printed
after the title line.
The string (1 to 50 characters) must be enclosed in single apostrophes. To include a single apos-
trophe (') in the string, specify two single apostrophes (''). Blanks at the start of the string move the
text to the right. Blanks at the end of the string increase the spacing between the string and the next
title element.
PAGE
Specifies printing of the page number in the title line. The page number is printed in the form - p -
where p is in decimal with no leading zeros. The page number is 1 for the first page and is incre-
mented by 1 for each subsequent page.
The title line is printed at the top of each page of the list data set. It contains the elements you
specify (title string, page number, date and time) in the order in which you specify them. Eight blanks
appear between title elements. A blank line is printed after the title line.
DATE
Specifies printing of the date in the title line. The date is printed in the form mm/dd/yy where mm is
the month, dd is the day, and yy is the year. DATE is equivalent to specifying DATE(MDY/).
The title line is printed at the top of each page of the list data set. It contains the elements you
specify (title string, page number, date and time) in the order in which you specify them. Eight blanks
appear between title elements. A blank line is printed after the title line.
DATE(abcd)
Specifies printing of the date in the title line. The date is printed in the form aadbbdcc according to
the specified values for abc and d.
| abc can be any combination of M, D, and Y or 4 (each specified once) where M represents the month
| (01-12), D represents the day (01-31), Y represents the last two digits of the year (for example, 95),
| and 4 represents the four digits of the year (for example, 1995).
d can be any character and is used to separate the month, day, and year.
The title line is printed at the top of each page of the list data set. It contains the elements you
specify (title string, page number, date and time) in the order in which you specify them. Eight blanks
appear between title elements. A blank line is printed after the title line.
TIME
Specifies printing of the time in the title line. The time is printed in the form hh:mm:ss where hh is
hours, mm is minutes and ss is seconds. TIME is equivalent to specifying TIME(24:).
The title line is printed at the top of each page of the list data set. It contains the elements you
specify (title string, page number, date and time) in the order in which you specify them. Eight blanks
appear between title elements. A blank line is printed after the title line.
TIME(abc)
Specifies printing of the time in the title line. The time is printed in the form
hhcmmcss xx according to the specified value for ab and c.
ab can be:
12 to indicate 12-hour time. hh (hours) is 1-12, mm (minutes) is 0-59, ss (seconds) is 0-59 and xx
is am or pm.
24 to indicate 24-hour time. hh (hours) is 0-23, mm (minutes) is 0-59, ss (seconds) is 0-59 and xx
is not included.
c can be any character and is used to separate the hours, minutes, and seconds.
The title line is printed at the top of each page of the list data set. It contains the elements you
specify (title string, page number, date and time) in the order in which you specify them. Eight blanks
appear between title elements. A blank line is printed after the title line.
BLANK
Specifies an alternate format for printing character and numeric data as follows:
| Numeric values for which formatting is not specified are printed with blank for plus sign, − for
minus sign and no leading zeros (overriding the default of + for plus sign and leading zeros).
Numeric values are thus displayed as:
– d...d for positive values (blank sign immediately to the left of the digits and no leading zeros)
– −d...d for negative values (− sign immediately to the left of the digits and no leading zeros)
Column widths are dynamically adjusted according to the length of the headings and the maximum
number of bytes needed for the character or numeric data
Headings and data for numeric fields are right-justified (overriding the default of left-justified
headings and data for numeric fields)
PLUS
Specifies an alternate format for printing character and numeric data as follows:
| Numeric values for which formatting is not specified are printed with + for plus sign, − for minus
sign and no leading zeros (overriding the default of leading zeros).
Numeric values are thus displayed as:
– +d...d for positive values (+ sign immediately to the left of the digits and no leading zeros)
– −d...d for negative values (− sign immediately to the left of the digits and no leading zeros)
Column widths are dynamically adjusted according to the length of the headings and the maximum
number of bytes needed for the character or numeric data
Headings and data for numeric fields are right-justified (overriding the default of left-justified
headings and data for numeric fields)
HEADER('string')
Specifies a heading to be printed for the corresponding ON field. The specified string is used instead
of the standard column heading for the corresponding ON field. (ON fields and HEADER operands
correspond one-for-one according to the order in which they are specified; that is, the first HEADER
operand corresponds to the first ON field, the second HEADER operand corresponds to the second
ON field, and so on.)
The string (1 to 50 characters) must be enclosed in single apostrophes. To include a single apos-
trophe (') in the string, specify two single apostrophes (''). If the string length is greater than the
column width for the corresponding ON field, the column width is increased to the string length.
The heading is left-justified for character fields or right-justified for numeric fields and is underlined with
dashes for the entire column width (overriding the default of left-justified, non-underlined headings).
Character values are left-justified and numeric values are right-justified (overriding the default of left-
justified field values).
Blanks at the start or end of a heading string may alter the justification of the heading or the width of
the column.
If HEADER('string') is used for any ON field, HEADER('string') or HEADER(NONE) must be used for
each ON field.
HEADER(NONE)
Specifies that a heading is not to be printed for the corresponding ON field. The standard column
heading for the corresponding ON field is suppressed.
If HEADER('string') is used for any ON field, HEADER('string') or HEADER(NONE) must be used for
each ON field. Specifying HEADER(NONE) for every ON field is equivalent to specifying
NOHEADER.
NOHEADER
Specifies that headings for ON fields are not to be printed (overriding the default of printing standard
headings for ON fields).
If NOHEADER is used, it must be specified only once and HEADER('string') or HEADER(NONE) must
not be used.
If NOHEADER is specified without any TITLE, DATE, TIME, or PAGE operands, the resulting list data
set contains only data records. Data sets created in this way can be processed further by other oper-
ators (for example, STATS or UNIQUE) using CH for character values or CSF/FS for numeric values.
LINES(n)
Specifies the number of lines per page for the list data set (overriding the default of 58). n must be
greater than 9, but less than 1000.
TOTAL('string')
| Specifies an overall TOTAL line is to be printed after the columns of data for the report. The specified
| string is printed starting in column 2 of the overall TOTAL line, followed by the overall total for each
| numeric data column on the same line as the string or on the next line, as appropriate. A blank line is
| printed before the overall TOTAL line.
The string (1 to 50 characters) must be enclosed in single apostrophes. To include a single apos-
trophe (') in the string, specify two single apostrophes (''). To suppress printing of a string, specify
TOTAL('').
| The overall total for each numeric ON field is printed in the format (formatting, PLUS, BLANK, or
| standard) you specify. Totals are printed for ON(VLEN) fields, but not for ON(NUM) fields.
| The column widths for numeric ON fields are adjusted to allow for a maximum of a sign and 15 digits
| for the totals. If the overall total for an ON field overflows 15 digits, ICETOOL prints asterisks for the
| overall total for that field.
The TOTAL, MAXIMUM, MINIMUM, and AVERAGE lines are printed in the order in which you specify
them.
MAXIMUM('string')
| Specifies an overall MAXIMUM line is to be printed after the columns of data for the report. The
| specified string is printed starting in column 2 of the overall MAXIMUM line, followed by the overall
| maximum for each numeric data column on the same line as the string or on the next line, as appro-
| priate. A blank line is printed before the overall MAXIMUM line.
The string (1 to 50 characters) must be enclosed in single apostrophes. To include a single apos-
trophe (') in the string, specify two single apostrophes (''). To suppress printing of a string, specify
MAXIMUM('').
| The overall maximum for each numeric ON field is printed in the format (formatting, PLUS, BLANK, or
| standard) you specify. Maximums are printed for ON(VLEN) fields, but not for ON(NUM) fields.
The TOTAL, MAXIMUM, MINIMUM, and AVERAGE lines are printed in the order in which you specify
them.
MINIMUM('string')
| Specifies an overall MINIMUM line is to be printed after the columns of data for the report. The speci-
| fied string is printed starting in column 2 of the overall MINIMUM line, followed by the overall minimum
| for each numeric data column on the same line as the string or on the next line, as appropriate. A
| blank line is printed before the overall MINIMUM line.
The string (1 to 50 characters) must be enclosed in single apostrophes. To include a single apos-
trophe (') in the string, specify two single apostrophes (''). To suppress printing of a string, specify
MINIMUM('').
| The overall minimum for each numeric ON field is printed in the format (formatting, PLUS, BLANK, or
| standard) you specify. Minimums are printed for ON(VLEN) fields, but not for ON(NUM) fields.
The TOTAL, MAXIMUM, MINIMUM, and AVERAGE lines are printed in the order in which you specify
them.
AVERAGE('string')
| Specifies an overall AVERAGE line is to be printed after the columns of data for the report. The
| specified string is printed starting in column 2 of the overall AVERAGE line, followed by the overall
| average for each numeric data column on the same line as the string or on the next line, as appro-
| priate. A blank line is printed before the overall AVERAGE line.
| The overall average (or mean) is calculated by dividing the overall total by the number of values in the
| report and rounding down to the nearest integer (examples: 23 / 5 = 4, -23 / 5 = -4).
The string (1 to 50 characters) must be enclosed in single apostrophes. To include a single apos-
trophe (') in the string, specify two single apostrophes ('). To suppress printing of a string, specify
AVERAGE('').
| The overall average for each numeric ON field is printed in the format (formatting, PLUS, BLANK, or
| standard) you specify. Averages are printed for ON(VLEN) fields, but not for ON(NUM) fields.
| If the overall total for an ON field overflows 15 digits, ICETOOL prints asterisks for the overall average
| for that field.
The TOTAL, MAXIMUM, MINIMUM, and AVERAGE lines are printed in the order in which you specify
them.
LIMIT(n)
Specifies a limit for the number of invalid decimal values (overriding the default of 200). If n invalid
decimal values are found, ICETOOL terminates the operation. n can be 1 to 15 decimal digits, but
must be greater than 0.
VSAMTYPE(x)
See the discussion of this operand on the COPY statement in “COPY Operator” on page 291.
| WIDTH(n)
| Specifies the line length and LRECL you want ICETOOL to use for your list data set. n can be from
| 121 to 2048.
| ICETOOL always calculates the line length required to print all titles, headings, data, and statistics and
| uses it as follows:
| If WIDTH(n) is specified and the calculated line length is greater than n, ICETOOL issues an error
| message and terminates the operation. Otherwise, ICETOOL sets the line length and LRECL to
| n.
| If WIDTH(n) is not specified and the calculated line length is less than or equal to 121, ICETOOL
| sets the line length and LRECL to 121.
| If WIDTH(n) is not specified and the calculated line length is greater than 121, ICETOOL sets the
| line length and LRECL to the calculated line length.
| Use WIDTH(n) if your LRECL must be set to a particular value (for example, if you use DISP=MOD to
| place several reports in the same data set) or if you want to ensure that the line length for your report
| does not exceed a specific maximum (for example, 133 bytes). Otherwise, you can let ICETOOL
| calculate and set the appropriate line length and LRECL by not specifying WIDTH(n).
| BREAK(p,m,f)
| Specifies a numeric or character break field to be used to divide the report into sections. Each set of
| sequential input records, with the same value for the specified break field, results in a corresponding
| set of data lines that is treated as a section in the report. The DISPLAY operator should be preceded
| by a SORT operator (or another application) that sorts the break field and any other appropriate fields
| in the desired sequence for the report.
| Each section starts on a new page. Each page of a section includes a break title line showing the
| break value for the section. Numeric break values are printed with blank for plus sign, − for minus
| sign, and no leading zeros. BTITLE can be used to specify a string to appear in the break title line.
| The break value and break title string appear in the order in which you specify BREAK and BTITLE.
| Two blanks appear between break title elements. A blank line is printed after the break title line.
| BTOTAL, BMAXIMUM, BMINIMUM, and BAVERAGE can be used to produce break statistics for each
| numeric ON field—for example, the maximum of the values in the section for ON(5,3,ZD) and the
| maximum of the values in the section for ON(22,2,BI). The break statistics for each section are
| printed at the end of the section (on one or more pages which include the break title). TOTAL,
| MAXIMUM, MINIMUM, and AVERAGE can be used to produce overall statistics for each numeric ON
| field—for example, the maximum of the values in the report for ON(5,3,ZD) and the maximum of the
| values in the report for ON(22,2,BI). The overall statistics for each section are printed at the end of
| the report (on a separate page which does not include the break title).
| See ON(p,m,f) for a discussion of p and m.
| f specifies the format of the field as shown for ON(p,m,f).
| For a CSF or FS format break field:
| A maximum of 15 digits is allowed. If a value with 16 digits is found, ICETOOL issues an error
| message and terminates the operation.
| If a decimal value with an invalid digit (A-F) is found, ICETOOL issues an error message and
| terminates the operation.
| A value is treated as positive if its sign is F, E, C, A, 8, 6, 4, 2, or 0.
| A value is treated as negative if its sign is D, B, 9, 7, 5, 3, or 1.
| BTITLE('string')
| Specifies a string to appear in the break title line printed for each page of a section. BTITLE can only
| be specified if BREAK is specified. The break value and break title string appear in the order in which
| you specify BREAK and BTITLE. Two blanks appear between break title elements. A blank line is
| printed after the break title line.
| The string (1 to 50 characters) must be enclosed in single apostrophes. To include a single apos-
| trophe (') in the string, specify two single apostrophes (''). Blanks at the start of the string move the
| text to the right. Blanks at the end of the string increase the spacing between the string and the break
| value if BTITLE is specified before BREAK.
| BTOTAL('string')
| Specifies a break TOTAL line is to be printed after the columns of data for each section. BTOTAL can
| only be specified if BREAK is specified. The specified string is printed starting in column 2 of the
| break TOTAL line, followed by the break total for each numeric data column on the same line as the
| string or on the next line, as appropriate. A blank line is printed before the break TOTAL line.
| The string (1 to 50 characters) must be enclosed in single apostrophes. To include a single apos-
| trophe (') in the string, specify two single apostrophes (''). To suppress printing of a string, specify
| BTOTAL('').
| The break total for each numeric ON field is printed in the format (formatting, PLUS, BLANK, or
| standard) you specify. Totals are printed for ON(VLEN) fields, but not for ON(NUM) fields.
| The column widths for numeric ON fields are adjusted to allow for a maximum of a sign and 15 digits
| for the totals. If the break total for an ON field overflows 15 digits, ICETOOL prints asterisks for the
| break total for that field.
| The BTOTAL, BMAXIMUM, BMINIMUM, and BAVERAGE lines are printed in the order in which you
| specify them.
| BMAXIMUM('string')
| Specifies a break MAXIMUM line is to be printed after the columns of data for each section.
| BMAXIMUM can only be specified if BREAK is specified. The specified string is printed starting in
| column 2 of the break MAXIMUM line, followed by the break maximum for each numeric data column
| on the same line as the string or on the next line, as appropriate. A blank line is printed before the
| break MAXIMUM line.
| The string (1 to 50 characters) must be enclosed in single apostrophes. To include a single apos-
| trophe (') in the string, specify two single apostrophes (''). To suppress printing of a string, specify
| BMAXIMUM('').
| The break maximum for each numeric ON field is printed in the format (formatting, PLUS, BLANK, or
| standard) you specify. Maximums are printed for ON(VLEN) fields, but not for ON(NUM) fields.
| The BTOTAL, BMAXIMUM, BMINIMUM, and BAVERAGE lines are printed in the order in which you
| specify them.
| BMINIMUM('string')
| Specifies a break MINIMUM line is to be printed after the columns of data for each section.
| BMINIMUM can only be specified if BREAK is specified. The specified string is printed starting in
| column 2 of the break MINIMUM line, followed by the break minimum for each numeric data column
| on the same line as the string or on the next line, as appropriate. A blank line is printed before the
| break MINIMUM line.
| The string (1 to 50 characters) must be enclosed in single apostrophes. To include a single apos-
| trophe (') in the string, specify two single apostrophes (''). To suppress printing of a string, specify
| BMINIMUM('').
| The break minimum for each numeric ON field is printed in the format (formatting, PLUS, BLANK, or
| standard) you specify. Minimums are printed for ON(VLEN) fields, but not for ON(NUM) fields.
| The BTOTAL, BMAXIMUM, BMINIMUM, and BAVERAGE lines are printed in the order in which you
| specify them.
| BAVERAGE('string')
| Specifies a break AVERAGE line is to be printed after the columns of data for each section.
| BAVERAGE can only be specified if BREAK is specified. The specified string is printed starting in
| column 2 of the break AVERAGE line, followed by the break average for each numeric data column
| on the same line as the string or on the next line, as appropriate. A blank line is printed before the
| break AVERAGE line.
| The break average (or mean) is calculated by dividing the break total by the number of values in the
| section and rounding down to the nearest integer (examples: 23 / 5 = 4, -23 / 5 = -4).
| The string (1 to 50 characters) must be enclosed in single apostrophes. To include a single apos-
| trophe (') in the string, specify two single apostrophes (''). To suppress printing of a string, specify
| BAVERAGE('').
| The break average for each numeric ON field is printed in the format (formatting, PLUS, BLANK, or
| standard) you specify. Averages are printed for ON(VLEN) fields, but not for ON(NUM) fields.
| If the break total for an ON field overflows 15 digits, ICETOOL prints asterisks for the break average
| for that field.
| The BTOTAL, BMAXIMUM, BMINIMUM, and BAVERAGE lines are printed in the order in which you
| specify them.
DISPLAY Examples
Although the DISPLAY operators in the examples below could all be contained in a single ICETOOL job
step, they are shown and discussed separately for clarity. See “OCCUR Operator” on page 329 for addi-
tional examples of tailoring the report format.
Example 1
The FIELDS output starts on a new page and looks as follows (the first 2 records are shown with illustra-
tive values):
Example 2
A title line containing the specified title, the page number, the date and the time
A heading line containing the specified underlined headings
Data lines in the BLANK format containing:
– The characters from positions 1-25 of the IN data set
– The zoned decimal values from positions 45-54 of the IN data set
– The zoned decimal values from positions 35-44 of the IN data set
A TOTAL line containing the specified string and the total for each of the two zoned decimal fields in
the BLANK format
An AVERAGE line containing the specified string and the average for each of the two zoned decimal
fields in the BLANK format.
The LIST1 output starts on a new page and looks as follows (the first 2 records are shown with illustrative
values):
The title line and underlined heading line appear at the top of each page.
Example 3
-ðððððððððð273216 +ðððððððððððððð27
+ðððððððððð993112 +ððððððððððððð321
. .
. .
. .
Example 4
| This example shows how reports for different subsets of data can be produced. Assume that:
| The TREGCNTL data set contains:
| INCLUDE COND=(44,8,CH,EQ,C'Regular')
| The TPOWCNTL data set contains:
| INCLUDE COND=(44,8,CH,EQ,C'Power')
| The first COPY operator copies the records from the INPUT data set that contain 'Regular ' in positions
| 44-51 to the TEMP (temporary) data set
| The first DISPLAY operator uses the first subset of records in the TEMP data set to print, in the
| REGULAR data set:
| A title line containing the specified title and the page number; the page number is moved to the right
| as a result of the extra blanks at the end of the TITLE string and the 8 blanks between the title string
| and the page number
| A heading line containing the specified underlined headings (with no heading for the first ON field)
| Data lines for the first subset of records containing:
| – The characters from positions 1-18
| – The characters from positions 35-39
| – The floating sign values from positions 28-31 formatted with one decimal place and a period as
| the decimal point
| The second COPY operator copies the records from the INPUT data set that contain 'Power ' in positions
| 44-51 to the TEMP (temporary) data set
| The second DISPLAY operator uses the second subset of records in the TEMP data set to print, in the
| POWER data set:
| A title line containing the specified title and the page number; the page number is moved to the right
| as a result of the extra blanks at the end of the TITLE string and the 8 blanks between the title string
| and the page number
| A heading line containing the specified underlined headings (with no heading for the first ON field)
| Data lines for the second subset of records containing:
| – The characters from positions 1-18
| – The characters from positions 35-39
| – The floating sign values from positions 28-31 formatted with one decimal place and a period as
| the decimal point
| The REGULAR output starts on a new page and looks as follows (the first 2 records are shown with
| illustrative values):
| The title line and underlined heading line appear at the top of each page. The number of lines per page is
| 66, overriding the default of 58.
| The POWER output starts on a new page and looks as follows (the first 2 records are shown with illustra-
| tive values):
| The title line and underlined heading line appear at the top of each page. The number of lines per page is
| 66, overriding the default of 58.
Example 5
Smallest +ððððððððððððð58
Largest +ððððððððððððð78
The title line and heading line appear at the top of each page.
Example 6
The title line and underlined heading line appear at the top of each page.
| Example 7
| This example shows how reports for three different countries can be produced. The reports differ only in
| the way that date and numeric values are displayed.
| The SORT operator sorts the PARTS data set to the TEMP data set using the SORT statement in
| SRT1CNTL.
| The first DISPLAY operator uses the sorted records in the TEMP data set to print, in the USA data set:
| A title line containing the specified title and the date in the format commonly used in the United States
| A heading line containing the specified underlined headings
| Data lines containing:
| – The characters from positions 15-20
| – The zoned decimal values from positions 3-6 formatted with the separators commonly used in the
| United States
| – The zoned decimal values from positions 38-45 formatted with two decimal places and the separa-
| tors and decimal point commonly used in the United States.
| A TOTAL line containing the specified string and the total for each of the two zoned decimal fields
| formatted in the same way as the data values.
| The second DISPLAY operator uses the sorted records in the TEMP data set to print, in the FRANCE
| data set:
| A title line containing the specified title and the date in the format commonly used in France
| A heading line containing the specified underlined headings
| Data lines containing:
| – The characters from positions 15-20
| – The zoned decimal values from positions 3-6 formatted with the separators commonly used in
| France
| – The zoned decimal values from positions 38-45 formatted with two decimal places and the separa-
| tors and decimal point commonly used in France.
| A TOTAL line containing the specified string and the total for each of the two zoned decimal fields
| formatted in the same way as the data values.
| The third DISPLAY operator uses the sorted records in the TEMP data set to print, in the DENMARK data
| set:
| A title line containing the specified title and the date in the format commonly used in Denmark
| A heading line containing the specified underlined headings
| Data lines containing:
| – The characters from positions 15-20
| – The zoned decimal values from positions 3-6 formatted with the separators commonly used in
| Denmark
| – The zoned decimal values from positions 38-45 formatted with two decimal places and the separa-
| tors and decimal point commonly used in Denmark.
| A TOTAL line containing the specified string and the total for each of the two zoned decimal fields
| formatted in the same way as the data values.
| The USA output starts on a new page and looks as follows (several records are shown with illustrative
| values):
| The title line and underlined heading line appear at the top of each page.
| The FRANCE output starts on a new page and looks as follows (several record are shown with illustrative
| values):
| The title line and underlined heading line appear at the top of each page.
| The DENMARK output starts on a new page and looks as follows (several records are shown with illustra-
| tive values):
| The title line and underlined heading line appear at the top of each page.
| Example 8
| The SORT operator sorts the DATA data set to the TEMP data set using the SORT statement in
| SRTXCNTL.
| The DISPLAY operator uses the sorted records in the TEMP data set to print, in the WEST data set,
| sections with:
| A title line containing the date, the specified title string, and the page number
| A break title containing the specified break title string, and the break field characters from positions
| 3-12
| A heading line containing the specified underlined headings
| Data lines containing:
| – The characters from positions 16-28
| – The packed decimal values from positions 41-44 divided by 1000 and formatted with separators
| and signs as specified.
| Break MINIMUM, MAXIMUM, and AVERAGE lines containing the specified strings and statistics for
| the packed decimal field values in this section, formatted in the same way as the data values.
| The first section of the WEST output starts on a new page and looks as follows (several records are
| shown with illustrative values):
| Division: Chips
| The title line, break title line, and underlined heading line appear at the top of each page of the section.
| The second section of the WEST output starts on a new page and looks as follows (several records are
| shown with illustrative values):
| The title line, break title line, and underlined heading line appear at the top of each page of the section.
| The last page of the WEST output starts on a new page and looks as follows:
| Example 9
| MODE CONTINUE
| VERIFY FROM(CHECK) ON(2,3,PD) LIMIT(5ðð)
| DISPLAY FROM(CHECK) LIST(PDREPORT) BLANK LIMIT(5ðð) -
| HEADER('Relative Record') ON(NUM) -
| HEADER('Numeric') ON(2,3,PD) -
| HEADER('Hexadecimal') ON(2,3,HEX) -
| HEADER('Associated Field') ON(21,2ð,CH)
| This example shows how each record containing an invalid decimal value can be identified either by its
| relative record number or an associated field in the record.
| The MODE operator ensures that the DISPLAY operator is processed if the VERIFY operator identifies an
| invalid decimal value.
| The VERIFY operator checks for invalid digits (A-F) and invalid signs (0-9) in the packed decimal values
| from positions 2-4 of the CHECK data set. Message ICE618A is printed in the TOOLMSG data set for
| each value (if any) that contains an invalid digit or sign. If 500 invalid values are found, the operation is
| terminated.
| The DISPLAY operator checks for invalid digits (A-F) in the packed decimal values from positions 2-4 of
| the CHECK data set. Message ICE618A is printed in the TOOLMSG data set for each value (if any) that
| contains an invalid digit. If 500 invalid values are found, the operation is terminated. If a check for invalid
| signs is required, the VERIFY operator must be used, since the DISPLAY operator only checks for invalid
| digits. The VERIFY operator is not required if signs need not be checked.
| PDREPORT can be used in conjunction with the ICE618A messages to identify that:
| Record 3 has an invalid digit of A and an associated field of “Giulianelli”
| Record 12 has an invalid sign of 0 and an associated field of “Wu”
| Record 19 has an invalid digit of F and an associated field of “Yaeger.”
| Example 10
| This example shows how the OUTFIL table lookup feature can be used to substitute meaningful phrases
| for cryptic values in ICETOOL reports. Assume that:
| The OUTFCNTL data set contains:
| OUTFIL FNAMES=TEMP,
| OUTREC=(1:9,2,CHANGE=(25,
| C'MN',C'Manufacturing',
| C'RD',C'Research and Development',
| C'FN',C'Finance',
| C'MR',C'Marketing',
| C'IS',C'Information Systems'),
| 3ð:4,4)
| The COPY operator uses the OUTFIL statement in OUTFCNTL to reformat the IN data set records to the
| TEMP (temporary) data set. Two fields are extracted for use by the DISPLAY operator:
| The 2-character department code in positions 9-10 is changed to a 25-character name in positions
| 1-25 using the table lookup feature.
| The zoned decimal value in positions 4-7 is moved to positions 30-33.
| The DISPLAY operator uses the reformatted fields in the TEMP data set to print, in the EMPCT data set:
| A title line containing the specified title and the date
| A heading line containing the specified underlined headings
| Data lines in the BLANK format containing:
| – The names from positions 1-25 that were substituted for the department codes
| – The zoned decimal values from positions 30-33.
| Function Employees
| ------------------------- ---------
| Manufacturing 486
| Marketing 21
| Research and Development 55
| Information Systems 123
| Finance 33
MODE Operator
55──MODE──┬─STOP─────┬──────────────────────────────────────────────────────────────────5%
├─CONTINUE─┤
└─SCAN─────┘
Specifies one of three modes to control error checking and actions after error detection. A MODE oper-
ator effects the “processing” (that is, error checking of ICETOOL statements and calling DFSORT) of the
operators which follow it, up to the next MODE operator (if any). MODE operators allow you to do the
following for groups of operators or all operators:
1. Stop or continue processing operators after a non-zero return code. A non-zero return code can be
set as the result of a statement or run-time error detected by ICETOOL or DFSORT.
2. Check for errors in ICETOOL statements, but do not call DFSORT.
STOP
Stops subsequent operations if a non-zero return code is set. If an error is detected for an operator,
SCAN mode is automatically set in effect; DFSORT is not called for subsequent operators, although
checking ICETOOL statements for errors continues.
STOP mode can be used to group dependent operators (that is, if an operation fails, do not process
the remaining operators).
STOP MODE is set in effect automatically at the start of the ICETOOL run.
CONTINUE
Continues with subsequent operations regardless of whether or not a non-zero return code is set. If
an operator results in an error, processing continues for subsequent operators.
CONTINUE mode can be used to group independent operators (that is, process each operator regard-
less of the success or failure of the others).
SCAN
ICETOOL statements are checked for errors, but DFSORT is not called.
SCAN mode can be used to test ICETOOL statements for errors.
Note: SCAN mode is set automatically if an error is detected while in STOP mode.
MODE Example
MODE SCAN
RANGE ...
UNIQUE ...
MODE STOP
VERIFY ...
DISPLAY ...
MODE CONTINUE
COPY ...
SORT ...
STATS ...
SCAN mode: RANGE and UNIQUE are checked for statement errors, but DFSORT is not called.
STOP mode: DISPLAY is dependent on VERIFY. If the return code for VERIFY is non-zero, SCAN mode
is entered; DISPLAY is checked for statement errors, but DFSORT is not called.
CONTINUE mode: COPY, SORT, and STATS are independent of each other. SORT is processed even
if the return code for COPY is non-zero. STATS is processed even if the return code for COPY or SORT
is non-zero.
Note that the return codes for one group of operators does not affect the other groups of operators.
OCCUR Operator
┌──
───────────────┐
55──┬─OCCUR──┬──FROM(indd)───6┬─ON(p,m,f)───┬┴──LIST(listdd)──┬─────────────────┬─────────5
└─OCCURS─┘ ├─ON(p,m,HEX)─┤ └─TITLE('string')─┘
├─ON(VLEN)────┤
└─ON(VALCNT)──┘
┌──
────────────────────┐
5──┬──────┬──┬────────────┬──┬───────────┬──┬───────┬───6┬──────────────────┬┴────────────5
└─PAGE─┘ ├─DATE───────┤ ├─TIME──────┤ ├─BLANK─┤ ├─HEADER('string')─┤
└─DATE(abcd)─┘ └─TIME(abc)─┘ └─PLUS──┘ ├─HEADER(NONE)─────┤
└─NOHEADER─────────┘
5──┬──────────┬──┬───────────┬──┬─────────────┬──┬──────────┬───────────────────────────5%
| └─LINES(n)─┘ ├─ALLDUPS───┤ └─VSAMTYPE(x)─┘ └─WIDTH(n)─┘
├─NODUPS────┤
├─HIGHER(x)─┤
├─LOWER(y)──┤
└─EQUAL(v)──┘
Prints each unique value for specified numeric or character fields and how many times it occurs in a sepa-
rate list data set. Simple or tailored reports can be produced. The values printed can be limited to those
for which the value count meets specified criteria.
| From 1 to 10 fields can be specified, but the resulting list data set line length must not exceed the limit
| specified by the WIDTH operand or 2048 bytes if WIDTH is not specified. At least one ON(VLEN) or
ON(p,m,f) field must be specified; all such ON fields specified are used to determine whether a record
contains a unique value. A single list data set record is printed for each unique value. If ON(VALCNT) is
specified, the "value count" (that is, the number of times the ON values occur) is printed in the list data set
record along with the other ON values.
| Specifying the PLUS or BLANK operand, which can "compress" the columns of output data, can
| enable you to include more fields in your report, up to a maximum of 10, if your line length is
| limited by the character width your printer or display supports.
ALLDUPS, NODUPS, HIGHER(x), LOWER(y) or EQUAL(v) can be specified to limit the ON values printed
to those for which the value count meets the specified criteria (for example, ALLDUPS for duplicate values
only). The default criteria is HIGHER(0) resulting in the ON values being printed for each unique value.
DFSORT is called to sort the indd data set to ICETOOL's E35 user exit. ICETOOL uses its E35 exit to
print appropriate titles, headings and data in the list data set.
You must not supply your own DFSORT MODS, INREC, OUTREC, SUM, or RECORD statement since
they override the DFSORT statements passed by ICETOOL for this operator.
The DYNALLOC option is passed to DFSORT to ensure that work space is available for the sort. If your
installation defaults for dynamic allocation are inappropriate for an OCCUR operator, you can take one of
the following actions:
1. Override the DYNALLOC option using an OPTION control statement such as:
OPTION DYNALLOC=(339ð,5)
in the DFSPARM data set (applies to all OCCUR, SELECT, SORT, and UNIQUE operators).
2. Use SORTWKnn DD statements to override the use of dynamic allocation (applies to all OCCUR,
SELECT and UNIQUE operators). Refer to “SORTWKnn DD Statement” on page 50 for details.
Simple Report: You can produce a simple report by specifying just the required operands. For
example, if you specify FROM and LIST operands, and ON operands for 10-byte character and 7-byte
zoned decimal fields and the value count, the output in the list data set can be represented as follows:
A control character occupies the first byte of each list data set record. Left-justified standard headings are
printed at the top of each page to indicate the contents of each column, followed by a line for each record
showing the characters and numbers in the fields of that record, and the count of occurrences (value
count) of the specified values.
The fields are printed in columns in the same order in which they are specified in the OCCUR statement.
All fields are left-justified. For numeric fields, leading zeros are printed, a − is used for the minus sign,
and a + is used for the plus sign. For the value count, leading zeros are printed.
HEADER operands can be used to change or suppress the headings. PLUS or BLANK operands can be
used to change the format of numeric fields. PLUS, BLANK and HEADER operands can be used to
change the width of the columns for numeric and character fields and the justification of headings and
fields.
The NOHEADER operand can be used to create list data sets containing only data records. Data sets
created in this way can be processed further by other operators (for example, STATS or UNIQUE) using
CH format for character values or CSF/FS format for numeric values (including the value count).
Tailored Report: You can tailor the output in the list data set using various operands that control
title, date, time, page number, headings, lines per page and field formats. The optional operands can be
used in many different combinations to produce a wide variety of report formats. For example, if you
specify FROM, LIST, BLANK, TITLE, PAGE, DATE, TIME, and HEADER operands, and ON operands for
10-byte character and 7-byte zoned decimal fields and the value count, the output in the list data set looks
as follows:
A control character occupies the first byte of each list data set record. The title line is printed at the top of
each page of the list data set. It contains the elements you specify (title string, page number, date and
time) in the order in which you specify them. Eight blanks appear between title elements. A blank line is
printed after the title line.
Your specified headings (underlined) are printed after the title line on each page to indicate the contents of
each column, followed by a line for each record showing the characters and numbers in the fields of that
record. Headings for character fields are left-justified and headings for numeric fields are right-justified.
The fields are printed in columns in the same order in which they are specified in the OCCUR statement.
Character fields are left-justified and numeric fields are right justified. For numeric fields, leading zeros are
suppressed, a − is used for the minus sign, and a blank is used for the plus sign (you can specify PLUS
rather than BLANK if you want a + to be used for the plus sign). For the value count, leading zeros are
suppressed.
The column widths are dynamically adjusted according to the length of the headings and the maximum
number of bytes needed for the character or numeric data.
FROM(indd)
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
ON(p,m,f)
Specifies the position, length, and format of a numeric or character field to be used for this operation.
'(p,m,f)' is used for the standard column heading (see HEADER('string'), HEADER(NONE) and
NOHEADER for alternative heading options).
p specifies the first byte of the field relative to the beginning of the input record. p is 1 for the first
data byte of a fixed-length record and 5 for the first data byte of a variable-length record as illustrated
below (RRRR represents the 4-byte record descriptor word):
| m specifies the length of the field in bytes. A field must not extend beyond position 32 752 or beyond
the end of a record. The maximum length for a field depends on its format.
f specifies the format of the field as shown below.
A maximum of 15 digits is allowed. If a CSF/FS value with 16 digits is found, ICETOOL issues an
error message and terminates the operation.
If a decimal value contains an invalid digit (A-F), ICETOOL identifies the bad value in a message
and terminates the operation.
F, E, C, A, 8, 6, 4, 2, and 0 are treated as equivalent positive signs. Thus the zoned decimal
values F2F3C1, F2F3F1 and 020301 are counted as only one unique value.
D, B, 9, 7, 5, 3, and 1 are treated as equivalent negative signs. Thus the zoned decimal values
F2F3B0, F2F3D0, and 020310 are counted as only one unique value.
The fields of records that do not meet the specified criteria are not checked for invalid digits (PD and
ZD) or excessive digits (CSF and FS).
ON(p,m,HEX)
Specifies the position and length of a character field to be used for this operation and printed in
hexadecimal format (00—FF for each byte). '(p,m,HEX)' is used for the standard column heading
(see HEADER('string'), HEADER(NONE), and NOHEADER for alternative heading options).
See ON(p,m,f) for a discussion of p.
| m specifies the length of the field in bytes. A field must not extend beyond position 32 752 or beyond
the end of a record. A field can be 1 to 50 bytes.
ON(VLEN)
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
ON(VALCNT)
Specifies that the number of occurrences for each unique value is to be printed. 'VALUE COUNT' is
used for the standard column heading (see HEADER('string'), HEADER(NONE) and NOHEADER for
alternative heading options).
LIST(listdd)
| See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
TITLE('string')
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
PAGE
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
DATE
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
DATE(abcd)
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
TIME
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
TIME(abc)
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
BLANK
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
PLUS
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
For ON(VALCNT), PLUS is treated as BLANK.
HEADER('string')
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
HEADER(NONE)
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
NOHEADER
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
LINES(n)
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
ALLDUPS
Limits the ON values printed to those that occur more than once (that is, those with duplicate field
values). The ON values are printed when value count > 1.
ALLDUPS is equivalent to HIGHER(1).
NODUPS
Limits the ON values printed to those that occur only once (that is, those with no duplicate field
values). The ON values are printed when value count = 1.
NODUPS is equivalent to EQUAL(1) or LOWER(2).
HIGHER(x)
Limits the ON values printed to those that occur more than x times. The ON values are printed when
value count > x.
x must be specified as n or +n where n can be 1 to 15 decimal digits.
LOWER(y)
Limits the ON values printed to those that occur less than y times. The ON values are printed when
value count < y.
y must be specified as n or +n where n can be 1 to 15 decimal digits.
EQUAL(v)
Limits the ON values printed to those that occur v times. The ON values are printed when value count
= v.
v must be specified as n or +n where n can be 1 to 15 decimal digits.
VSAMTYPE(x)
See the discussion of this operand on the COPY statement in “COPY Operator” on page 291.
| WIDTH(n)
| See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
OCCUR Examples
Although the OCCUR operators in the examples below could all be contained in a single ICETOOL job
step, they are shown and discussed separately for clarity. See “DISPLAY Operator” on page 299 for
additional examples of tailoring the report format.
Example 1
The VOLSERS output starts on a new page and looks as follows (the first 2 records are shown with
illustrative values):
Example 2
A data line for each unique ON(1,16,CH) and ON(25,3,PD) value in the BLANK format containing:
– The count of occurrences in the IN data set of the unique value
– The characters from positions 1-16 of the IN data set for the unique value
– The packed decimal values from positions 25-27 of the IN data set for the unique value
The LIST1 output starts on a new page and looks as follows (the first 2 records are shown with illustrative
values):
3ð9ð Distribution - 1 -
The title line and underlined heading line appear at the top of each page.
Example 3
The CHECKIT output starts on a new page and looks as follows (the first 2 records are shown with illus-
trative values):
The title line and underlined heading line appear at the top of each page.
Example 4
The ONCE output starts on a new page and looks as follows (the first 2 records are shown with illustrative
values):
RECORD LENGTH
57
61
.
.
.
The title line and heading line appear at the top of each page.
RANGE Operator
55──RANGE──FROM(indd)──┬─ON(p,m,f)─┬──┬─HIGHER(x)─────────────┬──┬─────────────┬────────5%
└─ON(VLEN)──┘ ├─LOWER(y)──────────────┤ └─VSAMTYPE(x)─┘
├─HIGHER (x)──LOWER (y)─┤
├─EQUAL(v)──────────────┤
└─NOTEQUAL(w)───────────┘
Prints a message containing the count of values in a specified range for a specific numeric field.
DFSORT is called to copy the indd data set to ICETOOL's E35 user exit. ICETOOL prints a message
containing the range count as determined by its E35 user exit.
The range can be specified as higher than x, lower than y, higher than x and lower than y, equal to v, or
not equal to w, where x, y, v, and w are signed or unsigned decimal values. If the range is specified as
higher than x and lower than y, it must be a valid range (for example, higher than 5 and lower than 6 is
not a valid range since there is no integer value that satisfies the criteria).
You must not supply your own DFSORT MODS, INREC, or OUTREC statement since they would override
the DFSORT statements passed by ICETOOL for this operator.
FROM(indd)
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
ON(p,m,f)
Specifies the position, length, and format of the numeric field to be used for this operation.
p specifies the first byte of the field relative to the beginning of the input record. p is 1 for the first
data byte of a fixed-length record and 5 for the first data byte of a variable-length record as illustrated
below (RRRR represents the 4-byte record descriptor word):
| m specifies the length of the field in bytes. A field must not extend beyond position 32 752 or beyond
the end of a record. The maximum length for a field depends on its format.
f specifies the format of the field as follows:
A maximum of 15 digits is allowed. If a CSF/FS value with 16 digits is found, ICETOOL issues an
error message and terminates the operation.
If a decimal value contains an invalid digit (A-F), ICETOOL identifies the bad value in a message
and terminates the operation.
A value is treated as positive if its sign is F, E, C, A, 8, 6, 4, 2, or 0.
A value is treated as negative if its sign is D, B, 9, 7, 5, 3, or 1.
For a ZD, PD or CSF/FS format field, a negative zero value is treated as a positive zero value.
ON(VLEN)
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
HIGHER(x)
Values higher than x are counted as contained in the range. If only HIGHER(x) is specified, the range
count is incremented when x < value. If LOWER(y) is also specified, the range count is incremented
when x < value < y.
x must be specified as n, +n, or −n where n can be 1 to 15 digits.
LOWER(y)
Values lower than y are counted as contained in the range. If only LOWER(y) is specified, the range
count is incremented when value < y. If HIGHER(x) is also specified, the range count is incremented
when x < value < y.
y must be specified as n, +n, or −n where n can be 1 to 15 digits.
EQUAL(v)
Values equal to v are counted as contained in the range. The range count is incremented when v =
value.
v must be specified as n, +n, or −n where n can be 1 to 15 decimal digits.
NOTEQUAL(w)
Values not equal to w are counted as contained in the range. The range count is incremented when
w ¬= value.
w must be specified as n, +n, or −n where n can be 1 to 15 decimal digits.
VSAMTYPE(x)
See the discussion of this operand on the COPY statement in “COPY Operator” on page 291.
RANGE Example
The first RANGE operator prints a message containing the count of binary values from positions 1-2 of the
DATA1 data set that are higher than 10.
The second RANGE operator prints a message containing the count of zoned decimal values from posi-
tions 11-16 of the DATA2 data set that are lower than 3000.
The third RANGE operator prints a message containing the count of fixed-point values from positions 29
001-29 004 of the DATA3 data set that are higher than −10 000 but lower than 27.
The fourth RANGE operator prints a message containing the count of packed decimal values from posi-
tions 25-27 of the DATA2 data set that are equal to −999.
The fifth RANGE operator prints a message containing the count of binary values from position 40 of the
DATA3 data set that are not equal to 199. This RANGE operator could be used to count the number of
records that do not have 'G' in position 40, since 199 (X'C7') is the EBCDIC code for 'G'. Alternatively, the
COUNT operator could be used with OMIT COND=(40,1,CH,EQ,C'G').
SELECT Operator
┌──
─────────────┐
55──SELECT──FROM(indd)──TO(outdd)───6┬─ON(p,m,f)─┬┴──┬─ALLDUPS───┬──┬─────────────┬──────5%
└─ON(VLEN)──┘ ├─NODUPS────┤ └─VSAMTYPE(x)─┘
├─HIGHER(x)─┤
├─LOWER(y)──┤
├─EQUAL(v)──┤
├─FIRST─────┤
| └─LAST──────┘
Selects records from an input data set for inclusion in an output data set based on meeting criteria for the
number of times specified numeric or character field values occur. This makes it possible to only keep
records with duplicate field values, only keep records with no duplicate field values, only keep records with
| field values that occur more than, less than, or exactly n times, or only keep the first or last record with
| each unique field value. From 1 to 10 fields can be specified. At least one ON(VLEN) or ON(p,m,f) field
must be specified; all such ON fields specified will be used to determine the "value count" (that is, the
number of times the ON values occur) to be matched against the criteria.
DFSORT is called to sort the indd data set to the outdd data set. ICETOOL uses its E35 exit to determine
which records to include in the outdd data set.
ICETOOL requires extra storage for SELECT processing, over and above what is normally needed by
ICETOOL and DFSORT, in order to save your records until it can determine whether or not they meet
your specified criteria. In most cases, only a small amount of storage is needed and can be obtained
(above 16-megabyte virtual). However, for a FROM data set with a large record length and criteria
requiring many saved records, a large amount of storage is needed. For example, with a record length of
32 756 and HIGHER(99), over 3 megabytes of storage is needed. If ICETOOL cannot get the storage it
needs, it issues a message and terminates the SELECT operation. Increasing the REGION by the
amount indicated in the message may allow ICETOOL to run successfully.
The DYNALLOC option is passed to DFSORT to ensure that work space is available for the sort. If your
installation defaults for dynamic allocation are inappropriate for a SELECT operator, you can take one of
the following actions:
1. Override the DYNALLOC option using an OPTION control statement such as:
OPTION DYNALLOC=(339ð,5)
in the DFSPARM data set (applies to all OCCUR, SELECT, SORT, and UNIQUE operators).
2. Use SORTWKnn DD statements to override the use of dynamic allocation (applies to all OCCUR,
SELECT and UNIQUE operators). Refer to “SORTWKnn DD Statement” on page 50 for details.
You must not supply your own DFSORT MODS, INREC or OUTREC statement since they would override
the DFSORT statements passed by ICETOOL for this operator.
FROM(indd)
See the discussion of this operand on the COPY statement in “COPY Operator” on page 291.
TO(outdd)
Specifies the ddname of the output data set to be written by DFSORT for this operation. An outdd DD
statement must be present and must define an output data set that conforms to the rules for
DFSORT's SORTOUT data set.
The ddname specified in the FROM operand must not be the same as the ddname specified in the TO
operand.
Refer to “JCL Restrictions” on page 289 for more information regarding the selection of ddnames.
ON(p,m,f)
Specifies the position, length, and format of a numeric or character field to be used for this operation.
p specifies the first byte of the field relative to the beginning of the input record. p is 1 for the first
data byte of a fixed-length record and 5 for the first data byte of a variable-length record as illustrated
below (RRRR represents the 4-byte record descriptor word):
m specifies the length of the field in bytes. A field must not extend beyond position 4 088, or beyond
the end of a record. The maximum length for a field depends on its format.
f specifies the format of the field as shown below.
F, E, C, A, 8, 6, 4, 2, and 0 are treated as equivalent positive signs. Thus the zoned decimal
values F2F3C1, F2F3F1 and 020301 are counted as only one unique value.
D, B, 9, 7, 5, 3, and 1 are treated as equivalent negative signs. Thus the zoned decimal values
F2F3B0, F2F3D0, and 020310 are counted as only one unique value.
Digits are not checked for validity.
ON(VLEN)
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
ALLDUPS
Limits the records selected to those with ON values that occur more than once (value count > 1). You
can use this operand to keep just those records with duplicate field values.
NODUPS
Limits the records selected to those with ON values that occur only once (value count = 1). You can
use this operand to keep just those records with no duplicate field values.
NODUPS is equivalent to EQUAL(1) or LOWER(2).
HIGHER(x)
Limits the records selected to those with ON values that occur more than x times (value count > x).
You can use this operand to keep just those records with field values that occur more than x times.
x must be specified as n or +n where n can be 0 to 99.
LOWER(y)
Limits the records selected to those with ON values that occur less than y times (value count < y).
You can use this operand to keep just those records with field values that occur less than y times.
y must be specified as n or +n where n can be 0 to 99.
EQUAL(v)
Limits the records selected to those with ON values that occur v times (value count = v). You can use
this operand to keep just those records with field values that occur v times.
v must be specified as n or +n where n can be 0 to 99.
FIRST
Limits the records selected to those with ON values that occur only once (value count = 1) and the
first record of those with ON values that occur more than once (value count > 1). You can use this
operand to keep just the first record for each unique field value.
| LAST
| Limits the records selected to those with ON values that occur only once (value count = 1) and the
| last record of those with ON values that occur more than once (value count > 1). You can use this
| operand to keep just the last record for each unique field value.
VSAMTYPE(x)
See the discussion of this operand on the COPY statement in “COPY Operator” on page 291.
SELECT Examples
Although the SELECT operators in the examples below could all be contained in a single ICETOOL job
step, they are shown and discussed separately for clarity.
Example 1
Sorts the INPUT data set to the DUPS data set, selecting only the records from INPUT with characters in
positions 11-18 and characters in positions 30-73 that occur more than once (that is, only records with
duplicate ON field values).
The DUPS data set might look as follows (several records are shown for illustrative purposes):
Example 2
Sorts the INPUT data set to the ONLYONE data set, selecting only the records from INPUT with floating
sign values in positions 23-25 that occur just once (that is, only records with no duplicate ON field values).
The ONLYONE data set might look as follows (several records are shown for illustrative purposes):
Example 3
Sorts the FAILURES data set to the CHECKOUT data set, selecting only the records from FAILURES with
characters in positions 28-35 and characters in positions 1-5 that occur more than three times (that is only
records with four or more duplicate ON field values).
The CHECKOUT data set might look as follows (several records are shown for illustrative purposes):
Example 4
Sorts the BOOKS data set to the PUBLISHR data set, selecting only the records from BOOKS with char-
acters in positions 29-38 that occur only once and the first record of those with characters in positions
29-38 that occur more than once (that is, one record for each unique ON field value).
The PUBLISHR data set might look as follows (several records are shown for illustrative purposes):
SORT Operator
|
| 55──SORT──FROM(indd)──USING(xxxx)──┬─────────────────┬──┬─────────────┬──────────────────5
| │ ┌─,─────┐ │ └─VSAMTYPE(x)─┘
| └─TO(──6─outdd─┴─)─┘
| 5──┬─────────────────┬──┬────────┬──────────────────────────────────────────────────────5%
| ├─LOCALE(name)────┤ └─SERIAL─┘
| ├─LOCALE(CURRENT)─┤
| └─LOCALE(NONE)────┘
| DFSORT is called to sort the indd data set to the outdd data sets using the DFSORT control statements in
| xxxxCNTL. You must supply a DFSORT SORT statement in the xxxxCNTL data set to indicate the control
| fields for the sort. You can use additional DFSORT statements in the xxxxCNTL data set to sort a subset
| of the input records (INCLUDE or OMIT statement; SKIPREC and STOPAFT options; OUTFIL INCLUDE,
| OMIT, STARTREC, ENDREC and SPLIT operands; user exit routines), reformat records for output
| (INREC and OUTREC statements, OUTFIL OUTREC operand, user exit routines), and so on.
| The active locale's collating rules affect SORT processing as explained in “SORT Control Statement” on
| page 207. If an INCLUDE or OMIT statement or an OUTFIL INCLUDE or OMIT operand is specified in
| the xxxxCNTL data set, the active locale's collating rules affect INCLUDE and OMIT processing as
| explained in the “Cultural Environment Considerations” discussion in “INCLUDE Control Statement” on
| page 75.
The DYNALLOC option is passed to DFSORT to ensure that work space is available for the sort. If your
installation defaults for dynamic allocation are inappropriate for a SORT operator, you can take one of the
following actions:
1. Override the DYNALLOC option using an OPTION control statement such as:
OPTION DYNALLOC=(339ð,5)
in the xxxxCNTL data set (only applies to this operator) or the DFSPARM data set (applies to all
OCCUR, SELECT, SORT and UNIQUE operators).
2. Use xxxxWKn DD statements to override the use of dynamic allocation (only applies to this operator).
Refer to “SORTWKnn DD Statement” on page 50 for details.
FROM(indd)
See the discussion of this operand on the COPY statement in “COPY Operator” on page 291.
USING(xxxx)
Specifies the first 4 characters of the ddname for the control statement data set to be used by
DFSORT for this operation. An xxxxCNTL DD statement must be present, and the control statements
| in it must conform to the rules for DFSORT's SORTCNTL data set. The xxxxCNTL data set must
| contain a SORT statement. If TO is not specified, the xxxxCNTL data set must also contain either one
| or more OUTFIL statements or a MODS statement for an E35 routine that disposes of all records.
| Other statements are optional.
| TO(outdd,...)
| Specifies the ddnames of the output data sets to be written by DFSORT for this operation. From 1 to
| 10 outdd names can be specified. An outdd DD statement must be present for each outdd name
| specified. If a single outdd data set is specified, DFSORT is called once to sort the indd data set to
| the outdd data set using SORTOUT processing; the outdd data set must conform to the rules for
| DFSORT's SORTOUT data set. If multiple outdd data sets are specified and SERIAL is not specified,
| DFSORT is called once to sort the indd data set to the outdd data sets using OUTFIL processing; the
| outdd data sets must conform to the rules for DFSORT's OUTFIL data sets.
| A ddname specified in the FROM operand must not also be specified in the TO operand.
| Refer to “JCL Restrictions” on page 289 for more information regarding the selection of ddnames.
VSAMTYPE(x)
See the discussion of this operand on the COPY statement in “COPY Operator” on page 291.
| LOCALE(name)
| See the discussion of this operand on the COPY statement in “COPY Operator” on page 291.
| LOCALE(CURRENT)
| See the discussion of this operand on the COPY statement in “COPY Operator” on page 291.
| LOCALE(NONE)
| See the discussion of this operand on the COPY statement in “COPY Operator” on page 291.
| SERIAL
| Specifies that OUTFIL processing is not to be used when multiple outdd data sets are specified.
| DFSORT is called multiple times and uses SORTOUT processing; the outdd data sets must conform
| to the rules for DFSORT's SORTOUT data set. SERIAL is not recommended because the use of
| serial processing (that is, multiple calls to DFSORT) instead of OUTFIL processing can degrade per-
| formance and imposes certain restrictions as detailed below. SERIAL is ignored if a single outdd data
| set is specified.
| DFSORT is called to sort the indd data set to the first outdd data set using the DFSORT control state-
| ments in the xxxxCNTL data set. If the sort operation is successful, DFSORT is called as many times
| as necessary to copy the first outdd data set to the second and subsequent outdd data sets. There-
| fore, for maximum efficiency, use a DASD data set as the first in a list of outdd data sets on both
| DASD and tape. If more than one outdd data set is specified, DFSORT must be able to read the first
| outdd data set after it is written in order to copy it to the other outdd data sets. Do not use a SYSOUT
| or DUMMY data set as the first in a list of outdd data sets because:
| If the first data set is SYSOUT, DFSORT abends when it tries to copy the SYSOUT data set to
| the second outdd data set.
| If the first data set is DUMMY, DFSORT copies the empty DUMMY data set to the other outdd
| data sets (that is, all of the resulting outdd data sets are empty).
SORT Examples
| Although the SORT operators in the examples below could all be contained in a single ICETOOL job step,
| they are shown and discussed separately for clarity.
| Example 1
| \ Method 1
| SORT FROM(MASTER) TO(PRINT,TAPE,DASD) USING(ABCD)
| \ Method 2
| SORT FROM(MASTER) TO(DASD,TAPE,PRINT) USING(ABCD) SERIAL
| This example shows two different methods for creating multiple sorted output data sets. Assume that the
| ABCDCNTL data set contains:
| SORT FIELDS=(15,2ð,CH,A,1,5,PD,D)
| Method 1 requires one call to DFSORT, one pass over the input data set, and allows the output data sets
| to be specified in any order. The SORT operator sorts all records from the MASTER data set to the
| PRINT (SYSOUT), TAPE, and DASD data sets, using the SORT statement in the ABCDCNTL data set
| and OUTFIL processing.
| Method 2 requires three calls to DFSORT, three passes over the input data set, and imposes the
| restriction that the SYSOUT data set must not be the first TO data set. The SORT operator sorts all
| records from the MASTER data set to the DASD data set, using the SORT statement in the ABCDCNTL
| data set, and then copies the resulting DASD data set to the TAPE and PRINT (SYSOUT) data sets.
| Since the first TO data set is processed three times (written, read, read), placing the DASD data set first is
| more efficient than placing the TAPE data set first. PRINT must not be the first in the TO list because a
| SYSOUT data set cannot be read.
| Example 2
| \ Method 1
| SORT FROM(IN) TO(DEPT1) USING(DPT1)
| SORT FROM(IN) TO(DEPT2) USING(DPT2)
| SORT FROM(IN) TO(DEPT3) USING(DPT3)
| \ Method 2
| SORT FROM(IN) USING(ALL3)
| This example shows two different methods for creating sorted subsets of an input data set. Assume that:
| The DPT1CNTL data set contains:
| SORT FIELDS=(51,2,BI,A,18,5,CH,A,58,4,BI,A)
| INCLUDE COND=(5,3,CH,EQ,C'Dð1')
| The DPT2CNTL data set contains:
| SORT FIELDS=(51,2,BI,A,18,5,CH,A,58,4,BI,A)
| INCLUDE COND=(5,3,CH,EQ,C'Dð2')
| The DPT3CNTL data set contains:
| SORT FIELDS=(51,2,BI,A,18,5,CH,A,58,4,BI,A)
| INCLUDE COND=(5,3,CH,EQ,C'Dð3')
| The ALL3CNTL data set contains:
| SORT FIELDS=(51,2,BI,A,18,5,CH,A,58,4,BI,A)
| OUTFIL FNAMES=DEPT1,INCLUDE=(5,3,CH,EQ,C'Dð1')
| OUTFIL FNAMES=DEPT2,INCLUDE=(5,3,CH,EQ,C'Dð2')
| OUTFIL FNAMES=DEPT3,INCLUDE=(5,3,CH,EQ,C'Dð3')
| Method 1 requires three calls to DFSORT and three passes over the input data set:
| The first SORT operator sorts the records from the IN data set that contain D01 in positions 5-7 to the
| DEPT1 data set
| The second COPY operator sorts the records from the IN data set that contain D02 in positions 5-7 to
| the DEPT2 data set
| The third COPY operator sorts the records from the IN data set that contain D03 in positions 5-7 to
| the DEPT3 data set.
| Method 2 accomplishes the same result as method 1 but, because it uses OUTFIL statements instead of
| TO operands, requires only one call to DFSORT and one pass over the input data set.
| Example 3
| This example shows how sorted data for three different countries can be produced. Assume that the
| SRT1CNTL data set contains:
| SORT FIELDS=(5,2ð,CH,A,31,15,CH,A,1,4,FI,D,63,1ð,CH,D)
| The first SORT operator sorts all records from the IN1 data set to the FRANCE data set, using the SORT
| statement in the SRT1CNTL data set. The character (CH) control fields are sorted according to the col-
| lating rules defined in locale FR_FR (French language for France).
| The second SORT operator sorts all records from the IN1 data set to the CANADA data set, using the
| SORT statement in the SRT1CNTL data set. The character (CH) control fields are sorted according to the
| collating rules defined in locale FR_CA (French language for Canada).
| The third SORT operator sorts all records from the IN1 data set to the BELGIUM data set, using the
| SORT statement in the SRT1CNTL data set. The character (CH) control fields are sorted according to the
| collating rules defined in locale FR_BE (French language for Belgium).
STATS Operator
┌──
─────────────┐
55──STATS──FROM(indd)───6┬─ON(p,m,f)─┬┴──┬─────────────┬─────────────────────────────────5%
└─ON(VLEN)──┘ └─VSAMTYPE(x)─┘
Prints messages containing the minimum, maximum, average, and total for specified numeric fields. From
1 to 10 fields can be specified.
DFSORT is called to copy the indd data set to ICETOOL's E35 user exit. ICETOOL prints messages
containing the minimum, maximum, average, and total for each field as determined by its E35 exit.
| The average (or mean) is calculated by dividing the total by the record count and rounding down to the
| nearest integer (examples: 23 / 5 = 4, −23 / 5 = − 4).
You must not supply your own DFSORT MODS, INREC, or OUTREC statement since they would override
the DFSORT statements passed by ICETOOL for this operator.
FROM(indd)
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
ON(p,m,f)
Specifies the position, length, and format of a numeric field to be used for this operation.
p specifies the first byte of the field relative to the beginning of the input record. p is 1 for the first
data byte of a fixed-length record and 5 for the first data byte of a variable-length record as illustrated
below (RRRR represents the 4-byte record descriptor word):
| m specifies the length of the field in bytes. A field must not extend beyond position 32 752 or beyond
the end of a record. The maximum length for a field depends on its format.
f specifies the format of the field as follows:
If the total for a field overflows, ICETOOL continues processing, but prints asterisks for the average
and total for that field.
A maximum of 15 digits is allowed. If a CSF/FS value with 16 digits is found, ICETOOL issues an
error message and terminates the operation.
If a decimal value contains an invalid digit (A-F), ICETOOL identifies the bad value in a message
and prints asterisks for the minimum, maximum, average and total for that field.
A value is treated as positive if its sign is F, E, C, A, 8, 6, 4, 2, or 0.
A value is treated as negative if its sign is D, B, 9, 7, 5, 3, or 1.
For a ZD, PD or CSF/FS format field, a negative zero value is treated as a positive zero value.
ON(VLEN)
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
VSAMTYPE(x)
See the discussion of this operand on the COPY statement in “COPY Operator” on page 291.
STATS Example
Prints messages containing the minimum, maximum, average and total of the binary values in positions
1-2 of the DATA1 data set. For variable-length records, this gives statistics about the length of the
records. Prints messages containing the minimum, maximum, average and total of the zoned decimal
values in positions 15-18 of the DATA1 data set.
UNIQUE Operator
55──UNIQUE──FROM(indd)──┬─ON(p,m,f)─┬──┬─────────────┬──────────────────────────────────5%
└─ON(VLEN)──┘ └─VSAMTYPE(x)─┘
Prints a message containing the count of unique values for a specified numeric or character field.
DFSORT is called to sort the indd data set to ICETOOL's E35 user exit. ICETOOL prints a message
containing the unique count as determined by its E35 user exit.
The DYNALLOC option is passed to DFSORT to ensure that work space is available for the sort. If your
installation defaults for dynamic allocation are inappropriate for a UNIQUE operator, you can take one of
the following actions:
1. Override the DYNALLOC option using an OPTION control statement such as:
OPTION DYNALLOC=(339ð,5)
in the DFSPARM data set (applies to all OCCUR, SELECT, SORT and UNIQUE operators).
2. Use SORTWKnn DD statements to override the use of dynamic allocation (applies to all OCCUR,
SELECT, and UNIQUE operators). Refer to “SORTWKnn DD Statement” on page 50 for details.
You must not supply your own DFSORT MODS, INREC, OUTREC, SUM or RECORD statement since
they override the DFSORT statements passed by ICETOOL for this operator.
FROM(indd)
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
ON(p,m,f)
Specifies the position, length, and format of a numeric or character field to be used with this operation.
p specifies the first byte of the field relative to the beginning of the input record. p is 1 for the first
data byte of a fixed-length record and 5 for the first data byte of a variable-length record as illustrated
below (RRRR represents the 4-byte record descriptor word):
| m specifies the length of the field in bytes. A field must not extend beyond position 32 752 or beyond
the end of a record. The maximum length for a field depends on its format.
f specifies the format of the field as shown below:
F, E, C, A, 8, 6, 4, 2, and 0 are treated as equivalent positive signs. Thus the zoned decimal
values F2F3C1, F2F3F1, and 020301 are counted as only one unique value.
D, B, 9, 7, 5, 3, and 1 are treated as equivalent negative signs. Thus the zoned decimal values
F2F3B0, F2F3D0, and 020310 are counted as only one unique value.
Digits are not checked for validity.
ON(VLEN)
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
VSAMTYPE(x)
See the discussion of this operand on the COPY statement in “COPY Operator” on page 291.
UNIQUE Example
The first UNIQUE operator prints a message containing the count of unique character data in positions
20-59 of the DATAIN data set.
The second UNIQUE operator prints a message containing the count of unique zoned decimal values in
positions 5-7 of the DATAIN data set.
VERIFY Operator
┌──
───────────┐
55──VERIFY──FROM(indd)───6─ON(p,m,f)─┴──┬────────┬──┬──────────┬──┬─────────────┬────────5%
└─NOSIGN─┘ └─LIMIT(n)─┘ └─VSAMTYPE(x)─┘
Examines particular decimal fields in a data set and prints a message identifying each invalid value found
for each field. From 1 to 10 fields can be specified.
DFSORT is called to copy the indd data set to ICETOOL's E35 user exit. ICETOOL uses its E35 user exit
to examine the digits and sign of each value for validity, and for each invalid value found, prints an error
message containing the record number and field value (in hexadecimal).
You must not supply your own DFSORT MODS, INREC, or OUTREC statement since they would override
the DFSORT statements passed by ICETOOL for this operator.
| Notes:
| 1. Values with invalid decimal digits are also identified for the DISPLAY, OCCUR, RANGE, and STATS
| operators.
| 2. The DISPLAY operator can be used to print a report identifying the relative record number,
| hexadecimal value, and associated fields for each invalid (and valid) decimal value, as shown in
| Example 9 under “DISPLAY Operator” on page 299.
FROM(indd)
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
ON(p,m,f)
Specifies the position, length, and format of a decimal field to be used for this operation.
p specifies the first byte of the field relative to the beginning of the input record. p is 1 for the first
data byte of a fixed-length record and 5 for the first data byte of a variable-length record as illustrated
below (RRRR represents the 4-byte record descriptor word):
| m specifies the length of the field in bytes. A field must not extend beyond position 32 752 or beyond
the end of a record. The maximum length for a field depends on its format.
f specifies the format of the field as shown below:
If the number of bad values reaches the LIMIT for invalid decimal values, ICETOOL terminates the
operation. If the LIMIT operand is not specified, a default of 200 is used for the invalid decimal value
limit.
NOSIGN
Specifies that the sign of the decimal values is not to be validity checked (overriding the default of
checking for 0-9 as invalid signs).
LIMIT(n)
See the discussion of this operand on the DISPLAY statement in “DISPLAY Operator” on page 299.
VSAMTYPE(x)
See the discussion of this operand on the COPY statement in “COPY Operator” on page 291.
VERIFY Example
The first VERIFY operator checks for invalid digits (A-F) and invalid signs (0-9) in the packed decimal
| values from positions 22-37 and the zoned decimal values from positions 7-15 of the NEW data set. A
| message is printed identifying each value (if any) that contains an invalid digit or sign. If 200 invalid
values are found, the operation is terminated.
The second VERIFY operator checks for invalid digits (A-F) in the packed decimal values from positions
| 22-37 and the zoned decimal values from positions 7-15 of the NEW data set. A message is printed
| identifying each value (if any) that contains an invalid digit. If 10 invalid values are found, the operation is
terminated.
| Note: The DISPLAY operator can be used to print a report identifying the relative record number,
| hexadecimal value, and associated fields for each invalid (and valid) decimal value, as shown in Example
| 9 under “DISPLAY Operator” on page 299.
When you call ICETOOL from a program, you have a choice of two different interfaces: the TOOLIN Inter-
face and the Parameter List Interface.
TOOLIN Interface
With the TOOLIN Interface, you supply ICETOOL statements in the TOOLIN data set. ICETOOL prints
messages in the TOOLMSG data set, but does not return information directly to your program.
To use the TOOLIN interface, set a value of 0 in register 1, or place the address of a 4-byte field con-
taining X'80000000' in register 1, before calling ICETOOL as shown below:
...
SLR R1,R1 TOOLIN INTERFACE - METHOD 1
LINK EP=ICETOOL CALL ICETOOL
...
LA R1,NOPLIST TOOLIN INTERFACE - METHOD 2
LINK EP=ICETOOL CALL ICETOOL
...
NOPLIST DC X'8ð',AL3(ð) TOOLIN INTERFACE INDICATOR
...
Figure 83 shows the format of the parameter list used with the Parameter List Interface. Figure 84 on
page 356 shows the operation-specific values returned to the calling program.
┌────────────┐ ┌──────────────────────────┐
│ Register 1 ├────5│ Flags │
└────────────┘ ├──────────────────────────┤
│ Statement Area 1 Address │
├──────────────────────────┤
│ Return Area 1 Address │
└──────────────────────────┘
┌──────────────────────────┐
│ Statement Area n Address │
├──────────────────────────┤
│ Return Area n Address │
├──────────────────────────┤
│ X'FFFFFFFF' │
└──────────────────────────┘
The flags field must be specified. A 4-byte field containing X'FFFFFFFF' must be used to indicate the
end of the parameter list. It can be coded after any pair of statement/return addresses.
All addresses in the parameter list must be 31-bit addresses or clean 24-bit addresses (the first 8 bits
contain zeros).
Explanation of Fields
Flags
Bit 0 = 0: Use the Parameter List Interface. Process ICETOOL statements from this parameter list
and return information to this parameter list. Ignore TOOLIN.
Bit 0 = 1: Use the TOOLIN Interface. Process ICETOOL statements from TOOLIN. Ignore this
parameter list.
Bits 1-31: Reserved. Must be set to zero to ensure future extendibility.
A 2-byte length field containing the length of the statement area for this operation. If this field is 0,
ICETOOL ignores this statement area/return area pair.
One or more 80-character ICETOOL statement images in the format described in “ICETOOL
Statements” on page 289. Each statement area must have one operator statement. Comment
and blank statements before the operator statement are processed. Comment, blank, and addi-
tional operator statements after the end of the first operator statement are ignored.
A 2-byte length field containing the length of the return area for this operation. If this field is 0,
ICETOOL does not return any information for this operation.
A 1-byte operation status indicator which is set by ICETOOL as follows:
0= This operation was run and completed with return code 0. Operation-specific values
(see below) were returned.
4= This operation was not run (for example, scan mode was in effect) or did not complete
with return code 0. Operation-specific values (see below) were not returned.
Operation-specific values. Each value returned by ICETOOL is an 8-byte packed decimal value
with a C for a positive sign or a D for a negative sign. If ICETOOL set the operation status to 4, it
did not return any values for this operation.
Note: Programs in LPALIB which call ICETOOL must provide return areas which ICETOOL can store
into.
The required return area length and the operation-specific values returned for each operator are
shown in Figure 84. If the return area length is less than the length required, ICETOOL issues a
message and terminates the operation.
Parameter List Interface Example: The example in Figure 85 on page 358 shows a portion of
an assembler language program that uses the Parameter List Interface. Figure 86 on page 360 shows
the JCL you might use to run the program in Figure 85 on page 358.
DEPTVIEW CSECT
...
\ SET UP PARAMETER LIST AND CALL ICETOOL
LA R1,PARLST LOAD ADDRESS OF PARAMETER LIST
LINK EP=ICETOOL CALL ICETOOL
LTR R15,R15 IF ANY OPERATIONS WERE NOT SUCCESSFUL,
BNZ CKSTAT1 DETERMINE WHICH ONE FAILED
\ ALL OPERATIONS WERE SUCCESSFUL
\ CHECK EMPLOYEES PER DEPARTMENT AGAINST ACCEPTABLE LEVEL
CP RT2AVG1,EMAVGCK IF AVERAGE IS ACCEPTABLE,
BNH CKQUAL NO MESSAGE IS NEEDED
\ ISSUE A MESSAGE SHOWING AVERAGE, MINIMUM, MAXIMUM, AND
\ TOTAL NUMBER OF EMPLOYEES PER DEPARTMENT.
...
\ CHECK EXPENSES PER DEPARTMENT AGAINST ACCEPTABLE LEVEL
CKQUAL CP RT2AVG2,TLAVGCK IF AVERAGE IS ACCEPTABLE,
BNH PCTCALC NO MESSAGE IS NEEDED
\ ISSUE A MESSAGE SHOWING AVERAGE, MINIMUM, MAXIMUM, AND
\ TOTAL EXPENSES PER DEPARTMENT.
...
\ CALCULATE THE PERCENTAGE OF DEPARTMENTS OVER/UNDER EMPLOYEE LIMIT
PCTCALC MVC WORK+2(4),RT3RCDS+4 COPY NUMBER OF DEPARTMENTS
SP WORK+2(4),RT3RNG+4(4) SUBTRACT 'NUMBER WITHIN LIMITS' TO
\ GET 'NUMBER OVER/UNDER LIMIT'
CP WORK+2(4),Pð IF NONE OVER/UNDER LIMIT,
BE PCTPRT PERCENTAGE IS ZERO
MP WORK+2(4),P1ðð MULTIPLY NUMBER OVER/UNDER BY 1ðð
DP WORK(6),RT3RCDS+4(4) DIVIDE BY NUMBER OF DEPARTMENTS
\ ISSUE A MESSAGE SHOWING THE PERCENTAGE OF DEPARTMENTS THAT ARE
\ OVER/UNDER EMPLOYEE LIMIT
PCTPRT UNPK PCTVAL,WORK(2) CONVERT AVERAGE TO PRINTABLE EBCDIC
OI PCTVAL+2,X'Fð' ENSURE LAST DIGIT IS PRINTABLE
...
\ ONE OR MORE OPERATIONS FAILED
CKSTAT1 CLI RT1STAT,ð IF OPERATION 1 WORKED,
BNE CKSTAT2 CHECK OPERATION 2
\ ISSUE MESSAGE: OPERATION 1 FAILED - CHECK TOOLMSG
...
\ PARAMETER LIST
PARLST DC A(ð) USE PARAMETER LIST INTERFACE
DC A(ST1A) STATEMENT AREA 1 ADDRESS
DC A(RT1A) RETURN AREA 1 ADDRESS
DC A(ST2A) STATEMENT AREA 2 ADDRESS
DC A(RT2A) RETURN AREA 2 ADDRESS
DC A(ST3A) STATEMENT AREA 3 ADDRESS
DC A(RT3A) RETURN AREA 3 ADDRESS
DC F'.\-1' END OF PARAMETER LIST
//DFSPARM DD \
DEBUG ABEND
you cause DFSORT to abend when it issues an error message, thus preventing ICETOOL from per-
forming subsequent operators.
Tape work data sets cannot be used with ICETOOL.
An ON field must not include bytes beyond the fixed part of variable length input records. The entire
| field specified must be present in every input record, otherwise, DFSORT issues message ICE015A,
| ICE218A, or ICE027A and terminates.
| If a BatchPipes/MVS data set is used for FROM, TO, or LIST and an error is detected by ICETOOL or
| DFSORT, an ABEND is generated in order to allow appropriate error propagation by the system to
| other applications that may be accessing the same BatchPipes/MVS data set. See “BatchPipes/MVS
| Considerations” on page 13 for information about special user abend processing in conjunction with
| BatchPipes/MVS data sets.
| If DFSORT detects the error, it issues the appropriate ABEND as directed by the ABCODE installation
| option (see Installation and Customization).
| If ICETOOL detects the error, it issues ABEND 2222.
For successful completion of all operations, ICETOOL passes back a return code of 0 to the operating
system or the invoking program.
| For unsuccessful completion due to an unsupported operating system, ICETOOL passes back a return
| code of 24 to the operating system or invoking program.
For unsuccessful completion of one or more operations, ICETOOL passes back a return code of 12, 16, or
20 to the operating system or the invoking program.
| The meanings of the return codes that ICETOOL passes back (in register 15) are:
0 Successful completion. All operations completed successfully.
12 Unsuccessful completion. ICETOOL detected one or more errors that prevented it from completing
successfully. Messages for these errors were printed in the TOOLMSG data set.
16 Unsuccessful completion. DFSORT detected one or more errors that prevented ICETOOL from
completing successfully. Messages for these errors were printed in the DFSMSG data set.
20 Message data set error. The TOOLMSG DD statement was not present or the TOOLMSG data set
was not opened.
| 24 Unsupported operating system. This operating system is not supported by this release of
| DFSORT. Only current or subsequent releases of the following systems are supported:
| MVS/XA
| MVS/ESA
Using EFS
Like the user exits described in Chapter 4, “Using Your Own User Exit Routines,” the DFSORT Extended
Function Support (EFS) interface is a means by which you can pass run-time control to an EFS program
you write yourself. An EFS program is essential if you want to process double-byte character sets (such
as Japanese characters) with DFSORT.
To process Japanese data types with DFSORT, you can use the IBM Double Byte Character Set Ordering
Support Program (DBCS Ordering), Licensed Program 5665-3601, Release 2.0.
Using an EFS program and EFS program exit routines, you can:
Sort or merge user-defined data types (such as double-byte character sets) with user-defined collating
sequences
Include or omit records based on the user-defined data types
Provide user-written messages to DFSORT for printing to the message data set
Examine, alter, or ignore control statements or EXEC PARM options prior to processing by DFSORT.
The EFS program can also perform routine tasks, such as opening and initializing data sets, terminating
DFSORT, and closing data sets.
You can write your EFS program in any language that uses standard register and linkage conventions,
and can:
Pass a parameter list and a record (if you provide the EFS01 and EFS02 exit routines in the EFS
program) in register 1
Pass a return code in general register 15.
| Notes:
| 1. DFSORT does not support EFS programs for Conventional merge or tape work data set sort applica-
| tions.
| 2. VLSHRT is not allowed if EFS processing is in effect and an EFS01 or EFS02 exit routine is provided
| by the EFS program.
| 3. If you use locale processing for SORT, MERGE, INCLUDE, or OMIT fields, you must not use an EFS
| program. DFSORT's locale processing may eliminate the need for an EFS program. See “OPTION
| Control Statement” on page 111 for information related to locale processing.
The DFSORT target library, ICEMAC, contains a mapping macro called ICEDEFS, which provides a sepa-
rate Assembler DSECT for the EFS parameter list.
You can activate your EFS program during run-time with the EFS=name option (name is the name of your
EFS program):
As set during DFSORT installation with the ICEMAC macro (see “Installation Defaults” on page 13)
On the PARM parameter of your EXEC statement when you use job control language to invoke
DFSORT (see “Specifying EXEC/DFSPARM PARM Options” on page 24)
On the OPTION program control statement (see “OPTION Control Statement” on page 111).
See Appendix B, “Specification/Override of DFSORT Options” on page 459 for override information.
Figure 87 illustrates the role of the EFS interface in linking DFSORT's processing capabilities to the EFS
program you write.
┌───────────────────────┐
│ DFSORT and Non─DFSORT │
│ Control Statements │
│ and EXEC PARM Options │
└─────────┬─────────────┘
│
6
┌────────────────────┐ ┌────────────────────┐
│ DFSORT │ │ EFS Program │
│ │ │ │
│ ┌────────────┴─┐ ┌─────────────┐ ┌─┴────────────┐ │
│ │ EFS │ │ EFS │ │ EFS │ │
│ │ Interface │%───5│ Interface │%───5│ Interface │ │
│ │ Processing │ │ │ │ Processing │ │
│ └────────────┬─┘ └─────────────┘ └─┬────────────┘ │
│ │ │ │
└───────────────┬────┘ └────────────────────┘
& │
│ 6
┌───┴───┐ ┌────────┐
│ Input │ │ Output │
│ Data │ │ Data │
│ Set │ │ Set │
└───────┘ └────────┘
EFS processing can be invoked during the initialization, input, and termination phases of DFSORT.
DFSORT always calls the EFS program during the initialization phase.
| During the input phase, DFSORT reads input records, and performs any INCLUDE or OMIT statement
| logic on the records. If the EFS program generates exit routines (EFS01 and EFS02), DFSORT calls
them during the input phase.
During the termination phase, DFSORT closes data sets, releases storage, and returns control to the
calling program or system. DFSORT always calls the EFS program from the termination phase.
┌───────────────────────┐
Initialization │ │
Phase │ DFSORT ┌────────────┴─┐ Major Call 1 ┌─────────┐
│ │ │ %────────────────5 │ │
│ │ EFS │ │ EFS │
│ │ Processing │ │ Program │
│ │ │ Major Call 2 │ │
│ │ │ %────────────────5 │ │
│ │ │ │ │
│ │ │ │ │
│ │ │ Major Call 3 │ │
│ │ │ %────────────────5 │ │
│ └────────────┬─┘ │ │
│ │ │ │
└──────────┬────────────┘ │ │
│ │ │
6 │ │
┌───────────────────────┐ │ │
Input Phase │ │ │ │
│ DFSORT ┌────────────┴─┐ Call for each ┌┴───────┐ │
│ │ EFSð1 and │ %────────────────5 │ EFSð1 │ │
│ │ EFSð2 │ Input Record └┬───────┘ │
│ │ Parameter │ │ │
│ │ List │One or more calls for each┌┴───────┐ │
│ │ Processing │ %────────────────5 │ EFSð2 │ │
│ └────────────┬─┘ Input Record └┬───────┘ │
│ │ │ │
└──────────┬────────────┘ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
6 │ │
┌───────────────────────┐ │ │
Termination │ │ │ │
Phase │ DFSORT ┌────────────┴─┐ Major Call 4 │ │
│ │ │ %────────────────5 │ │
│ │ EFS │ │ EFS │
│ │ Processing │ │ Program │
│ │ │ Major Call 5 │ │
│ │ │ %────────────────5 │ │
│ └────────────┬─┘ └─────────┘
│ │
└───────────────────────┘
Figure 88. EFS Program Calls for a Sort. The figure also shows the calls to the EFS program EFS01 and EFS02
exit routines.
┌───────────────────────┐
Initialization │ │
Phase │ DFSORT ┌────────────┴─┐ Major Call 1 ┌─────────┐
│ │ │ %────────────────5 │ │
│ │ EFS │ │ EFS │
│ │ Processing │ │ Program │
│ │ │ Major Call 2 │ │
│ │ │ %────────────────5 │ │
│ │ │ │ │
│ │ │ │ │
│ │ │ Major Call 2 │ │
│ │ │ %────────────────5 │ │
│ └────────────┬─┘ │ │
│ │ │ │
└──────────┬────────────┘ │ │
│ │ │
6 │ │
┌───────────────────────┐ │ │
│ │ │ │
Input and │ DFSORT ┌────────────┴─┐ Call for each ┌┴───────┐ │
Output Phase │ │ EFSð1 │ %────────────────5 │ EFSð1 │ │
│ │ and │ Input Record │ (Merge │ │
│ │ EFSð2 │ │ Only) │ │
│ │ Parameter │ └┬───────┘ │
│ │ List │ One or more │ │
│ │ Processing │ calls for each ┌┴───────┐ │
│ │ │ %────────────────5 │ EFSð2 │ │
│ └────────────┬─┘ Input Record └┬───────┘ │
│ │ │ │
└──────────┬────────────┘ │ │
│ │ │
6 │ │
┌───────────────────────┐ │ │
Termination │ │ │ │
Phase │ DFSORT ┌────────────┴─┐ Major Call 4 │ │
│ │ │ %────────────────5 │ │
│ │ EFS │ │ EFS │
│ │ Processing │ │ Program │
│ │ │ Major Call 5 │ │
│ │ │ %────────────────5 │ │
│ └────────────┬─┘ └─────────┘
│ │
└───────────────────────┘
Figure 89. EFS Program Calls for a Merge or Copy. The figure also shows the calls to the EFS program EFS01 and
EFS02 exit routines.
Initialization Phase: DFSORT runs Major Calls 1 through 3 during the initialization phase.
Major Call 1: The EFS program can perform initialization processing such as opening data sets and
obtaining storage.
Information is passed in both directions between DFSORT and the EFS program across the EFS interface.
At Major Call 1, DFSORT supplies your EFS program with fields in the EFS interface containing:
An action code indicating that Major Call 1 is in effect
Informational flags that describe current processing.
When the EFS program returns control to DFSORT, it can supply fields in the EFS interface containing:
A control statement request list, with a list of DFSORT and non-DFSORT control statement operation
definers, or EXEC PARM options
| Note: OUTFIL statements cannot be requested by an EFS program.
An EFS Program Context area (a private communication area for the EFS program)
A list containing messages for printing to the message data set
Major Call 2: At this call, your EFS program can examine, alter, or ignore control statements before
DFSORT processes them, and provide user-written messages to the message data set. DFSORT calls
your EFS program once for each control statement or EXEC PARM you request.
At Major Call 2, DFSORT supplies your EFS program with fields in the EFS interface containing:
An action code indicating that Major Call 2 is in effect
The original control statement or EXEC PARM option requested by the EFS program
The length of the original control statement or EXEC PARM option
Informational flags that describe current processing
| An EFS Program Context area (a private communication area for the EFS program).
When the EFS program returns control to DFSORT, it can supply fields in the EFS interface containing:
A modified version of the control statement or EXEC PARM option sent by DFSORT to the EFS
program. If you plan to sort or merge user-defined data types, or include or omit user-defined data
types, your EFS program must return new formats for the SORT/MERGE or INCLUDE/OMIT control
statements. These new formats (D1 and D2) signal DFSORT to call the EFS01 and EFS02 exit rou-
tines you included with your EFS program.
| Note: OUTFIL statements cannot be passed to an EFS program or returned from an EFS program to
| be parsed.
The length of the altered control statement or EXEC PARM option.
Informational flags signaling DFSORT whether to parse or ignore the control statement or EXEC
PARM option.
A list of messages for DFSORT to print to the message data set.
A return code (in general register 15).
Major Call 3: At Major Call 3, your EFS program can provide DFSORT with user-written messages to
print to the message data set. DFSORT can call the EFS program once for the Blockset technique and
once for the Peerage/Vale techniques. DFSORT obtains more information at this call from the EFS
program to process the EFS01 and EFS02 exit routines.
At Major Call 3, DFSORT supplies your EFS program with fields in the EFS interface containing:
An action code indicating that Major Call 3 is in effect
An extract buffer offsets list needed by the EFS01 exit routine
A record lengths list of input and output records
Informational flags that describe current processing
An EFS Program Context area (a private communication area for the EFS program).
When the EFS program returns control to DFSORT, it can supply fields in the EFS interface containing:
An EFS01 exit routine address
An EFS02 exit routine address
A list of messages for printing to the message data set
A return code in general register 15.
Input Phase: DFSORT runs the two exit routines, EFS01 and EFS02, during the input phase. The
EFS01 routine supports sorting or merging user-defined data types with user-defined collating sequences
and is called once for each record. The EFS02 routine provides logic to include or omit records on user-
defined data types and is called one or more times for each record, according to the logic.
Information is passed in both directions between DFSORT and the exit routines across the EFS01 and
EFS02 parameter lists.
DFSORT supplies the EFS01 routine with fields in the parameter list containing:
An Extract Buffer Area to which the EFS01 routine must move all EFS control fields. See “EFS01
User Exit Routine” on page 385 for more information.
The input data record.
An EFS Program Context Area (a private communication area for the EFS program).
When the EFS01 routine returns control to DFSORT, it must return a return code in general register 15.
DFSORT supplies the EFS02 routine with fields in the parameter list containing:
A Correlator Identifier, which identifies a relational condition containing EFS fields. See “EFS02 User
Exit Routine” on page 386 for more information.
The input data record.
When the EFS02 routine returns control to DFSORT, it must return a return code in general register 15.
Termination Phase: DFSORT runs Major Calls 4 and 5 during the termination phase. Only one call
is made at each of these Major Calls.
Note: If a system abend occurs while DFSORT's ESTAE recovery routine is in effect, and Major Calls 4
and 5 have not already been run, the ESTAE routine runs them. If an EFS abend occurs during Major
Call 1, the ESTAE routine does not run Major Calls 4 and 5. See Appendix E, “DFSORT Abend
Processing” on page 497 for more information about ESTAE.
Major Call 4: The EFS program provides any final user-written messages for printing to the message
data set.
At Major Call 4, DFSORT supplies your EFS program with fields in the EFS interface containing:
| An action code indicating that Major Call 4 is in effect.
An EFS Program Context Area (a private communication area for the EFS program).
When the EFS program returns control to DFSORT, it can supply fields in the EFS interface containing:
A message list containing messages for printing to the message data set.
A return code (in general register 15).
Major Call 5: The EFS program performs any termination processing, such as closing data sets and
releasing storage.
At Major Call 5, DFSORT supplies your EFS program with fields in the EFS interface containing:
An action code indicating that Major Call 5 is in effect.
An EFS Program Context Area (a private communication area for the EFS program).
When the EFS program returns control to DFSORT, it must supply a return code in general register 15.
At Major Call 2, your EFS program can examine, alter, or ignore control statements and EXEC PARM
options that DFSORT reads from the EXEC statement, SYSIN, SORTCNTL, DFSPARM, or a parameter
| list passed from an invoking program. OUTFIL statements cannot be passed to an EFS program or
| returned from an EFS program to be parsed.
Refer to Figure 91 on page 372 for an illustration of the control statement processing sequence used
when an EFS program is activated.
The same override rules apply to control statements and parameters returned from an EFS program as
apply to the original control statements and parameters.
For example, a STOPAFT parameter added to the SORT statement by an EFS program is overridden by
a STOPAFT parameter in an OPTION statement in the same way as if the SORT statement originally
contained the STOPAFT parameter.
See Appendix B, “Specification/Override of DFSORT Options” on page 459 for full override details.
| You can control whether to print the control statements returned by an EFS program to the message data
| set with:
The LISTX operator of the ICEMAC macro (see “Installation Defaults” on page 13)
The LISTX or NOLISTX operators in the PARM field of the JCL EXEC statement (see “Specifying
EXEC/DFSPARM PARM Options” on page 24)
The LIST or NOLIST operators of the OPTION program control statement.
Terminating DFSORT
Your EFS program can terminate DFSORT at any of the five Major Calls and also from either of the two
EFS program exit routines during the input phase.
The parameter list resides below 16-megabyte virtual, and remains accessible while the EFS program is
active, although DFSORT might change its storage location during run-time to optimize use of storage.
The actual address in register 1 (used to pass the interface parameter list address) can therefore change
while DFSORT is running.
Figure 92 on page 374 illustrates the structure of the EFS interface parameter list. The illustrated
portions of the list are explained in order in the following pages. EXEC PARMs are not described in the
figure, but are included in processing.
R1 ─────5┌───────────────────────────────────┐
│ Action code │
├───────────── 4 bytes ─────────────┤ ┌──────────────────────────┐
│ Address of ├───5│ Control statement │
│ Control Statement list │ │ request list │
│ │ └── \\ bytes ──────────────┘
├───────────── 4 bytes ─────────────┤
│ Address of │
│ original Control Statement │ ┌──────────────────────────┐
│ including all keywords and │ │ Original │
│ corresponding subparameters ├───5│ control statement string │
│ │ └─── \ bytes ──────────────┘
├───────────── 4 bytes ─────────────┤
│ Address of │
│ modified Control Statement │ ┌──────────────────────────┐
│ including all keywords and │ │ Modified │
│ corresponding subparameters ├───5│ control statement string │
│ │ └─── \ bytes ──────────────┘
├───────────── 4 bytes ─────────────┤
│ Length of │
│ original Control Statement │
│ including all keywords and │
│ corresponding subparameters │
├───────────── 4 bytes ─────────────┤
│ Length of │
│ modified Control Statement │
│ including all keywords and │
│ corresponding subparameters │
├───────────── 4 bytes ─────────────┤
│ Address of │
│ EFS context area │
└───────────── 4 bytes ─────────────┘
┌───────────────────────────────────┐
│ Address of │
│ Extract buffer offsets │
│ (zeros if no EFS fields exist) │
├───────────── 4 bytes ─────────────┤ ┌───────────────┐
│ Address of ├───5│ Record lengths│
│ Record lengths list │ │ list │
├───────────── 4 bytes ─────────────┤ └─── 8 bytes ───┘
│ RESERVED │
├───────────── 4 bytes ─────────────┤
│ RESERVED │
├───────────── 4 bytes ─────────────┤
│ RESERVED │
├───────────── 4 bytes ─────────────┤
│ Information flags │
├───────────── 4 bytes ─────────────┤
│ Address of │
│ message list │
│ (zeros if none) │
├───────────── 4 bytes ─────────────┤
│ RESERVED │
├───────────── 4 bytes ─────────────┤
│ RESERVED │
├───────────── 4 bytes ─────────────┤
│ RESERVED │
├───┬───────── 4 bytes ─────────────┤
│ │ Address of │
│ f │ EFSð1 extract routine │
│ │ (zeros if none) │
├───┼───────── 4 bytes ─────────────┤
│ │ Address of │
│ f │ EFSð2 INCLUDE/OMIT routine │
│ │ (zeros if none) │
├───┴───────── 4 bytes ─────────────┤
│ List end indicator (X'FFFFFFFF') │
└───────────── 4 bytes ─────────────┘
Action Codes
DFSORT sets one of five action codes before a call to the EFS program:
0 Indicates Major Call 1 to the EFS program. DFSORT sends this action code once.
4 Indicates Major Call 2 to the EFS program. DFSORT might send this action code several times at
Major Call 2 depending on how many control statements are requested and found. For example, if
the SORT, MERGE, and INCLUDE control statements are all supplied in SYSIN and are requested,
the EFS program is called twice: once for the SORT control statement (because SORT and
MERGE are mutually exclusive, and assuming the SORT statement is specified first, only the SORT
statement is taken) and once for the INCLUDE control statement.
8 Indicates Major Call 3 to the EFS program. DFSORT can send this action code once for the
Blockset technique and once for the Peerage/Vale technique.
12 Indicates Major Call 4 to the EFS program. DFSORT sends this action code once.
16 Indicates Major Call 5 to the EFS program. DFSORT sends this action code once.
Non-DFSORT operation definers and PARM options must be in EBCDIC format, and the first character
must be non-numeric. The format of the control statement request list is:
┌──────────────────┬───────────────────┬───────────────────┐
│ Chain pointer to │ Length of │ Operation definer │
│ next operation │ operation definer │ or EXEC PARM │
│ definer or EXEC │ or EXEC PARM │ option name │
│ PARM option name,│ option name │ (variable-length) │
│ or zero for end │ │ │
│ of list │ │ │
│ │ │ │
└─── 4 bytes ──────┴──── 2 bytes ──────┴──── \ bytes ──────┘
* indicates that the length is determined by the corresponding length field (maximum of 8 bytes).
DFSORT places a copy of the requested control statement or PARM option string in a contiguous storage
area for the EFS program. No labels are supplied with the control statement; the address of the string
always points to the first byte of the appropriate operation definer or PARM option.
DFSORT will send the requested control statement(s) or PARM option(s) to the EFS program as found by
DFSORT; DFSORT will provide limited syntax checking of control statements or PARM option(s) before
sending them to the EFS program.
In addition to following the rules in “General Coding Rules” on page 62, you must observe the following
rules for non-DFSORT control statements:
DFSORT will recognize a control statement with no operand(s) provided the operation definer (1) is
supplied in SYSIN, SORTCNTL, or DFSPARM and (2) is the only operation definer contained on a
line.
Operation definers supplied through SYSIN, SORTCNTL, DFSPARM, or the extended parameter list
and requested by the EFS program will not be recognized if they are longer than eight bytes.
In addition to observing the rules in JCL User's Guide and JCL Reference, you must observe the following
rule for non-DFSORT PARM options:
PARM options requested by the EFS program will not be recognized if they are longer than eight
bytes.
DFSORT will send the requested DFSORT or non-DFSORT control statements or PARM options that
remain after DFSORT override rules have been applied.
If duplicate DFSORT or non-DFSORT control statements or PARM options are supplied through the
same source (such as SYSIN), then DFSORT will send the first occurrence of the control statement.
The second occurrence of the DFSORT or non-DFSORT control statement or PARM option will be
ignored by DFSORT.
If duplicate DFSORT or non-DFSORT control statements are supplied through different sources (such
as extended parameter list, SORTCNTL, and DFSPARM), then DFSORT will send the control state-
ment remaining after different source override rules have been applied, except for the DFSORT
OPTION and DEBUG control statements (see “Special Handling of OPTION and DEBUG Control
Statements”).
If mutually exclusive DFSORT control statements (such as SORT/MERGE) are supplied through the
same source (such as SYSIN), then DFSORT will send the first occurrence of the control statement.
The second occurrence of the DFSORT control statement will be ignored by DFSORT.
If mutually exclusive DFSORT control statements (such as SORT/MERGE) are supplied through dif-
ferent sources (such as extended parameter list, SORTCNTL, and DFSPARM), then DFSORT will
send the control statement remaining after different source override rules have been applied. The
DFSORT control statement not sent will be ignored by DFSORT.
Thus the EFS program will not be sent duplicate DFSORT or non-DFSORT control statements (except for
the DFSORT OPTION and DEBUG control statements as explained in “Special Handling of OPTION and
DEBUG Control Statements”), or duplicate PARM options.
If the EFS program supplies non-DFSORT operands on the DFSORT OPTION control statement and the
OPTION control statement is supplied in the extended parameter list, the EFS program must specify the
non-DFSORT operands after all DFSORT operands.
DFSORT will free any storage it acquired for the control statement or PARM string.
Note: Blanks and quotes are very important to DFSORT in determining the control statement to send to
an EFS program. Do not supply unpaired quotes in the INCLUDE/OMIT control statements, because
DFSORT treats data within quotes as a constant, and treats blanks outside of quotes as the major delim-
iter.
Special Handling of OPTION and DEBUG Control Statements: The override features of
both the DFSORT OPTION and DEBUG control statements, when supplied through different sources,
require special handling when EFS processing is in effect and either or both control statements are
requested by the EFS program.
For example, DFSORT handles override for the OPTION and DEBUG control statements as follows:
The OPTION control statement supplied in SORTCNTL will selectively override corresponding options
on the OPTION control statement supplied in the extended parameter list.
The DEBUG control statement supplied in SORTCNTL will selectively override corresponding options
on the DEBUG control statement supplied in the 24-bit parameter list or the extended parameter list.
Because of these override features, DFSORT cannot simply send the OPTION control statement supplied
in SORTCNTL and not send the OPTION control statement supplied in the extended parameter list. For
the EFS program to process all possible operands on the OPTION control statements, DFSORT must
send the OPTION control statements supplied in both SORTCNTL and the extended parameter list.
DFSORT will send both the OPTION and DEBUG control statements supplied through different sources.
If duplicate OPTION or DEBUG control statements are supplied in the same source and the OPTION or
DEBUG control statements are also supplied in different sources, DFSORT will send the first occurrence
of both the OPTION and DEBUG control statements supplied through different sources.
Your EFS program must set an Informational flag to indicate whether the control statement or PARM
option in the string should be parsed or ignored by DFSORT (see “Information Flags” on page 382 for
further details).
Rules for Parsing: The content and format of the altered control statement to be parsed must corre-
spond to valid DFSORT values as described in Chapter 3, “Using DFSORT Program Control Statements”
on page 59, except when using the FIELDS operand with SORT or MERGE, or the COND operand with
INCLUDE or OMIT (see “EFS Formats for SORT, MERGE, INCLUDE, and OMIT Control Statements” on
page 379).
You must observe the following rules for control statements to be returned to DFSORT for parsing:
The operation definer and corresponding operands must be in uppercase EBCDIC format.
At least one blank must follow the operation definer (SORT, MERGE, RECORD, and so on). A control
statement can start with one or more blanks and can end with one or more blanks. No other blanks
are allowed unless the blanks are part of a constant.
Labels are not allowed; a leading blank, or blanks, before the control statement name is optional.
No continuation character is allowed.
Neither comment statements nor comment fields are allowed.
The content and format of the altered EXEC PARM option to be parsed must correspond to valid DFSORT
values as described in “Specifying EXEC/DFSPARM PARM Options” on page 24.
The following operands will be ignored by DFSORT if returned by an EFS program on the OPTION control
statement:
EFS
LIST
NOLIST
LISTX
NOLISTX
| LOCALE
MSGDDN
MSGDD
MSGPRT
| SMF
SORTDD
SORTIN
SORTOUT
USEWKDD
The following EXEC PARM options will be ignored by DFSORT if returned by an EFS program:
EFS
LIST
NOLIST
LISTX
NOLISTX
| LOCALE
MSGDDN
MSGDD
MSGPRT
EFS Formats for SORT, MERGE, INCLUDE, and OMIT Control Statements: In addi-
tion to using the SORT, MERGE, INCLUDE, and OMIT control statements as explained in “Program
Control Statements,” you can also use two additional formats on the FIELDS and COND parameters. The
formats are termed D1 and D2 and apply as follows:
| D1 with the FIELDS parameter of the SORT or MERGE statement
| D2 with the COND parameter of the INCLUDE or OMIT statement.
Use D1 and D2 to reflect data types that require special processing by EFS program exit routines EFS01
| and EFS02, respectively. You cannot specify D2 format with the INCLUDE or OMIT parameters of the
| OUTFIL statement.
D1 Format on FIELDS Operand: The syntax for the SORT and MERGE statements using the D1
format on the FIELDS operand is as follows.
┌─,───────────┐
55──┬─SORT──┬──FIELDS=──(───6─mp,mm,mf,ms─┴──)───────────────────────────────────────────5%
└─MERGE─┘
Where Represents
mp field position within the input record
mm field length
mf the D1 format that designates this field as an EFS control field
ms must be either ascending (A) or descending (D); modification by an E61 exit (E) is not allowed.
Figure 93 on page 380 gives an example of using the D1 format for a SORT control statement returned
to DFSORT by the EFS program.
SORT FIELDS=(15,4,FF,A,2ð,4,CH,A,4ð,7,FF,D)
SORT FIELDS=(15,4,D1,A,2ð,4,CH,A,4ð,7,D1,D)
where:
D2 Format on COND Operand: Following is the syntax for the INCLUDE or OMIT statements
using the D2 format on the COND operand.
┌────────────────,─┬─AND┬─,─────────────────────┐
│ └─OR─┘ │
│ │
│ ┌────────,─┬─AND┬─,──────────────┐┌─)──┐│
│┌──(──┐│ └─OR─┘ ││ ││
66 │6 │6 ││
55──┬INCLUDE┬COND=─(───────┴──mc,mm,mf,─operator─,─┬mc,mm,mf┬┴─────┴┴─)─5%
└───OMIT┘ │ │
├constant┤
└──mask──┘
Where Represents
mc the correlator identifier, a numeric value used to identify each relational condition
mm field length
mf the D2 format designating an EFS field within the relational condition
operator a valid DFSORT comparison or bit logic operator
constant a valid DFSORT decimal, character, hexadecimal or bit constant.
mask a valid DFSORT hexadecimal or bit string
Figure 94 on page 381 gives an example of using a correlator identifier and the D2 format for an
INCLUDE control statement returned to DFSORT by the EFS program.
Note: The values for the correlator identifiers assigned to each relational condition by the EFS program
can be in any chosen order. The example in Figure 94 shows a sequential ordering for the correlator
identifiers.
The mc, mm, or constant values returned must be valid INCLUDE or OMIT control statement values,
except:
– The combined value of mc and mm might exceed the record length.
– Any valid DFSORT constant or mask is allowed.
– If COND=(mc1,mm1,mf1,operator,mc2,mm2,mf2) is used, both mf1 and mf2 must be D2.
– CHALT has no effect on EFS fields.
– FORMAT=D2 is not allowed.
INCLUDE COND=(15,4,FF,EQ,2ð,4,FF,AND,4ð,7,FF,NE,5ð,7,FF,OR,
3ð,2,FF,NE,35,2,FF)
INCLUDE COND=(1,4,D2,EQ,1,4,D2,AND,2,7,D2,NE,2,7,D2,OR,
3,2,D2,NE,3,2,D2)
Where:
FF is a user-defined format and modified to D2 by the EFS program
before returning to DFSORT.
The first relational condition specified, (1,4,D2,EQ,1,4,D2), uses
correlator identifier value 1 to identify this relational
condition.
The second relational condition specified, (2,7,D2,NE,2,7,D2),
uses correlator identifier value 2 to identify this relational
condition.
The third relational condition specified, (3,2,D2,NE,3,2,D2),
uses correlator identifier value 3 to identify this relational
condition.
The EFS program is responsible for obtaining (at Major Call 1) and releasing (at Major Call 5) the neces-
sary storage for the EFS program context area.
DFSORT frees any storage it acquired for the extract buffer offsets list. The format of the extract buffer
offsets list is:
┌───────────────────┬───────────────────┐
│ Chain pointer to │ Offset n │
│ the next offset or│ │
│ zero for end of │ │
│ list │ │
│ │ │
└─── 4 bytes ───────┴──── 4 bytes ──────┘
The input and output record lengths are sent to the EFS program for informational use only. DFSORT
ignores any changes to the values made to the record lengths list returned by the EFS program.
DFSORT frees any storage it acquired for the record lengths list. The format of the record lengths list is:
┌──────────────────┬──────────────────┐
│ Input record │ Output record │
│ length │ length │
│ │ │
│ │ │
└──── 4 bytes ─────┴──── 4 bytes ─────┘
Information Flags
The information flags are defined in the figure that follows:
bit ð 1 2 3 4 5 6 7 8
┌─────────────────┬────────────┬──────────┬──────────┐
│ ð ð ð ð ð ð ð ð │ ð ððððððð │ ðððððððð │ ðððððððð │
└─┬─┬─┬─┬─┬─┬─┬─┬─┴─┬─┬┬┬┬┬┬┬──┴─┬┬┬┬┬┬┬┬─┴─┬┬┬┬┬┬┬┬─┘
│ │ │ │ │ │ │ │ │ │││││││ ││││││││ ││││││││ Reserved
│ │ │ │ │ │ │ │ │ └┴┴┴┴┴┴────┴┴┴┴┴┴┴┴───┴┴┴┴┴┴┴┴─5
│ │ │ │ │ │ │ │ └──5 ð = Inform DFSORT to ignore parsing
│ │ │ │ │ │ │ │ the verb the EFS program returns
│ │ │ │ │ │ │ │ to DFSORT
│ │ │ │ │ │ │ │ 1 = Inform DFSORT to parse the verb
│ │ │ │ │ │ │ │ the EFS program returns to DFSORT
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ └──5 ð = Fixed-length records
│ │ │ │ │ │ │ 1 = Variable-length records
│ │ │ │ │ │ └──5 ð = PARM option/Control statement not from DFSPARM
│ │ │ │ │ │ 1 = PARM option/Control statement from DFSPARM
│ │ │ │ └─┴──5 ð ð = No application in effect
│ │ │ │ ð 1 = SORT application in effect
│ │ │ │ 1 ð = MERGE application in effect
│ │ │ │ 1 1 = COPY application in effect
│ │ │ └──5 ð = SORTDIAG not being used
│ │ │ 1 = SORTDIAG being used
│ │ └──5 ð = Directly invoked
│ │ 1 = Program invoked
└─┴──5 ð ð = Option from EXEC PARM
ð 1 = Control statement from SYSIN
1 ð = Control statement from SORTCNTL
1 1 = Control statement from invoking parameter list
Bit Description
Bits 0 and 1 Indicate the source of the control statement being processed. Information flags 0 and
1 are set by DFSORT before a call to the EFS program at Major Call 2 (multiple calls
are possible at Major Call 2).
Bit 2 Indicates how DFSORT was invoked. Information flag 2 is set by DFSORT before
Major Call 1 to the EFS program.
Bit 3 Indicates whether diagnostic messages are to be printed. Information flag 3 is set by
DFSORT before Major Call 1 to the EFS program.
Bits 4 and 5 Indicate the DFSORT function being run. Information flags 4 and 5 are set by
DFSORT before each call at Major Call 2 and Major Call 3 to the EFS program (mul-
tiple calls are possible at Major Call 2 and Major Call 3).
Bit 6 Indicates the source of PARM options and control statements from DFSPARM. Infor-
mation flag 6 is set by DFSORT before each call at Major Call 2 to the EFS program
(multiple calls are possible at Major Call 2).
Bit 7 Indicates whether fixed-length records or variable-length records are to be processed.
Information flag 7 is set by DFSORT before each call at Major Call 3 to the EFS
program (multiple calls are possible at Major Call 3).
Bit 8 Set by the EFS program to inform DFSORT whether to parse or ignore the control
statement returned by the EFS program. Printing of the control statement is managed
by the LISTX/NOLISTX parameters (see “OPTION Control Statement” on page 111
for further details). Information flag 8 is set by the EFS program before returning to
DFSORT from each call at Major Call 2 (multiple calls are possible at Major Call 2).
Message List
Your EFS program can return informational or critical messages. A return code of 0 in general register 15
indicates an informational message while a return code of 16 indicates a critical message. If the EFS
program has no messages to send after a Major Call, it must zero the message list address in the EFS
interface parameter list.
At Major Call 2, if the EFS program finds a syntax error in a control statement, it can return an offset
relative to the start of the string to indicate the location of the error. DFSORT first prints the control
statement in error and then prints another line containing a dollar symbol ($) at the location indicated by
the offset.
Because DFSORT associates the relative offset with a critical message, the EFS program must return with
a return code of 16 in general register 15. If a relative offset is returned for an EXEC PARM, the relative
offset will be ignored. The EFS program must free any storage it acquired for its messages.
The length field values must not include their own length.
┌─────────────┬─────────────┬─────────────┬──────────────┐
│ Pointer to │ Relative │ Length of │ Message │
│ next │ offset (to │ the │ text │
│ message or │ syntax │ message │ (variable │
│ zero for │ error) or │ text │ length) │
│ list end │ zero │ │ │
│ │ │ │ │
│ │ │ │ │
└───4 bytes───┴───2 bytes───┴───2 bytes───┴───\ bytes────┘
DFSORT imposes no restrictions on the format of the messages returned by an EFS program. If you
wish, you can use the DFSORT message format so that messages in the message data set are consistent
| in appearance. For a description of the message format used by DFSORT, see Messages, Codes and
| Diagnosis.
During the termination phase, the EFS program must free any storage used by these routines.
The EFS program can provide user exit routine EFS01 to supplement the function of the DFSORT
SORT/MERGE control statements and can provide user exit routine EFS02 to perform the function of the
DFSORT INCLUDE/OMIT control statements.
Register Use
1 DFSORT places the address of a parameter list in this register.
13 DFSORT places the address of a standard save area in this register.
The area can be used to save contents of registers used by the
EFS program exit routine. The first word of the area contains
the characters SM1 in its three low-order bytes.
14 Contains the address of DFSORT return point.
15 Contains the address of the EFS program exit routine. This
register can be used as the base register for EFS program exit
routine. This register is also used by the EFS program exit
routine to pass return codes to DFSORT.
At Major Call 3, DFSORT sends the EFS program a list of offsets into a buffer. These offsets indicate
where in the buffer the EFS program must have the EFS01 routine move the data indicated by the EFS
control fields. See “Extract Buffer Offsets List” on page 382 for further details. At Major Call 3, the EFS
program must return the address of the EFS01 routine to DFSORT.
During the input phase, DFSORT calls the EFS01 routine for each input record. The EFS01 exit routine
must move all data indicated by the EFS control fields, specified in the SORT or MERGE FIELDS
operand, from the input record to the extract buffer area as specified by the offsets in the extract buffer
offsets list. For each EFS control field, the total number of bytes moved by EFS01 into the buffer area is
equal to the total number of bytes specified in the mm parameter of the altered SORT or MERGE
operand. Records are ordered according to the altered ms parameter.
The EFS01 routine is called to extract all EFS control fields to the extract buffer area each time a new
record is brought into the input phase.
| DFSORT will do sort or merge processing using the data in the extract buffer, and will treat the data as
| binary data.
EFS01 Parameter List: DFSORT sends three words to the EFS01 user exit routine each time it is
entered:
The address of the extract buffer area
The address of the input record
The address of the EFS program context area.
DFSORT places the address of a parameter list in register 1. The list begins on a fullword boundary and
is three fullwords long. The format of the parameter list is:
Bytes 1 through 4
Address of the extract buffer area
Address of the input record
Address of the EFS program context area
The EFS01 routine must return one of the following return codes in general register 15:
0 The extraction of the EFS control field was successful.
16 The extraction of the EFS control field was unsuccessful; terminate DFSORT.
At Major Call 3, the EFS program must return the address of the EFS02 routine to DFSORT.
| The EFS02 routine is called to perform the INCLUDE or OMIT comparison logic for each relational condi-
| tion containing an EFS field. During the input phase, DFSORT will call the EFS02 exit routine one or
| more times for each input record according to the evaluation defined by the AND, OR, or parentheses.
The EFS02 exit routine must use the correlator identifier to determine the current relational condition being
performed. EFS02 must perform the comparison logic for the current relational condition as identified by
the correlator identifier. Figure 97 repeats Figure 94 on page 381 to illustrate an example of the calling
sequences to an EFS02 by DFSORT.
INCLUDE COND=(15,4,FF,EQ,2ð,4,FF,AND,4ð,7,FF,NE,5ð,7,FF,OR,
3ð,2,FF,NE,35,2,FF)
INCLUDE COND=(1,4,D2,EQ,1,4,D2,AND,2,7,D2,NE,2,7,D2,OR,
3,2,D2,NE,3,2,D2)
┌────────────┬────────────────┬───────────────────────────────────┐
│ Relational │ EFSð2 returns │ DFSORT action when the next │
│ condition │ a return code │ logical operator is: │
│ with │ of ð=True or ├───────────────────────────────────┤
│ │ 4=False │ OR │
├────────────┼────────────────┼───────────────────────────────────┤
│ Correlator │ True │ Include the record │
│ Identifier ├────────────────┼───────────────────────────────────┤
│ 2 │ False │ Call EFSð2 with Correlator Id 3 │
└────────────┴────────────────┴───────────────────────────────────┘
┌────────────┬────────────────┬───────────────────────────────────┐
│ Relational │ EFSð2 returns │ DFSORT action when the next │
│ condition │ a return code │ logical operator is: │
│ with │ of ð=True or ├───────────────────────────────────┤
│ │ 4=False │ None │
├────────────┼────────────────┼───────────────────────────────────┤
│ Correlator │ True │ Include the record │
│ Identifier ├────────────────┼───────────────────────────────────┤
│ 3 │ False │ Omit the record │
└────────────┴────────────────┴───────────────────────────────────┘
EFS02 Parameter List: DFSORT sends three words to the EFS02 exit routine each time it is
entered:
The address of the correlator identifier
The address of the input record
The address of the EFS program context area.
DFSORT places the address of a parameter list in register 1. The list begins on a fullword boundary and
is three fullwords long. The format of the parameter list is:
The EFS02 exit routine must return one of the following return codes in general register 15:
0 True
The record passed the INCLUDE or OMIT test for the relational condition of an EFS field. If appli-
cable, processing continues with the next relational condition. Otherwise, DFSORT accepts the
record if INCLUDE is specified or omits the record if OMIT is specified.
4 False
The record did not pass the INCLUDE or OMIT test for the relational condition of an EFS field. If
applicable, processing continues with the next relational condition. Otherwise, DFSORT omits the
record if INCLUDE is specified or includes the record if OMIT is specified.
16 Terminate
An error occurred in processing the INCLUDE or OMIT logic; terminate DFSORT.
The EFS program user exit routine can return to DFSORT with either 24-bit or 31-bit addressing in effect.
The return address that DFSORT placed in register 14 must be used.
Except for the EFS program context area address (which DFSORT sends to the EFS program user exit
routine unchanged), DFSORT handles the EFS program exit routine parameter list addresses (that is, the
pointer to the EFS program exit routine parameter list and the addresses in the parameter list) as follows:
If the EFS program exit routine is entered with 24-bit addressing in effect, DFSORT can pass clean
(zeros in the first 8 bits) 24-bit addresses or 31-bit addresses to the EFS program exit routine. The
EFS program exit routine must return clean 24-bit addresses if the EFS program exit routine returns to
DFSORT with 31-bit addressing in effect.
If the EFS program exit routine is entered with 31-bit addressing in effect, DFSORT can pass clean
24-bit addresses or 31-bit addresses to the EFS program exit routine. The EFS program exit routine
must return 31-bit addresses or clean 24-bit addresses.
|
General-use programming interface
The figures illustrate the same points as described in Figure 2 on page 7 with the following exceptions:
When record processing is done for an INCLUDE or OMIT control statement, an EFS02 user exit
routine is called to perform the comparison logic for the relational conditions with EFS fields.
When record processing is done for a SORT or MERGE control statement, an EFS01 user exit routine
is called to perform the extraction process for EFS control fields.
| │
| Copy Application
| ┌───────────┐
| │ SORTIN │
| └─────┬─────┘
| │
| │
| │
| 6
| ┌───────────┐
| │ SKIPREC │
| └─────┬─────┘
| │
| 6
| ┌───────────┐ ┌───────────┐
| │ E15 or │ │ E15 or │
| │ COBOL E15 │ │ COBOL E15 │
| └─────┬─────┘ └─────┬─────┘
| │ ┌─────────────────┘
| │ │
| │ │
| 6 6
| ┌───────────┐ ┌───────────┐
| │ INCLUDE │%──────5│ EFSð2 │
| │ OMIT │ │ │
| └─────┬─────┘ └───────────┘
| │
| 6
| ┌───────────┐
| │ STOPAFT │
| └─────┬─────┘
| │
| 6
| ┌───────────┐
| │ INREC │
| └─────┬─────┘
| │
| 6
| ┌───────────┐
| │ COPY │
| └─────┬─────┘
| │
| 6
| ┌───────────┐
| │ OUTREC │
| └─────┬──┬──┘
| │ └─────────────────┐
| │ │
| 6 6
| ┌───────────┐ ┌───────────┐
| │ E35 or │ │ E35 or │
| │ COBOL E35 │ │ COBOL E35 │
| └─────┬────┬┘ └───────────┘
| │ └───────────┐
| 6 6
| ┌───────────┐ ┌───────────┐
| │ SORTOUT │ │ OUTFIL │
| └───────────┘ └───────────┘
Major Call 1: Prior to Major Call 1, DFSORT sets the following fields in the EFS interface parameter
list:
Action code=0
Major Call 1 is in effect.
Informational bit flag 2=0
The DFSORT run is JCL-invoked.
Informational bit flag 3=0
SORTDIAG is not in effect.
| DFSORT calls EFS program EFSPGM at Major Call 1, and EFSPGM sets the following fields in the EFS
interface parameter list:
Control statement request list
Contains the OPTION operation definer which indicates to DFSORT that the OPTION control state-
ment is requested by EFSPGM.
EFSPGM program context area
EFSPGM will be using the context area.
Message list=0
EFSPGM has no messages for DFSORT to print to the message data set. General register 15 is set
to zero.
Major Call 2: Prior to Major Call 2, DFSORT sets the following fields in the EFS interface parameter
list:
Action code=4
Major Call 2 is in effect.
Informational bit flag 4=0 and informational bit flag 5=0
No application is in effect.
| EFSPGM requested the OPTION control statement. DFSORT makes a call to EFS program EFSPGM for
| each control statement requested; in this case, one. DFSORT also sets the following fields in the EFS
interface parameter list:
Informational bit flag 0=0 and informational bit flag 1=1
The requested control statement came from SYSIN.
The original OPTION control statement, including all operands and corresponding subparameters
|
| OPTION STOPAFT=30,DYNALLOC=3390
The length of the original OPTION control statement, including all operands and corresponding subpa-
rameters
The original control statement string is 31 bytes long.
| DFSORT calls EFS program EFSPGM at Major Call 2, and EFSPGM sets the following fields in the EFS
interface parameter list:
Informational bit flag 8=1
DFSORT must parse the control statement returned by EFSPGM.
The altered OPTION control statement, including all operands and subparameters
OPTION STOPAFT=30,DYNALLOC=3380,EQUALS
The length of the altered OPTION control statement, including all operands and subparameters
The altered control statement string is 38 bytes long.
Message list=0
EFSPGM has no messages for DFSORT to print to the message data set. General register 15 is set
to zero.
Figure 100 on page 394 shows the original control statement sent to EFS program EFSPGM and the
altered control statement returned by EFS program EFSPGM.
OPTION STOPAFT=30,DYNALLOC=3380,EQUALS
Where:
Major Call 3: Prior to Major Call 3, DFSORT sets the following fields in the EFS interface parameter
list:
Action code=8
Major Call 3 is in effect.
Informational bit flag 4=0 and informational bit flag 5=1
A sort application is in effect.
Informational bit flag 7=0
Fixed-length records are being processed.
Record lengths list values=80
The LRECL of the input and output data sets is 80. Because the SORTOUT LRECL was not speci-
fied, DFSORT defaulted to the SORTIN LRECL for the SORTOUT LRECL.
Extract buffer offsets list=0
No EFS control fields were specified on the SORT control statement.
| DFSORT calls EFS program EFSPGM at Major Call 3, and EFSPGM sets the following fields in the EFS
interface parameter list:
EFS01 address=0
Because the SORT control statement has no EFS control fields, the EFS01 user exit routine is not
used.
Because no INCLUDE control statement was supplied (with EFS fields), the EFS02 user exit routine is
not used.
Message list=0
EFSPGM has no messages for DFSORT to print to the message data set. General register 15 is set
to zero.
Major Call 4: Prior to Major Call 4, DFSORT sets the following fields in the EFS interface parameter
list:
Action code=12
Major Call 4 is in effect.
| DFSORT calls EFS program EFSPGM at Major Call 4, and EFSPGM sets the following fields in the EFS
interface parameter list:
Message list=0
EFSPGM has no messages for DFSORT to print to the message data set.
Major Call 5: Prior to Major Call 5, DFSORT sets the following fields in the EFS interface parameter
list:
Action Code=16
Major Call 5 is in effect.
| DFSORT calls EFS program EFSPGM at Major Call 5, and EFSPGM does not set any fields in the EFS
interface parameter list but sets general register 15 to zero.
Improving Performance
DFSORT is designed to optimize performance automatically. It sets optimization variables (such as buffer
sizes) and selects the most efficient of several sorting and merging techniques.
The DFSORT Tuning Guide provides additional information related to many of the topics covered in this
chapter.
Whenever possible:
Use either EBCDIC character or binary control fields
Place binary control fields so they start and end on byte boundaries
Avoid using the alternative collating sequence character translation
| If you know that a fixed-point control field always contains positive values, specify it as a binary field.
| If you know that a packed decimal or zoned decimal control field always contains positive values with
| the same sign (for example, X'C'), specify it as a binary field.
Use packed decimal format rather than zoned decimal
If several contiguous character or binary control fields in the correct order of significance are to be
sorted or merged in the same order (ascending or descending), specify them as one control field
Avoid overlapping control fields.
| Avoid using locale processing if your SORT, MERGE, INCLUDE, or OMIT character fields can be
| processed using the binary encoding of the data.
Efficient Blocking: Performance of DFSORT can be significantly improved if you block your input
and output records. Use the system-determined block size (SDB) facility whenever possible to allow the
system to select optimal block sizes for your data sets.
For copy applications, Blockset is the only technique used. If your program cannot use Blockset,
DFSORT issues error message ICE160A and stops processing.
Sorting Techniques: One condition that affects which sorting technique DFSORT selects is the type
of device used for intermediate storage. If you use a tape device, the Conventional technique is used,
which is less efficient. For more information on using tape devices for intermediate storage, see “Tape
Work Storage Devices” on page 410.
The Blockset and Peerage/Vale techniques can be used only with DASD work data sets. These tech-
niques are discussed below.
Blockset Disk Sorting Techniques: DFSORT's most efficient techniques, FLR-Blockset (for fixed-length
records) and VLR-Blockset (for variable-length records), will be used for most sorting applications.
Notes:
The Blockset technique might require more intermediate work space than Peerage/Vale. For more
information, see “Allocate Temporary Work Space Efficiently” on page 409.
If Blockset is not selected, you can use a SORTDIAG DD statement to force message ICE800I, which
gives a code indicating why Blockset cannot be used.
Peerage/Vale Disk Sorting Techniques: When the conditions for use of the Blockset sorting technique
are not met, DFSORT uses Peerage/Vale.
Merging Techniques: For merging applications, DFSORT uses the Blockset and Conventional tech-
niques.
Blockset Merging Techniques: DFSORT’s most efficient techniques, FLR-Blockset (for fixed-length
records) and VLR-Blockset (for variable-length records), will be used for most merging applications.
Note: If Blockset is not selected, you can use a SORTDIAG DD statement to force message ICE800I,
which gives a code indicating why Blockset cannot be used.
Conventional Merge Technique: When the conditions for use of the Blockset merging technique are not
met (for example, if the control field is too long), DFSORT uses the Conventional merge technique, which
is less efficient.
Data Set Size: When DFSORT has accurate information about the input data set size, it can make
the most efficient use of both main storage and intermediate work storage. See “File Size and Dynamic
Allocation” on page 452 for information about when and how to specify the input file size.
Variable-Length Records: When the input data set consists of variable-length records and
dynamic allocation of intermediate data sets is used, specify the average record length as accurately as
possible using AVGRLEN=n in the OPTION statement.
Direct Access Storage Devices: System performance is improved if storage is specified in cylin-
ders rather than tracks or blocks. Storage on sort work data sets will be readjusted to cylinders if pos-
sible. The number of tracks per cylinder for direct access devices is shown in Figure 101.
If WRKSEC is in effect and the work data set is not allocated to virtual I/O, DFSORT allocates secondary
extents as required, even if not requested in the JCL.
Allocating twice the space used by the input data sets is usually adequate for the work data sets. Certain
conditions can cause additional space requirements. These include:
Long control words (more than 150 bytes)
Care should be taken to ensure that the LRECL parameter of the DCB corresponds to the actual
maximum record length contained in your data set.
Tape: Three different techniques are available to the program: Balanced, Polyphase, and Oscillating.
| For information on how to calculate their requirements, see “Tape Capacity Considerations” on page 456.
| Use Compression
| The use of compression can significantly reduce the DASD storage required for many types of data and
| the resulting time DFSORT spends reading and writing that data. We recommend using compression for
| your DFSORT input and output data sets as a way to improve elapsed time performance.
| Use BatchPipes/MVS
| The use of BatchPipes/MVS input and output pipes can significantly reduce elapsed time as a result of the
| parallelism inherent in piping the data from “writer” to concurrent “reader” jobs. For example, if a
| SORTOUT data set is piped, DFSORT output processing can be overlapped with the receiving job's input
| processing. In addition, because a pipe is a virtual storage queue rather than a DASD or tape data set,
| data transfer time and elapsed time can be reduced significantly.
| We recommend using BatchPipes/MVS pipes for your DFSORT input and output data sets, when appro-
| priate, as a way to improve elapsed time and data transfer time.
| We recommend using VIO in expanded storage for your DFSORT input and output data sets, when appro-
| priate, as a way to improved elapsed time and data transfer time.
| Note that VIO is generally not recommended for work data sets, as discussed in “Virtual I/O for Work Data
| Sets” on page 409.
The exact elapsed time improvement you see when using 3390s depends on the processing techniques
| used by DFSORT for the particular run, and which data sets (SORTIN, SORTWKnn, SORTOUT, OUTFIL)
| reside on 3390s. We recommend that if you cannot use all 3390s, you use 3390s for SORTIN,
| SORTOUT, and OUTFIL data sets in preference to SORTWKnn data sets.
| CFW: To improve Blockset sorting performance by taking advantage of the cached 3990 Storage Con-
| trols, specify CFW on the DEBUG control statement or CFW=YES as the installation default (CFW=YES is
the IBM-supplied default).
COBEXIT: To take advantage of the COBOL II interface with DFSORT and enhance performance,
specify COBEXIT=COB2 on the OPTION control statement or define it as the installation default when you
run user exits compiled with VS COBOL II.
: DSA: Performance can be improved for Blockset sort applications by using Dynamic Storage Adjust-
: ment (DSA).
: The DSA installation parameter sets the maximum amount of storage available to DFSORT for dynamic
: storage adjustment of a Blockset sort application when SIZE/MAINSIZE=MAX is in effect. If you specify a
: DSA value greater than the TMAXLIM value, you allow DFSORT to use more storage than the TMAXLIM
: value if doing so should improve performance. DFSORT only tries to obtain as much storage as needed
: to improve performance up to the DSA value.
| DSPSIZE: Performance can be improved for sort applications that use the Blockset technique by using
dataspace sorting.
The DSPSIZE parameter sets the maximum amount of data space that will be used for dataspace sorting.
The default, DSPSIZE=MAX, permits DFSORT to select the maximum amount of data space that it uses
based on the size of the file being sorted and, for MVS/ESA systems only, the paging activity of your
system. Installation option VIRTDSP=YES enables dataspace sorting for MVS/XA systems.
FASTSRT: By specifying the VS COBOL II FASTSRT compile-time option, you can significantly
reduce DFSORT processor time, EXCPs, and elapsed time. With FASTSRT, DFSORT input/output oper-
ations are more efficient because DFSORT rather than COBOL does the input/output (see Figure 102 on
page 403). For more details, see the VS COBOL II publications.
The FASTSRT option does not take effect for input and output if input and output procedures are used in
| the SORT statement. Many of the functions usually performed in an input or output procedure are the
| same as those done by DFSORT INREC, OUTFIL, OUTREC, INCLUDE or OMIT, STOPAFT, SKIPREC,
| and SUM functions. You might be able to eliminate your input and output procedures by coding the
appropriate DFSORT program control statements and placing them in either the DFSPARM (DFSORT),
SORTCNTL (DFSORT), or IGZSRTCD (COBOL) data set, thereby allowing your SORT statement to
qualify for FASTSRT.
| SDB: To improve Blockset output DASD usage and elapsed time, specify SDB=YES as the installation
| default (SDB=YES is the IBM-supplied default). SDB=YES allows DFSORT to select the system-
| determined optimal block size for your DASD and tape output data sets, when appropriate.
input file
┌──────────┐ ┌──────────────┐ ┌──────────────┐
│ unsorted │─────────5│ OS/VS │─────────5│ │
└──────────┘ │ COBOL │ │ │
│ or VS │ │ │
│ COBOL II │ │ DFSORT │
┌──────────┐ │ without │ │ │
│ sorted │%─────────│ FASTSRT │%─────────│ │
└──────────┘ └──────────────┘ └──────────────┘
output file
input file
┌──────────────────────────────────────────────────┐
│ 6
┌──────────┐ ┌──────────────┐ ┌──────────────┐
│ unsorted │ │ │ │ │
└──────────┘ │ │ │ │
│ VS COBOL │ │ │
┌──────────┐ │ II with │ │ DFSORT │
│ sorted │ │ FASTSRT │ │ │
│ or │ │ │ │ │
│ copied │ │ │ │ │
└──────────┘ └──────────────┘ └──────────────┘
& │
└──────────────────────────────────────────────────┘
output file
HIPRMAX: Blockset sorting performance can be improved by using Hiperspace along with DASD for
temporary storage on an MVS/ESA system.
| The HIPRMAX parameter sets the maximum amount of Hiperspace to be committed during a run. Speci-
| fying HIPRMAX=OPTIMAL allows DFSORT to optimize the maximum amount of Hiperspace to be com-
| mitted during a run, subject to other system and concurrent Hipersorting activity throughout the run. Total
| Hipersorting activity on a system can be further limited by the DFSORT installation options EXPMAX,
| EXPOLD, and EXPRES. See the description of HIPRMAX in “OPTION Control Statement” on page 111
| for more information.
| INCLUDE or OMIT, STOPAFT, and SKIPREC: You can use the INCLUDE or OMIT statement
| and the STOPAFT and SKIPREC options to reduce the number of records to be processed, which can
reduce processor and data transfer time.
The INCLUDE and OMIT statements allow you to select records by comparing fields with constants or
other fields.
The STOPAFT option allows you to specify the maximum number of records to be accepted for sorting
or copying.
The SKIPREC option allows you to skip records at the beginning of the input file and sort or copy only
the remaining records.
| OUTFIL: If you need to create multiple output data sets from the same input data set, you can use
| OUTFIL to read the input data set only once, thus improving performance. OUTFIL can be used for sort,
| merge, and copy applications to provide sophisticated filtering, editing, conversion, lookup and replace,
| and report features.
| If you are creating only a single output data set and do not need the features of OUTFIL, use SORTOUT
| rather than OUTFIL for best performance.
| LOCALE: You can use the LOCALE option to sort and merge character data based on collating rules
| in an active locale; this enables you to obtain results with DFSORT that were previously possible only
| through pre- and/or post-processing of your data. By eliminating such costly processing, you can save
| time and processing resources.
SUM: You can improve performance by using SUM to add the contents of fields. The SUM statement
adds the contents of specified SUM fields in records with identical control fields. The result is placed in
| one record while the other record is deleted, thus reducing the number of records to be output by
| DFSORT.
You can use the ZDPRINT=YES installation option or the ZDPRINT run-time option to specify that positive
zoned decimal fields that result from summing are to be printable. That is, you can tell DFSORT to
change the last digit of the zone from hex C to hex F.
: Eliminating Duplicate Records: You can eliminate records with duplicate keys by specifying
SUM FIELDS=NONE
when using the SUM control statement.
For a diagram of the processing sequence for record handling statements, user exits, and options, see
Figure 2 on page 7.
| ICETOOL: ICETOOL is a multi-purpose utility that allows you to use DFSORT's highly efficient I/O and
| processing to perform multiple operations on one or more data sets in a single job step. ICETOOL's
| twelve operators allow you to perform sort, copy, statistical, and report operations quickly and efficiently.
CKPT: The CKPT option might preclude the use of the more efficient Blockset technique.
Note: If the installation default IGNCKPT=YES has been selected, DFSORT ignores the
checkpoint/restart request and selects the Blockset technique.
EQUALS: The EQUALS option increases the time needed for comparison of records and for data
transfer.
EQUCOUNT: The EQUCOUNT option takes additional time to count the number of records with equal
keys.
| LOCALE: The LOCALE option may increase the time required to run an application.
NOCINV: The NOCINV option precludes the use of control interval access for more efficient VSAM
processing.
NOBLKSET: The NOBLKSET option precludes the use of the more efficient Blockset technique.
VERIFY: The VERIFY option degrades performance, because it involves extra processing.
Tape Work Data Sets: Use of tape work data for intermediate storage precludes the use of the
much more efficient disk techniques.
User Exit Routines: When user exit routines are included in an application, the time required to run
the application is usually increased.
The run time required by most user exit routines is generally small, but the routines at user exits E15,
E32, and E35 are entered for each record of the data sets. For large input data sets, the total run time of
these routines can be relatively large.
EFS Programs: When EFS programs are included in an application, the time required to run the
application might increase.
However, your virtual storage allocation must not exceed the amount of real storage generally available for
one initiator; otherwise, excessive paging might occur.
DFSORT requires a minimum of 88K bytes, but to get better performance, use a much larger amount of
storage. The recommended amount is about four megabytes. Improved performance will be most notice-
able with large input files.
Note: When using the Blockset technique for a sort application, DFSORT can place selected buffers
above 16-megabyte virtual. This frees more storage for DFSORT without having to increase the region
size in the job control language. A region size of at least 440K bytes must be available to allow DFSORT
to use storage effectively.
Generally, the most efficient way to allocate (virtual) main storage is to specify MAINSIZE/SIZE=MAX.
However, problems can arise if the values for the TMAXLIM or MAXLIM installation options have been set
excessively high (or low). Guidelines for setting these values are given in Installation and Customization.
Note: Do not use SIZE/MAINSIZE=MAX with password-protected data sets if passwords are to be
entered through a routine at a user exit, because DFSORT cannot then open the data sets during the
initialization phase to make the necessary calculations.
If you specify MAINSIZE/SIZE=n and give n a value less than that specified for the MINLIM installation
option, MINLIM is used.
If the MINLIM value is greater than that specified for REGION on the EXEC statement, DFSORT attempts
to use the value specified for MINLIM; if it fails to get the amount specified by MINLIM, DFSORT still tries
to run, provided at least 88K bytes (below 16-megabyte virtual) are available to DFSORT.
Although DFSORT requires a minimum of 88K bytes (below 16-megabyte virtual), the minimum amount of
main storage required depends on the application.
For best performance, it is strongly recommended that you use significantly more than the minimum
amount of main storage.
| Storage used for OUTFIL processing will be adjusted automatically, depending upon several factors,
| including:
| Total available storage
| Non-OUTFIL processing storage requirements
| Number of OUTFIL data sets and their attributes (for example, block size).
| OUTFIL processing is subject to the ODMAXBF limit and your system storage limits (for example, IEFUSI)
| but not to DFSORT storage limits, that is, SIZE/MAINSIZE, MAXLIM, and TMAXLIM. DFSORT attempts
| to use storage above 16-megabyte virtual for OUTFIL processing whenever possible.
Notes:
| 1. In some cases, this release of DFSORT may use more storage than prior releases for comparable
| applications. This might affect the operation of some applications. For example, some applications
| that run as in-storage sorts (with no SORTWKnn data sets) in previous releases might not run in-
storage when using this release. The amount of storage allocated is normally controlled by TMAXLIM.
A REGION size of at least 440K bytes must be available if DFSORT is to achieve acceptable perform-
ance. The allocation of storage can be adversely affected if you have a smaller region value or if
DFSORT needs to allocate buffers below 16-megabyte virtual.
2. For extremely large sorts (for example, 500 megabytes or more of data), make sure that Hipersorting
and dataspace sorting are enabled, or make sure that 16 megabytes or more of main storage is avail-
able to DFSORT.
The relationship between TMAXLIM, MAXLIM, MINLIM, and REGION might be described as a series of
checks and balances.
Your system programmer has set the default storage values according to your site’s major sorting require-
ments. If you have an overnight or batch time window that must be met, increasing storage (using
REGION or SIZE/MAINSIZE=n) can give you some relief from the time constraint. If you are concerned
with processor time, decreasing storage (using REGION or SIZE/MAINSIZE=n) can reduce the processor
time associated with sorting small files.
In general, when you vary the amount of storage available to DFSORT, several things occur:
1. If you increase the amount of storage:
EXCPs are reduced.
For larger files, processor time generally decreases; that is, overhead in managing the extra
storage is offset by DFSORT having to make fewer passes over the data.
For a very heavily loaded system, elapsed time might increase because DFSORT can be
swapped out more often.
For very small sorts, processor time might remain stable or increase because of the overhead in
managing the extra storage. For larger files, processor time will usually decrease because the
overhead in managing the extra storage would be less than the benefit gained by DFSORT
making fewer passes over the data.
2. If you decrease the amount of storage:
EXCPs increase.
Elapsed time increases for most sorts.
Processor time decreases for very small files, but increases for larger files.
Changing the main storage allocation can affect system efficiency. By reducing the amount of main
storage allocated, you impair performance of DFSORT to allow other programs to have the storage they
need to operate simultaneously; by increasing the allocation, you can run large DFSORT applications effi-
| ciently at the risk of decreasing the efficiency of other applications sharing the multiprogramming environ-
| ment.
| When SIZE/MAINSIZE=n is in effect and n is greater than the REGION parameter or the default REGION
| value for your sort application, or when SIZE/MAINSIZE=MAX and TMAXLIM is greater than your
REGION, specify the storage you need released in the following way:
| For applications with user exits:
– For directly invoked DFSORT, you can choose one of the following:
- Use the m parameter of the MODS control statement.
- If SIZE=MAX is in effect, you can use the RESALL option.
- Change your REGION so that REGION is greater than SIZE/MAINSIZE (the difference is
available).
- If the installation parameter OVERRGN is smaller than your system IEFUSI value, this differ-
ence is available. (OVERRGN is an installation option that can be modified only by your
system programmer.)
– For program invoked DFSORT, you can choose one of the following:
- If the user exit address is not passed in the parameter list (that is, it is specified with a MODS
statement), use the m parameter on the MODS statement.
- If the user exit address is passed in the parameter list, and SIZE/MAINSIZE=MAX is in effect,
use the RESINV option.
- If the user exit address is passed in the parameter list, and SIZE/MAINSIZE=n is in effect,
change your REGION so that the REGION is greater than SIZE/MAINSIZE (the difference is
available).
- If many of your DFSORT applications pass the user exit address in the parameter list and
SIZE/MAINSIZE=n is in effect, then consider having the OVERRGN value changed by your
system programmer to less than your IEFUSI value.
| For applications without user exits:
– For directly invoked DFSORT, you can choose one of the following:
- If SIZE/MAINSIZE=MAX is in effect, use the RESALL option.
- If SIZE/MAINSIZE=n is in effect, change your REGION so that REGION is greater than
SIZE/MAINSIZE (the difference is available).
- Have the OVERRGN value changed by your system programmer to less than your IEFUSI
value.
– For program invoked DFSORT, you can choose one of the following:
- If SIZE/MAINSIZE=MAX is in effect, use the RESINV option.
- If SIZE/MAINSIZE=n is in effect, change your REGION so that REGION is greater than
SIZE/MAINSIZE (the difference is available).
- Have the OVERRGN value changed by your system programmer to less than your IEFUSI
value.
When SIZE/MAINSIZE is less than REGION, make sure the difference between SIZE/MAINSIZE and your
REGION specification value or default provides sufficient storage for system or user exit routine use.
Elapsed time is decreased when DFSORT can both read input while writing to SORTWKnn and write
| output while reading from SORTWKnn. If, for example, you have two channels, the best allocation of
| them is to have SORTIN, SORTOUT, and OUTFIL data sets on one and the SORTWKnn data sets on the
| other.
Storage requirements for different disk techniques can be estimated by using the guidelines found in
Appendix A, “Using Work Space” on page 447.
DFSORT temporary work data sets allocated to virtual devices (VIO) can provide reduced elapsed time at
the cost of increased CPU time for DFSORT applications. In general, this is not a good trade-off and VIO
should not be used for DFSORT work data sets unless:
The system supports VIO in expanded storage, and
Elapsed time is of primary concern.
If work data sets are allocated to VIO, the ICEMAC option VIO tells DFSORT how to handle to VIOs:
VIO=YES causes DFSORT to accept the use of VIOs for work data sets.
VIO=NO causes DFSORT to reallocate work data sets from virtual devices to real devices. Note that
in order for re-allocation to be successful, a real device with the same device type as the virtual device
must be available.
Re-allocation of VIO data sets (VIO=NO) is recommended over no re-allocation (VIO=YES). However, it is
better to avoid using VIO work data sets in the first place, since re-allocation wastes time and resources.
Increasing the number of work units, however, also reduces the block size used for intermediate storage;
this can become a critical factor if you have relatively little main storage available for buffers. For
example, if DFSORT has only 88K bytes in which to operate, you probably achieve no improvement (and
might find deterioration) if you use more than four tape work units. Therefore, apply the general rule of
using as many tapes as possible only when DFSORT has more than 100K bytes available.
For information on how to determine storage requirements when using different tape techniques, see
Appendix A, “Using Work Space” on page 447.
Notes:
1. The frequency with which the tape direction changes during DFSORT work file operations has more of
an impact on the effective data rate of IBM 3480/3490 Magnetic Tape Subsystems than on IBM 3420
Magnetic Tape Units. Because of this characteristic, performance comparisons between these tape
units for intermediate storage cannot be reliably predicted and can vary widely.
2. If the IBM 3480/3490 Magnetic Tape Subsystem with the Improved Data Recording Capability (IDRC)
feature or the IBM 3490 MTS is used as a work storage device, it is recommended that you do not
invoke the IDRC feature as it does not perform well with the read backward command.
Use Hipersorting
Hipersorting uses Hiperspace available with MVS/ESA. A Hiperspace is a high-performance data space
which resides in expanded storage, and is backed by auxiliary storage when necessary. With
Hipersorting, Hiperspace is used in place of and along with DASD for temporary storage of records during
a Blockset sort. Hipersorting reduces I/O processing which in turn reduces elapsed time, EXCPs, and
| channel usage. Hipersorting is recommended when the input or output is a compressed sequential or
| VSAM data set.
| You can control the maximum amount of Hiperspace for a Hipersorting application with the HIPRMAX
| parameter. HIPRMAX can direct DFSORT to dynamically determine the maximum amount of Hiperspace,
| subject to the available expanded storage at the start of the run. You can also use HIPRMAX to suppress
| Hipersorting when optimizing CPU time is your major concern because Hipersorting can slightly degrade
| CPU time.
| The actual amount of Hiperspace a Hipersorting application uses depends upon several factors. See the
| HIPRMAX description in “OPTION Control Statement” on page 111 for more details. Most important,
| throughout the run, DFSORT determines the amount of available expanded storage as well as the amount
| of expanded storage needed by other concurrent Hipersorting applications. Based on this information,
| DFSORT switches dynamically from using Hiperspace to using DASD work data sets when either an
| expanded storage shortage is predicted or the total Hipersorting activity on the system reaches the limits
| set by the DFSORT installation options EXPMAX, EXPOLD, and EXPRES. See Installation and
| Customization for a complete description of these installation options.
Dataspace sorting allows DFSORT to sort large pieces of data at a time. This helps to reduce CPU time
and elapsed time.
The maximum amount of data space used for dataspace sorting can be controlled with the DSPSIZE
option. DSPSIZE=MAX allows DFSORT to select the maximum data space to use. In this case, the
amount used would depend on the size of the file being sorted and, for MVS/ESA only, the paging activity
of your system. DSPSIZE=0 means that DFSORT will not use dataspace sorting.
| The following functions and types of data sets are not supported for dataspace sorting:
| VSAM, dummy, and spool SORTIN data sets
| User exits
| INREC, OUTFIL, OUTREC, and SUM
| EQUCOUNT
| Dataspace sorting is seldom used for very small data sets of a few megabytes or so because it is more
| efficient to sort small amounts of data entirely in main storage.
| In order for dataspace sorting to be used, you need sufficient available central storage, that is, central
| storage that is unused or not recently used, as reported by SRM at the start of the sort. Such storage is
| needed to back the corresponding data space required by DFSORT. The amount of data space required
| varies. Typically, it grows as the amount of data to sort increases, and, it shrinks as the amount of main
| storage specified increases.
| The following are actions you can take which might increase the use of dataspace sorting:
| Specify sufficient main storage. The default is 4MB, the recommended minimum for dataspace
| sorting. If you increase the amount of main storage specified, more dataspace sorting is possible,
| especially when sorting large amounts of data (multiple hundred megabytes). Specifying more than
| 12MB or so will have no significant impact on DFSORT's decision to use dataspace sorting; it will,
| however, improve the performance of large non-dataspace sort applications.
| Specify generous extent sizes for work data sets, especially for secondary extents. Dataspace sorting
| is frequently used in conjunction with DASD work space but never with Hiperspace or with tape work
| data sets.
| Specify DSPSIZE=MAX.
| Verify that IEFUSI does not place any restrictions on the size of the data spaces that a single address
| space can create.
| Verify that DFSORT can determine how much data is being sorted. DFSORT can easily estimate the
| size of DASD data sets. However, the size of tape data sets is more difficult to determine. In these
| cases, specify a FILSZ=Un estimate on the OPTION control statement, where n is the number of
| records to be sorted.
: ICEGENER can transfer control to IEBGENER due to DFSPARM or SORTCNTL statement errors or other
: errors detected by DFSORT. Therefore, we recommend that ICEGENER not be used for any application
: for which IEBGENER cannot be used, to avoid unwanted IEBGENER processing. For example, if
: ICEGENER is used with an INCLUDE statement in DFSPARM, IEBGENER could be used and complete
: successfully, but the INCLUDE statement would be ignored. Instead, DFSORT copy should be used
: directly so that IEBGENER cannot be called.
If your site has installed ICEGENER to be invoked by the name IEBGENER, you need not make any
| changes to your applications to use ICEGENER. If your site has not chosen automatic use of
ICEGENER, you can use ICEGENER by substituting the name ICEGENER for IEBGENER on the EXEC
| statement (when DFSORT is directly invoked) or LINK macro (when DFSORT is program-invoked) in any
| applications you choose. Program-invoked applications must be recompiled.
| Following is an example of how an IEBGENER application can be changed to use ICEGENER by substi-
tuting the name ICEGENER for the name IEBGENER in the EXEC statement.
//GENER JOB...
// EXEC PGM=ICEGENER
//SYSPRINT DD SYSOUT=\
//SYSUT1 DD DSN=CONTROL.MASTER,DISP=OLD,UNIT=338ð,VOL=SER=MASTER
//SYSUT2 DD DSN=CONTROL.BACKUP,DISP=OLD,UNIT=338ð,VOL=SER=BACKUP
//SYSIN DD DUMMY
The IEBGENER DD statements SYSUT1 (input), SYSUT2 (output), and SYSPRINT (messages) are used
by DFSORT for SORTIN, SORTOUT, and SYSOUT, respectively. These DD statement names will be
translated by using an extended parameter list to invoke the copy function. If DFSORT cannot be used
(for example, because IEBGENER control statements are specified), control will be transferred to
IEBGENER.
Notes:
| 1. The SYSUT2 data set should not be the same as the SYSUT1 data set because this could result in
| lost or incorrect data.
: 2. Whether ICEGENER is invoked from a program or not, DFSORT will be invoked from ICEGENER
: using an extended parameter list. Therefore, the ICEMAC INV and TSOINV options apply and
: SORTCNTL or DFSPARM can be used to provide additional control statements for the copy applica-
: tion; for example, OPTION. However, ICEGENER can transfer control to IEBGENER due to
: DFSPARM or SORTCNTL statement errors or other errors detected by DFSORT. Therefore,
: DFSORT copy should be used directly rather than ICEGENER if DFSORT processing statements such
: as INCLUDE, OUTREC, SUM and so on are required.
3. For most error conditions that prevent the use of DFSORT copy, control will be transferred to the
IEBGENER system utility (using its new name, if appropriate). DFSORT messages will not be printed
unless a SORTDIAG DD statement is supplied. Use of the SORTDIAG DD statement will allow you to
determine why DFSORT copy could not be used.
4. If DFSORT copy is used, its operation and messages will be equivalent to a directly called DFSORT
copy application. If an unrecoverable error is encountered (for example, an I/O error), DFSORT's
return code of 16 will be changed by ICEGENER to a return code of 12 to emulate the return code
from a failing IEBGENER application.
5. DFSORT copy can perform some functions not provided by IEBGENER, such as certain padding and
truncation operations. ICEGENER processing is not identical to IEBGENER processing in all cases,
since DFSORT copy uses methods to enhance performance (EXCP, for example) that are not used by
IEBGENER.
6. In some cases, IEBGENER terminates when the SYSUT2 LRECL is different from the SYSUT1
LRECL. ICEGENER takes one of three actions depending on ICEMAC option GNPAD (LRECL
padding) or GNTRUNC (LRECL truncation), as appropriate.
If you want ICEGENER to transfer control to IEBGENER when the SYSUT2 LRECL is larger than the
SYSUT1 LRECL, use ICEMAC option GNPAD=IEB. If you want ICEGENER to handle LRECL
padding, use GNPAD=RC0 (the supplied default) or GNPAD=RC4.
If you want ICEGENER to transfer control to IEBGENER when the SYSUT2 LRECL is smaller than
the SYSUT1 LRECL, use ICEMAC option GNTRUNC=IEB. If you want ICEGENER to handle LRECL
truncation, use GNTRUNC=RC0 (the supplied default) or GNTRUNC=RC4.
If ICEGENER transfers control to IEBGENER, IEBGENER passes back its return code to the operating
system or the invoking program.
| The meanings of the return codes that ICEGENER passes back (in register 15) are:
0 Successful completion. ICEGENER completed successfully.
4 Successful completion. ICEGENER completed successfully, and:
ICEMAC option GNPAD=RC4 was specified and the SYSUT2 LRECL was larger than the
SYSUT1 LRECL (LRECL padding) or
ICEMAC option GNTRUNC=RC4 was specifed and the SYSUT2 LRECL was smaller than the
SYSUT1 LRECL (LRECL truncation).
12 Unsuccessful completion. DFSORT detected an error that prevented ICEGENER from completing
successfully.
| 24 Unsupported operating system. This operating system is not supported by this release of
| ICEGENER. Only current or subsequent releases of the following systems are supported:
| MVS/XA
| MVS/ESA
Summary of Examples
The table below summarizes the examples provided in this chapter.
Sort Examples
Example 1. Sort with ALTSEQ
Line Explanation
01 JOB statement. Introduces this job to the operating system.
02 EXEC statement. Calls DFSORT directly by its alias SORT.
03 SYSOUT DD statement. Directs DFSORT messages and control statements to system output
class A.
04 SORTIN DD statement. The input data set is named A123456.IN5 and is cataloged. DFSORT
determines from the data set label that the RECFM is VB, the maximum LRECL is 120, and the
BLKSIZE is 2200.
05 SORTOUT DD statement. The output data set is named OUT1 and is to be allocated on 3490
volume VOL001 and kept. DFSORT sets the RECFM and LRECL from SORTIN and selects an
appropriate BLKSIZE for this standard labeled tape.
06 SORTWK01 DD statement. The first work data set is allocated on 3390.
07 SORTWK02 DD statement. The second work data set is allocated on 3390.
08 SYSIN DD statement. DFSORT control statements follow.
09 Comment statement. Printed but otherwise ignored.
10 SORT statement. FIELDS specifies an ascending 5-byte character control field starting at position
7 (the third data byte, since the RDW occupies the first 4 bytes). The control field is to be collated
according to the modified sequence described in the ALTSEQ statement.
11 ALTSEQ statement. CODE specifies that the three characters $, # and @ are to collate in that
order after Z.
Line Explanation
01 JOB statement. Introduces this job to the operating system.
02 EXEC statement. Calls DFSORT directly by its alias SORT.
03 SYSOUT DD statement. Directs DFSORT messages and control statements to system output
class H.
04-05 SORTIN DD statement. Consists of a concatenation of two data sets. The first input data set is
named INP1 and resides on 3380 volume SCR001. The second input data set is named INP2
and resides on 3390 volume SYS351. DFSORT determines from the data set labels that the
record format is FB, the LRECL is 80 and the largest BLKSIZE is 27920.
06-07 SORTOUT DD statement. The output data set is temporary and is to be allocated on a 3390.
Since the OUTREC statement results in a reformatted output record length of 22 bytes, LRECL=22
must be specified. DFSORT sets the RECFM from SORTIN and selects an appropriate BLKSIZE.
08 SYSIN DD statement. DFSORT control statements follow.
09 OMIT statement. COND specifies that input records with a character M in position 5 are to be
omitted from the output data set.
10 SORT statement. FIELDS specifies an ascending 8-byte character control field starting at position
20 and a descending 3-byte fixed-point control field starting at position 10.
11 SUM statement. FIELDS specifies a 4-byte zoned-decimal summary field starting at position 16.
Whenever two records with the same control fields (specified in the SORT statement) are found,
their summary fields (specified in the SUM statement) are to be added and placed in one of the
records, and the other record is to be deleted.
12 OPTION statement. DYNALLOC specifies that work data sets are to be dynamically allocated
using the installation defaults for the type of device and number of devices. ZDPRINT specifies
that positive ZD SUM fields are to be printable.
13 OUTREC statement. FIELDS specifies how the records are to be reformatted for output. The
reformatted records are 22 bytes long and look as follows:
Position Content
1-3 Input positions 10 through 12
4-11 Input positions 20 through 27
12-15 Input positions 16 through 19
16-17 Zeros
18 Input position 5
19-22 The character string ' SUM'
Line Explanation
01 JOB statement. Introduces this job to the operating system.
02 EXEC statement. Uses the SORTD cataloged procedure to call DFSORT directly.
03-05 SORTIN DD statement. The input data set is named SRTFIL and resides on 3400 volume
311500. It is to be deleted after this job step. It was written with a density of 6250 bpi and has a
RECFM of D (variable-length ISCII/ASCII records), a maximum LRECL of 400, a BLKSIZE of 404
and an ISCII/ASCII label. For this job, the buffer offset is the block length indicator. The records
are to be translated from ISCII/ASCII to EBCDIC.
06-07 SORTOUT DD statement. The output data set is named OUTFIL and is to be allocated on 3400
volume 311501 and kept. It is to be written with a density of 6250 bpi and an ISCII/ASCII label.
DFSORT sets the RECFM and LRECL from SORTIN and sets the BLKSIZE to 404 as indicated in
the DD statement. For this job, the buffer offset is the block length indicator. The records are to
be translated from EBCDIC to ISCII/ASCII.
08 SORTWK01 DD statement. The work data set is allocated on SYSDA.
09 SYSIN DD statement. DFSORT control statements follow.
10 SORT statement. FIELDS specifies a descending 8-byte ISCII/ASCII control field starting at posi-
tion 10.
11 RECORD statement. TYPE specifies ISCII/ASCII variable-length records. LENGTH specifies that
the minimum record length is 20 and the average record length is 80.
Line Explanation
01 JOB statement. Introduces this job to the operating system.
02 EXEC statement. Calls DFSORT directly.
03 SYSOUT DD statement. Directs DFSORT messages and control statements to system output
class A.
04-05 SORTIN DD statement. The input data set is named INPUT and resides on 3490 volume FLY123.
DFSORT determines from the data set label of this standard labeled tape that the RECFM is V,
the LRECL is 120 and the BLKSIZE is 124.
06-07 SORTOUT DD statement. The output data set is temporary and is to be allocated on SYSDA.
Since the input is unblocked and the output is to be blocked, RECFM=VB must be specified.
DFSORT sets the LRECL from SORTIN and selects an appropriate BLKSIZE.
08-09 MODLIB DD statement. Specifies the load libraries that contain the exit routines. When exit rou-
tines reside in more than one library, the libraries must be concatenated using a single DD state-
ment.
10 SYSIN DD statement. DFSORT control statements follow.
11 SORT statement. FIELDS specifies an ascending 4-byte packed-decimal control field starting at
position 23 and an ascending 6-byte floating-sign control field starting at position 10.
12 OPTION statement. DYNALLOC=(3390,3) specifies that three 3390 work data sets are to be allo-
cated. AVGRLEN=75 specifies an average record length of 75. AVGRLEN helps DFSORT opti-
mize work space for variable-length record input. FILSZ=E50000 specifies an estimate of 50000
records. Since the 3490 input data set is compacted, DFSORT might not be able to determine the
file size accurately; specifying FILSZ can make a significant difference in work space optimization
for compacted tape input.
13 MODS statement. E15 specifies a user exit routine named MODREC. Approximately 1024 bytes
are required for MODREC and the system services (for example, GETMAIN and OPEN) it per-
forms. E35 specifies a user exit routine named ADDREC. Approximately 1200 bytes are required
for ADDREC and the system services it performs. MODREC and ADDREC reside in the libraries
defined by the MODLIB DD statement.
Line Explanation
01 JOB statement. Introduces this job to the operating system.
02 EXEC statement. Calls a program named MYPGM that in turn calls DFSORT.
03 STEPLIB DD statement. Specifies the load library that contains MYPGM.
04 SYSOUT DD statement. Directs DFSORT messages and control statements to system output
class A.
05 SYSPRINT DD statement. Directs MYPGM output to system output class A.
06 SORTIN DD statement. The input data set is member MASTER in the cataloged partitioned data
set M999999.INPUT. DFSORT determines the RECFM, LRECL and BLKSIZE from the data set
label.
07 SORTOUT DD statement. The output data set is named M999999.OUTPUT.FILE and is cata-
loged. DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
08 SORTCNTL DD statement. DFSORT control statements follow. Statements in SORTCNTL over-
ride or supplement statements passed by MYPGM in the DFSORT parameter list it uses.
09 OPTION statement. CHALT specifies that character format control fields (specified in the SORT
statement passed by MYPGM) are to be sorted using the installation default ALTSEQ table.
DYNALLOC=(,3) specifies that three work data sets are to be dynamically allocated using the
installation default for the type of device. FILSZ=U25000 specifies a file size of 25000 records is
to be used by DFSORT to determine the amount of work space needed. Since the input data set
is a member of a PDS, specifying FILSZ helps DFSORT optimize work data set space.
For purposes of illustration, assume that none of the standard installation defaults for batch direct invoca-
tion of DFSORT have been changed by the site.
Line Explanation
01 JOB statement. Introduces this job to the operating system.
02 EXEC statement. Calls DFSORT directly by its alias SORT.
03 SYSOUT DD statement. Directs DFSORT messages and control statements to system output
class A.
04 SORTIN DD statement. The input data set is TEST.SORTIN.FILE. DFSORT determines that it is
a VSAM data set and obtains its attributes from the catalog.
05 SORTOUT DD statement. The output data set is TEST.SORTOUT.FILE. DFSORT determines
that it is a VSAM data set and obtains its attributes from the catalog.
06 DFSPARM DD statement. DFSORT control statements follow. DFSPARM can be used for both
direct-invocation and program-invocation of DFSORT and overrides options and statements from
all other sources. Certain operands, such as MSGPRT and LIST/NOLIST, are used if supplied in
DFSPARM, the EXEC PARM or the invocation parameter list, but not used if supplied in SYSIN or
SORTCNTL.
07 RECORD statement. TYPE=V specifies that DFSORT is to treat the VSAM records as variable-
length. TYPE is required since DFSORT cannot determine from the catalog whether to treat the
VSAM records as fixed-length (TYPE=F) or variable-length (TYPE=V).
08 SORT statement. FIELDS specifies an ascending 4-byte binary control field starting at position 30.
This position corresponds to a specification of KEYS(4 25) for the VSAM CLUSTER (4 bytes at
offset 25, which is equivalent to position 26 with 4 bytes added for the RDW that DFSORT sup-
plies at input and removes at output for VSAM TYPE=V records).
09-10 OPTION statement. HIPRMAX=10 specifies that up to 10 megabytes of Hiperspace can be com-
mitted for Hipersorting, overriding the standard installation default of HIPRMAX=OPTIMAL.
DYNALLOC specifies that work data sets are to be dynamically allocated using the standard instal-
lation default device (SYSDA) and number of work data sets (2). MAINSIZE=3M specifies that up
to 3 megabytes of storage can be used, overriding the standard installation default of
MAINSIZE=MAX. MSGPRT=CRITICAL specifies that only error messages are to be printed, over-
riding the standard installation default of MSGPRT=ALL. NOLIST specifies that control statements
are not to be printed, overriding the standard installation default of LIST=YES.
Example 7. Sort with COBOL E15, EXEC PARM, COBEXIT and MSGDDN
Line Explanation
01 JOB statement. Introduces this job to the operating system.
02 EXEC statement. Calls DFSORT directly by its alias name SORT. MSGDDN=DFSOUT specifies
an alternate message data set for DFSORT messages and control statements to prevent the
COBOL messages in SYSOUT from being interleaved with the DFSORT messages and control
statements.
03 STEPLIB statement. Specifies the VS COBOL II library.
04 SYSOUT statement. Directs COBOL messages to system output class A.
05 DFSOUT statement. Directs DFSORT messages and control statements to system output class A
(this is the alternate message data set specified by MSGDDN in the PARM field of the EXEC
statement).
06 EXITC statement. Specifies the load library that contains the exit routine.
07 SORTIN DD statement. The input data set is named SORT1.IN and is cataloged. DFSORT
determines from the data set label that the RECFM is F, the LRECL is 100 and the BLKSIZE is
100.
08-09 SORTOUT DD statement. The output data set is temporary and is to be allocated on SYSDA.
Since the E15 exit changes the length of the records from 100 bytes to 120 bytes, LRECL=120
must be specified. DFSORT sets the RECFM from SORTIN and sets the BLKSIZE to the LRECL
(unblocked records).
10 SYSIN DD statement. DFSORT control statements follow.
11 SORT statement. FIELDS specifies an ascending 4-byte control field starting at position 5 and an
ascending 2-byte control field starting at position 22. FORMAT specifies that the control fields are
binary.
12 MODS statement. E15 specifies a user exit routine named COBOLE15 written in COBOL.
Approximately 37000 bytes are required for the exit, the system services (for example, GETMAIN
and OPEN) it performs, and the COBOL library subroutines. COBOLE15 resides in the library
defined by the EXITC DD statement.
13 RECORD statement. LENGTH specifies that the COBOL E15 routine changes the length of the
records to 120 bytes.
14 OPTION statement. COBEXIT=COB2 specifies that the COBOL E15 routine is to be run with the
VS COBOL II library.
Line Explanation
01 JOB statement. Introduces this job to the operating system.
02 EXEC statement. Uses the SORT cataloged procedure to call DFSORT directly and supply the
DD statements (not shown) required by the linkage editor.
03 SORTIN DD statement. The input data set is named SMITH.INPUT and is cataloged. DFSORT
determines the RECFM, LRECL and BLKSIZE from the data set label.
04-05 SORTOUT DD statement. The output data set is named SMITH.OUTPUT and is to be allocated
on 3380 volume XYZ003 and cataloged. DFSORT sets the RECFM and LRECL from SORTIN
and selects an appropriate BLKSIZE.
06 SORTWK01 DD statement. The work data set is allocated on SYSDA.
07 EXIT DD statement. Specifies the partitioned data set containing the object decks for the E11,
E18, E31, E35 and E38 exit routines.
08 EXIT2 DD statement. Specifies the partitioned data set containing the object deck for the E17 exit
routine.
09 SORTMODS DD statement. The partitioned data set to hold exit routine object decks from SYSIN
for input to the linkage editor is to be allocated on SYSDA.
10 SYSIN DD statement. DFSORT control statements, and object decks to be used by the linkage
editor, follow.
11 SORT statement. FIELDS specifies an ascending 8-byte character control field starting at position
1 and a descending 4-byte binary control field starting at position 20.
12-20 MODS statement. Specifies the exit routines to be used, the approximate number of bytes
required for each exit and that:
The EXIT11 routine in the EXIT library is to be link-edited separately from other input phase
exit routines and associated with user exit E11.
The E15 and E19 routines in SYSIN, the EXIT17 routine in EXIT2, and the EXIT18 routine in
EXIT are to be link-edited together and associated with user exits E15, E19, E17, and E18,
respectively.
The E31, E35, and E38 routines in the PH3EXIT object deck and the E39 routine in SYSIN
are to be link-edited together and associated with user exits E31, E35, E38, and E39, respec-
tively.
21 END statement. Marks the end of the DFSORT control statements and the beginning of the exit
routine object decks.
22 Object decks. The three object decks for the E15, E19, and E39 exit routines follow the END
statement.
-----------------------------------------------------------------------
MYSORT CSECT 11
.
.
.
LA R1,PL1 SET ADDRESS OF PARAMETER LIST 12
\ TO BE PASSED TO DFSORT 13
ST R2,PL4 SET ADDRESS OF GETMAINED AREA 14
\ TO BE PASSED TO E15 15
LINK EP=SORT INVOKE DFSORT 16
.
.
.
PL1 DC A(CTLST) ADDRESS OF CONTROL STATEMENTS 17
PL2 DC A(E15) ADDRESS OF E15 ROUTINE 18
PL3 DC A(ð) NO E35 ROUTINE 19
PL4 DS A USER EXIT ADDRESS CONSTANT 2ð
PL5 DC F'-1' INDICATE END OF LIST 21
CTLST DS ðH CONTROL STATEMENTS AREA 22
DC AL2(CTL2-CTL1) LENGTH OF CHARACTER STRING 23
CTL1 DC C' SORT FIELDS=(5,8,CSF,A)' 24
DC C' RECORD TYPE=F,LENGTH=8ð ' 25
DC C' OPTION FILSZ=E25ððð,DYNALLOC,' 26
DC C'RESINV=8ððð ' 27
DC C' OMIT FORMAT=CSF,COND=(5,8,EQ,13,8) ' 28
CTL2 EQU \ 29
OUT DCB DDNAME=MSGOUT,... 3ð
E15 DS ðH E15 ROUTINE 31
.
.
.
L R2,4(,R1) GET ADDRESS OF GETMAINED AREA 32
.
.
.
BR R14 RETURN TO DFSORT 33
.
.
.
The JCL for running program MYSORT, and highlights of the code used by MYSORT to invoke DFSORT
with the extended parameter list, are shown below. For purposes of illustration, assume that none of the
standard installation defaults for batch program invocation of DFSORT have been changed by the site.
Line Explanation
01 JOB statement. Introduces this job to the operating system.
02 EXEC statement. Calls a program named MYSORT that in turn calls DFSORT.
03 SYSOUT DD statement. Directs DFSORT messages and control statements to SYSOUT class C.
04 MSGOUT DD statement. Directs MYSORT messages to SYSOUT class C.
05 STEPLIB DD statement. Specifies the load library that contains MYSORT.
06-07 SORTOUT DD statement. The output data set is temporary and is to be allocated on SYSDA.
Since SORTIN is not used, DFSORT sets the RECFM and LRECL from the RECORD statement
and sets the BLKSIZE to the LRECL (unblocked records).
08 SORTCNTL DD statement. DFSORT control statements follow. Statements in SORTCNTL over-
ride or supplement statements passed by MYSORT in the extended parameter list it uses.
09 Comment statement. Printed but otherwise ignored.
10 OPTION statement. FILSZ=E30000 specifies an estimate of 30000 records, overriding
FILSZ=E25000 in the OPTION statement of the extended parameter list. Since the E15 routine
supplies all of the input records, DFSORT will not be able to determine the file size accurately;
therefore, specifying FILSZ can make a significant difference in work space optimization when an
E15 routine supplies all of the input records. It's important to change the FILSZ value whenever
the number of input records increases significantly.
11 This is the start of program MYSORT. Assume that it GETMAINs a work area, saves its address
in register 2, and initializes it with information to be used by the E15 routine.
12-13 MYSORT places the address of the extended parameter list to be passed to DFSORT in register
1.
14-15 MYSORT places the address of the GETMAINed work area in the user exit address constant field
in the extended parameter list. DFSORT will pass this address to the E15 routine (in the second
word of the E15 parameter list) when it is entered.
16 MYSORT calls DFSORT by it's alias SORT.
17-21 The extended parameter list specifies: the address of the control statements area, the address of
the E15 routine, that no E35 routine is present, and the address of the GETMAINed work area.
F'-1' indicates the end of the extended parameter list. Subsequent parameter list fields, such as
the address of an ALTSEQ table, are not used in this application.
Since the address of the E15 routine is passed in the parameter list, SORTIN cannot be used; if a
SORTIN DD statement were present, it would be ignored.
22-23 This is the start of the control statements area. The total length of the control statements is speci-
fied.
24 SORT statement. FIELDS specifies an ascending 8-byte floating-sign control field starting at posi-
tion 5.
25 RECORD statement. TYPE specifies that the record format is F. LENGTH specifies that the input
record length is 80 bytes. TYPE and LENGTH are required when SORTIN is not present or is not
used.
26-27 OPTION statement. FILSZ=E25000 specifies an estimate of 25000 records, which is overridden
by FILSZ=E30000 in SORTCNTL's OPTION statement. DYNALLOC specifies that work data sets
are to be dynamically allocated using the installation defaults for the type of device and number of
devices. RESINV=8000 specifies that approximately 8000 bytes are required for the system ser-
vices (for example, GETMAIN and OPEN) that MYSORT's E15 exit routine performs.
28 OMIT statement. FORMAT specifies that the compare fields are floating-sign. COND specifies
that input records with equal 8-byte floating-sign compare fields starting in position 5 (also the
control field) and position 13 are to be omitted from the output data set.
29 This is the end of the control statements area.
30 This is the DCB for MYSORT's MSGOUT output.
31-33 This is MYSORT's E15 routine. The E15 routine loads the address of the GETMAINed work area
from the second word of the E15 parameter list. The E15 routine must supply each input record
by placing its address in register 1 and placing a 12 (insert) in register 15. When all the records
have been passed, the E15 routine must place an 8 (“do not return”) in register 15.
| OUTFIL FNAMES=(ALLGPS,ALLBU) 12
| OUTFIL FNAMES=G1STATS, 13
| INCLUDE=(1,3,CH,EQ,C'Gð1'), 14
| HEADER2=(1:'GROUP 1 STATUS REPORT FOR ',&DATE, 15
| ' - PAGE ',&PAGE,2/, 16
| 6:'ITEM ',16:'STATUS ',31:'PARTS',/, 17
| 6:'-----',16:'------------',31:'-----'), 18
| OUTREC=(6:6,5, 19
| 16:14,1,CHANGE=(12, 2ð
| C'1',C'SHIP', 21
| C'2',C'HOLD', 22
| C'3',C'TRANSFER'), 23
| NOMATCH=(C'\CHECK CODE\'), 24
| 31:39,1,BI,M1ð,LENGTH=5, 25
| 12ð:X) 26
| OUTFIL FNAMES=G2STATS, 27
| INCLUDE=(1,3,CH,EQ,C'Gð2'), 28
| HEADER2=(1:'GROUP 2 STATUS REPORT FOR ',&DATE, 29
| ' - PAGE ',&PAGE,2/, 3ð
| 6:'ITEM ',16:'STATUS ',31:'PARTS',/, 31
| 6:'-----',16:'------------',31:'-----'), 32
| OUTREC=(6:6,5, 33
| 16:14,1,CHANGE=(12, 34
| C'1',C'SHIP', 35
| C'2',C'HOLD', 36
| C'3',C'TRANSFER'), 37
| NOMATCH=(C'\CHECK CODE\'), 38
| 31:39,1,BI,M1ð,LENGTH=5, 39
| 12ð:X) 4ð
| Line Explanation
| 01 JOB statement. Introduces this job to the operating system.
| 02 EXEC statement. Calls DFSORT directly by its alias name SORT.
| 03 SYSOUT DD statement. Directs DFSORT messages and control statements to sysout class A.
| 04 SORTIN DD statement. The input data set is named GRP.RECORDS and is cataloged. DFSORT
| determines from the data set label that the RECFM is FB, the LRECL is 80 and the BLKSIZE is
| 23440.
| 05 ALLGPS DD statement. The first OUTFIL output data set is named GRP.ALLGRPS and is cata-
| logued. DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
| 06-07 ALLBU DD statement. The second OUTFIL output data set is named GRP.BU and is to be allo-
| cated on a 3390 and catalogued. DFSORT sets the RECFM and LRECL from SORTIN and
| selects an appropriate BLKSIZE.
| 08 G1STATS DD statement. The third OUTFIL output data set is directed to sysout class A. Since
| this is an OUTFIL report data set, DFSORT sets the RECFM to FBA (FB from SORTIN and A for
| ASA control characters) and the LRECL to 121 (1 byte for the ASA control character and 120
| bytes for the data). DFSORT sets an appropriate BLKSIZE.
| 09 G2STATS DD statement. The fourth OUTFIL output data set is directed to sysout class A. Since
| this is an OUTFIL report data set, DFSORT sets the RECFM to FBA (FB from SORTIN and A for
| ASA control characters) and the LRECL to 121 (1 byte for the ASA control character and 120
| bytes for the data). DFSORT sets an appropriate BLKSIZE.
| 10 SYSIN DD statement. DFSORT control statements follow.
| 11 SORT statement. FIELDS specifies an ascending 5-byte character control field starting at position
| 6.
| 12 OUTFIL statement. The sorted input records are written to the ALLGPS and ALLBU data sets.
| 13-26 OUTFIL statement. The subset of sorted input records containing 'G01' in positions 1 through 3
| are used to produce a report which is written to the G1STATS data set.
| 27-40 OUTFIL statement. The subset of sorted input records containing 'G02' in positions 1 through 3
| are used to produce a report which is written to the G2STATS data set.
| Line Explanation
| 01 Job statement. Introduces this job to the operating system.
| 02 EXEC statement. Calls DFSORT directly.
| 03 SYSOUT DD statement. Directs DFSORT messages and control statements to system output
| class H.
| 04-05 SORTIN DD statement. The SUBSYS=PIPE parameter directs the allocation to the 'PIPE'
| BatchPipes/MVS subsystem for the pipe named INPUT.PIPE. The DCB statement describes the
| data set characteristics to subsystem PIPE.
| 06-07 OUT1 DD statement. The SUBSYS=PIPE parameter directs the allocation to the 'PIPE'
| BatchPipes/MVS subsystem for the pipe named OUTPUT.PIPE1. The DCB statement describes
| the data set characteristics to subsystem PIPE.
| 08-09 OUT2 DD statement. The SUBSYS=PIPE parameter directs the allocation to the 'PIPE'
| BatchPipes/MVS subsystem for the pipe named OUTPUT.PIPE2. The DCB statement describes
| the data set characteristics to subsystem PIPE.
| 10 SYSIN DD statement. DFSORT control statements follow.
| 11 OPTION statement. DYNALLOC specifies that work data sets are to be dynamically allocated
| using the installation defaults for type of device and number of devices. FILSZ=U1000000 speci-
| fies an estimate of one million input records.
| 12 SORT statement. FIELDS specifies an ascending 20-byte character control field starting at posi-
| tion 1 and an ascending 4 byte binary control field starting at position 25.
| 13 OUTFIL statement. The records from the SORTIN pipe are sorted and written alternatively to the
| OUT1 and OUT2 pipes (that is, the sorted records are split evenly between the two output pipes).
| Line Explanation
| 01 JOB statement. Introduces this job to the operating system.
| 02 EXEC statement. Calls DFSORT directly by its alias name SORT. LOCALE specified in EXEC
| PARM overrides installation default for LOCALE. The locale for the French language and the cul-
| tural conventions of Canada will be active.
| 03 STEPLIB DD statement. Specifies the load library that contains AD/Cycle LE/370 dynamically
| loadable routines and locales.
| 04 SYSOUT statement. Directs DFSORT messages and control statements to sysout class A.
| 05 SORTIN DD statement. The input data set is named INPUT.FRENCH.CANADA and is cataloged.
| DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
| 06 SORTOUT DD statement. The output data set is named OUTPUT.FRENCH.CANADA and is cat-
| aloged. DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
| 07 SYSIN DD statement. DFSORT control statements follow.
| 08 SORT statement. FIELDS specifies an ascending 20-byte character control field starting at position
| 1, a one-byte descending binary control field starting at position 25, and a 10-byte ascending char-
| acter control field starting at position 30. The character (CH) control fields will be sorted according
| to the collating rules defined in locale FR_CA.
| 09 INCLUDE statement. COND specifies that only input records with equal 6-byte character compare
| fields starting in position 40 and position 50 are to be included in the output data set. The char-
| acter (CH) compare fields will be compared according to the collating rules defined in locale
| FR_CA.
| 10 OPTION statement. DYNALLOC specifies that work data sets are to be dynamically allocated
| using the installation defaults for the type of device and number of devices.
Merge Examples
| Example 13. Merge with EQUALS
Line Explanation
01 JOB statement. Introduces this job to the operating system.
02 EXEC statement. Calls DFSORT directly by its alias SORT.
03 SYSOUT DD statement. Directs DFSORT messages and control statements to sysout class A.
04 SORTIN01 DD statement. The first input data set is named M1234.INPUT1 and is cataloged.
DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
05 SORTIN02 DD statement. The second input data set is named M1234.INPUT2 and is cataloged.
DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
06 SORTIN03 DD statement. The third input data set is named M1234.INPUT3 and is cataloged.
DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
07-08 SORTOUT DD statement. The output data set is named M1234.MERGOUT and is to be allocated
on 3390 and kept. DFSORT sets the RECFM and LRECL from the SORTINnn data sets and
selects an appropriate BLKSIZE.
09 SYSIN DD statement. DFSORT control statements follow.
10 MERGE statement. FIELDS specifies an ascending 8-byte character control field starting at posi-
tion 1 and an ascending 4-byte packed-decimal field starting at position 20. The records in each
input data set must already be in the order specified.
25 OPTION statement. EQUALS specifies that the order of output records with equal control fields is
to be based on the file number of the input data sets and the original order of the records within
each input data set.
| Line Explanation
| 01 JOB statement. Introduces this job to the operating system.
| 02 EXEC statement. Calls DFSORT directly by its alias name SORT.
| 03 STEPLIB DD statement. Specifies the load library that contains AD/Cycle LE/370 dynamically
| loadable routines and locales.
| 04 SYSOUT statement. Directs DFSORT messages and control statements to sysout class A.
| 05 SORTIN01 DD statement. The first input data set is named INPUT01.GERMAN.GERMANY and is
| cataloged. DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
| 06 SORTIN02 DD statement. The second input data set is named INPUT02.GERMAN.GERMANY
| and is cataloged. DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
| 07 SORTIN03 DD statement. The third input data set is named INPUT03.GERMAN.GERMANY and
| is cataloged. DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
| 08 GP1 DD statement. The first OUTFIL output data set is named OUTPUT.GERMAN.GP1 and is
| cataloged. DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
| 09 GP2 DD statement. The second OUTFIL output data set is named OUTPUT.GERMAN.GP2 and
| is cataloged. DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
| 10 GP3 DD statement. The third OUTFIL output data set is named OUTPUT.GERMAN.GP3 and is
| cataloged. DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
| 11 DFSPARM DD statement. DFSORT control statements follow.
| 12 LOCALE parameter. Overrides installation default for LOCALE. The locale for the German lan-
| guage and the cultural conventions of Germany based on the IBM-1047 encoded character set will
| be active.
| 13 MERGE statement. FIELDS specifies an ascending 5-byte character control field starting at posi-
| tion 25, and a descending 4-byte packed decimal control field starting at position 40. The character
| (CH) control field will be merged according to the collating rules defined in locale
| De_DE.IBM-1047. The records in each input data set must already be in the order specified.
| 14-15 OUTFIL statement. The subset of records with character values less than or equal to 'Ö' in posi-
| tion 23 are written to the GP1 output data set. The character (CH) compare field and character
| constant will be compared according to the collating rules defined in locale De_DE.IBM-1047.
| 16-18 OUTFIL statement. The subset of records with character values greater than 'Ö' but less than 'Ü'
| in position 23 are written to the GP2 output data set. The character (CH) compare fields and char-
| acter constants will be compared according to the collating rules defined in locale
| De_DE.IBM-1047.
| 19 OUTFIL statement. Any records not written to the GP1 or GP2 output data sets are written to the
| GP3 output data set.
Copy Examples
| Example 15. Copy with EXEC PARMs, SKIPREC, MSGPRT and ABEND
Line Explanation
01 JOB statement. Introduces this job to the operating system.
02-03 EXEC statement. Calls DFSORT directly by its alias SORT. SKIPREC=500 specifies that the first
500 input records are not to be included in the output data set. MSGPRT=CRITICAL specifies that
error messages, but not informational messages, are to be printed. ABEND specifies that
DFSORT is to terminate with a user ABEND if it issues an error message.
04 SYSOUT DD statement. Directs DFSORT messages and control statements to sysout class A.
05-07 SORTIN DD statement. The input data set is named FLY.RECORDS and resides on 3490
volumes 000333 and 000343. The UNIT parameter requests two tape drives, one for each volume
of the data set. Because the tape is unlabeled, DCB parameters must be supplied to indicate that
the RECFM is FB, the LRECL is 12000 and the BLKSIZE is 24000.
08 SORTOUT DD statement. The output data set is named FLY.RECORDS.COPY and is cataloged.
DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
| 09 SYSIN DD statement. DFSORT control statements follow.
| 10 SORT statement. FIELDS=COPY specifies a copy application.
Line Explanation
01 JOB statement. Introduces this job to the operating system.
02 EXEC statement. Calls DFSORT directly by its alias SORT.
03 SYSOUT DD statement. Directs DFSORT messages and control statements to sysout class A.
04 SORTIN DD statement. The input data set is named SMF.DATA and is cataloged. DFSORT
determines from the data set label that the RECFM is VBS, the LRECL is 32760 and the BLKSIZE
is 23476.
05-06 SORTOUT DD statement. The output data set is named SMF.VIOL and is to be allocated on
SYSDA and kept. DFSORT sets the RECFM and LRECL from SORTIN and selects an appro-
priate BLKSIZE.
07 SYSIN DD statement. DFSORT control statements follow.
08 INCLUDE statement. COND specifies that only input records with decimal 80 in the 1-byte fixed-
point field at position 6 and bit 0 on in the 1-byte binary field at position 19 are to be included in
the output data set.
09 OPTION statement. COPY specifies a copy application. VLSHRT specifies that records which are
too short to contain all of the INCLUDE compare fields are not to be included in the output data
set.
ICEGENER Example
| Example 17. ICEGENER
This example shows how to use the ICEGENER facility for an IEBGENER job if your site has not installed
ICEGENER as an automatic replacement for IEBGENER. The ICEGENER facility selects the more effi-
cient DFSORT copy function for this IEBGENER job.
Line Explanation
01 JOB statement. Introduces this job to the operating system.
02 EXEC statement. Calls the ICEGENER facility. PGM=IEBGENER has been replaced by
PGM=ICEGENER.
03-06 No other changes to the IEBGENER job are required.
ICETOOL Example
| Example 18. ICETOOL with Various Operators
//CJ82CNTL DD \ 37
\ Select J82 employees, reformat fields, and insert text 38
INCLUDE COND=(45,3,CH,EQ,C'J82') 39
OUTREC FIELDS=(21,1ð,X,1,15,C'is in department J82',34X) 4ð
//IN1 DD DSN=FLY.INPUT1,DISP=SHR 41
//OUTJ69D DD DSN=&&OUTJ69D,DISP=(,PASS),SPACE=(TRK,(1ð,1ð)), 42
// UNIT=SYSDA 43
//OUTJ82D DD DSN=&&OUTJ82D,DISP=(,PASS),SPACE=(TRK,(1ð,1ð)), 44
// UNIT=SYSDA 45
//CONCAT DD DSN=\.OUTJ69D,VOL=REF=\.OUTJ69D,DISP=(OLD,PASS) 46
// DD DSN=\.OUTJ82D,VOL=REF=\.OUTJ82D,DISP=(OLD,PASS) 47
//ABCDCNTL DD \ 48
\ Sort by last name, first name 49
SORT FIELDS=(12,15,CH,A,1,1ð,CH,A) 5ð
| //DEPTSD DD DSN=FLY.OUTPUT1,DISP=SHR 51
//DEPTSP DD SYSOUT=A 52
//IN2 DD DSN=FLY.INPUT2,DISP=SHR 53
//OUT4 DD DSN=FLY.OUTPUT2,DISP=OLD 54
//CTL1CNTL DD \ 55
\ Sort and produce totals in one record for each unique key 56
SORT FIELDS=(5,1ð,CH,A) 57
SUM FIELDS=(22,6,PD,3ð,3,ZD) 58
//LIST1 DD SYSOUT=A 59
This example shows how ICETOOL can be used to perform multiple operations in a single step.
Line Explanation
01 JOB statement. Introduces this job to the operating system.
02 EXEC statement. Calls ICETOOL specifying the recommended REGION of 1024K.
03 TOOLMSG DD statement. Directs ICETOOL messages and statements to system output class
A.
04 DFSMSG DD statement. Directs DFSORT messages and control statements to SYSOUT class
A.
05 TOOLIN DD statement. ICETOOL statements follow. The MODE for the ICETOOL run is ini-
tially set to STOP. If an error is detected for an operator, SCAN mode will be entered.
06 Comment statement. Printed but otherwise ignored.
07-10 OCCUR operator. Prints, in the LT5 data set, a report detailing each value for the specified
field in the IN1 data set and the number of times that value occurs.
11 Comment statement.
12 COPY operator. Records from the IN1 data set are copied to the OUTJ69D data set using the
DFSORT control statements in the CJ69CNTL data set. As a result, &&OUTJ69D contains a
reformatted subset of the records from FLY.INPUT1 (those records containing 'J69' in the posi-
tions 45-47).
13 COPY operator. Records from the IN1 data set are copied to the OUTJ82D data set using the
DFSORT control statements in the CJ82CNTL data set. As a result, &&OUTJ82D contains a
reformatted subset of the records from FLY.INPUT1 (those records containing 'J82' in the posi-
tions 45-47).
14 Comment statement.
| 15 SORT operator. Records from the CONCAT data sets are sorted to the DEPTSD and
| DEPTSP data sets using the DFSORT control statements in the ABCDCNTL data set. As a
| result, FLY.OUTPUT1 and DEPTSP (SYSOUT) contain the sorted combined records from
| &&OUTJ69D and &&OUTJ82D.
16-17 Comment statements.
18 MODE operator. The MODE is reset to STOP (needed in case SCAN mode was entered due
to an error for a previous operator). If an error is detected for a subsequent operator, SCAN
mode will be entered. This divides the previous operators and subsequent operators into two
unrelated groups.
19 Comment statement.
20 VERIFY operator. Identifies invalid values, if any, in the specified decimal fields of the IN2 data
set. Used to stop subsequent operations if any invalid value is found in FLY.INPUT2.
21 Comment statement.
22 STATS operator. Prints the minimum, maximum, average, and total for the specified fields of
the IN2 data set.
ON(VLEN) operates on the record length of the records in FLY.INPUT2. Thus, the values
printed for ON(VLEN) represent the shortest record, the longest record, the average record
length, and the total number of bytes for FLY.INPUT2.
23 Comment statement.
24 SORT operator. Records from the IN2 data set are sorted and summarized to the OUT4 data
set using the DFSORT control statements in the CTL1CNTL data set. As a result,
FLY.OUTPUT2 contains one record from FLY.INPUT2 for each unique sort field with totals for
the sum fields.
25-27 Comment statements.
28-31 DISPLAY operator. Prints, in the LIST1 data set, a report detailing each sort and sum value for
the OUT4 data set resulting from the previous operation, and the lowest and highest value for
each sum field.
32-59 DD statements. Defines the data sets and DFSORT control statements used for the ICETOOL
operations described above.
Introduction
When a sort application cannot be performed entirely in virtual storage, DFSORT
must use work space. The amount of work space required depends on:
| The amount of data being sorted
The amount of virtual storage available to DFSORT
The amount of Hiperspace available to DFSORT (MVS/ESA systems only)
The type of devices you use
| The DFSORT functions and features you use (for example, VLSHRT, locale
| processing, EFS, and ALTSEQ can increase the amount of work space
| required).
There are three ways to supply work space for a DFSORT application:
Hiperspace
Dynamic allocation of work data sets
JCL allocation of work data sets.
Hiperspace
Hiperspace (MVS/ESA systems only) is the most efficient form of intermediate
storage for DFSORT. Using the default ICEMAC option HIPRMAX=OPTIMAL
ensures that DFSORT will use Hiperspace for Hipersorting whenever possible.
| Sites can tune their definition of HIPRMAX=OPTIMAL through use of the ICEMAC
| parameters EXPMAX, EXPOLD, and EXPRES. See Installation and Customization
| for more information.
| DFSORT only uses Hipersorting when there is sufficient expanded storage to back
| all the DFSORT Hiperspace data. Hipersorting is very dynamic: multiple concurrent
| Hipersorting applications always know each other's expanded storage needs and
| never try to back their Hiperspaces with the same portion of expanded storage. In
| addition, DFSORT checks the available expanded storage throughout the run, and
| switches from using Hiperspace to using DASD work data sets when either an
| expanded storage shortage is predicted or the total Hipersorting activity on the
| system reaches the limits set by the DFSORT installation options EXPMAX,
| EXPOLD, and EXPRES.
not requested explicitly. For further details, see the HIPRMAX option of the
“OPTION Control Statement” on page 111.
Using tape devices for work data sets rather than DASD causes significant perform-
ance degradation for the following reasons:
Tape work data sets prevent DFSORT from using its more efficient sorting
techniques, Blockset and Peerage/Vale. DASD work data sets allow DFSORT
to use these techniques.
Tape work data sets must be accessed sequentially. DASD data sets can be
accessed randomly.
DASD control units can provide additional features, such as cache fast write,
that are not available with tape devices.
Number of Devices
Although one work data set is sufficient, using two or more work data sets on sepa-
rate devices usually reduces the elapsed time of the application significantly. In
general, using more than three work data sets does not reduce elapsed time any
further, and is only necessary if the work data sets are small or the file size is
: large. Regardless, no more than 100 work data sets can be specified. If you
: specify more than 32 and the Blockset technique is not selected, a maximum of 32
: data sets is used.
Under some circumstances, DFSORT does not perform as well when using
ESCON channels as it does when using parallel channels. The two types of appli-
cations most likely to cause a noticeable decrease in performance are:
1. Applications where DFSORT cannot accurately determine the size of the file to
be sorted. These applications often involve DFSORT E15 user exits that insert
records into the sorting process.
2. Sort applications with a low ratio of available storage to input file size.
Dynamic allocation has one drawback: for certain applications, as described in “File
Size and Dynamic Allocation” on page 452, you might need to give DFSORT a
reasonable estimate of the input file size. Later, if the input file size for the applica-
tion increases significantly, you must update the file size estimate accordingly.
However, JCL allocation has a similar drawback, except that it applies to all appli-
cations. Unless you overallocate the work data sets initially and waste space, you
have to update the JCL allocation when the input file size increases significantly for
any application to avoid out-of-space abends.
If you can allocate enough work data set space with JCL to guarantee your applica-
tions will never exceed the space allocated, you do not need dynamic allocation.
However, since efficient use of DASD space is usually desirable, dynamic allocation
is recommended over JCL allocation.
DYNAUTO also controls whether dynamic allocation or JCL allocation takes pre-
cedence when JCL work data sets are specified.
Device Defaults
When the device type, or the number of devices for dynamic allocation, is not
explicitly specified, DFSORT obtains the missing information from the DYNALOC
installation option information supplied by your system programmer.
There are several ways to specify the number of records to be sorted at run-time,
as explained below:
Run-time option SIZE=n enables you to specify the exact number of records in
the input data sets. If specified, DFSORT always uses this number to deter-
mine the file size and issues an error message if the actual number of input
records does not match the given number (this happens only if FSZEST=NO is
in effect). You must change SIZE=n whenever the number of records in the
input data sets changes.
Run-time option FILSZ=n works the same way as SIZE=n, except that the
exact number you specify must take into account the number of records in the
input data sets, and the number of records inserted and deleted before sorting
using an E15 exit routine, an INCLUDE or OMIT control statement, or the
SKIPREC or STOPAFT options.
Use FILSZ=n rather than SIZE=n if your application inserts or deletes a signif-
icant number of records before sorting. You must change FILSZ=n whenever
the total number of records to be sorted changes.
Run-time option SIZE=Un enables you to specify the number of records in the
input data sets. DFSORT always uses your specified value to determine the
file size, but does not issue an error message if the actual number of input
records does not match the given number. As long as the supplied value is
reasonably close to the actual number of records read in, DFSORT can dynam-
ically allocate the work space efficiently. You only need to update the value
when the number of input records changes significantly; the better the estimate
is, the more efficient the allocation.
Run-time option FILSZ=Un works the same way as SIZE=Un, except that the
record count you specify should take into account not only the number of
records in the input data sets, but also, if significant, the number of records
inserted or deleted before sorting.
Run-time option SIZE=En enables you to specify an estimate of the number of
records in the input data sets. DFSORT only uses your estimate to determine
the file size in the following instances:
– An E15 user exit routine supplies all input records (an input data set is not
present).
– An input data set is present, along with an E15 user exit routine.
– Small input data sets are on tape.
– The IBM 3480/3490 Magnetic Tape Subsystem with the Improved Data
Recording Capability (IDRC) feature is used for the input device.
See “File Size and Dynamic Allocation” on page 452 for more information
about these cases.
No error message is issued if the supplied estimate is incorrect.
Run-time option FILSZ=En works the same way as SIZE=En, except that the
record count you specify should take into account not only the number of
records in the input data sets, but also, if significant, the number of records
inserted or deleted before sorting.
For variable-length records, DFSORT uses one-half of the maximum record length
| to determine the input file size, unless you specify the AVGRLEN option without
| supplying an E15 user exit. If your actual average record length is significantly
different from one-half of the maximum record length, specifying AVGRLEN=n can
prevent DFSORT from over- or under-allocating dynamic work space.
See “OPTION Control Statement” on page 111 for more information about the
AVGRLEN, SIZE and FILSZ parameters.
Dynamic over-allocation of work space can occur when you do not specify the
number of records (for example, with small input data sets on tape), or even when
you do (for example, when a significant number of records is deleted). In these
cases, you might prefer to use JCL allocation of work data sets to control the
amount of space allocated. However, there are drawbacks to doing so, as previ-
ously explained. If DYNAUTO=IGNWKDD is used, remember to specify run-time
option USEWKDD when you want to use JCL allocation of work data sets.
Because of the number of variables involved, an exact formula cannot be given for
calculating the needed work space. However, the following guidelines usually hold
true:
For fixed length record (FLR) sort applications, 1.5 to 2 times the input file size
is usually adequate.
For variable-length record (VLR) sort applications, 1.5 to 2.5 times the input file
size is usually adequate.
These guidelines assume that a reasonable amount of storage (at least 1M) is
available to DFSORT. Limiting the available amount of storage can increase the
amount of needed work space.
DFSORT can often run with less than the amount of work space indicated by the
above guidelines.
To get the best performance using JCL allocation of work data sets:
| Use devices without much activity on them.
| Avoid 3390-9 DASD, optical DASD, or tape devices for work data sets.
Allocate space in cylinders.
Specify contiguous space for each work data set, and make sure there is
enough primary space so that secondary space is not needed.
Allocate two or more work data sets.
Assign one work data set per actuator.
Use multiple channel paths to the devices.
Use different spindles and separate channel paths for the work data sets and
the input/output data sets.
The following table shows the work data set space needed with 4M of storage for
applications with various characteristics when Hipersorting and dataspace sorting
are not used (HIPRMAX=0 and DSPSIZE=0).
| Note that, for performance reasons, 3390-9 devices should not be specified for
| intermediate storage.
System performance is improved if work data sets are specified in cylinders, rather
than tracks or blocks. Storage on temporary work data sets will be readjusted to
cylinders if possible. The number of tracks per cylinder for direct access devices is
shown in Figure 105.
If WRKSEC is in effect and the work data set is not allocated to VIO, DFSORT
allocates secondary extents as required, even if not requested in the JCL.
DFSORT normally allocates secondary extents for work data sets, even if not
requested in the JCL. This reduces the probability of exceeding work space
capacity.
If the DASD work space is not sufficient to perform the sort, DFSORT issues a
message and terminates.
If you assign 7-track tapes for input, you can use the data converter. If you assign
7-track tapes for work space, you can use neither the data converter, nor the trans-
lation feature for anything but character data.
Three different tape work data set techniques are available to DFSORT: Balanced,
Polyphase, and Oscillating. For information on how to calculate their requirements,
see Figure 106.
Note: The value you obtain for “min” is literally a minimum value; if, for example,
your input uses a more efficient blocking factor than DFSORT or is spanned, you
need more work space. Space requirements are also summarized in Figure 106.
DFSORT selects the most appropriate tape technique using these criteria.
The value for Nmax printed in message ICE038I is an average value rounded down
to the nearest thousand. This value assumes random input. If you have a
reversed sequenced file and tape work space, sort capacity may be exceeded at a
lower value because of the higher number of partly empty, end-of-string blocks.
For magnetic tape, a tape length of 2400 feet is assumed in calculating Nmax. For
tapes of other lengths, the figure is not correct. When tapes with mixed density are
used, the smallest density is used in the calculation.
If you specify an actual data set size, and that size is larger than the maximum
capacity estimated by the program (Nmax), the program terminates before begin-
ning to sort. If you specify an estimated data set size, or none at all, and the
number of records reaches the maximum (Nmax), the program gives control to your
routine at user exit E16, if you have written and included one. This routine can
direct the program to take one of the following actions:
Continue sorting the entire input data set with available work space. If the esti-
mate of the input data set size was high, enough work space may remain to
complete the application.
Continue sorting with only part of the input data set; the remainder could be
sorted later and the two results merged to complete the application.
Terminate the program without any further processing.
If you do not include an E16 routine, DFSORT continues to process records for as
long as possible. If the work space is sufficient to contain all the records in the
input data set, DFSORT completes normally; when work space is not sufficient,
DFSORT issues a message and terminates.
The program generates a separate message for each of the three possible error
conditions. They are:
The test for message ICE041A is made with the maximum possible calculated
value, that is, DFSORT is sure it will fail. In case of doubt, the message is not
issued.
Listed below are the places in DFSORT where you can specify various options that
will override the IBM-supplied defaults. The sources for the options are listed in
override order; that is, any option specified in a higher place in the list overrides
one specified in a lower place.
Notes:
: 1. For the DEBUG and OPTION statements, override is at the option level. For
: example, with:
: //DFSPARM DD \
: OPTION EQUALS
: //SYSIN DD \
: OPTION NOEQUALS,SKIPREC=5ð
: EQUALS from DFSPARM overrides NOEQUALS from SYSIN, but
: SKIPREC=50 from SYSIN in not affected by the OPTION statement in
: DFSPARM, so both EQUALS and SKIPREC=50 will be used.
: For control statements other than DEBUG and OPTION, override is at the
: statement level. For example, with:
: //DFSPARM DD \
: MODS E15=(CHECK,4ð96,EXIT)
: //SYSIN DD \
: MODS E35=(MOVE,2ð48,EXITX)
: the MODS statement in DFSPARM completely overrides the MODS statement
: in SYSIN, so the E15 exit will be used, but the E35 exit will not.
2. An EFS program or an installation initialization exit (ICEIEXIT) routine can also
be used to override options. ICEIEXIT changes override any corresponding
changes made by an EFS program.
| 3. For OUTFIL statements, override is at the ddname level. See “OUTFIL State-
| ments Notes” on page 184 for details.
Parameter Lists
Use with program invocation only.
Extended parameter list accepts all DFSORT program control statements,
including those OPTION statement parameters ignored by SYSIN and
SORTCNTL.
24-bit parameter list accepts a subset of DFSORT program control statements.
Using multiple parameter lists to rename the SORTCNTL data set permits dif-
ferent control statements to be used for a program that invokes DFSORT more
than once.
Can be used to pass the addresses of any user exits that your program has
placed in main storage.
Note: The extended parameter list can perform a superset of the functions in the
24-bit parameter list.
Override Tables
The following tables show the possible sources of specification and order of over-
ride for individual options.
The order of override between sources of specification is from left to right. A
specification overrides all specifications to its right.
The order of override within a source is from top to bottom. A specification
overrides all specifications below it.
EXEC PARM options you can specify in the DFSPARM data set are preceded
by the word “PARM” in the DFSPARM columns of the tables to distinguish
them from control statement options.
The Function columns indicate which functions (S=sort, M=merge, or C=copy)
can use the option.
Although alias names are available for many of the options, they are not shown
here.
Specification/Override Of Options
Figure 107 (Page 1 of 5). Directly Invoked DFSORT Option Specification/Override. Options are arranged alphabetically on the ICEMAC column. If “NO” is
specified in the ICEMAC column, move to the next column to the left and so on.
DFSORT R13 Application Programming Guide
The order of override is from left to right and from top to bottom within a row.
Specified
with
Specified with ICEMAC Func-
Specified with DFSPARM EXEC PARM Specified with SYSIN JCL or TSO Description of Option tion
NO NO NO ABCODE ABEND code S,M,C
DEBUG ABSTP NO DEBUG ABSTP NO Abnormal stop S,M,C
ALTSEQ CODE NO ALTSEQ CODE ALTSEQ Alternate sequence S,M
PARM ARESALL ARESALL OPTION ARESALL ARESALL System storage above 16-megabyte S
OPTION ARESALL virtual
DEBUG NOASSIST NO DEBUG NOASSIST NO Bypass Sorting Instructions S
PARM AVGRLEN AVGRLEN OPTION AVGRLEN NO Average record length S
OPTION AVGRLEN
PARM BSAM BSAM DEBUG BSAM NO Force BSAM S,M,C
DEBUG BSAM
DEBUG CFW|NOCFW NO DEBUG CFW|NOCFW CFW Cache fast write S
OPTION CHALT|NOCHALT NO OPTION CHALT|NOCHALT CHALT CH field sequence S,M
OPTION CHECK|NOCHECK NO OPTION CHECK|NOCHECK CHECK Record count check S,M,C
PARM CINV|NOCINV CINV|NOCINV OPTION CINV|NOCINV CINV Control interval access S,M,C
OPTION CINV|NOCINV
OPTION COBEXIT NO OPTION COBEXIT COBEXIT COBOL library S,M,C
INCLUDE|OMIT COND|FORMAT NO INCLUDE|OMIT COND|FORMAT NO Include|Omit fields S,M,C
OPTION COPY NO OPTION COPY NO Copy records C
SORT|MERGE FIELDS SORT|MERGE FIELDS
DEBUG CTRx NO DEBUG CTRx NO ABEND record count S,M
NO NO NO DIAGSIM Simulate SORTDIAG DD statement S,M,C
: NO NO NO DSA Dynamic storage adjustment limit S
PARM DSPSIZE DSPSIZE OPTION DSPSIZE DSPSIZE Dataspace sorting S
OPTION DSPSIZE
PARM DYNALLOC DYNALLOC OPTION DYNALLOC DYNALOC1 Dynamic SORTWKs S
OPTION DYNALLOC SORT DYNALLOC
SORT DYNALLOC
| Figure 107 (Page 2 of 5). Directly Invoked DFSORT Option Specification/Override. Options are arranged alphabetically on the ICEMAC column. If “NO” is
| specified in the ICEMAC column, move to the next column to the left and so on.
| The order of override is from left to right and from top to bottom within a row.
| Specified
| with
| Specified with ICEMAC Func-
| Specified with DFSPARM EXEC PARM Specified with SYSIN JCL or TSO Description of Option tion
PARM DYNALLOC DYNALLOC OPTION DYNALLOC DYNAUTO Automatic dynamic allocation S
OPTION DYNALLOC|USEWKDD SORT DYNALLOC
SORT DYNALLOC
NO NO NO DYNSPC Dynamic allocation default space S
PARM EFS EFS NO2 EFS EFS program specified S,M,C
OPTION EFS
PARM EQUALS|NOEQUALS EQUALS|NOEQUALS OPTION EQUALS|NOEQUALS EQUALS Equal record order S,M
OPTION EQUALS|NOEQUALS SORT|MERGE
SORT|MERGE EQUALS|NOEQUALS
EQUALS|NOEQUALS
DEBUG EQUCOUNT NO DEBUG EQUCOUNT NO Equal key count message S
PARM ABEND|NOABEND ABEND|NOABEND DEBUG ABEND|NOABEND ERET Error action S,M,C
DEBUG ABEND|NOABEND
Appendix B. Specification/Override of DFSORT Options
Specification/Override Of Options
| NO NO NO EXPMAX Available expanded storage limit for all S
| DFSORT Hiperspaces
| NO NO NO EXPOLD Old expanded storage limit for all S
| DFSORT Hiperspaces
| NO NO NO EXPRES Available expanded storage reserved for S
| non-Hipersorting use
| PARM E15=COB E15=COB MODS Exx|HILEVEL=YES NO User Exit Exx S,M,C3
| PARM E35=COB E35=COB (xx=11,15-19,31,35,37-39, and 61)
| MODS Exx|HILEVEL=YES
INREC FIELDS NO INREC FIELDS NO INREC fields S,M,C
OUTREC FIELDS NO OUTREC FIELDS NO OUTREC fields S,M,C
SORT|MERGE FIELDS|FORMAT NO SORT|MERGE FIELDS|FORMAT NO Control fields S,M
463
Specification/Override Of Options
| Figure 107 (Page 3 of 5). Directly Invoked DFSORT Option Specification/Override. Options are arranged alphabetically on the ICEMAC column. If “NO” is
| specified in the ICEMAC column, move to the next column to the left and so on.
DFSORT R13 Application Programming Guide
| The order of override is from left to right and from top to bottom within a row.
| Specified
| with
| Specified with ICEMAC Func-
| Specified with DFSPARM EXEC PARM Specified with SYSIN JCL or TSO Description of Option tion
MERGE FILES NO MERGE FILES NO Merge input files M
PARM FILSZ FILSZ OPTION FILSZ|SIZE FSZEST File size S,M
OPTION FILSZ|SIZE SORT|MERGE FILSZ|SIZE
SORT|MERGE FILSZ|SIZE
PARM HIPRMAX HIPRMAX OPTION HIPRMAX HIPRMAX Hipersorting S
OPTION HIPRMAX
NO NO NO IDRCPCT IDRC compaction S
NO NO NO IEXIT ICEIEXIT S,M,C
OPTION CKPT4 NO OPTION CKPT4 IGNCKPT Checkpoints S
SORT CKPT4 SORT CKPT4
: NO NO NO IOMAXBF Maximum SORTIN/SORTOUT data set S
: buffer space
RECORD LENGTH NO RECORD LENGTH NO Record lengths S,M,C
PARM LIST|NOLIST LIST|NOLIST NO2 LIST Print DFSORT control statements5 S,M,C
OPTION LIST|NOLIST
PARM LISTX|NOLISTX LISTX|NOLISTX NO2 LISTX Print control statements returned by an S,M,C
OPTION LISTX|NOLISTX EFS program5
| PARM LOCALE LOCALE NO2 LOCALE Locale processing S,M,C
| OPTION LOCALE
NO NO NO MAXLIM Maximum storage below 16-megabyte S,M,C
virtual6
NO NO NO MINLIM Minimum storage S,M,C
PARM MSGDDN MSGDDN NO2 MSGDDN Alternate message data set S,M,C
OPTION MSGDDN
NO NO NO MSGCON Write messages on master console S,M,C
PARM MSGPRT MSGPRT NO2 MSGPRT Print messages S,M,C
OPTION MSGPRT
OPTION NOBLKSET NO OPTION NOBLKSET NO Bypass Blockset S,M
NO NO NO NOMSGDD Action when message data set missing S,M,C
| Figure 107 (Page 4 of 5). Directly Invoked DFSORT Option Specification/Override. Options are arranged alphabetically on the ICEMAC column. If “NO” is
| specified in the ICEMAC column, move to the next column to the left and so on.
| The order of override is from left to right and from top to bottom within a row.
| Specified
| with
| Specified with ICEMAC Func-
| Specified with DFSPARM EXEC PARM Specified with SYSIN JCL or TSO Description of Option tion
| PARM ODMAXBF ODMAXBF OPTION ODMAXBF ODMAXBF Maximum OUTFIL data set buffer space S,M,C
| OPTION ODMAXBF
| OUTFIL9 OUTFIL9 OUTFIL9 NO OUTFIL processing S,M,C
| PARM OUTREL|NOOUTREL OUTREL|NOOUTREL OPTION NOOUTREL OUTREL Release output data set space S,M,C
OPTION NOOUTREL
| OPTION NOOUTSEC NO OPTION NOOUTSEC OUTSEC Output data set secondary allocation S,M,C
NO NO NO OVERRGN Storage over REGION S,M,C
NO NO NO PARMDDN Alternate ddname for DFSPARM S,M,C
PARM RESALL RESALL OPTION RESALL RESALL System reserved storage6 S,M,C
OPTION RESALL
| NO NO NO SDB System-determined output data set block S,M,C
| size
Appendix B. Specification/Override of DFSORT Options
Specification/Override Of Options
PARM SKIPREC SKIPREC OPTION SKIPREC NO Skip records S,C
OPTION SKIPREC SORT SKIPREC
SORT SKIPREC
| OPTION SMF NO NO SMF SMF records S,M,C
OPTION SORTDD NO NO2 NO ddname prefix S,M,C
| OPTION SORTIN7 NO NO2 NO Alternate SORTIN ddname S,C
NO NO NO SORTLIB Conventional modules library S,M
| OPTION SORTOUT8 NO NO2 NO Alternate SORTOUT ddname S,M,C
PARM STIMER|NOSTIMER STIMER|NOSTIMER OPTION NOSTIMER STIMER Use of STIMER S,M,C
OPTION NOSTIMER
PARM STOPAFT STOPAFT OPTION STOPAFT NO Input limit S,C
OPTION STOPAFT SORT STOPAFT
SORT STOPAFT
465
466
Specification/Override Of Options
| Figure 107 (Page 5 of 5). Directly Invoked DFSORT Option Specification/Override. Options are arranged alphabetically on the ICEMAC column. If “NO” is
| specified in the ICEMAC column, move to the next column to the left and so on.
DFSORT R13 Application Programming Guide
| The order of override is from left to right and from top to bottom within a row.
| Specified
| with
| Specified with ICEMAC Func-
| Specified with DFSPARM EXEC PARM Specified with SYSIN JCL or TSO Description of Option tion
NO NO NO SVC DFSORT SVC Information S,M,C
NO NO NO TEXIT ICETEXIT S,M,C
NO NO NO TMAXLIM Maximum storage above and below S
16-megabyte virtual6
RECORD TYPE NO RECORD TYPE NO Record format S,M,C
OPTION VERIFY|NOVERIFY NO OPTION VERIFY|NOVERIFY VERIFY Sequence check S,M
NO NO NO VIO SORTWK virtual I/O S
OPTION VLSHRT|NOVLSHRT NO OPTION VLSHRT|NOVLSHRT VLSHRT Variable records do not contain all speci- S,M,C
fied control or compare fields
NO NO NO VSAMBSP VSAM buffer space S
PARM WRKREL|NOWRKREL WRKREL|NOWRKREL OPTION NOWRKREL WRKREL Release SORTWK space S
OPTION NOWRKREL
PARM WRKSEC|NOWRKSEC WRKSEC|NOWRKSEC OPTION NOWRKSEC WRKSEC SORTWK secondary allocation S
OPTION NOWRKSEC
: OPTION Y2PAST NO OPTION Y2PAST Y2PAST Set century window S,M,C
| OPTION ZDPRINT|NZDPRINT NO OPTION ZDPRINT|NZDPRINT ZDPRINT ZD SUM results S,M
Specification/Override Of Options
Specification/Override Of Options
Figure 108 (Page 1 of 6). Extended Parameter List DFSORT Option Specification/Override. Options are arranged alphabetically on the ICEMAC column. If
“NO” is specified in the ICEMAC column, move to the next column to the left and so on.
DFSORT R13 Application Programming Guide
The order of override is from left to right and from top to bottom within a row.
Specified
with
ICEMAC
Specified with Extended INV or Func-
Specified with DFSPARM Specified with SORTCNTL Parameter List TSOINV Description of Option tion
NO NO NO ABCODE ABEND code S,M,C
DEBUG ABSTP DEBUG ABSTP DEBUG ABSTP NO Abnormal stop S,M,C
ALTSEQ CODE ALTSEQ CODE Offset 16 entry ALTSEQ Alternate sequence S,M
ALTSEQ CODE
PARM ARESALL OPTION ARESALL OPTION ARESALL ARESALL System storage above S
OPTION ARESALL 16-megabyte virtual
OPTION ARESINV OPTION ARESINV OPTION ARESINV ARESINV Storage above S
16-megabyte virtual for
invoking program
DEBUG NOASSIST DEBUG NOASSIST DEBUG NOASSIST NO Bypass Sorting Instructions S
PARM AVGRLEN OPTION AVGRLEN OPTION AVGRLEN NO Average record length S
OPTION AVGRLEN
PARM BSAM DEBUG BSAM DEBUG BSAM NO Force BSAM S,M,C
DEBUG BSAM
DEBUG CFW|NOCFW DEBUG CFW|NOCFW DEBUG CFW|NOCFW CFW Cache fast write S
OPTION CHALT|NOCHALT OPTION CHALT|NOCHALT OPTION CHALT|NOCHALT CHALT CH field sequence S,M
OPTION CHECK|NOCHECK OPTION CHECK|NOCHECK OPTION CHECK|NOCHECK CHECK Record count check S,M,C
PARM CINV|NOCINV OPTION CINV|NOCINV OPTION CINV|NOCINV CINV Control interval access S,M,C
OPTION CINV|NOCINV
OPTION COBEXIT OPTION COBEXIT OPTION COBEXIT COBEXIT COBOL library S,M,C
INCLUDE|OMIT COND|FORMAT INCLUDE|OMIT COND|FORMAT INCLUDE|OMIT COND|FORMAT NO Include|Omit fields S,M,C
OPTION COPY OPTION COPY OPTION COPY NO Copy records C
SORT|MERGE FIELDS SORT|MERGE FIELDS2 SORT|MERGE FIELDS
DEBUG CTRx DEBUG CTRx DEBUG CTRx NO ABEND record count S,M
NO NO NO DIAGSIM Simulate SORTDIAG DD S,M,C
statement
: NO NO NO DSA Dynamic storage adjust- S
: ment limit
| Figure 108 (Page 2 of 6). Extended Parameter List DFSORT Option Specification/Override. Options are arranged alphabetically on the ICEMAC column. If
| “NO” is specified in the ICEMAC column, move to the next column to the left and so on.
| The order of override is from left to right and from top to bottom within a row.
| Specified
| with
| ICEMAC
| Specified with Extended INV or Func-
| Specified with DFSPARM Specified with SORTCNTL Parameter List TSOINV Description of Option tion
PARM DSPSIZE OPTION DSPSIZE OPTION DSPSIZE DSPSIZE Dataspace sorting S
OPTION DSPSIZE
PARM DYNALLOC OPTION DYNALLOC OPTION DYNALLOC DYNALOC1 Dynamic SORTWKs S
OPTION DYNALLOC SORT DYNALLOC2 SORT DYNALLOC
SORT DYNALLOC
PARM DYNALLOC OPTION DYNALLOC OPTION DYNALLOC|USEWKDD DYNAUTO Automatic DYNALLOC S
OPTION DYNALLOC|USEWKDD SORT DYNALLOC SORT DYNALLOC
SORT DYNALLOC
NO NO NO DYNSPC Dynamic allocation default S
space
PARM EFS NO3 OPTION EFS EFS EFS program specified S,M,C
OPTION EFS
Appendix B. Specification/Override of DFSORT Options
PARM EQUALS|NOEQUALS OPTION EQUALS|NOEQUALS OPTION EQUALS|NOEQUALS EQUALS Equal record order S,M
OPTION EQUALS|NOEQUALS SORT|MERGE SORT|MERGE
SORT|MERGE EQUALS|NOEQUALS2 EQUALS|NOEQUALS
EQUALS|NOEQUALS
DEBUG EQUCOUNT DEBUG EQUCOUNT DEBUG EQUCOUNT NO Equal key count message S
Specification/Override Of Options
PARM ABEND|NOABEND DEBUG ABEND|NOABEND DEBUG ABEND|NOABEND ERET Error action S,M,C
DEBUG ABEND|NOABEND
DEBUG ESTAE|NOESTAE DEBUG ESTAE|NOESTAE DEBUG ESTAE|NOESTAE ESTAE ESTAE routine S,M,C
PARM EXCPVR OPTION EXCPVR OPTION EXCPVR EXCPVR EXCPVR for I/O S,C
OPTION EXCPVR
NO NO NO EXITCK E15/E35 return code S,M,C
checking
| NO NO NO EXPMAX Available expanded S
| storage limit for all
| DFSORT Hiperspaces
| NO NO NO EXPOLD Old expanded storage limit S
| for all DFSORT
| Hiperspaces
469
470
Specification/Override Of Options
| Figure 108 (Page 3 of 6). Extended Parameter List DFSORT Option Specification/Override. Options are arranged alphabetically on the ICEMAC column. If
| “NO” is specified in the ICEMAC column, move to the next column to the left and so on.
DFSORT R13 Application Programming Guide
| The order of override is from left to right and from top to bottom within a row.
| Specified
| with
| ICEMAC
| Specified with Extended INV or Func-
| Specified with DFSPARM Specified with SORTCNTL Parameter List TSOINV Description of Option tion
| NO NO NO EXPRES Available expanded S
| storage reserved for non-
| Hipersorting use
| PARM E15=COB MODS E154|HILEVEL=YES Offset 4 entry4 NO Exit E15 S,C
| MODS E154|HILEVEL=YES MODS E154|HILEVEL=YES
MODS E184 MODS E184 Offset 24 entry4 NO Exit E18 S
MODS E184
NO NO Offset 4 entry NO Exit E32 M
| PARM E35=COB MODS E354|HILEVEL=YES Offset 8 entry4 NO Exit E35 S,M,C
| MODS E354|HILEVEL=YES MODS E354|HILEVEL=YES
MODS E394 MODS E394 Offset 28 entry4 NO Exit E39 S,M,C
MODS E394
MODS Exx MODS Exx MODS Exx NO User Exit Exx S,M,C5
(xx=11,16,17,19, 31,37,38,
and 61)
INREC FIELDS INREC FIELDS INREC FIELDS NO INREC fields S,M,C
OUTREC FIELDS OUTREC FIELDS OUTREC FIELDS NO OUTREC fields S,M,C
SORT|MERGE FIELDS|FORMAT SORT|MERGE FIELDS|FORMAT SORT|MERGE FIELDS|FORMAT NO Control fields S,M
SUM FIELDS|FORMAT SUM FIELDS|FORMAT SUM FIELDS|FORMAT NO Sum fields S,M
MERGE FILES MERGE FILES MERGE FILES NO Merge input files M
PARM FILSZ OPTION FILSZ|SIZE OPTION FILSZ|SIZE FSZEST File size S,M
OPTION FILSZ|SIZE SORT|MERGE FILSZ|SIZE2 SORT|MERGE FILSZ|SIZE
SORT|MERGE FILSZ|SIZE
NO NO NO GENER IEBGENER name C
NO NO NO GNPAD ICEGENER LRECL C
padding action
NO NO NO GNTRUNC ICEGENER LRECL C
truncation action
| Figure 108 (Page 4 of 6). Extended Parameter List DFSORT Option Specification/Override. Options are arranged alphabetically on the ICEMAC column. If
| “NO” is specified in the ICEMAC column, move to the next column to the left and so on.
| The order of override is from left to right and from top to bottom within a row.
| Specified
| with
| ICEMAC
| Specified with Extended INV or Func-
| Specified with DFSPARM Specified with SORTCNTL Parameter List TSOINV Description of Option tion
PARM HIPRMAX OPTION HIPRMAX OPTION HIPRMAX HIPRMAX Hipersorting S
OPTION HIPRMAX
NO NO NO IDRCPCT IDRC compaction S
NO NO NO IEXIT ICEIEXIT S,M,C
OPTION CKPT6 OPTION CKPT6 OPTION CKPT6 IGNCKPT Checkpoints S
SORT|MERGE CKPT6 SORT|MERGE CKPT2,6 SORT|MERGE CKPT6
: NO NO NO IOMAXBF Maximum S
: SORTIN/SORTOUT data
: set buffer space
RECORD LENGTH RECORD LENGTH RECORD LENGTH NO Record lengths S,M,C
PARM LIST|NOLIST NO3 OPTION LIST|NOLIST LIST Print DFSORT control S,M,C
OPTION LIST|NOLIST statements7
Appendix B. Specification/Override of DFSORT Options
PARM LISTX|NOLISTX NO3 OPTION LISTX|NOLISTX LISTX Print control statements S,M,C
OPTION LISTX|NOLISTX returned by an EFS
program7
| PARM LOCALE NO3 OPTION LOCALE LOCALE Locale processing S,M,C
Specification/Override Of Options
| OPTION LOCALE
NO NO NO MAXLIM Maximum storage below S,M,C
16-megabyte virtual8
NO NO NO MINLIM Minimum storage S,M,C
PARM MSGDDN NO3 OPTION MSGDDN MSGDDN Alternate message S,M,C
OPTION MSGDDN ddname
NO NO NO MSGCON Write messages on master S,M,C
console
PARM MSGPRT NO3 OPTION MSGPRT MSGPRT Print messages S,M,C
OPTION MSGPRT
OPTION NOBLKSET OPTION NOBLKSET OPTION NOBLKSET NO Bypass Blockset S,M
NO NO NO NOMSGDD Action when message data S,M,C
set missing
471
472
Specification/Override Of Options
| Figure 108 (Page 5 of 6). Extended Parameter List DFSORT Option Specification/Override. Options are arranged alphabetically on the ICEMAC column. If
| “NO” is specified in the ICEMAC column, move to the next column to the left and so on.
DFSORT R13 Application Programming Guide
| The order of override is from left to right and from top to bottom within a row.
| Specified
| with
| ICEMAC
| Specified with Extended INV or Func-
| Specified with DFSPARM Specified with SORTCNTL Parameter List TSOINV Description of Option tion
| PARM ODMAXBF OPTION ODMAXBF OPTION ODMAXBF ODMAXBF Maximum OUTFIL data set S,M,C
| OPTION ODMAXBF buffer space
| OUTFIL11 OUTFIL11 OUTFIL11 NO OUTFIL processing S,M,C
| PARM OUTREL|NOOUTREL OPTION NOOUTREL OPTION NOOUTREL OUTREL Release output data set S,M,C
| OPTION NOOUTREL space
| OPTION NOOUTSEC OPTION NOOUTSEC OPTION NOOUTSEC OUTSEC Output data set secondary S,M,C
| allocation
NO NO NO OVERRGN Storage over REGION S,M,C
NO NO NO PARMDDN Alternate ddname for S,M,C
DFSPARM
PARM RESALL OPTION RESALL OPTION RESALL RESALL System reserved storage8 S,M,C
OPTION RESALL
OPTION RESINV OPTION RESINV OPTION RESINV RESINV Program reserved storage8 S,M,C
| NO NO NO SDB System-determined output S,M,C
| data set block size
| NO NO NO SDBMSG System-determined block S,M,C
| size for message and list
| data sets
PARM SIZE OPTION MAINSIZE OPTION MAINSIZE SIZE Storage S,M,C
OPTION MAINSIZE
PARM SKIPREC OPTION SKIPREC OPTION SKIPREC NO Skip records S,C
OPTION SKIPREC SORT|MERGE SKIPREC2 SORT|MERGE SKIPREC
SORT|MERGE SKIPREC
| OPTION SMF NO OPTION SMF SMF SMF records S,M,C
OPTION SORTDD NO3 OPTION SORTDD NO ddname prefix S,M,C
| OPTION SORTIN9 NO3 OPTION SORTIN9 NO Alternate SORTIN ddname S,C
NO NO NO SORTLIB Conventional modules S,M
library
| Figure 108 (Page 6 of 6). Extended Parameter List DFSORT Option Specification/Override. Options are arranged alphabetically on the ICEMAC column. If
| “NO” is specified in the ICEMAC column, move to the next column to the left and so on.
| The order of override is from left to right and from top to bottom within a row.
| Specified
| with
| ICEMAC
| Specified with Extended INV or Func-
| Specified with DFSPARM Specified with SORTCNTL Parameter List TSOINV Description of Option tion
| OPTION SORTOUT10 NO3 OPTION SORTOUT10 NO Alternate SORTOUT S,M,C
| ddname
PARM STIMER|NOSTIMER OPTION NOSTIMER OPTION NOSTIMER STIMER Use of STIMER S,M,C
OPTION NOSTIMER
PARM STOPAFT OPTION STOPAFT OPTION STOPAFT NO Input limit S,C
OPTION STOPAFT SORT|MERGE STOPAFT2 SORT|MERGE STOPAFT
SORT|MERGE STOPAFT
NO NO NO SVC DFSORT SVC information S,M,C
NO NO NO TEXIT ICETEXIT S,M,C
NO NO NO TMAXLIM Maximum storage above S
and below 16-megabyte
virtual8
Appendix B. Specification/Override of DFSORT Options
Specification/Override Of Options
contain all specified control
fields or compare fields
NO NO NO VSAMBSP VSAM buffer space S
PARM WRKREL|NOWRKREL OPTION NOWRKREL OPTION NOWRKREL WRKREL Release SORTWK space S
OPTION NOWRKREL
PARM WRKSEC|NOWRKSEC OPTION NOWRKSEC OPTION NOWRKSEC WRKSEC SORTWK secondary allo- S
OPTION NOWRKSEC cation
: OPTION Y2PAST OPTION Y2PAST OPTION Y2PAST Y2PAST Set century window S,M,C
| OPTION ZDPRINT|NZDPRINT OPTION ZDPRINT|NZDPRINT OPTION ZDPRINT|NZDPRINT ZDPRINT ZD SUM results S,M
473
Specification/Override Of Options
Specification/Override Of Options
OPTION CHECK|NOCHECK OPTION CHECK|NOCHECK NO CHECK Record count check S,M,C
PARM CINV|NOCINV OPTION CINV|NOCINV NO CINV Control interval access S,M,C
OPTION CINV|NOCINV
OPTION COBEXIT OPTION COBEXIT NO COBEXIT COBOL library S,M,C
INCLUDE|OMIT COND|FORMAT INCLUDE|OMIT COND|FORMAT INCLUDE|OMIT COND|FORMAT NO Include|Omit fields S,M,C
OPTION COPY OPTION COPY SORT|MERGE FIELDS NO Copy records C
SORT|MERGE FIELDS SORT|MERGE FIELDS
DEBUG CTRx DEBUG CTRx DEBUG CTRx NO ABEND record count S,M
NO NO NO DIAGSIM Simulate SORTDIAG DD S,M,C
statement
: NO NO NO DSA Dynamic storage adjust- S
: ment limit
475
476
Specification/Override Of Options
| Figure 109 (Page 2 of 6). 24-Bit List DFSORT Option Specification/Override. Options are arranged alphabetically on the ICEMAC column. If “NO” is speci-
| fied in the ICEMAC column, move to the next column to the left and so on.
DFSORT R13 Application Programming Guide
| The order of override is from left to right and from top to bottom within a row.
| Specified
| with
| ICEMAC
| INV or Func-
| Specified with DFSPARM Specified with SORTCNTL Specified with 24-Bit List TSOINV Description of Option tion
PARM DSPSIZE OPTION DSPSIZE OPTION DSPSIZE DSPSIZE Dataspace sorting S
OPTION DSPSIZE
PARM DYNALLOC OPTION DYNALLOC SORT DYNALLOC DYNALOC1 Dynamic SORTWKs S
OPTION DYNALLOC SORT DYNALLOC
SORT DYNALLOC
PARM DYNALLOC OPTION DYNALLOC SORT DYNALLOC DYNAUTO Automatic DYNALLOC S
OPTION DYNALLOC|USEWKDD SORT DYNALLOC
SORT DYNALLOC
NO NO NO DYNSPC Dynamic allocation default S
space
PARM EFS NO2 NO EFS EFS program specified S,M,C
OPTION EFS
PARM EQUALS|NOEQUALS OPTION EQUALS|NOEQUALS SORT|MERGE EQUALS Equal record order S,M
OPTION EQUALS|NOEQUALS SORT|MERGE EQUALS|NOEQUALS
SORT|MERGE EQUALS|NOEQUALS
EQUALS|NOEQUALS
DEBUG EQUCOUNT DEBUG EQUCOUNT DEBUG EQUCOUNT NO Equal key count message S
PARM ABEND|NOABEND DEBUG ABEND|NOABEND DEBUG ABEND|NOABEND ERET Error action S,M,C
DEBUG ABEND|NOABEND
DEBUG ESTAE|NOESTAE DEBUG ESTAE|NOESTAE DEBUG ESTAE|NOESTAE ESTAE ESTAE routine S,M,C
PARM EXCPVR OPTION EXCPVR NO EXCPVR EXCPVR for I/O S,C
OPTION EXCPVR
NO NO NO EXITCK E15/E35 return code S,M,C
checking
| NO NO NO EXPMAX Available expanded S
| storage limit for all
| DFSORT Hiperspaces
| NO NO NO EXPOLD Old expanded storage limit S
| for all DFSORT
| Hiperspaces
| Figure 109 (Page 3 of 6). 24-Bit List DFSORT Option Specification/Override. Options are arranged alphabetically on the ICEMAC column. If “NO” is speci-
| fied in the ICEMAC column, move to the next column to the left and so on.
| The order of override is from left to right and from top to bottom within a row.
| Specified
| with
| ICEMAC
| INV or Func-
| Specified with DFSPARM Specified with SORTCNTL Specified with 24-Bit List TSOINV Description of Option tion
| NO NO NO EXPRES Available expanded S
| storage reserved for non-
| Hipersorting use
| PARM E15=COB MODS E153|HILEVEL=YES Offset 18 entry3 NO User exit E15 S,C
| MODS E153|HILEVEL=YES MODS E153|HILEVEL=YES
NO NO Offset 18 entry NO User exit E32 M
| PARM E35=COB MODS E353|HILEVEL=YES Offset 22 entry3 NO User exit E35 S,M,C
| MODS E353|HILEVEL=YES MODS E353|HILEVEL=YES
MODS Exx MODS Exx MODS Exx NO User Exit Exx S,M,C4
(xx=11,16-19, 31,37-39,
and 61)
INREC FIELDS INREC FIELDS INREC FIELDS NO INREC fields S,M,C
Appendix B. Specification/Override of DFSORT Options
Specification/Override Of Options
MERGE FILES
PARM FILSZ OPTION FILSZ|SIZE SORT|MERGE FILSZ|SIZE FSZEST File size S,M
OPTION FILSZ|SIZE SORT|MERGE FILSZ|SIZE
SORT|MERGE FILSZ|SIZE
NO NO NO GENER IEBGENER name C
NO NO NO GNPAD ICEGENER LRECL C
padding action
NO NO NO GNTRUNC ICEGENER LRECL C
truncation action
PARM HIPRMAX OPTION HIPRMAX NO HIPRMAX Hipersorting S
OPTION HIPRMAX
NO NO NO IDRCPCT IDRC compaction S
477
Specification/Override Of Options
| Figure 109 (Page 4 of 6). 24-Bit List DFSORT Option Specification/Override. Options are arranged alphabetically on the ICEMAC column. If “NO” is speci-
| fied in the ICEMAC column, move to the next column to the left and so on.
DFSORT R13 Application Programming Guide
| The order of override is from left to right and from top to bottom within a row.
| Specified
| with
| ICEMAC
| INV or Func-
| Specified with DFSPARM Specified with SORTCNTL Specified with 24-Bit List TSOINV Description of Option tion
OPTION CKPT5 OPTION CKPT5 SORT|MERGE CKPT5 IGNCKPT Checkpoints S
SORT|MERGE CKPT5 SORT|MERGE CKPT5
: NO NO NO IOMAXBF Maximum S
: SORTIN/SORTOUT data
: set buffer space
RECORD LENGTH RECORD LENGTH RECORD LENGTH NO Record lengths S,M,C
PARM LIST|NOLIST NO2 NO LIST Print DFSORT control S,M,C
OPTION LIST|NOLIST statements6
PARM LISTX|NOLISTX NO2 NO LISTX Print control statements S,M,C
OPTION LISTX|NOLISTX returned by an EFS
program6
| PARM LOCALE NO2 NO LOCALE Locale processing S,M,C
| OPTION LOCALE
NO NO NO MAXLIM Maximum storage below S,M,C
16-megabyte virtual7
NO NO NO MINLIM Minimum storage S,M,C
PARM MSGDDN NO2 X'03' entry MSGDDN Alternate message S,M,C
OPTION MSGDDN ddname
NO NO NO MSGCON Write messages on master S,M,C
console
PARM MSGPRT NO2 X'FF' entry MSGPRT Print messages S,M,C
OPTION MSGPRT
OPTION NOBLKSET OPTION NOBLKSET NO NO Bypass Blockset S,M
NO NO NO NOMSGDD Action when message data S,M,C
set missing
| PARM ODMAXBF OPTION ODMAXBF NO ODMAXBF Maximum OUTFIL data set S,M,C
| OPTION ODMAXBF buffer space
| OUTFIL10 OUTFIL10 OUTFIL10 NO OUTFIL processing S,M,C
| PARM OUTREL|NOOUTREL OPTION NOOUTREL NO OUTREL Release output data set S,M,C
| OPTION NOOUTREL space
| Figure 109 (Page 5 of 6). 24-Bit List DFSORT Option Specification/Override. Options are arranged alphabetically on the ICEMAC column. If “NO” is speci-
| fied in the ICEMAC column, move to the next column to the left and so on.
| The order of override is from left to right and from top to bottom within a row.
| Specified
| with
| ICEMAC
| INV or Func-
| Specified with DFSPARM Specified with SORTCNTL Specified with 24-Bit List TSOINV Description of Option tion
| OPTION NOOUTSEC OPTION NOOUTSEC NO OUTSEC Output data set secondary S,M,C
| allocation
NO NO NO OVERRGN Storage over REGION S,M,C
NO NO NO PARMDDN Alternate ddname for S,M,C
DFSPARM
PARM RESALL OPTION RESALL NO RESALL System reserved storage7 S,M,C
OPTION RESALL
OPTION RESINV OPTION RESINV X'01' entry RESINV Program reserved storage7 S,M,C
| NO NO NO SDB System-determined output S,M,C
| data set block size
| NO NO NO SDBMSG System-determined block S,M,C
| size for message and list
Appendix B. Specification/Override of DFSORT Options
| data sets
PARM SIZE OPTION MAINSIZE X'00' entry SIZE Storage S,M,C
OPTION MAINSIZE
PARM SKIPREC OPTION SKIPREC SORT|MERGE SKIPREC NO Skip records S,C
Specification/Override Of Options
OPTION SKIPREC SORT|MERGE SKIPREC
SORT|MERGE SKIPREC
| OPTION SMF NO NO SMF SMF records S,M,C
OPTION SORTDD NO2 Prefix entry NO ddname prefix S,M,C
| OPTION SORTIN8 NO2 NO NO Alternate SORTIN ddname S,C
NO NO NO SORTLIB Conventional modules S,M
library
| OPTION SORTOUT9 NO2 NO NO Alternate SORTOUT S,M,C
| ddname
PARM STIMER|NOSTIMER OPTION NOSTIMER NO STIMER Use of STIMER S,M,C
OPTION NOSTIMER
PARM STOPAFT OPTION STOPAFT SORT|MERGE STOPAFT NO Input limit S,C
SORT|MERGE STOPAFT SORT|MERGE STOPAFT
479
OPTION STOPAFT
480
Specification/Override Of Options
| Figure 109 (Page 6 of 6). 24-Bit List DFSORT Option Specification/Override. Options are arranged alphabetically on the ICEMAC column. If “NO” is speci-
| fied in the ICEMAC column, move to the next column to the left and so on.
DFSORT R13 Application Programming Guide
| The order of override is from left to right and from top to bottom within a row.
| Specified
| with
| ICEMAC
| INV or Func-
| Specified with DFSPARM Specified with SORTCNTL Specified with 24-Bit List TSOINV Description of Option tion
NO NO NO SVC DFSORT SVC information S,M,C
NO NO NO TEXIT ICETEXIT S,M,C
NO NO NO TMAXLIM Maximum storage above S
and below 16-megabyte
virtual7
RECORD TYPE RECORD TYPE RECORD TYPE NO Record format S,M,C
OPTION VERIFY|NOVERIFY OPTION VERIFY|NOVERIFY NO VERIFY Sequence check S,M
NO NO NO VIO SORTWK virtual I/O S
OPTION VLSHRT|NOVLSHRT OPTION VLSHRT|NOVLSHRT X'FD' entry VLSHRT Variable records do not S,M,C
contain all specified control
or compare fields
NO NO NO VSAMBSP VSAM buffer space S
PARM WRKREL|NOWRKREL OPTION NOWRKREL NO WRKREL Release SORTWK space S
OPTION NOWRKREL
PARM WRKSEC|NOWRKSEC OPTION NOWRKSEC NO WRKSEC SORTWK secondary allo- S
OPTION NOWRKSEC cation
: OPTION Y2PAST OPTION Y2PAST NO Y2PAST Set century window S,M,C
| OPTION ZDPRINT|NZDPRINT OPTION ZDPRINT|NZDPRINT NO ZDPRINT ZD SUM results S,M
Specification/Override Of Options
Format Description
CH (character EBCDIC, unsigned). Each character is represented by its 8-bit
EBCDIC code.
Example: AB7 becomes
C1 C2 F7 Hexadecimal
11000001 11000010 11110111 Binary
| Notes:
| 1. If CHALT is in effect, a format CH field collates according to the ALTSEQ
| (alternate collating sequence) table in effect. AQ format can be used for the
| same purpose.
| 2. If locale processing is in effect, a format CH field collates according to the
| collating rules of the active locale.
ZD (zoned decimal, signed). Each digit of the decimal number is converted into its
8-bit EBCDIC representation. The sign indicator replaces the first four bits of
the low order byte of the number.
Example: -247 becomes
2 4 - 7 Decimal
F2 F4 D7 Hexadecimal
11110010 11110100 11010111 Binary
The number +247 becomes
F2 F4 C7
11110010 11110100 11000111
Notes:
1. The following are treated as positive sign indicators: F, E, C, A, 8, 6, 4, 2,
0.
2. The following are treated as negative sign indicators: D, B, 9, 7, 5, 3, 1.
| 3. For SUM processing, 0 through 9 for the sign or A through F for a digit
| results in a data exception (0C7 ABEND). For example, a ZD value such
| as 3.5 (X'F34BF5') results in an 0C7 because B is treated as an invalid
| digit. ICETOOL's DISPLAY or VERIFY operator can be used to identify ZD
| values with invalid digits. ICETOOL's VERIFY operator can be used to
| identify ZD values with invalid signs.
| 4. The first four bits of the last digit is the sign indicator. The first four bits of
| each other digit is ignored. Thus the EBCDIC strings '0025' and ' 25'
| are both treated as 25 because a leading blank (X'40') is equivalent to a 0
| digit (X'F0').
Format Description
PD (packed decimal, signed). Each digit of the decimal number is converted into
its 4-bit binary equivalent. The sign indicator is put into the rightmost four bits
of the number.
Example: -247 becomes
2 4 7 - Decimal
24 7D Hexadecimal
00100100 01111101 Binary
The number +247 becomes 247C in hexadecimal.
Notes:
1. The following are treated as positive sign indicators: F, E, C, A, 8, 6, 4, 2,
0.
2. The following are treated as negative sign indicators: D, B, 9, 7, 5, 3, 1.
| 3. For SUM processing, 0 through 9 for the sign or A through F for a digit
| results in a data exception (0C7 ABEND). For example, a PD value such
| as X'0123BF' results in an 0C7 because B is treated as an invalid digit.
| ICETOOL's DISPLAY or VERIFY operator can be used to identify PD
| values with invalid digits. ICETOOL's VERIFY operator can be used to
| identify PD values with invalid signs.
: PD0 (packed decimal, with sign and first digit ignored) The PD0 format can be
: represented as follows:
: xddd...ds
: x is hexadecimal 0-F and is ignored.
: d is hexadecimal 0-9 and represents a decimal digit.
: s is hexadecimal 0-F and is ignored.
: PD0 can be used for parts of PD fields. For example, in the PD field
: P'mmddyy' (hexadecimal 0mmddyyC), PD0 can be used separately for 0mmd
: (mm), mddy (dd) and dyyC (yy).
FI (fixed point, signed). The complete number is represented by its binary equiv-
alent with the sign indicator placed in the most significant bit position.
0 for + or 1 for -. Negative numbers are in 2's complement
form.
Example: +247 becomes in halfword form
00F7 Hexadecimal
0000000011110111 Binary
The number -247 becomes
FF09 Hexadecimal
BI (binary unsigned). Any bit pattern.
FL (floating point, signed). The specified number is in the two-part format of char-
acteristic and fraction with the sign indicator in bit position 0.
Example: +247 becomes
0 1000010 111101110000000.......
+ chara. fraction
-247 is identical, except that the sign bit is
changed to 1.
AC (character ASCII, unsigned). This is similar to format CH but the characters
are represented with ASCII code.
Example: AB7 becomes
41 42 37 Hexadecimal
01000001 01000010 00110111 Binary (ASCII code)
Format Description
CSF or (signed numeric with optional leading floating sign).
FS
The floating sign format can be represented as follows:
<s>d . . .d
s is an optional sign immediately to the left of the digits d . . .d. If s is a −, the
number is treated as negative, otherwise it is treated as positive. Thus, − must
be used for a minus sign, but any other character (for example, + or blank) can
be used for a plus sign. The first non-decimal digit (that is, not 0-9) going from
right to left is treated as the sign and anything to the left of the sign is ignored.
Examples:
Value: Treated as:
34 +34
+34 +34
ððð34 +34
-ðð3 -3
-1234 -1234
1234 +1234
+ð1234 +1234
ð +ð
The types of data handled by the CSF/FS format encompass those produced
by several different FORTRAN, PL/I and COBOL formats, such as those shown
below (using a width of 4 for purposes of illustration):
* FORTRAN: I4 ; G4.0 ; SP,I4 ; SP,I4.3 ; S,I4.3
* PL/I: F(4) ; P'S999' ; P'SSS9' ; P'---9'
* COBOL: PIC +++9 ; PIC +999 ; PIC ++++ ; PIC ---9 ;
PIC ---- ; PIC ZZZZ
Because CSF/FS format fields are processed less efficiently than the other
formats, CSF/FS should not be used when another format is also appropriate
(for example, CSL).
CSL or (signed number, leading separate sign). This format refers to decimal data as
LS punched into cards, and then assembled into EBCDIC code.
Example: +247 punched in a card becomes
+ 2 4 7 Punched numeric data
4E F2 F4 F7 Hexadecimal
01001110 11110010 11110100 11110111 Binary EBCDIC code
-247 becomes
- 2 4 7 Punched numeric data
60 F2 F4 F7 Hexadecimal
01100000 11110010 11110100 11110111 Binary EBCDIC code
CST or (signed numeric, trailing separate sign). This has the same representation as
TS the CSL format, except that the sign indicator is punched after the number.
Example: 247+ punched on the card becomes
F2 F4 F7 4E Hexadecimal
CLO1 or (signed numeric, leading overpunch sign). This format again refers to decimal
OL1 data punched into cards and then assembled into EBCDIC code. The sign
indicator is, however, overpunched with the first decimal digit of the number.
Example: +247 with + overpunched on 2 becomes
+2 4 7 Punched numeric data
C2 F4 F7 Hexadecimal
11000010 11110100 11110111 Binary EBCDIC code
Similarly -247 becomes
D2 F4 F7
Format Description
CTO or (signed numeric, trailing overpunch sign). This format has the same represen-
OT tation as for the CLO format, except that the sign indicator is overpunched on
the last decimal digit of the number.
Example: +247 with + overpunched on 7 becomes
F2 F4 C7 hexadecimal
ASL (signed numeric, ASCII, leading separate sign). Similar to the CSL format but
with decimal data assembled into ASCII code.
Example: +247 punched into card becomes
+ 2 4 7 Punched numeric data
2B 32 34 37 Hexadecimal
0101011 00110010 00110100 00110111 Binary ASCII code
Similarly -247 becomes
2D 32 34 37 hexadecimal
AST (signed numeric, ASCII, trailing separate sign). This gives the same bit repre-
sentation as the ASL format, except that the sign is punched after the number.
Example: 247+ becomes
32 34 37 2B hexadecimal
: Y2C or (two-digit, two-byte character or zoned-decimal year data). The two-digit year
: Y2Z data can be represented as follows:
: xyxy
: y is hexadecimal 0-9 and represents a year digit. x is hexadecimal 0-F and is
: ignored.
: Thus, 96 might be represented as hexadecimal F9F6 (character 96) or as
: hexadecimal F9C6 or 0906 (zoned decimal 96).
: Y2P (two-digit, two-byte packed-decimal year data). The two-digit year data can be
: represented as follows:
: xyyx
: y is hexadecimal 0-9 and represents a year digit. x is hexadecimal 0-F and is
: ignored.
: Thus, 96 might be represented as hexadecimal 096F or 896C (packed decimal
: 96).
: Y2D (two-digit, one-byte decimal year data). The two-digit year data can be repres-
: ented as follows:
: yy
: y is hexadecimal 0-9 and represents a year digit.
: Thus, 96 would be represented as hexadecimal 96 (decimal 96).
1 The overpunch sign bit is always 'C' for positive and 'D' for negative.
A detailed description of CH, ZD, PD, FI, BI, and FL data formats are found in the
Assembler Reference.
| The following tables show the statements, operands, and operators allowed with
| each of the various data formats.
EBCDIC
Figure 112 shows the collating sequence for EBCDIC character and unsigned
decimal data. The collating sequence ranges from low (00000000) to high
(11111111). The bit configurations which do not correspond to symbols (that is, 0
through 73, 81 through 89, and so forth) are not shown. Some of these correspond
to control commands for the printer and other devices.
Packed decimal, zoned decimal, fixed-point, and normalized floating-point data are
collated algebraically, that is, each quantity is interpreted as having a sign.
Collating Bit
Sequence Configuration Symbol Meaning
0 00000000
.
.
74 01001010 ¢ Cent sign
75 01001011 . Period, decimal point
76 01001100 < Less than sign
77 01001101 ( Left parenthesis
78 01001110 + Plus sign
79 01001111 | Vertical bar, Logical OR
80 01010000 & Ampersand
.
.
90 01011010 ! Exclamation point
91 01011011 $ Dollar sign
92 01011100 * Asterisk
93 01011101 ) Right parenthesis
94 01011110 ; Semicolon
95 01011111 ¬ Logical not
96 01100000 - Minus, hyphen
97 01100001 / Slash
Collating Bit
Sequence Configuration Symbol Meaning
Collating Bit
Sequence Configuration Symbol Meaning
193 11000001 A
194 11000010 B
195 11000011 C
196 11000100 D
197 11000101 E
198 11000110 F
199 11000111 G
200 11001000 H
201 11001001 I
.
.
209 11010001 J
210 11010010 K
211 11010011 L
212 11010100 M
213 11010101 N
214 11010110 O
215 11010111 P
216 11011000 Q
217 11011001 R
.
.
226 11100010 S
227 11100011 T
228 11100100 U
229 11100101 V
230 11100010 W
231 11100111 X
232 11101000 Y
233 11101001 Z
.
.
240 11110000 0
241 11110001 1
242 11110010 2
243 11110011 3
244 11110100 4
245 11110101 5
.
.
246 11110110 6
247 11110111 7
248 11111000 8
249 11111001 9
.
.
255 11111111
ISCII/ASCII
Figure 113 on page 493 shows the collating sequence for ISCII/ASCII, character,
and unsigned decimal data. The collating sequence ranges from low (00000000) to
high (01111111). Bit configurations that do not correspond to symbols are not
shown.
Packed decimal, zoned decimal, fixed-point normalized floating-point data, and the
signed numeric data formats are collated algebraically; that is, each quantity is
interpreted as having a sign.
Collating Bit
Sequence Configuration Symbol Meaning
0 00000000 Null
32 00100000 SP Space
33 00100001 ! Exclamation point
34 00100010 " Quotation mark
35 00100011 # Number sign
36 00100100 $ Dollar sign
37 00100101 % Percent
38 00100110 & Ampersand
39 00100111 ′ Apostrophe, prime
40 00101000 ( Opening parenthesis
41 00101001 ) Closing parenthesis
42 00101010 * Asterisk
43 00101011 + Plus
44 00101100 , Comma
45 00101101 - Hyphen, minus
46 00101110 . Period, decimal point
47 00101111 / Slant
48 00110000 0
49 00110001 1
50 00110010 2
51 00110011 3
52 00110100 4
53 00110101 5
54 00110110 6
55 00110111 7
56 00111000 8
57 00111001 9
58 00111010 : Colon
59 00111011 ; Semicolon
60 00111100 < Less than
61 00111101 = Equals
62 00111110 > Greater than
63 00111111 ? Question mark
64 01000000 @ Commercial At
65 01000001 A
66 01000010 B
67 01000011 C
68 01000100 D
69 01000101 E
Collating Bit
Sequence Configuration Symbol Meaning
70 01000110 F
71 01000111 G
72 01001000 H
73 01001001 I
74 01001010 J
75 01001011 K
76 01001100 L
77 01001101 M
78 01001110 N
79 01001111 O
80 01010000 P
81 01010001 Q
82 01010010 R
83 01010011 S
84 01010100 T
85 01010101 U
86 01010110 V
87 01010111 W
88 01011000 X
89 01011001 Y
90 01011010 Z
91 01011011 [ Opening bracket
92 01011100 / Reverse slash
93 01011101 ] Closing bracket
94 01011110 ^ Circumflex, Logical NOT
95 01011111 _ Underscore
96 01100000 ` Grave Accent
97 01100001 a
98 01100010 b
99 01100011 c
100 01100100 d
101 01100101 e
102 01100110 f
103 01100111 g
104 01101000 h
105 01101001 i
106 01101010 j
107 01101011 k
108 01101100 l
109 01101101 m
110 01101110 n
111 01101111 o
112 01110000 p
113 01110001 q
114 01110010 r
115 01110011 s
116 01110100 t
117 01110101 u
Collating Bit
Sequence Configuration Symbol Meaning
118 01110110 v
119 01110111 w
120 01111000 x
121 01111001 y
122 01111010 z
123 01111011 { Opening Brace
124 01111100 | Vertical Line
125 01111101 } Closing Brace
126 01111110 ˜ Tilde
All abend dumps produced by DFSORT are system abend dumps that can be proc-
essed by standard dump analysis programs. A dump will be generated if you have
| included a SYSUDUMP, SYSABEND, or SYSMDUMP DD statement in your appli-
| cation. The actual output of the system dump depends on the system parameters
specified in the IEADMP00, IEAABD00 or IEADMR00 members of SYS1.PARMLIB
by your installation.
At the end of its recovery routine, DFSORT always returns control to the system to
allow termination to continue. The system will then invoke the next higher level
ESTAE recovery routine.
Checkpoint/Restart
| Checkpoint/Restart is a facility of the operating system that allows information about
| an application to be recorded so that same application can be restarted after
abnormal termination or after some portion of the application has been completed.
| Restart can take place immediately or be deferred until the application is resub-
mitted.
DFSORT takes checkpoints when requested during a sort that uses the Peerage or
Vale techniques.
Notes:
1. No ANSI Standard Label tape files can be open during Checkpoint/Restart
processing.
2. Do not specify CHKPT=EOV on any DFSORT DD statement.
| For more information on the Checkpoint/Restart facility, see Checkpoint/Restart.
For unexpected system or user exit routine abends, the DFSORT recovery
routine issues message ICE185A giving information about when the abend
| occurred. The description of this message is in Messages, Codes and Diag-
| nosis.
Snap dumps
The DFSORT recovery routine provides a snap dump of the system diagnostic
work area (SDWA). The snap dumps are written to a dynamically allocated
data set whether or not a SYSUDUMP (or SYSABEND or SYSMDUMP) DD
| statement is included in the application.
Copy system diagnostic work area
If an invoking program passes the address of an SDWA area in the 24-bit or
extended parameter list, DFSORT will copy the first 104 or 112 bytes of the
system diagnostic work area into the user SDWA area. See Chapter 5,
“Invoking DFSORT from a Program” on page 265 for more information.
| Continuation of an application after successful SORTOUT output
| If an unexpected abend occurs after the sort, merge, or copy application writes
| the SORTOUT data set successfully, DFSORT issues message ICE186A and
| completes its normal cleanup and termination functions. The SORTOUT data
| set written by DFSORT is closed. The run is successful except for the function
| causing the abend. Message ICE186A says that the SORTOUT data set is
| usable even though the run has abended. You can then decide to use the
| SORTOUT data set or rerun the application.
DFSORT returns control to the system at the end of its abend recovery proc-
essing so that recovery routines can be invoked.
The DFSORT abend recovery routine functions described above may not be
performed after an abend if NOESTAE is in effect. The DFSORT ESTAE
recovery routine is always established at the beginning of a run. It is deleted
early in DFSORT processing if NOESTAE is in effect.
With NOESTAE and ABEND in effect, the abend dump is produced after the A-type
message is printed and other termination functions are run. As a result, the dump
produced might not reflect the conditions at the time of the error. It may not include
the module that encountered the error.
With NOESTAE and ABSTP in effect, the correct module will be dumped but the
A-type message will not be issued.
The DFSORT ESTAE recovery routine will return control to the system which will
pass control to any ESTAE recovery routine(s) established by invoking programs.
As described earlier, the DFSORT ESTAE recovery routine will save the first 104 or
112 bytes of the system diagnostic work area in the invoking program's SDWA area
if the address of the area is passed to DFSORT.
Since PL/I normally has an ESPIE in effect to intercept program checks (0Cx abend
codes), the DFSORT ESTAE recovery routine is not entered after these errors
unless you have specified NOSPIE. DFSORT abend recovery processing will
occur for all other types of abends.
Invocations from COBOL programs or use of COBOL exits can result in more than
one abend dump.
| For details about locales and their customization, see Using Locales. The table of
| supported locales has been reproduced here for your convenience.
ICETOOL
Other Enhancements
ICETOOL, introduced in R11.1, is now even more
versatile as a result of many enhancements to the Very large values are now handled in appropriate
DISPLAY operator, and the addition of three new options (up to 15 significant digits instead of 8
operators: DEFAULTS, OCCUR, and SELECT. digits) and messages (up to 20 digits instead of 10
ICETOOL's new capabilities include: digits).
Creating a list data set showing the DFSORT Several ICEMAC installation options have been
installation defaults selected at your site. added or changed: .
Creating list data sets showing character (up to ALTSEQ=TABLE enables you to supply a com-
80 bytes) and numeric fields in a variety of plete 256-byte alternate collating sequence
report formats, allowing control of title, date, table.
time, page numbers, headings, lines per page, DIAGSIM enables you to simulate the use of a
field formats, and total, maximum, minimum and SORTDIAG DD statement for DFSORT applica-
average values for the columns of numeric data. tions.
Creating list and output data sets for records DSPSIZE and VIRTDSP control the use of
with duplicate values, non-duplicate values, or dataspace sorting and virtual dataspace,
values that occur n times, less than n times, or respectively.
more than n times.
GNPAD and GNTRUNC specify the action to be
Creating list data sets showing unique values taken when ICEGENER is used and the
for selected character and numeric fields and SYSUT2 LRECL is different from the SYSUT1
the number of times each occurs, in a variety of LRECL.
report formats.
Several run-time options have been added or
changed:
FSZEST=YES/NO allows you to specify whether or The data set with the largest block size can be specified
not DFSORT treats exact filesize values as esti- anywhere in the SORTIN concatenation for copy and
mated filesize values at run-time. DASD work data set sort applications.
TSO specifies the set of ICEMAC defaults used
when DFSORT is invoked directly by foreground Support for Partitioned Data Set Extended (PDSE) has
TSO users. been added.
TSOINV specifies the set of ICEMAC defaults used ICEMAC option SDB=YES/NO allows you to specify
when DFSORT is invoked from programs by fore- whether DFSORT should use the system-determined
ground TSO users. optimum block size for DASD and tape SORTOUT
when appropriate.
The following alternate forms of existing operands are
allowed:
Device Support for Release 11: Support
SORT FIELDS=(COPY) for IBM 3390 Direct Access Storage Device has been
MERGE FIELDS=(COPY) added.
SUM FIELDS=(NONE)
DFSORT supports all models of the ES/9000 processor.
The limit for the number of dynamically allocated work DFSORT applications based on the System/370 archi-
data sets (DYNALOC/DYNALLOC) is raised from 16 to tecture will run effectively on ES/9000 and MVS/ESA
32. SP Version 4 with no modification.
The extended parameter list now supports a call identi-
fier field which can be used by invoking programs to Service Changes: Other minor technical and
identify the messages associated with individual calls to editorial changes have been made.
DFSORT.
Index
ALTSEQ
Numerics defining alternate collating sequence 5
24-bit parameter list ICEMAC installation option 5
examples 276—279 installation option 14
format 268—273 ALTSEQ control statement
examples 67
function 62
A TABLE Option 67
ABCODE installation option
using 67—68
and DEBUG ABEND 69
ALTSEQ Statement Examples 67—68
and EXEC PARM ABEND 26
AMODE 226, 229
defined 14
AQ (alternate character) format
ABEND
INCLUDE statement 78
categories 498
SORT statement 209
checkpoint/restart 497
ARESALL
critical 499
EXEC PARM option 26
CTRx 500
installation option 14
CTRx processing 500
OPTION control statement option 112
DEBUG control statement option 69
releasing main storage 408
EXEC PARM option 26
using RESERVEX instead of ARESALL 27
processing 497—500
ARESINV
processing for unexpected abends 498—499
installation option 14
recovery 497, 498, 500
OPTION control statement option 113
ESTAE 497
releasing main storage 408
ABSTP
ASL (ISCII/ASCII leading sign) format
DEBUG control statement option 69
example 486
processing 498
INCLUDE statement 78
AC (ISCII/ASCII character) format
SORT statement 209
example 484
Assembler user exit routines
INCLUDE statement 78
input phase user exits 230—238
SORT statement 209
output phase user exits 239—244
action codes 375
AST (ISCII/ASCII trailing sign) format
adding record values 2
example 486
adding records 225
INCLUDE statement 78
E15 user exit 231, 250
SORT statement 209
E35 user exit 255
ATTACH
addressing
description 266
EFS program 364
writing macro instructions 276
EFS program user exit routine 388
AVGRLEN
user exits 226
EXEC PARM option 27
ALIAS statement 228
OPTION control statement option 113
aliases 21
alignment field 93, 197
allocating storage B
intermediate storage 409 BatchPipes/MVS
main storage 405, 406 and ICETOOL 360
temporary work space 409 and STOPAFT 134
allocating temporary work space efficiently 409—410 considerations 13
altering records 225 OUTFIL example 195
See also reformatting records Sort example 435
alternate collating sequence 67 BI (binary) format
DISPLAY operator 302
Index 511
Index
data types 11
D dataspace sorting
D1 format advantages 411
FIELDS operand 379 considerations 411
SORT statement 209 definition 411
D2 format DBCS ordering 364
COND operand 380 DD statements
INCLUDE statement 78 overview 41
DASD program DD statements 45
capacity considerations 455, 456 summary 20
efficiency 400, 409 system DD statements 44
exceeding capacity 456 using 41—57
data formats ddnames
AC (ISCII/ASCII character) format 484 duplicate 43
ASL (ISCII/ASCII leading sign) format 486 DEBUG control statement
AST (ISCII/ASCII trailing sign) format 486 example 69, 73
CH (character) format 483 function 62
CLO/OL (leading overpunch sign) format 485 special handling 377
CSF/FS (floating sign) format 485 using 69—73
CSL/LS (leading sign) format 485 DEBUG Statement Examples 73
CST/TS (trailing sign) format 485 debugging jobs 69
CTO/OT (trailing overpunch sign) format 486 decimal number constants 80
examples 483—487 defaults
FI (fixed-point) format 484 installation 13
FL (floating-point) format 484 listing with ICETOOL 14
PD (packed decimal) format 484 DEFAULTS operator (ICETOOL)
ZD (zoned decimal) format 483 examples 14
data management rules 11 listing installation defaults 14
data set using to display installation defaults 297
BatchPipes/MVS 13 defaults, installation 13
closing 226 definitions
closing with user exit routines 234, 242 cataloged procedures 22
considerations 13 collating sequence 5
defining 10 control field 4
handling input with user exit routines 243 copying 2
handling output with user exit routines 243 DD statements 20
input 9 direct invocation 3
shared tape unit 44 EXEC statement 21
key-sequenced, considerations 12 installation options 14—16
message data set 17 JOB statement 21
notes and limitations 11—13 key 4
opening with user exit routines 224, 230, 239 merging 2
output 9 program invocation 3
shared tape unit 44 sorting 2
QSAM considerations 12 deleting control fields
requirements 10 with INREC 93
size and efficiency 400 with OUTREC control statement 197
system data management rules 11 deleting records 225
valid types 10 E15 user exit 231, 250
VSAM considerations 12 E35 user exit 255
data space with INCLUDE control statement 75, 108
definition 116 with OMIT control statement 108
specifying with EXEC PARM 28 designing applications to maximize
specifying with OPTION control statement 116 performance 398—405
using on MVS/XA systems 402 designing new applications 399
determining action when intermediate storage is insuffi- DSA (Dynamic Storage Adjustment)
cient 226 enhancing performance 402
devices, improving elapsed time with 402 installation option 14
DFSORT limit 462
calls to your EFS program 365 DSPSIZE
compatible operating systems 4 enhancing performance 402
dynamic invocation 266 EXEC PARM option 28
exit routines 220 installation option 14
improving efficiency 397 OPTION control statement option 116
installation defaults 13 duplicate ddnames 43—44
invoking 3 duplicate records
job control statements 20—57 OCCUR operator (ICETOOL) 329
logic examples for input/user exit/output 223 SELECT operator (ICETOOL) 340
messages 17 SUM control statement 215
operating as a guest under VM 4 DYNALLOC
override of options 459 EXEC PARM option 28
overview 2 OPTION control statement option 117
processing order 6 SORT control statement option 211
processing OUTFIL operands 143 DYNALLOC=OFF
program control statements 61—218 EXEC PARM option 29
program phases 221—222, 365 OPTION control statement option 118
terminating with user exit 226 DYNALOC
DFSORT home page 3 installation option 14
DFSORT phases dynamic link-editing
definition 365 See link-editing
initialization 367, 392 Dynamic Storage Adjustment (DSA)
input 369 enhancing performance 402
termination 369, 394 installation option 14
DFSPARM data set 460 limit 462
DFSPARM DD statement dynamically-invoked DFSORT
defined 20 with the 24-bit parameter list 474—481
function 46 with the extended parameter list 467—474
using 55—56 DYNAUTO
DFSPARM statement installation option 14
PARM options 24 DYNSPC
alternate PARM option names 40 installation option 14
diagnosis
EFS program 391
diagnostic messages 17 E
DIAGSIM E11 user exit
installation option 14 initializing routines 230
direct access storage devices opening data sets 230
See DASD E15 user exit
direct access work storage devices 409 altering record length 244
direct invocation changing records for sort and copy applications 230
definition 3 EXEC PARM option 30
DFSORT processing 398 interface with COBOL 250
using JCL 461 LINKAGE SECTION code example for fixed-length
DISPLAY operator (ICETOOL) records 252
floating sign data format 302 LINKAGE SECTION code example for variable-
formatting 303 length records 253
Double Byte Character Set (DBCS) ordering LINKAGE SECTION fields for fixed-length
See DBCS ordering records 252
Double Byte Character Set Ordering Support Program LINKAGE SECTION fields for variable-length
See DBCS ordering records 252
passing records for sort and copy applications 230
Index 513
Index
Index 515
Index
Index 517
Index
Index 519
Index
Index 521
Index
Index 523
Index
U V
unexpected abends 498 variable-length record
UNIQUE operator (ICETOOL) longest record length 12
defined 284 record descriptor word 12
Index 525
Index
X
XCTL
using 266
writing macro instructions 276
Y
Y2C (two-digit character year) format
OUTFIL control statement 150
SORT statement 209
Y2D (two-digit decimal year) format
OUTFIL control statement 150
SORT statement 209
If you especially like or dislike anything about this book, please use one of the methods
listed below to send your comments to IBM. Whichever method you choose, make sure you
send your name, address, and telephone number if you would like a reply.
Feel free to comment on specific errors or omissions, accuracy, organization, subject matter,
or completeness of this book. However, the comments you send should pertain to only the
information in this manual and the way in which the information is presented. To request
additional publications, or to ask questions or make comments about the functions of IBM
products or systems, you should talk to your IBM representative or to your IBM authorized
remarketer.
When you send comments to IBM, you grant IBM a nonexclusive right to use or distribute
your comments in any way it believes appropriate without incurring any obligation to you.
If you are mailing a readers' comment form (RCF) from a country other than the United
States, you can give the RCF to the local IBM branch office or IBM representative for
postage-paid mailing.
If you prefer to send comments by mail, use the RCF at the back of this book.
If you prefer to send comments by FAX, use this number:
– United States: 1-800-426-6209
– Other countries: (+1)+408+256-7896
If you prefer to send comments electronically, use this network ID:
– IBMLink from U.S. and IBM Network: STARPUBS at SJEVM5
– IBMLink from Canada: STARPUBS at TORIBM
– IBM Mail Exchange: USIB3VVD at IBMMAIL
– Internet: [email protected]
Overall, how satisfied are you with the information in this book?
Very Very
Satisfied Satisfied Neutral Dissatisfied Dissatisfied
Overall satisfaction Ø Ø Ø Ø Ø
How satisfied are you that the information in this book is:
Very Very
Satisfied Satisfied Neutral Dissatisfied Dissatisfied
Accurate Ø Ø Ø Ø Ø
Complete Ø Ø Ø Ø Ø
Easy to find Ø Ø Ø Ø Ø
Easy to understand Ø Ø Ø Ø Ø
Well organized Ø Ø Ø Ø Ø
Applicable to your tasks Ø Ø Ø Ø Ø
When you send comments to IBM, you grant IBM a nonexclusive right to use or distribute your comments
in any way it believes appropriate without incurring any obligation to you.
Name Address
Company or Organization
Phone No.
Cut or Fold
Readers' Comments — We'd Like to Hear from You
IBM
Along Line
SC33-4035-17
NO POSTAGE
NECESSARY
IF MAILED IN THE
UNITED STATES
Cut or Fold
SC33-4035-17 Along Line
IBM
SC33-4ð35-17