DFSORT Application Programming Guide V1R5
DFSORT Application Programming Guide V1R5
SC26-7523-00
z/OS
SC26-7523-00
Note
Before using this information and the product it supports, be sure to read the general information under Notices on page
679.
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Contents v
Sample Routines Written in COBOL. . . . . . . . . . . . . . . . . 357
COBOL E15 User Exit: Altering Records . . . . . . . . . . . . . . 357
COBOL E35 User Exit: Inserting Records . . . . . . . . . . . . . 358
E15/E35 Return Codes and EXITCK . . . . . . . . . . . . . . . . 360
Contents vii
Using EFS . . . . . . . . . . . . . . . . . . . . . . . . . . 532
Addressing and Residence Mode of the EFS Program . . . . . . . . . . 532
How EFS Works . . . . . . . . . . . . . . . . . . . . . . . . 533
DFSORT Program Phases . . . . . . . . . . . . . . . . . . . 533
DFSORT Calls to Your EFS Program . . . . . . . . . . . . . . . 534
What You Can Do with EFS. . . . . . . . . . . . . . . . . . . . 538
Opening and Initializing Data Sets . . . . . . . . . . . . . . . . 539
Examining, Altering, or Ignoring Control Statements . . . . . . . . . . 539
Processing User-Defined Data Types with EFS Program User Exit Routines 541
Supplying Messages for Printing to the Message Data Set . . . . . . . 541
Terminating DFSORT . . . . . . . . . . . . . . . . . . . . . 541
Closing Data Sets and Housekeeping . . . . . . . . . . . . . . . 541
Structure of the EFS Interface Parameter List . . . . . . . . . . . . . 541
Action Codes . . . . . . . . . . . . . . . . . . . . . . . . 543
Control Statement Request List . . . . . . . . . . . . . . . . . 544
Control Statement String Sent to the EFS program . . . . . . . . . . 544
Control Statement String Returned by the EFS Program . . . . . . . . 546
EFS Formats for SORT, MERGE, INCLUDE, and OMIT Control Statements 547
D1 Format on FIELDS Operand . . . . . . . . . . . . . . . . . 547
D2 Format on COND Operand . . . . . . . . . . . . . . . . . 548
Length of Original Control Statement . . . . . . . . . . . . . . . 549
Length of the Altered Control Statement . . . . . . . . . . . . . . 550
EFS Program Context Area . . . . . . . . . . . . . . . . . . . 550
Extract Buffer Offsets List . . . . . . . . . . . . . . . . . . . 550
Record Lengths List . . . . . . . . . . . . . . . . . . . . . 550
Information Flags . . . . . . . . . . . . . . . . . . . . . . 550
Message List . . . . . . . . . . . . . . . . . . . . . . . . 552
EFS Program Exit Routines . . . . . . . . . . . . . . . . . . . . 552
EFS01 and EFS02 Function Description . . . . . . . . . . . . . . 553
EFS01 User Exit Routine. . . . . . . . . . . . . . . . . . . . 553
EFS02 User Exit Routine. . . . . . . . . . . . . . . . . . . . 554
Addressing and Residence Mode of EFS Program User Exit Routines 556
EFS Program Return Codes You Must Supply . . . . . . . . . . . . . 557
Record Processing Order . . . . . . . . . . . . . . . . . . . . 557
How to Request a SNAP Dump . . . . . . . . . . . . . . . . . . 559
EFS Program Example . . . . . . . . . . . . . . . . . . . . . 560
DFSORT Initialization Phase: . . . . . . . . . . . . . . . . . . 560
DFSORT Termination Phase . . . . . . . . . . . . . . . . . . 562
Contents ix
SYSIN Data Set . . . . . . . . . . . . . . . . . . . . . . . 626
Parameter Lists . . . . . . . . . . . . . . . . . . . . . . . 626
Override Tables . . . . . . . . . . . . . . . . . . . . . . . 627
Directly Invoked DFSORT . . . . . . . . . . . . . . . . . . . . 627
Notes to Directly Invoked DFSORT Table . . . . . . . . . . . . . . 636
Program Invoked DFSORT with the Extended Parameter List . . . . . . . 636
Notes to Extended Parameter List Table . . . . . . . . . . . . . . 645
Program Invoked DFSORT with the 24-Bit Parameter List . . . . . . . . 645
Notes to 24-Bit List Table . . . . . . . . . . . . . . . . . . . 655
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . 679
Programming Interface Information . . . . . . . . . . . . . . . . . 680
Trademarks. . . . . . . . . . . . . . . . . . . . . . . . . . 680
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681
You should also be familiar with the information presented in the following related
documents:
Table 1. Related documents
Document Title Document Order Number
z/OS DFSORT Messages, Codes and SC26-7525
Diagnosis Guide
z/OS MVS JCL Reference SA22-7597
z/OS MVS JCL Users Guide SA22-7598
z/OS DFSMS: Using Data Sets SC26-7410
z/OS DFSMS: Using Magnetic Tapes SC26-7412
Referenced documents
This document refers to the following documents:
Table 2. Referenced documents
Document title Order number
z/OS DFSMS Checkpoint/Restart SC26-7401
From this Web site, you can link directly to the z/OS softcopy documents by
selecting the Library icon. You can also link to the IBM Publications Center to order
printed documentation.
You can use LookAt from the following locations to find IBM message explanations
for z/OS elements and features, z/VM, and VSE:
You can obtain code to install LookAt on your host system or Windows workstation
from a disk on your z/OS Collection (SK3T-4269), or from the LookAt Web site
(click Download, and select the platform, release, collection, and location that suit
your needs). More information is available in the LOOKAT.ME files available during
the download process.
Licensed documents are available only to customers with a z/OS license. Access to
these documents requires an IBM Resource Link user ID and password, and a key
code. With your z/OS order you received a Memo to Licensees, (GI10-0671), that
includes this key code.
To obtain your IBM Resource Link user ID and password, log on to:
http://www.ibm.com/servers/resourcelink
Note: You cannot access the z/OS licensed documents unless you have registered
for access to them and received an e-mail confirmation informing you that
your request has been processed.
You can use the PDF format on either z/OS Licensed Product Library CD-ROM or
IBM Resource Link to print licensed documents.
Notational conventions
The syntax diagrams in this document 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 statement.
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
xviii z/OS V1R5.0 DFSORT Application Programming Guide
Notational Conventions
requires you to follow. Any path through the diagram gives you a correctly coded
statement, if you observe these conventions:
v Read the syntax diagrams from left to right and from top to bottom.
v Begin coding your statement at the spot marked with the double arrowhead.
v A single arrowhead at the end of a line indicates that the diagram continues on
the next line or at an indicated spot.
Required
Optional
v Where you can make one choice between two or more parameters, the
alternatives are stacked vertically.
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.
v 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).
, , (
a,b,c Choice-1
Choice-2
Choice-3
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 parentheses incorrectly.
Use any punctuation or delimiters that appear within the repeat symbol to
separate repeated items.
v A double arrowhead at the end of a line indicates the end of the syntax diagram.
You might notice changes in the style and structure of some content in this
documentfor example, more specific headings for notes, such as Tip and
Requirement. The changes are ongoing improvements to the consistency and
retrievability of information in DFSORT documents.
New Information
This edition includes the following new enhancements:
Improvements in Performance
Memory object sorting is a new DFSORT capability that uses a memory object on
64-bit real architecture to improve the performance of sort applications. A memory
object is a data area in virtual storage that is allocated above the bar and backed
by central storage. With memory object sorting, a memory object can be used
exclusively, or along with disk space, for temporary storage of records. Memory
object sorting can reduce I/O processing, elapsed time, EXCPs, and channel usage.
When a memory object is used, Hiperspace and data space are not needed.
A new NULLOUT installation (ICEMAC) and run-time option allows you to specify
what you want DFSORT to do when there are no records for the SORTOUT data
set. This gives you control over the action (continue or terminate), type of message
(informational or error) and return code (0, 4 or 16) for a SORTOUT data set with
no records.
A new NULLOFL installation (ICEMAC) option and OUTFIL run-time option allows
you to specify what you want DFSORT to do when there are no data records for an
OUTFIL data set. This gives you control over the action (continue or terminate),
type of message (informational or error) and return code (0, 4 or 16) for an OUTFIL
data set with no data records.
The IBM-supplied default for ICEMAC option COBEXIT has been changed from
COB1 to COB2.
The IBM-supplied default for ICEMAC option DSA has been changed from 32MB to
64MB.
The IBM-supplied default for ICEMAC option ZDPRINT has been changed from NO
to YES.
New Information
This edition includes the following new enhancements:
ICETOOL Enhancements
A new SPLICE operator helps you to perform various file join and match
operations. SPLICE allows you to create output records in a variety of ways by
splicing together fields from records that have the same key, but different
information. For example, for the same userid, you could create output records
consisting of the division and department from one type of record (originating in
input file1) with the account number and phone number from another type of record
(originating in input file2). Spliced records can be created by combining the first
duplicate and:
v one or more fields from the last duplicate, or
v one or more fields for each subsequent duplicate, or
v one field from each subsequent duplicate.
Non-duplicate records can be deleted or kept.
The USING(xxxx) option can now be used with ICETOOLs SELECT operator to
process DFSORT control statements like INCLUDE, OMIT and OUTFIL for a
SELECT operation.
New LISTSDB and LISTNOSDB options for ICETOOLs DEFAULTS, DISPLAY and
OCCUR operators allow you to control the use of system-determined optimum
blocksize for LIST data sets.
OUTFIL Enhancements
New SAMPLE=n and SAMPLE=(n,m) options of OUTFIL allow you to sample
records in a variety of ways.
A new REPEAT=n option of OUTFIL allows you to write each output record multiple
times.
A new DATE4 option of OUTFIL OUTREC allows you to insert a timestamp for your
DFSORT run in the form yyyy-mm-dd-hh.mm.ss into your records.
OUTFIL OUTREC now allows you to insert decimal constants (+n and n) in your
records as BI, FI, PD, ZD, FS or edited CH values.
OUTFIL OUTREC now allows you to combine fields (p,m,f), decimal constants (+n
and n), operators (MIN, MAX, MUL, DIV, MOD, ADD, SUB) and parentheses to
form arithmetic expressions, and place the results in your records as BI, FI, PD, ZD,
FS or edited CH values.
The maximum length for an SS field used with OUTFIL INCLUDE and OUTFIL
OMIT has been raised to 32752.
INREC and OUTREC now allow you to insert decimal constants (+n and n) in your
records as BI, FI, PD, ZD, FS or edited CH values.
INREC and OUTREC now allow you to combine fields (p,m,f), decimal constants
(+n and n), operators (MIN, MAX, MUL, DIV, MOD, ADD, SUB) and parentheses
to form arithmetic expressions, and place the results in your records as BI, FI, PD,
ZD, FS or edited CH values.
The maximum length for an SS field used with INCLUDE and OMIT has been
raised to 32752.
FORMAT=f can now be used with mixed p,m and p,m,f fields in the COND operand
for INCLUDE and OMIT. f from FORMAT=f will be used for p,m fields but not for
p,m,f fields.
Other Enhancements
Enhancements to DFSORTs control statement continuation rules allow you to
continue a line that breaks at column 71 anywhere in columns 2 to 16 of the next
line.
New Information
This edition includes the following new enhancements:
z900
DFSORT can now exploit the z900s 64-bit real architecture by backing storage and
data spaces in real storage above 2 gigabytes, and by using central storage instead
of expanded storage for Hipersorting.
Multiple Hiperspaces
DFSORT can now use multiple Hiperspaces for external storage requirements,
increasing DFSORTs ability to use Hipersorting for large sort applications when
sufficient system resources are available.
Managed Tapes
DFSORT can now automatically obtain accurate input file size information for tapes
managed by tape management systems that supply a tape exit routine (ICETPEX).
This can result in improved sort performance and more accurate dynamic work
space allocation.
DFSORT can now automatically obtain input and output attributes such as RECFM,
LRECL and BLKSIZE, for tapes managed by tape management systems that supply
a tape exit routine (ICETPEX).
ICETOOL Enhancements
New EMPTY, NOTEMPTY, HIGHER(n), LOWER(n), EQUAL(n) and NOTEQUAL(n)
options of ICETOOLs COUNT operator allow you to set RC=12 or RC=0 based on
the count of records in a data set.
A new FIRSTDUP option of ICETOOLs SELECT operator allows you to keep just
the first record of each set of duplicates.
A new LASTDUP option of ICETOOLs SELECT operator allows you to keep just
the last record of each set of duplicates.
The maximum length for a CH field used with ICETOOL has been raised to 1500.
The maximum length for a HEX field used with ICETOOL has been raised to 1000.
New TM1, TM2, TM3 and TM4 formats of ICETOOLs DISPLAY and OCCUR
operators allow you to produce meaningful representations of SMF time values.
A new INDENT(n) option of ICETOOLs DISPLAY and OCCUR operators allows you
to specify the number of blanks for indentation.
A new STATLEFT option of ICETOOLs DISPLAY operator allows you to print the
headings for statistics to the left of the first column of data.
The use of formatting items has been extended to the record length, record number
and break field of ICETOOLs DISPLAY operator, and to the data field, record
length and value count of ICETOOLs OCCUR operator.
Additional formatting items are now provided as follows: Epattern (use a specified
pattern for numeric digits such as phone numbers, social security numbers, dates,
and so on), /D (divide by 10), /C (divide by 100), /DK (divide by 10000), /CK (divide
by 100000), LZ (leading zeros for mask), NOST (no statistics), and Ndd (dd digits).
OUTFIL Enhancements
A new FTOV option of OUTFIL allows you to convert fixed-length input records (for
example, FB) to variable-length output records (for example, VB). A new VTOF
option of OUTFIL (an alias for CONVERT) allows you to convert variable-length
input records (for example, VB) to fixed-length output records (for example, FB).
A new VLTRIM=byte option of OUTFIL allows you to remove trailing bytes such as
blanks, binary zeros or asterisks, from variable-length output records.
A new REMOVECC option of OUTFIL allows you to remove the ANSI control
characters from a report.
New DATEn, DATEn(c) and DATEnP options of OUTFIL OUTREC allow you to
insert the date of your DFSORT run into your records in various forms.
New TIMEn, TIMEn(c) and TIMEnP options of OUTFIL OUTREC allow you to insert
the time of your DFSORT run into your records in various forms.
New DT1, DT2 and DT3 formats of OUTFIL OUTREC allow you to produce
meaningful representations of SMF date values.
New TM1, TM2, TM3 and TM4 formats of OUTFIL OUTREC allow you to produce
meaningful representations of SMF time values.
A new M26 edit mask of OUTFIL OUTREC allows you to edit numeric values
according to the pattern ST...T (S is the sign and T is a significant digit).
The maximum position for the end of a field used with OUTFIL INCLUDE and OMIT
has been raised to 32752.
New DATEn, DATEn(c) and DATEnP options of OUTFIL INCLUDE and OMIT allow
you to compare fields with various formats to the date of your DFSORT run.
A positive decimal number (n or +n) can now be compared to a binary (BI) field for
OUTFIL INCLUDE and OMIT.
A new SKIP=0L option of OUTFIL SECTIONS allows you to suppress blank lines
between sections on the same page.
New TIMEn, TIMEn(c) and TIMEnP options of INREC and OUTREC allow you to
insert the time of your DFSORT run into your records in various forms.
New DT1, DT2 and DT3 formats of INREC and OUTREC allow you to produce
meaningful representations of SMF date values.
New TM1, TM2, TM3 and TM4 formats of INREC and OUTREC allow you to
produce meaningful representations of SMF time values.
A new M26 edit mask of INREC and OUTREC allows you to edit numeric values
according to the pattern ST...T (S is the sign and T is a significant digit).
The maximum length for an AQ or AC field used with SORT and MERGE has been
raised to 4092.
The maximum position for the end of a field used with INCLUDE and OMIT has
been raised to 32752.
A positive decimal number (n or +n) can now be compared to a binary (BI) field for
INCLUDE and OMIT.
Other Enhancements
The IBM-supplied default for ICEMAC option DYNSPC has been changed from 32
megabytes to 256 megabytes. This allows DFSORT to sort more data by default
with dynamically allocated work space when the input file size is unknown.
DYNSPC can now be specified as a run-time option. This allows you to adjust the
dynamically allocated work space for individual sort applications for which the input
file size is unknown.
DFSORT now issues message ICE118I, and sets on bit 3 of SMF type-16 record
field ICEFSZFL, when the input file size is unknown for a sort application. This
identifies sort applications which may benefit from a FILSZ=En or DYNSPC=n
value.
DFSORT copy can now be used when ICEGENER is called by a program that uses
an alternate SYSIN ddname with DUMMY. This can result in improved performance
for RACFs IRRUT200 utility when ICEGENER is installed as a replacement for
IEBGENER.
When all of the input for variable-length records is supplied through an E15 or E32
exit, and RECFM is not specified for the output data set, DFSORT now sets the
output RECFM as blocked rather than unblocked, if that allows the use of the
system-determined optimum block size for output.
DFSORT now issues message ICE042A and terminates if the QNAME option is
specified on an output DD statement.
DFSORT Overview
| This chapter introduces IBM z/OS DFSORT Licensed Program 5694-A01.
DFSORT is intended to run in problem state and in a user key ( that is, key 8 or
higher).
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 100 different data sets at a time.
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. INREC and OUTREC statements support a wide
variety of tasks including:
| v Insertion of blanks, zeros, strings, current date, current time, sequence numbers,
| decimal constants, and the results of arithmetic expressions before, between,
| and after the input fields in the reformatted records.
v Sophisticated conversion capabilities, such as hexadecimal display, conversion of
EBCDIC letters from lowercase to uppercase or uppercase to lowercase,
conversion of characters using the ALTSEQ translation table, and conversion of
numeric values from one format to another.
v Sophisticated editing capabilities, such as control of the way numeric fields are
presented with respect to length, leading or suppressed zeros, thousands
separators, decimal points, leading and trailing positive and negative signs, and
so on.
Twenty-seven 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 unlimited number of numeric editing
patterns are available via user-defined editing masks.
v Transformation of SMF date and time values to more usable forms.
v Transformation of various forms of two-digit year dates to various forms of
four-digit year dates using a specified fixed or sliding century window.
v Selection of a character or hexadecimal string from a lookup table, based on a
character, hexadecimal, or bit string as input (that is, lookup and change).
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:
v Creation of multiple output data sets containing unedited or edited records from a
single pass over one or more input data sets.
v 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.
v Conversion of variable-length record data sets to fixed-length record data sets.
v Conversion of fixed-length record data sets to variable-length record data sets.
| v Insertion of blanks, zeros, strings, current date, current time, sequence numbers,
| decimal constants, and the results of arithmetic expressions before, between,
| and after the input fields in the reformatted records.
v Sophisticated conversion capabilities, such as hexadecimal display, conversion of
EBCDIC letters from lowercase to uppercase or uppercase to lowercase,
conversion of characters using the ALTSEQ translation table, and conversion of
numeric values from one format to another.
v Sophisticated editing capabilities, such as control of the way numeric fields are
presented with respect to length, leading or suppressed zeros, thousands
separators, decimal points, leading and trailing positive and negative signs, and
so on.
Twenty-seven 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 unlimited number of numeric editing
patterns are available via user-defined editing masks.
v Transformation of SMF date and time values to more usable forms.
v Transformation of two-digit year dates to various forms of four-digit year dates
using a specified fixed or sliding century window.
v 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).
v 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).
v Creation of multiple output records from each input record, with or without
intervening blank output records.
| v Repetition and sampling of data records.
| v Splitting of data records in rotation among a set of output data sets.
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 define and use a symbol for any field or constant that is recognized in a
DFSORT control statement or ICETOOL operator. This makes it easy to create and
reuse collections of symbols (that is, mappings) representing information associated
with various record layouts. See Chapter 7, Using Symbols for Fields and
Constants, on page 507.
Invoking DFSORT
You can invoke DFSORT processing in the following ways:
v With an EXEC job control statement in the input stream using the name of the
program (for example, PGM=ICEMAN or PGM=SORT) or the name of a
cataloged procedure (for example, SORTD). See Chapter 2, Invoking DFSORT
with Job Control Language, on page 25.
TSO users can allocate the needed ddnames (for example, SYSOUT, SORTIN,
SORTOUT and SYSIN), and invoke DFSORT using a calling method equivalent
to PGM=ICEMAN. For example:
call *(iceman)
| or any other alias for DFSORT (for example, SORT) in this form.
See Chapter 10, Examples of DFSORT Job Streams, on page 583 for
examples of invoking DFSORT from REXX and CLISTs.
v With a program written in basic assembler language using a system macro
instruction. See Chapter 5, Invoking DFSORT from a Program, on page 363.
v With programs written in either COBOL or PL/I with a special facility of the
language. See the programmers guide describing the compiler version available
at your location.
v With the ICETOOL utility. See Chapter 6, Using ICETOOL, on page 381.
v With interactive panels supported under ISPF and ISMF. See DFSORT Panels
Guide for complete information.
Note: DFSORT Panels supports interactive panels for a subset of the functions
available with DFSORT. Although interactive panels for functions such as
DFSORTs Year 2000 Features and the OUTFIL Statement are not provided,
you can use Free Form Entry panels to specify complete DFSORT Control
Statements for these functions.
In this document, 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 DFSORTs 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:
v z/OS
| v z/OS.e
| Throughout this document, z/OS is used to refer to the z/OS and z/OS.e operating
| systems.
Additionally, DFSORT runs under z/OS when it is running as a guest under z/VM or
VM/ESA.
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 corresponding 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 32752 bytes of the record (see
Figure 1).
Record
Figure 1. Control Fields. Control fields may overlap, or be contained within other control fields.
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 algebraic 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 installation 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 locales
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
locales collating rules affect DFSORTs SORT, MERGE, INCLUDE, and OMIT
processing as follows:
v Sort and Merge
DFSORT produces sorted or merged records for output according to the collating
rules defined in the active locale. This provides sorting and merging for single- or
multi-byte character data based on defined collating rules that retain the cultural
and local characteristics of a language.
v Include and Omit
DFSORT includes or omits 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 that retain the cultural
and local characteristics of a language.
DFSORT Processing
Unless you use DFSORT Panels to prepare and submit your job (see DFSORT
Panels Guide), you must prepare job control language (JCL) statements and
DFSORT program control statements to invoke DFSORT processing. JCL
statements (see Chapter 5, Invoking DFSORT from a Program, on page 363) 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 79) 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 DFSORTs Hipersorting feature.
2. Work data setseither allocated dynamically by DFSORTs 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 allocate are explained in
Appendix A, Using Work Space, on page 615.
3. A combination of Hiperspace and work data sets.
Figure 2 on page 8 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
SKIPREC
INCLUDE / OMIT
INREC INREC
SORT / SUM
or MERGE / SUM
COPY
OUTREC OUTREC
|
| Figure 2. Record Processing Order
|
As shown in Figure 2, DFSORT processing follows this order:
1. DFSORT first checks whether you supplied a SORTIN data set for SORT and
COPY jobs or SORTINnn data sets for MERGE jobs. If so, DFSORT reads the
input records from them.
v If no SORTIN data set is present for a SORT or COPY job, you must use an
E15 user exit to insert all the records. (This is also true if you invoke
DFSORT from a program with the address of an E15 user exit in the
parameter list, because SORTIN will be ignored.) DFSORT can use a
COBOL E15 routine if you specified the E15 user exit in the MODS
statement.
v If no SORTINnn data sets are present for a MERGE job, you must use an
E32 user exit to insert all the records.
2. If input records for SORT or COPY jobs are read from a SORTIN data set,
DFSORT performs processing specified with the SKIPREC option. DFSORT
deletes records until the SKIPREC count is satisfied. Eliminating records
before a SORT or COPY gives better performance.
3. If the input records for a SORT or COPY job are read from a SORTIN data
set, DFSORT checks whether you specified an E15 user exit. If so, DFSORT
transfers control to the user exit routine. You can use a COBOL E15 routine if
the E15 user exit is specified in the MODS statement. The E15 routine can
insert, delete, or reformat records.
4. DFSORT performs processing specified on an INCLUDE or OMIT statement. If
you used an E15 user exit routine to modify the record format, the
INCLUDE/OMIT control field definitions you specify must apply to the current
format rather than to the original format. If you use the INCLUDE or OMIT
statements to delete unnecessary records before SORT, MERGE, or COPY
processing, your jobs run more efficiently.
5. For SORT or COPY jobs, DFSORT performs processing specified with the
STOPAFT option. Record input stops after the maximum number of records (n)
you specify have been accepted. DFSORT accepts records for processing if
they are:
v Read from SORTIN or inserted by E15
v Not deleted by SKIPREC
v Not deleted by E15
v Not deleted by an INCLUDE or OMIT statement.
6. DFSORT performs processing specified in an INREC statement. If you
changed record format before this step, the INREC control and separation field
definitions you specify must apply to the current format rather than to the
original one.
7. DFSORT performs processing specified in the SORT, MERGE, or OPTION
COPY statement.
v For SORT, all input records are processed before any output record is
processed.
v For COPY or MERGE, an output record is processed after an input record is
processed.
v For SORT or MERGE, if a SUM statement is present, DFSORT processes it
during the SORT or MERGE processing. DFSORT summarizes the records
and deletes duplicates. If you made any changes to the record format prior
to this step, the SORT or MERGE and SUM field definitions you specify
must apply to the current format rather than to the original one.
8. DFSORT performs processing specified in an OUTREC statement. If you
changed record format prior to this step, the OUTREC control or separation
field definitions must apply to the current format rather than to the original one.
9. If an E35 user exit is present, DFSORT transfers control to your user exit
routine after all statement processing is completed. If you changed record
format, the E35 user exit receives the records in the current format rather than
in the original one. You can use a COBOL E35 routine if you specify the E35
user exit in the MODS statement. You can use the E35 exit routine to add,
delete, or reformat records.
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:
| v DFSORT performs processing specified with the STARTREC, SAMPLE, and
| ENDREC options. Record input for the OUTFIL data sets starts with the
| record indicated by STARTREC, ends with the record indicated by
| ENDREC, and is sampled according to the records indicated by SAMPLE.
v 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.
| v DFSORT performs processing specified with the OUTREC, FTOV, VTOF (or
| CONVERT), VLFILL, VLTRIM and REPEAT options. Data records are
| reformatted, converted and repeated according to the options specified.
| v DFSORT performs processing specified with the LINES, HEADER1,
| TRAILER1, HEADER2, TRAILER2, SECTIONS, NODETAIL, and
| REMOVECC options. Report records are reformatted and report records are
| generated for the OUTFIL data sets.
| v DFSORT performs SPLIT or SPLITBY processing. Records are distributed
| among the OUTFIL data sets as evenly as possible.
v DFSORT writes your OUTFIL records to the appropriate 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 E32 user exit in the parameter list.
Data Set Considerations on page 11 contains general information about input data
sets. For specific information about the SORTIN data set, see SORTIN DD
Statement on page 67. For specific information about the SORTINnn data sets,
see SORTINnn DD Statement on page 68.
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 statement define the OUTFIL processing to
be performed for the OUTFIL data sets associated with that statement. 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 72. For specific information about the OUTFIL data sets, see
SORTOUT and OUTFIL DD Statements on page 72 and OUTFIL Control
Statements on page 194.
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.
OUTFIL is used to convert variable input to fixed output, or fixed input to variable
output, an output data set must be the same type (fixed or variable) as the input
data set.
Hierarchical File System (HFS) files are supported as input and output for sort and
copy applications.
Merging Records
Input to a merge application can be up to 100 blocked or unblocked QSAM or
VSAM data sets 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, or fixed output to variable output, an output
data set must be the same type (fixed or variable) as the input data set.
Hierarchical File System (HFS) files are supported as input and output for merge
applications.
For more information about specific DFSORT data sets, see Using DD Statements
on page 60.
General Considerations
Variable-length records are processed with a record descriptor word (RDW) in
positions 1-4, so the data starts in position 5. Fixed-length records are processed
without an RDW, so the data starts in position 1. Control statement positions should
be specified accordingly.
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, or you can use locale processing with the
appropriate locale.
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 z/OS DFSMS: Using
Data Sets for more details.
The maximum record length DFSORT can handle is subject to the following
limitations:
v Record length can never exceed the maximum record length you specify.
v Variable-length records are limited to 32756 bytes.
v VSAM variable-length records are limited to 32752 bytes.
v Fixed-length records are limited to 32760 bytes.
The number of records that can be sorted using a given amount of storage is
reduced by:
v Processing control fields of different formats
v Large numbers of control fields
v 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.
DFSORT truncates fixed-length records on the right when the SORTOUT LRECL is
smaller than the SORTIN/SORTINnn LRECL provided that:
v The application is not a conventional merge or tape work data set sort.
v TRUNC=RC16 is not in effect.
You can control the action that DFSORT takes when a variable-length output record
is longer than the LRECL of the SORTOUT or OUTFIL data set to which it is to be
written by using the VLLONG or NOVLLONG option as described in OPTION
Control Statement on page 142.
You can control the action that DFSORT takes when the SORTOUT LRECL is
larger than the SORTIN/SORTINnn LRECL with the PAD option as described in
OPTION Control Statement on page 142.
DFSORT pads fixed-length records with binary zeros on the right when the
SORTOUT LRECL is larger than the SORTIN LRECL provided that:
v The Blockset technique is selected.
v The application is a sort or copy.
v PAD=RC16 is not in effect.
DFSORT does not pad or truncate records returned from an E15 or E35 user exit
since it expects the exit to pad or truncate each record appropriately.
You can use INREC, OUTREC, and OUTFIL to pad, truncate, and reformat records.
See INREC Control Statement on page 117 and OUTREC Control Statement on
page 281 for details.
See Use ICEGENER Instead of IEBGENER on page 579 for information about
padding and truncating with ICEGENER.
For more information about Blockset and other DFSORT techniques, see Specify
Efficient Sort/Merge Techniques on page 565.
QSAM Considerations
v 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.
v Empty input data sets can be used.
v If any of the input data sets are on tape without standard labels, DCB parameters
must be specified on their DD statements.
v ISO/ANSI Version 1 tape files can only be used as inputnever as output.
v 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
v You can have DFSORT process VSAM records as fixed-length (F) or
variable-length (V). When you use VSAM input, DFSORT selects fixed-length
processing if you specify RECORD TYPE=F or variable-length processing if you
specify RECORD TYPE=V. If you do not specify RECORD TYPE=x, DFSORT
selects the record type to use according to the rules described in the
discussion of the TYPE operand in RECORD Control Statement on page 293.
The record type selected affects how the records are treated, and how control
statement positions should be specified, as follows:
Variable-length processing: An RRDS, KSDS, ESDS or VRRDS can always
be processed as variable-length. For VSAM input, DFSORT reads each
record and prepends a record descriptor word (RDW) to it. For VSAM output,
DFSORT removes the RDW before writing each record. Since DFSORT uses
an RDW in positions 1-4 to process variable-length records, the data starts in
position 5. Control statement positions should be specified accordingly.
Fixed-length processing: An RRDS can always be processed as
fixed-length. A KSDS, ESDS or VRRDS used for input should only be
processed as fixed-length if all of its records have a length equal to the
maximum record size defined for the cluster. Otherwise, input records which
are shorter than the maximum record size are padded with bytes that may or
may not be zeros (that is, garbage bytes). DFSORT does not use an RDW
to process fixed-length records, so the data starts in position 1. Control
statement positions should be specified accordingly.
v 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.
v If VSAMIO and RESET are in effect, a data set defined with REUSE can be used
for both input and output for a sort; that is, the data set can be sorted in-place.
v A data set used for input or output must have been previously defined.
v If VSAMEMT is in effect, an empty input data set is processed as having zero
records.
v VSAM data sets must not be concatenated (system restriction).
v VSAM and non-VSAM input data sets must not be specified together for a sort,
merge or copy application.
v 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.
v 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 313.
v You must build the VSAM exit list with the VSAM EXLST macro instruction giving
the addresses of your routines that handle VSAM exit functions.
v 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 for 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 for the VSAM cluster is
therefore 4 bytes less than the non-VSAM LRECL.
v An output data set defined without REUSE is processed as MOD.
v If RESET is in effect, an output data set defined with REUSE is processed as
NEW. If NORESET is in effect, an output data set defined with REUSE is
processed as MOD.
v DFSORT cannot access VSAM data sets in RLS mode, that is, RLS=CR and
RLS=NRI are not supported for VSAM input and output data sets.
You should be familiar with the information found in z/OS UNIX System Services
Users Guide regarding HFS files if you use them. DFSORT uses BSAM to access
HFS files and is thus subject to all of the capabilities and restrictions that entails, as
described in z/OS DFSMS: Using Data Sets.
Installation Defaults
When your system programmers installed DFSORT, they selected separate sets of
installation (ICEMAC) parameters to be used by default for the following eight
installation modules:
ICEAM1 (JCL)
is the batch direct invocation environment installation module. This set of
defaults is used at run time when DFSORT is invoked directly (that is, not
through programs) by batch jobs, provided that an enabled time-of-day
installation module (ICETDx) is not activated.
ICEAM2 (INV)
is the batch program invocation environment installation module. This set of
defaults is used at run time when DFSORT is invoked through batch
programs, provided that an enabled time-of-day installation module
(ICETDx) is not activated.
ICEAM3 (TSO)
is the TSO direct invocation environment installation module. This set of
defaults is used at run time when DFSORT is invoked directly (that is, not
through programs) by foreground TSO users, provided that an enabled
time-of-day installation module (ICETDx) is not activated.
ICEAM4 (TSOINV)
is the TSO program invocation environment installation module. This set of
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 625 for full
override details). This document 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 eight installation modules and the
IBM-supplied defaults they override, where appropriate.
Table 3. Using ICETOOL to List Installation Defaults
See Chapter 6, Using ICETOOL, on page 381 and DEFAULTS Operator on page
400 for more information on using ICETOOL and the DEFAULTS operator.
The functions of the available ICEMAC parameters are summarized below. z/OS
DFSORT 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 z/OS Program Directory.
Parameter Function
INV|JCL|TSO|TSOINV|TD1|TD2|TD3|TD4
Specifies the environment installation module
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 625.
Messages written to the message data set can be either critical error messages,
informational error messages, 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 messages, as determined during installation.
See z/OS DFSORT Messages, Codes and Diagnosis Guide for complete
information about DFSORT messages.
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.
4 Successful completion. DFSORT completed successfully, and:
v OVFLO=RC4 was in effect and summary fields overflowed, or
v PAD=RC4 was in effect and the SORTOUT LRECL was larger than the
SORTIN/SORTINnn LRECL (LRECL padding), or
v TRUNC=RC4 was in effect and the SORTOUT LRECL was smaller than
the SORTIN/SORTINnn LRECL (LRECL truncation), or
v SPANINC=RC4 was in effect and one or more incomplete spanned
records was detected, or
| v NULLOUT=RC4 was in effect and there were no records for the
| SORTOUT data set, or
| v NULLOFL=RC4 was in effect and there were no data records for an
| OUTFIL data set.
16 Unsuccessful completion. DFSORT detected an error that prevented it
from completing successfully.
If possible and appropriate, remove the obstacle that is causing Blockset not to be
selected.
Unless you create your jobs with the interactive DFSORT Panels facility (see
DFSORT Panels Guide), you must supply JCL statements with every DFSORT job
you submit.
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 DFSORT 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
//SYMNAMES DD Defines the SYMNAMES data set containing
statements to be used for symbol processing
//SYMNOUT DD Defines the data set in which SYMNAMES
statements and the symbol table are to be listed
//SORTIN DD1 Defines the input data set for a sort or copy
//SORTINnn DD1 Defines the input data sets for a merge
1
//SORTOUT DD 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
//SORTWKdd 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 625.
, other parameters
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.
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 installations 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 disk 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
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 installations 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 75.
Details of aliases for PARM options are given under the description of individual
options. Aliases for PARM Options on page 59 summarizes the available aliases.
DFSORT accepts but does not process the following EXEC/DFSPARM PARM
options: BALANCE, BALN, BIAS=value, BMSG, CASCADE, CMP=value, CPU,
CRCX, DEBUG, DIAG, ELAP, EXCPVR=value, IO, INCOR=value, INCORE=value,
LRGSORT, L6=value, L7=value, NOCOMMAREA, NOINC, NOIOERR, OPT=value,
OSCL, PEER, POLY, and PRINT121.
| ,
,PARM= E ABEND
NOABEND
ARESALL= n
nK
nM
AVGRLEN=n
BSAM
CINV
NOCINV
COBEXIT= COB1
COB2
DSPSIZE= MAX
n
DYNALLOC
= d
(d)
(,n)
(d,n)
OFF
(OFF)
DYNSPC=n
EFS= name
NONE
EQUALS
NOEQUALS
E15=COB
E35=COB
FILSZ= x
Ex
Ux
HIPRMAX= OPTIMAL
n
p%
LIST
NOLIST
LISTX
NOLISTX
LOCALE= name
CURRENT
NONE
MSGDDN=ddname
MOSIZE= MAX
n
p%
MSGPRT= ALL
CRITICAL
NONE
NULLOUT= RC0
RC4
RC16
ODMAXBF= n
nK
nM
OUTREL
NOOUTREL
OVFLO= RC0
RC4
RC16
PAD= RC0
RC4
RC16
RESALL= n
nK
nM
RESET
NORESET
SDB= LARGE
YES
INPUT
NO
SIZE= n
nK
nM
MAX
MAX-m
MAX-mK
MAX-mM
SKIPREC=z
SOLRF
NOSOLRF
SPANINC= RC0
RC4
RC16
STIMER
NOSTIMER
STOPAFT=n
SZERO
NOSZERO
TRUNC= RC0
RC4
RC16
VERIFY
NOVERIFY
VLLONG
NOVLLONG
VLSCMP
NOVLSCMP
VLSHRT
NOVLSHRT
VSAMEMT
NOVSAMENT
VSAMIO
NOVSAMIO
WRKREL
NOWRKREL
WRKSEC
NOWRKSEC
Y2PAST= s
f
ZDPRINT
NZDPRINT
ABEND or NOABEND
ABEND
NOABEND
ARESALL= n
nK
nM
nK
specifies that n times 1024 bytes of storage are to be reserved.
Limit: 5 digits.
nM
specifies that n times 1048576 bytes of storage are to be reserved.
Limit: 2 digits.
AVGRLEN=n
Specifies the average input record length in bytes for variable-length record sort
applications. For more information, see the discussion of the AVGRLEN option
in OPTION Control Statement on page 142.
n specifies the average input record length. The value for n must be between
4 and 32767 and must include the 4 byte record descriptor word (RDW).
BSAM
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 specified, all null data
sets must precede all non-null data sets; otherwise, the results are
unpredictable.
CINV or NOCINV
CINV
NOCINV
COBEXIT= COB1
COB2
DSPSIZE
DSPSIZE= MAX
n
DYNALLOC
= 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 the DYNALLOC option in OPTION
Control Statement on page 142 and Appendix A, Using Work Space, on page
615
d specifies the device name. You can specify any IBM disk or tape device
supported by your operating system in the same way you would specify it in
the JCL UNIT parameter. You can also specify a group name, such as DISK
or SYSDA.
For best performance, specify an emulated 3390-9 device (such as a
RAMAC) or another high-speed IBM disk device, and avoid specifying a
tape, virtual (VIO) or real 3390-9 device.
n specifies the maximum number of requested work data sets. If you specify
more than 255, a maximum of 255 data sets is used. If you specify 1 and
DYNALLOC
= (OFF)
OFF
DYNSPC=n
Temporarily overrides the DYNSPC installation option, which specifies the total
default primary space allocation for all of the dynamically allocated work data
sets when the input file size is unknown. That is, when DFSORT cannot
determine the input file size for a sort application and the number of records is
not supplied by a FILSZ or SIZE value. For more information, see the
discussion of the DYNSPC option in OPTION Control Statement on page 142.
n specifies the total default primary space, in megabytes, to be allocated for
all dynamically allocated work data sets (n is not the primary space for each
data set). n must be a value between 1 and 65535.
Do not specify a value which exceeds the available disk space, because
this causes dynamic allocation to fail for sort applications that use this
value.
EFS= name
NONE
Note: If you use locale processing for SORT, MERGE, INCLUDE, or OMIT
fields, you must not use an EFS program. DFSORTs locale processing
may eliminate the need for an EFS program. See OPTION Control
Statement on page 142 for information related to locale processing.
EQUALS
NOEQUALS
E15=COB
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.
E35=COB
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.
FILSZ= x
Ex
Ux
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 566 and Allocation of Work Data Sets on
page 617 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
HIPRMAX= OPTIMAL
n
p%
OPTIMAL
specifies that DFSORT determines dynamically the maximum amount of
Hiperspace to be used for Hipersorting.
n specifies that DFSORT determines dynamically the maximum amount of
Hiperspace to be used for Hipersorting, subject to a limit of nMB. n must be
a value between 0 and 32767. If n is 0, Hipersorting is not used.
p%
specifies that DFSORT determines dynamically the maximum amount of
hiperspace to be used for Hipersorting, subject to a limit of p percent of the
configured expanded storage. In 64-bit real mode, HIPRMAX=p% specifies
a percentage of an appropriate portion of central storage. p must be a value
between 0 and 100. If p is 0, Hipersorting is not used. The value calculated
for p% is limited to 32767MB, and is rounded down to the nearest MB.
LIST
NOLIST
LISTX
NOLISTX
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 z/OS
DFSORT Messages, Codes and Diagnosis Guide.
LOCALE= name
CURRENT
NONE
| MOSIZE
| MOSIZE= MAX
n
p%
|
|
| Temporarily overrides the MOSIZE installation option, which specifies the
| maximum size of a memory object to be used for memory object sorting. For
| more information, see the discussion of the MOSIZE option in OPTION Control
| Statement on page 142.
| MAX
| specifies that DFSORT determines dynamically the maximum size of a
| memory object to be used for memory object sorting.
| n specifies that DFSORT determines dynamically the maximum size of a
| memory object to be used for memory object sorting, subject to a limit of
| nMB. n must be a value between 0 and 2147483646. If n is 0, memory
| object sorting is not used.
| p%
| specifies that DFSORT determines dynamically the maximum size of a
| memory object to be used for memory object sorting, subject to a limit of p
| percent of the available central storage. p must be a value between 0 and
| 100. If p is 0, memory object sorting is not used. The value calculated for
| p% is limited to 2147483646MB, and is rounded down to the nearest MB.
MSGDDN=ddname
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 z/OS DFSORT
Messages, Codes and Diagnosis Guide.
MSGPRT
MSGPRT= ALL
CRITICAL
NONE
Temporarily overrides the MSGPRT installation option, which specifies the class
of messages to be written to the message data set. See z/OS DFSORT
Messages, Codes and Diagnosis Guide 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 statements are printed only if LIST is in effect.
NONE
specifies that no messages or control statements are printed.
| NULLOUT
| NULLOUT= RC0
RC4
RC16
|
|
| Temporarily overrides the NULLOUT installation option, which specifies the
| action to be taken by DFSORT when there are no records for the SORTOUT
| data set. For more information, see the discussion of the NULLOUT option in
| OPTION Control Statement on page 142.
| RC0
| specifies that DFSORT should issue message ICE173I, set a return code of
| 0, and continue processing when there are no records for the SORTOUT
| data set.
| RC4
| specifies that DFSORT should issue message ICE173I, set a return code of
| 4, and continue processing when there are no records for the SORTOUT
| data set.
| RC16
| specifies that DFSORT should issue message ICE206A, terminate, and give
| a return code of 16 when there are no records for the SORTOUT data set.
ODMAXBF= n
nK
nM
Limit: 2 digits
OUTREL
NOOUTREL
OVFLO= RC0
RC4
RC16
Temporarily overrides the OVFLO installation option, which specifies the action
to be taken by DFSORT when BI, FI, PD or ZD summary fields overflow. For
more information, see the discussion of the OVFLO option in OPTION Control
Statement on page 142.
RC0
specifies that DFSORT should issue message ICE152I (once), set a return
code of 0 and continue processing when summary fields overflow.
RC4
specifies that DFSORT should issue message ICE152I (once), set a return
code of 4 and continue processing when summary fields overflow.
RC16
specifies that DFSORT should issue message ICE195A, terminate and give
a return code of 16 when summary fields overflow.
PAD
PAD= RC0
RC4
RC16
Temporarily overrides the PAD installation option, which specifies the action to
be taken by DFSORT when the SORTOUT LRECL is larger than the
SORTIN/SORTINnn LRECL, for the cases where DFSORT allows LRECL
padding. For more information, see the discussion of the PAD option in
OPTION Control Statement on page 142.
RC0
specifies that DFSORT should issue message ICE171I (once), set a return
code of 0 and continue processing when the SORTOUT LRECL is larger
than the SORTIN/SORTINnn LRECL.
RC4
specifies that DFSORT should issue message ICE171I, set a return code of
4 and continue processing when the SORTOUT LRECL is larger than the
SORTIN/SORTINnn LRECL.
RC16
specifies that DFSORT should issue message ICE196A, terminate and give
a return code of 16 when the SORTOUT LRECL is larger than the
SORTIN/SORTINnn LRECL.
RESALL= n
nK
nM
RESET
NORESET
Note: A VSAM output data set defined without REUSE is processed as a MOD
data set.
SDB= LARGE
YES
INPUT
NO
INPUT
specifies that DFSORT is to use the system-determined optimum block size
for an output data set when its block size is zero, but is to limit the selected
block size to a maximum of 32760 bytes if the input block size is less than
or equal to 32760 bytes.
NO
specifies that DFSORT is not to use the system-determined optimum block
size.
SIZE= n
nK
nM
MAX
MAX-m
MAX-mK
MAX-mM
Temporarily overrides the SIZE installation option, which specifies the amount of
main storage available to DFSORT. For more information, see the discussion of
the MAINSIZE option in OPTION Control Statement on page 142.
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 KBs. 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 s. 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.
SKIPREC=z
Specifies the number of records (z) you want to skip (delete) 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 142.
z specifies the number of records to be skipped.
Limit: 28 digits (15 significant digits).
SOLRF
NOSOLRF
SPANINC= RC0
RC4
RC16
STIMER
NOSTIMER
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.
STOPAFT=n
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
142.
n specifies the maximum number of records to be accepted.
Limit: 28 digits (15 significant digits).
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.
SZERO
NOSZERO
TRUNC= RC0
RC4
RC16
Temporarily overrides the TRUNC installation option, which specifies the action
to be taken by DFSORT when the SORTOUT LRECL is smaller than the
SORTIN/SORTINnn LRECL, for the cases where DFSORT allows LRECL
truncation. For more information, see the discussion of the TRUNC option in
OPTION Control Statement on page 142.
RC0
specifies that DFSORT should issue message ICE171I, set a return code of
0 and continue processing when the SORTOUT LRECL is smaller than the
SORTIN/SORTINnn LRECL.
RC4
specifies that DFSORT should issue message ICE171I, set a return code of
4 and continue processing when the SORTOUT LRECL is smaller than the
SORTIN/SORTINnn LRECL.
RC16
specifies that DFSORT should issue message ICE196A, terminate and give
a return code of 16 when the SORTOUT LRECL is smaller than the
SORTIN/SORTINnn LRECL.
VERIFY
NOVERIFY
VLLONG
NOVLLONG
VLSCMP
NOVLSCMP
VLSHRT
NOVLSHRT
more information, see the discussion of the VLSHRT and NOVLSHRT options
in OPTION Control Statement on page 142.
VLSHRT
specifies that DFSORT continues processing if a short control field or
compare field is found.
NOVLSHRT
specifies that DFSORT terminates if a short control field or compare field is
found.
VSAMEMT
NVSAMEMT
VSAMIO
NOVSAMIO
These conditions ensure that the VSAM data set is processed as NEW for
output and will contain the sorted input records; that is it will be sorted
in-place.
DFSORT terminates if the same VSAM data set is specified for input and
output, and any of the above conditions are not met.
NOVSAMIO
specifies that DFSORT terminates if the same VSAM data set is specified
for input and output.
WRKREL
NOWRKREL
WRKSEC
NOWRKSEC
WRKSEC
specifies that automatic secondary allocation for temporary JCL
SORTWKdd 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
SORTWKdd data sets is not used.
Y2PAST= s
f
Temporarily overrides the Y2PAST installation option, which specifies the sliding
(s) or fixed (f) century window. The century window is used with DFSORTs Y2
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.
ZDPRINT
NZDPRINT
ZDPRINT
means convert positive ZD summation results to printable numbers.
NZDPRINT
means do not convert positive ZD summation results to printable numbers.
Using DD Statements
A DFSORT job always requires DD statements after the EXEC statement. DD
statements fall into two categories:
v System DD statements (discussed in detail in System DD Statements on page
63)
v Program DD statements (discussed in detail in Program DD Statements on
page 65).
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 Table 7. The subparameters of the DCB
parameter (a DD statement parameter) are described similarly in Table 8 on page
61.
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 12.
2. When using DFSORT applications, FREE=CLOSE cannot be used on any DD
statements except DFSPARM.
Table 7. DD Statement Parameters Used by DFSORT
Parameter When Required Parameter Values Default Value
{AMP| BUFSP} When password-protected Minimum buffer pool value None.
VSAM data sets are used given when creating the
and the password is data set.
supplied through E18, E38,
or E39.
DCB Required when 7-track tape Specifies information used (See separate
is used; for input on tape to fill the data control block subparameters in Table 8
without standard labels; and (DCB) associated with the on page 61.)
when the default values are data set.
not applicable.
DISP When the default value is Indicates the status and The system assumes
not applicable. disposition of the data set. (NEW, DELETE).
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.
Note: For a Conventional merge, SORTINn 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 Statements Notes on page 262.
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 concurrently.
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 statements dedicated to DFSORT, such as
SORTIN). The DD statements contained in the cataloged procedure (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.
v If you use DFSPARM, then SYSIN is not necessary unless your job
requires link-editing.
v 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.
v The data set must be defined with a RECFM of F or FB. The LRECL can
be 80, or more (when valid). If the LRECL is greater than 80, DFSORT
will use the first 80 bytes of each record.
If user exit routines are in SYSIN, the LRECL must be 80.
v DFSORT supports concatenated SYSIN data sets to the extent that the
system supports like concatenated data sets for BSAM. Refer to z/OS
DFSMS: Using Data Sets for further information about like
concatenated data sets.
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 75.
If you are using the supplied SORT cataloged procedure, the DD statements below
are automatically supplied. 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.
//SYMNAMES DD
Defines the SYMNAMES data set containing statements to be used for
symbol processing. Required only if symbol processing is to be performed.
//SYMNOUT DD
Defines the data set in which SYMNAMES statements and the symbol table
are to be listed. Optional if SYMNAMES DD is specified. Otherwise ignored.
//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.
//SORTWKdd 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.
//DFSPARM DD
Defines the data set from which both additional or changed DFSORT
SORTLIB DD Statement
The SORTLIB DD statement can usually be omitted. This statement describes the
data set that contains special DFSORT load modules.
//SORTLIB DD DSNAME=USORTLIB,DISP=SHR
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.
Data Set Characteristics: DFSORT accepts empty and null non-VSAM data sets,
and DUMMY data sets, for sorting and copying (be sure to supply DCB
parameters). DFSORT also accepts empty VSAM data sets for sorting and copying
provided VSAMEMT is in effect. 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 disk 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 disk
data sets that do not have DOS or VSE within the System Code field.
v 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.
v 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.
v 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.
v VSAM data sets must not be concatenated (system restriction).
v Input cannot consist of both VSAM and non-VSAM data sets.
//SORTIN DD DSNAME=INPUT,DISP=SHR
//SORTIN DD DSN=SORTIN,DISP=(OLD,KEEP),UNIT=3490,
// 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.
Data Set Characteristics: Input data sets can be either non-VSAM or VSAM, but
not both. DFSORT accepts empty and null non-VSAM data sets, and DUMMY data
sets, for merging (be sure to supply DCB parameters). DFSORT also accepts
empty VSAM data sets for merging provided VSAMEMT is in effect. 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 12 for additional considerations.
//SORTIN01 DD DSNAME=MERGE1,VOLUME=SER=000111,DISP=OLD,
// LABEL=(,NL),UNIT=3590,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=32000)
//SORTIN02 DD DSNAME=MERGE2,VOLUME=SER=000121,DISP=OLD,
// LABEL=(,NL),UNIT=3590,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=32000)
//SORTIN03 DD DSNAME=MERGE3,VOLUME=SER=000131,DISP=OLD,
// LABEL=(,NL),UNIT=3590,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=32000)
//SORTIN01 DD DSNAME=INPUT1,VOLUME=SER=000101, *
// UNIT=3390,DISP=OLD *DCB PARAMETERS
//SORTIN02 DD DSNAME=INPUT2,VOLUME=SER=000201, *SUPPLIED FROM
// UNIT=3390,DISP=OLD *LABELS
SORTWKdd DD Statement
The SORTWKdd DD statements describe the characteristics of the data sets used
as intermediate storage areas for records to be sorted; they also indicate the
location of these data sets.
When Required: One or more SORTWKdd statements are required for each sort
application (but not a merge or copy), unless:
v Input can be contained in main storage
v Dynamic work space allocation has been requested (DYNALLOC)
| v Hipersorting, dataspace sorting, or memory object sorting is used.
For information on using work data sets, see Appendix A, Using Work Space, on
page 615.
Devices: SORTWKdd 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.
//SORTWK01 DD SPACE=(CYL,(15,5)),UNIT=3390
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 SORTWKdd DD statement for a deferred restart would be:
//SORTWK01 DD DSNAME=name1,UNIT=3390,SPACE=(CYL,(15,5)),
// DISP=(NEW,DELETE,CATLG)
//SORTWK01 DD UNIT=3480,LABEL=(,NL)
//SORTWK02 DD UNIT=3480,LABEL=(,NL)
//SORTWK03 DD UNIT=3480,LABEL=(,NL)
These parameters specify unlabeled data sets on three 3480 tape units. Because
the DSNAME parameters are omitted, the system assigns unique names.
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 statement define the OUTFIL processing to
be performed for the OUTFIL data sets associated with that statement. For specific
information about OUTFIL processing, see OUTFIL Control Statements on page
194.
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.
For some jobs, the selection of a larger output data set block size 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.
Reblockable Indicator: DFSORT sets the reblockable indicator in the output data
set label when:
v See the discussion of the SOLRF and NOSOLRF options in OPTION Control
Statement on page 142 for information related to the SORTOUT LRECL.
//SORTOUT DD DSN=C905460.OUTPT,UNIT=3390,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.
DSNAME
specifies that the data set is called C905460.OUTPT.
SPACE
requests five cylinders of storage for the data set.
UNIT
Indicates that the data set is on a 3390.
SORTCKPT DD Statement
The SORTCKPT data set can be allocated on any device that operates with the
Basic Sequential Access Method (BSAM). Processing must be restarted only from
the last checkpoint taken.
//SORTCKPT DD DSNAME=CHECK,VOLUME=SER=000123,
// DSP=(NEW,KEEP),UNIT=3480
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.
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).
v 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.
v The data set must be defined with RECFM of F or FB. The LRECL can be 80, or
more (when valid). If the LRECL is greater than 80, DFSORT will use the first 80
bytes of each record.
v DFSORT supports concatenated SORTCNTL data sets to the extent that the
system supports like concatenated data sets for BSAM. Refer to z/OS DFSMS:
Using Data Sets for further information about like concatenated data sets.
v 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 *
OPTION MAINSIZE=8M
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
parameters 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
142.
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 625.
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.
For examples of using DFSPARM when you call DFSORT from a program, see
Overriding DFSORT Control Statements from Programs on page 364.
Full override and applicability details are listed below and in Appendix B,
Specification/Override of DFSORT Options, on page 625.
v If you use DFSPARM, SYSIN is not necessary unless your job requires
link-editing.
v 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.
v The data set must be defined with RECFM of F or FB. The LRECL can be 80, or
more (when valid). If the LRECL is greater than 80, DFSORT will use the first 80
bytes of each record.
v DFSORT supports concatenated DFSPARM data sets to the extent that the
system supports like concatenated data sets for BSAM. Refer to z/OS DFSMS:
Using Data Sets for further information about like concatenated data sets.
v 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 document to refer to this
data set source for EXEC PARM options and DFSORT program control
FREE=CLOSE can be used for applicable DFSPARM data sets (for example, with
temporary and permanent sequential data sets, but not with DD * data sets).
For example, if a COBOL program contains three SORT verbs, the following would
cause the control statements in DP1 to be used for the first SORT verb, the control
statements in DP2 to be used for the second SORT verb, and the control
statements in DP3 to be used for the third SORT verb:
//DFSPARM DD DSN=DP1,DISP=SHR,FREE=CLOSE
//DFSPARM DD DSN=DP2,DISP=SHR,FREE=CLOSE
//DFSPARM DD DSN=DP3,DISP=SHR,FREE=CLOSE
Without FREE=CLOSE, DP1 would be used for all three SORT verbs.
//DFSPARM DD *
SORT FIELDS=(1,2,CH,A),STOPAFT=300
ABEND
OPTION SORTIN=DATAIN
STOPAFT=500
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 statement, 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.
| 3. When PARMDDN=DFSPARM is specified or defaulted:
| v if a //DFSPARM DD data set is available at run-time, DFSORT will use it
| v if a //DFSPARM DD data set is not available at run-time, DFSORT will use a
| //$ORTPARM DD data set if available.
//DFSPARM DD *
SORT FIELDS=(5,2,CH,D),SKIPREC=10
STOPAFT=100,BSAM,SKIPREC=5
OPTION SORTIN=DATAIN,SKIPREC=20
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.
SORTDKdd DD Statement
SORTWKdd data sets can be assigned to VIO. If the ICEMAC parameter VIO is
specified or defaults to NO, SORTWKdd data sets are deallocated and reallocated
by DFSORT using SORTDKdd ddnames. SORTDKdd ddnames are 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.
in effect and neither an alternate message data set ddname statement 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.
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . 111
Example 3 . . . . . . . . . . . . . . . . . . . . . . . . 111
Method 2: Bit Comparison Tests . . . . . . . . . . . . . . . . . 111
Relational Condition Format . . . . . . . . . . . . . . . . . . 111
Fields . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Bit Constant . . . . . . . . . . . . . . . . . . . . . . . 112
Padding and Truncation . . . . . . . . . . . . . . . . . . . 112
Including Records in the Output Data SetBit Comparison Test Examples 113
Example 1 . . . . . . . . . . . . . . . . . . . . . . . . 113
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . 113
Example 3 . . . . . . . . . . . . . . . . . . . . . . . . 113
Date Comparisons . . . . . . . . . . . . . . . . . . . . . . 114
Relational Condition Format . . . . . . . . . . . . . . . . . . 114
Including Records in the Output Data SetDate Comparisons . . . . . . 116
Example 1 . . . . . . . . . . . . . . . . . . . . . . . . 116
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . 116
INCLUDE/OMIT Statement Notes . . . . . . . . . . . . . . . . 116
INREC Control Statement . . . . . . . . . . . . . . . . . . . . 117
INREC Statement Notes . . . . . . . . . . . . . . . . . . . . 127
Reformatting Records Before Processing Examples . . . . . . . . . 129
Example 1 . . . . . . . . . . . . . . . . . . . . . . . . 129
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . 129
Example 3 . . . . . . . . . . . . . . . . . . . . . . . . 130
Example 4 . . . . . . . . . . . . . . . . . . . . . . . . 131
Example 5 . . . . . . . . . . . . . . . . . . . . . . . . 131
MERGE Control Statement . . . . . . . . . . . . . . . . . . . . 132
Specifying a MERGE or COPYExamples . . . . . . . . . . . . . 135
Example 1 . . . . . . . . . . . . . . . . . . . . . . . . 135
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . 135
Example 3 . . . . . . . . . . . . . . . . . . . . . . . . 135
Example 4 . . . . . . . . . . . . . . . . . . . . . . . . 135
MODS Control Statement . . . . . . . . . . . . . . . . . . . . 135
Identifying User Exit RoutinesExamples . . . . . . . . . . . . . 138
Example 1 . . . . . . . . . . . . . . . . . . . . . . . . 138
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . 138
OMIT Control Statement . . . . . . . . . . . . . . . . . . . . . 139
Omitting Records from the Output Data SetExample . . . . . . . . . 141
Example . . . . . . . . . . . . . . . . . . . . . . . . . 141
OPTION Control Statement . . . . . . . . . . . . . . . . . . . . 142
Aliases for OPTION Statement Options . . . . . . . . . . . . . . 189
Specifying DFSORT Options or COPYExamples . . . . . . . . . . 189
Example 1 . . . . . . . . . . . . . . . . . . . . . . . . 189
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . 190
Example 3 . . . . . . . . . . . . . . . . . . . . . . . . 190
Example 4 . . . . . . . . . . . . . . . . . . . . . . . . 191
Example 5 . . . . . . . . . . . . . . . . . . . . . . . . 191
Example 6 . . . . . . . . . . . . . . . . . . . . . . . . 191
Example 7 . . . . . . . . . . . . . . . . . . . . . . . . 192
Example 8 . . . . . . . . . . . . . . . . . . . . . . . . 192
Example 9 . . . . . . . . . . . . . . . . . . . . . . . . 193
OUTFIL Control Statements . . . . . . . . . . . . . . . . . . . . 194
OUTFIL Statements Notes . . . . . . . . . . . . . . . . . . . 262
OUTFIL FeaturesExamples . . . . . . . . . . . . . . . . . . 265
Example 1 . . . . . . . . . . . . . . . . . . . . . . . . 265
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . 266
Example 3 . . . . . . . . . . . . . . . . . . . . . . . . 267
Example 4 . . . . . . . . . . . . . . . . . . . . . . . . 269
Example 5 . . . . . . . . . . . . . . . . . . . . . . . . 272
Example 6 . . . . . . . . . . . . . . . . . . . . . . . . 273
Example 7 . . . . . . . . . . . . . . . . . . . . . . . . 273
Example 8 . . . . . . . . . . . . . . . . . . . . . . . . 274
Example 9 . . . . . . . . . . . . . . . . . . . . . . . . 274
Example 10 . . . . . . . . . . . . . . . . . . . . . . . 275
Example 11 . . . . . . . . . . . . . . . . . . . . . . . . 276
Example 12 . . . . . . . . . . . . . . . . . . . . . . . 276
Example 13 . . . . . . . . . . . . . . . . . . . . . . . 277
Example 14 . . . . . . . . . . . . . . . . . . . . . . . 277
Example 15 . . . . . . . . . . . . . . . . . . . . . . . 278
Example 16 . . . . . . . . . . . . . . . . . . . . . . . 278
Example 17 . . . . . . . . . . . . . . . . . . . . . . . 279
Example 18 . . . . . . . . . . . . . . . . . . . . . . . 280
Example 19 . . . . . . . . . . . . . . . . . . . . . . . 280
OUTREC Control Statement . . . . . . . . . . . . . . . . . . . 281
OUTREC Statement Notes . . . . . . . . . . . . . . . . . . . 289
Reformatting the Output RecordExamples . . . . . . . . . . . . 290
Example 1 . . . . . . . . . . . . . . . . . . . . . . . . 290
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . 290
Example 3 . . . . . . . . . . . . . . . . . . . . . . . . 290
Example 4 . . . . . . . . . . . . . . . . . . . . . . . . 291
Example 5 . . . . . . . . . . . . . . . . . . . . . . . . 291
Example 6 . . . . . . . . . . . . . . . . . . . . . . . . 292
Example 7 . . . . . . . . . . . . . . . . . . . . . . . . 292
Example 8 . . . . . . . . . . . . . . . . . . . . . . . . 292
RECORD Control Statement . . . . . . . . . . . . . . . . . . . 293
Describing the Record Format and LengthExamples . . . . . . . . . 297
Example 1 . . . . . . . . . . . . . . . . . . . . . . . . 297
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . 297
SORT Control Statement . . . . . . . . . . . . . . . . . . . . . 298
SORT/MERGE Statement Notes . . . . . . . . . . . . . . . . . 305
Specifying a SORT or COPYExamples . . . . . . . . . . . . . . 305
Example 1 . . . . . . . . . . . . . . . . . . . . . . . . 305
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . 306
Example 3 . . . . . . . . . . . . . . . . . . . . . . . . 306
Example 4 . . . . . . . . . . . . . . . . . . . . . . . . 306
Example 5 . . . . . . . . . . . . . . . . . . . . . . . . 307
Example 6 . . . . . . . . . . . . . . . . . . . . . . . . 307
SUM Control Statement . . . . . . . . . . . . . . . . . . . . . 307
SUM Statement Notes . . . . . . . . . . . . . . . . . . . . . 309
Adding Summary FieldsExamples . . . . . . . . . . . . . . . . 311
Example 1 . . . . . . . . . . . . . . . . . . . . . . . . 311
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . 311
Example 3 . . . . . . . . . . . . . . . . . . . . . . . . 311
Example 4 . . . . . . . . . . . . . . . . . . . . . . . . 311
This chapter begins with a summary of DFSORT program control statements and
coding rules. A detailed description of each statement follows.
Using Symbols
You can define and use a symbol for any field or constant in the following DFSORT
control statements: INCLUDE, INREC, MERGE, OMIT, OUTFIL, OUTREC, SORT
and SUM. This makes it easy to create and reuse collections of symbols (that is,
mappings) representing information associated with various record layouts. See
Chapter 7, Using Symbols for Fields and Constants, on page 507 for complete
details.
All other DFSORT control statements have the same general format, shown in
Figure 5. 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 363 for
information on the special rules that apply.
72 73 80
(Continuation column)
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.
v Label Field
If present, the label must begin in column 1, and must conform to the operating
system requirements for statement labels.
v 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.
v Operand Field
The operand field is composed of one or more operands separated by commas
or semicolons. 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=(10,30,A)
v 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.
v 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 or colon followed by a blank,
the program assumes that the next line is a continuation 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.
v 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 6.
Column 1 must
be blank 16
72 73 80
Optional use
Continued operand or remarks
(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.
| Attention: You should only start with a blank in column 16 of line 2 if you need a
| blank as the first character of the continued operand, as shown in the OUTREC
| statement above. A blank in column 16 of line 2 will be included in the operand
| and will result in invalid syntax if incorrectly placed. For example:
| * 1 2 3 4 5 6 7
| *23456789012345678901234567890123456789012345678901234567890123456789012
| SORT FIELDS=(5,4,Z*
| D,A)
| SUM FIELDS=(5,4,Z*
| D)
| With the D in column 16 of line 2, we get ZD in the SORT statement. But with
| the D in column 17 of line 2, we get Z D in the SUM statement instead of ZD,
| resulting in a syntax error.
| v Explicit continuation in 2-15: If line 1 breaks at column 71 with a nonblank in
| column 72, and columns 2-15 of line 2 are nonblank, DFSORT continues on line
| 2 with the first nonblank character it finds in columns 2-15. For example:
| * 1 2 3 4 5 6 7
| *23456789012345678901234567890123456789012345678901234567890123456789012
| INCLUDE COND=(5,4,CH,EQ,CAB*
| CD)
| SORT FIELDS=(9,3,*
| ZD,A)
| OUTREC FIELDS=(5,4,2X*
| ,9,3,ZD,M26,80:X)
Coding Restrictions
The following rules apply to control statement preparation:
v Labels, operation definers, and operands must be in uppercase EBCDIC.
v 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.
v Labels must begin in column 1 and conform to operating system requirements for
statement labels.
v The entire operation definer must be contained on the first line of a control
statement.
v 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.
v Blanks are not allowed in operands. Anything following a blank is considered part
of the remark field.
v 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.
v Commas, semicolons, and blanks can be used only as delimiters. They can be
used in values only if the values are constants.
v Each type of program control statement can appear only once within a single
source (for example, the SYSIN data set).
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.
The ALTSEQ control statement can be used to change the alternate translation
table (ALTSEQ table). Any modifications you specify are applied to the standard
EBCDIC translation table. The modified ALTSEQ table overrides the installation
default ALTSEQ table (the shipped default is the EBCDIC translation table).
CODE=( E fftt )
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.
The character $ (X'5B') is to collate at position X'EA', that is, after uppercase Z
(X'E9').
Example 2
MERGE FIELDS=(25,7,A,1,10,D),FORMAT=CH
OPTION CHALT
ALTSEQ CODE=(F0B0,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
SORT FIELDS=(55,8,AQ,A)
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
SORT FIELDS=(55,8,AQ,A)
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)
Example 5
OPTION COPY
ALTSEQ CODE=(0040)
OUTREC FIELDS=(1,80,TRAN=ALTSEQ)
DEBUG E ABEND
NOABEND
ABSTP
BSAM
CFW
NOCFW
CTRx=n
,
EFSDPAFT=( E n )
,
EFSDPBFR=( E n )
EQUCOUNT
ESTAE
NOESTAE
NOASSIST
The DEBUG control statement is not intended for regular use; only ABEND,
NOABEND, and BSAM 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 diagnosis, see z/OS
DFSORT Messages, Codes and Diagnosis Guide.
ABEND or NOABEND
ABEND
NOABEND
NOABEND
Specifies that an unsuccessful sort, copy, or merge terminates with a return
code of 16.
BSAM
Temporarily bypasses the EXCP access method for input and output data sets.
BSAM is ignored for VSAM input and output data sets.
CFW
NOCFW
NOCFW
Specifies that DFSORT cannot use cache fast write.
CTRx=n
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).
EFSDPAFT=( E n )
Initiates a SNAP dump after a Major Call to an EFS program. Any combination
of the numbers can be specified.
EFSDPBFR
EFSDPBFR=( E n )
EQUCOUNT
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:
1. Using EQUCOUNT can degrade performance.
2. ICETOOLs UNIQUE and OCCUR operators provide unique and non-unique
key reporting capabilities that may be more useful for your application than
EQUCOUNT.
3. If VLSHRT is in effect, EQUCOUNT will not be used.
ESTAE
NOESTAE
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 processing. 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.
Note: See Appendix E, DFSORT Abend Processing, on page 673 for more
information on the DFSORT ESTAE recovery routine.
NOASSIST
Note: ICETOOLs UNIQUE and OCCUR operators provide full equal key reporting
capabilities and should be used instead of 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.
END
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.
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,1024,SYSIN,T)
END
object deck for E15 user exit here
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 set. 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.
relational condition1
.
If the logical expression is true for a given record, the record is included in the
output data set.
Although comparisons, substring comparison tests, bit logic tests, and date
comparisons 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:
v The INCLUDE statement applies to all input records; the INCLUDE parameter
applies only to the OUTFIL input records for its OUTFIL group.
| v FORMAT=f can be specified with the INCLUDE statement but not with the
| INCLUDE parameter. Thus, you can use FORMAT=f and p,m or p,m,f fields with
| the INCLUDE statement, but you must only use p,m,f fields with the INCLUDE
| parameter. For example:
| INCLUDE FORMAT=BI,
| COND=(5,4,LT,11,4,OR,21,4,EQ,31,4,OR,
| 61,20,SS,EQ,CFLY)
|
| OUTFIL INCLUDE=(5,4,BI,LT,11,4,BI,OR,21,4,BI,EQ,31,4,BI,OR,
| 61,20,SS,EQ,CFLY)
v D2 format can be specified with the INCLUDE statement but not with the
INCLUDE parameter.
See OUTFIL Control Statements on page 194 for more details on the OUTFIL
INCLUDE parameter.
COND
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.
FORMAT=f
| FORMAT=f can be used to specify a particular format for one or more compare
| fields. f from FORMAT=f is used for p,m fields. f from FORMAT=f is ignored for
| p,m,f fields. For example, the following are all equivalent:
| INCLUDE COND=(5,5,ZD,EQ,12,3,PD,OR,21,3,PD,NE,35,5,ZD)
|
| INCLUDE FORMAT=ZD,COND=(5,5,EQ,12,3,PD,OR,21,3,PD,NE,35,5)
|
| INCLUDE COND=(5,5,ZD,EQ,12,3,OR,21,3,NE,35,5,ZD),FORMAT=PD
The permissible field formats for comparisons are shown in Table 9 on page 99.
SS (substring) is the only permissible field format for substring comparison
tests. BI (unsigned binary) is the only permissible field format for bit logic tests.
The Y2x formats are the only permissible field formats for date comparisons.
Relational Condition
The relational condition specifies that a comparison or bit logic test be performed.
Relational conditions can be logically combined, with AND or OR, to form a logical
expression. If they are combined, the following rules apply:
v 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 parentheses is limited only by the amount of
storage available.)
v 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:
(p1,m1,f1, EQ , p2,m2,f2 )
NE constant
GT
GE
LT
LE
| (p1,m1, EQ , p2,m2 )
f1, NE ,f2
GT constant
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.
v 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 (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 32752.
v m1 specifies the length of the compare field. Acceptable lengths for different
formats are in Table 9.
v f1 specifies the format of the data in the compare field. Permissible formats are
given in Table 9.
| You can use p1,m1 rather than p1,m1,f1 if you use FORMAT=f to supply the
| format for the field.
Table 9. Compare Field Formats and Lengths
Format Code Length Description
5
CH 1 to 256 bytes Character
AQ 1 to 256 bytes Character with alternate
collating sequence
4. If your E15 user exit routine formats the record, p1 must refer to the record as reformatted by the exit.
p2,m2,f2: These variables specify another field in the input record with which the
p1,m1,f1 field will be compared. Permissible comparisons between compare fields
with different formats are shown in Table 10 on page 101.
AC, ASL, and AST formats sequence EBCDIC data using the ISCII/ASCII collating
sequence.
| You can use p2,m2 rather than p2,m2,f2 if you use FORMAT=f to supply the format
| for the field.
Constants: A constant can be a decimal number (n, +n, n), character string
(C'xx...x'), or hexadecimal string (X'yy...yy'). The current date can also be used as a
decimal number (DATE1P, DATE2P, DATE3P) or character string (DATE1,
| DATE1(c), DATE2, DATE2(c), DATE3, DATE3(c), DATE4). The different constants
are explained in detail below. Permissible comparisons between compare fields and
constants are shown in Table 11.
Table 11. Permissible Field-to-Constant Comparisons for INCLUDE/OMIT.
Field Format Self-Defining Term
Decimal Number Character String Hexadecimal String
BI X X X
CH X X
ZD X
PD X
| PD0 X
FI X
AC X X
ASL X
Decimal Number Format: The format for coding a decimal constant is:
[]n
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 apostrophes. Thus:
Required: O'NEILL Specify: C'O''NEILL'
Examples of valid and invalid character string constants are shown below:
| Tip: When a field is shorter than the character string its compared to, DFSORT
truncates the string on the right. You can take advantage of this to compare a field
to only part of the DATE4 timestamp when appropriate. For example:
INCLUDE COND=(1,13,CH,GT,DATE4)
would compare the field in positions 1-13 to the truncated DATE4 constant
C'yyyy-mm-dd-hh'.
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.
| Since the first digit and sign are ignored in a PD0 field, you should not include the
| first digit or sign in a hexadecimal constant to be compared to a PD0 field. For
| example, 3-byte PD0 values like X'01234C' and X'01234D' would be equal to a
| hexadecimal constant of X'1234'.
Examples of valid and invalid hexadecimal constants are shown in the following
table.
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.
Note that all three compare fields have the same format.
Example 2
INCLUDE COND=(1,10,CH,EQ,CSTOCKHOLM,
AND,21,8,ZD,GT,+50000,
OR,31,4,CH,NE,CHERR)
Note that the AND is evaluated before the OR. ( Omitting Records from the Output
Data SetExample on page 141 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 FORMAT=CH,
| COND=((5,1,EQ,8,1),&,
| ((20,1,EQ,CA,&,30,1,FI,GT,10),|,
| (20,1,EQ,CB,&,30,1,FI,LT,100),|,
| (20,1,NE,CA,&,20,1,NE,CB)))
| Note that p,m,FI is used for the FI fields, and p,m with FORMAT=CH is used for all
| of the CH fields. With FORMAT=f, you can mix p,m and p,m,f fields when thats
| convenient such as when all or most of the fields have the same format (although
| you can always code p,m,f for all fields and not use FORMAT=f, if you prefer).
Example 4
INCLUDE COND=(7,2,CH,EQ,CT1,OR,
(1,2,BI,GE,X001A,AND,20,2,CH,EQ,25,2,CH))
compare compare
RDW field A field B
T1
7 10
compare compare
RDW field C field D
T2
7 20 25
Example 5
INCLUDE COND=(21,8,ZD,GT,DATE1P)
(p1,m1,SS, EQ , constant )
NE
| (p1,m1, EQ , constant )
SS, NE
NE Not equal to
Fields:
p1,m1: These variables specify the character field in the input record for the
substring test.
v 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 32752.
| v m1 specifies the length of the field to be tested. The length can be 1 to 32752
| bytes.
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.
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.
6. If your E15 user exit routine formats the record, p1 must refer to the record as reformatted by the exit.
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.
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 associated 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.
v p1 specifies the first byte of the binary input field to be tested against the mask,
relative to the beginning 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 32752.
v 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.
AND
v Byte 18 has bit 0 on.
Example 2
INCLUDE COND=(11,1,BI,BM,X85)
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:
Table 14. Bit Comparison Example 2: Results for Selected Field Values
11,1,BI Value 11,1,BI Result Action
X85 False Omit Record
XC1 True Include Record
X84 True Include Record
X00 False Omit Record
Example 3
INCLUDE COND=(11,2,ALL,B0001001000110100,
OR,21,1,NONE,B01001100),FORMAT=BI
(p1,m1,BI, EQ , constant )
NE
| (p1,m1, EQ , constant )
BI, NE
Fields
p1,m1: These variables specify the binary field in the input record to be compared
to the bit constant.
v 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 32752.
v m1 specifies the length of the field to be tested. The length can be 1 to 256
bytes.
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).
8. If your E15 user exit routine formats the record, p1 must refer to the record as reformatted by the exit.
Example 2
INCLUDE COND=(11,1,BI,NE,B10...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:
Table 16. Bit Comparison Example 2: Results for Selected Field Values
11,1,BI Value 11,1,BI Result Action
X85 False Omit Record
XC1 True Include Record
X84 True Include Record
X97 False Omit Record
Example 3
INCLUDE COND=(11,2,EQ,B..01....0......1,
OR,21,1,EQ,B01......),FORMAT=BI
Date Comparisons
You can use DFSORTs Y2 formats in conjunction with the century window in effect,
as follows:
v Use the full date formats (Y2T, Y2U, Y2V, Y2W, Y2X and Y2Y) to compare a
two-digit year date field to a two-digit year date constant (Y constant) or to
another two-digit year date field.
v Use the year formats (Y2C, Y2Z, Y2S, Y2P, Y2D and Y2B) to compare a
two-digit year field to a two-digit year constant (Y constant) or to another two-digit
year field.
For example, you can include only those records for which a Z'yymm' date field is
between January 1996 and March 2005. Or you can include only those records for
which a P'dddyy' field is less than another P'dddyy' field.
The ordering of dates and special indicators used for comparisons with Y2 fields
and Y constants is the same as the ascending orders for sorting and merging Y2
fields (see SORT Control Statement on page 298 for details).
(p1,m1,Y2x, EQ , p2,m2,Y2x )
NE constant
GT
GE
LT
LE
| (p1,m1, EQ , p2,m2 )
Y2x, NE ,Y2x
GT constant
GE
LT
LE
Fields:
p1,m1,Y2x: These variables specify a two-digit year date field in the input record
to be compared either to another two-digit year date field in the input record or to a
two-digit year date constant.
v p1 specifies the first byte of the date field relative to the beginning of the input
record.9 The first data byte of a fixed-length record (FLR) has relative position 1.
9. If your E15 user exit routine formats the record, p1 must refer to the record as reformatted by the exit.
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 date fields must
start on a byte boundary, and no date field can extend beyond byte 32752.
v m1 specifies the length of the date field. Appendix C, Data Format Descriptions,
on page 657 describes the length and format for each type of date field.
v Y2x specifies the Y2 format. Appendix C, Data Format Descriptions, on page
657 describes the length (m) and format (Y2x) for each type of date field.
| You can use p1,m1 rather than p1,m1,Y2x if you use FORMAT=Y2x to supply the
| format for the date field.
p2,m2,Y2x: These variables specify another two-digit year date field in the input
record with which the p1,m1,Y2x field will be compared.
| You can use p2,m2 rather than p2,m2,Y2x if you use FORMAT=Y2x to supply the
| format for the date field.
Constant: A two-digit year date constant in the form Y'string' with which the
p1,m1,Y2x field will be compared.
Y'DATE1' generates a Y constant for the current date in the form Y'yymmdd'.
Y'DATE2' generates a Y constant for the current date in the form Y'yymm'.
Y'DATE3' generates a Y constant for the current date in the form Y'yyddd'.
You must use the same number of digits in a Y constant as the type of date;
leading zeros must be specified (for example, for Y'yymm', use Y'0001' for January
2000 and Y'0101' for January 2001).
v Y'LOW' (BI zeros), Y'BLANKS' (blanks) and Y'HIGH' (BI ones) can be used with
Y2T, Y2W and Y2S dates.
Note that the century window in effect will be used to interpret the Y'9901' and
Y'0312' date constants, as well as real dates in the C'yymm' date field. However,
the century window will not be used to interpret the Y'0000' special indicator
constant or special indicators in the C'yymm' date field.
Example 2
INCLUDE COND=(2,3,Y2X,LT,36,5,Y2T)
This example illustrates how to only include records in which a P'dddyy' date field in
bytes 2 through 4 is less than a Z'yyddd' date field in bytes 36 through 40.
Note that the century window in effect will be used to interpret real dates in the
P'dddyy' and Z'yyddd' date fields. However, the century window will not be used to
interpret special indicators in the P'dddyy' and Z'yyddd' date fields.
Table 19 on page 117 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 Table 19 helps you get the result that
you want.
Table 19. Logic Table for INCLUDE/OMIT.
Relational Condition Program action if next logical operator is:
Statement Compare AND OR
OMIT True Check next compare, OMIT record
or if last compare
OMIT record.
OMIT False INCLUDE record Check next compare,
or if last compare,
INCLUDE record.
INCLUDE True Check next compare, INCLUDE record
or if last compare,
INCLUDE record.
INCLUDE False OMIT record Check compare, or if
last compare, OMIT
record.
| ,
INREC FIELDS= ( E s )
c: p,m
,a
p
p,m,HEX
p,HEX
p,m,TRAN=LTOU
p,TRAN=LTOU
p,m,TRAN=UTOL
p,TRAN=UTOL
p,m,TRAN=ALTSEQ
p,TRAN=ALTSEQ
p,m,Y2x
p,m,Y2x(c)
p,m,Y2xP
p,m,f ,edit
(p,m,f) ,to
deccon ,edit
(deccon) ,to
arexp ,edit
(arexp) ,to
p,m,Y2x ,edit
,to
p,m,lookup
seqnum
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.
For information concerning the interaction of INREC and OUTREC, see INREC
Statement Notes on page 127.
FIELDS
| ,
FIELDS= ( E s )
c: p,m
,a
p
p,m,HEX
p,HEX
p,m,TRAN=LTOU
p,TRAN=LTOU
p,m,TRAN=UTOL
p,TRAN=UTOL
p,m,TRAN=ALTSEQ
p,TRAN=ALTSEQ
p,m,Y2x
p,m,Y2x(c)
p,m,Y2xP
p,m,f ,edit
(p,m,f) ,to
deccon ,edit
(deccon) ,to
arexp ,edit
(arexp) ,to
p,m,Y2x ,edit
,to
p,m,lookup
seqnum
| Specifies the order and alignment of the separation fields (blanks, zeros,
| strings, current date and current time), unedited and edited input fields, edited
| decimal constants, edited results of arithmetic expressions, and sequence
| numbers in the reformatted input records.
| c: Specifies the position (column) for a separation field, input field, decimal
| constant, arithmetic expression, or sequence number, relative to the start of
| the reformatted input record. Unused space preceding the specified column
is padded with EBCDIC blanks. The following rules apply:
v c must be a number between 1 and 32752.
| v c: must be followed by a separation field, input field, decimal constant, or
| arithmetic expression.
v c must not overlap the previous input field or separation field in the
reformatted input record.
v 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 input
record.
v The colon (:) is treated like the comma (,) or semicolon (;) for
continuation to another line.
nC'xx...x'
Character string separation. n repetitions of the character string
constant (C'xx...x') are to appear in the reformatted input 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
nX'yy...yy'
Hexadecimal string separation. n repetitions of the hexadecimal
string constant (X'yy...yy') are to appear in the reformatted input
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. Examples of valid
and invalid hexadecimal string separation are shown in Table 24.
Table 24. 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
Table 24. Examples of Valid and Invalid Hexadecimal String Separation (continued)
Validity Specified Result Length
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
Invalid 'F2F1'X X in wrong place n/a
Invalid 8000X'01' Too many repetitions. Use two n/a
adjacent separation fields instead
(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 unedited 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.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 4 bytes contain the RDW). All fields must
start on a byte boundary, and no field can extend beyond byte 32752.
For special rules concerning variable-length records, see INREC
Statement Notes on page 127.
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 127 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).
10. If your E15 user exit reformats the record, p must refer to the record as reformatted by the exit.
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.
p,m,HEX
specifies that the hexadecimal representation of an input field is to appear in
the reformatted input record.
See p,m,HEX under OUTFIL OUTREC for details.
p,HEX
specifies that the hexadecimal representation of 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.
See p,HEX under OUTFIL OUTREC for details.
p,m,TRAN=LTOU
specifies that lowercase EBCDIC letters (that is, a-z) in an input field are to
appear as uppercase EBCDIC letters (that is, A-Z) in the reformatted input
record.
See p,m,TRAN=LTOU under OUTFIL OUTREC for details.
p,TRAN=LTOU
specifies that lowercase EBCDIC letters (that is, a-z) in the variable part of the
input record (that part beyond the minimum record length), are to appear as
uppercase EBCDIC letters (that is, A-Z) in the reformatted input record, as the
last field.
See p,TRAN=LTOU under OUTFIL OUTREC for details.
p,m,TRAN=UTOL
specifies that uppercase EBCDIC letters (that is, A-Z) in an input field are to
appear as lowercase EBCDIC letters (that is, a-z) in the reformatted input
record.
See p,m,TRAN=UTOL under OUTFIL OUTREC for details.
p,TRAN=UTOL
specifies that uppercase EBCDIC letters (that is, A-Z) in the variable part of the
input record (that part beyond the minimum record length), are to appear as
lowercase EBCDIC letters (that is, a-z) in the reformatted input record, as the
last field.
See p,TRAN=UTOL under OUTFIL OUTREC for details.
p,m,TRAN=ALTSEQ
specifies that the characters in an input field are to be changed according to the
ALTSEQ translation table in effect in the reformatted input record.
See p,m,TRAN=ALTSEQ under OUTFIL OUTREC for details.
p,TRAN=ALTSEQ
specifies that the characters in the variable part of the input record (that part
beyond the minimum record length), are to be changed according to the
ALTSEQ translation table in effect in the reformatted input record, as the last
field.
See p,TRAN=ALTSEQ under OUTFIL OUTREC for details.
Sample Syntax:
Fixed input records
INREC FIELDS=(1:5,10,15:8C0,25:20,15,TRAN=LTOU,80:X)
Variable input records
INREC FIELDS=(1,4,C RDW=,1,4,HEX,C FIXED=,
5,20,HEX,C VARIABLE=,21,HEX)
p,m,Y2x
specifies that the four-digit CH date representation of a two-digit year input date
field is to appear in the reformatted input record. Real dates are transformed
using the century window established by the Y2PAST option in effect. The
century window is not used for special indicators; they are just expanded
appropriately (for example, p,6,Y2T transforms C000000 to C00000000).
See p,m,Y2x under OUTFIL OUTREC for details.
Sample Syntax:
INREC FIELDS=(21,3,Y2V,X,12,5,Y2W)
p,m,Y2x(c)
specifies that the four-digit CH date representation with separators of a two-digit
year input date field is to appear in the reformatted input record. Real dates are
transformed using the century window established by the Y2PAST option in
effect. The century window is not used for special indicators; they are just
expanded appropriately (for example, p,6,Y2T(/) transforms C000000 to
C0000/00/00).
See p,m,Y2x(c) under OUTFIL OUTREC for details.
Sample Syntax:
INREC FIELDS=(25,6,Y2T(-),X,14,2,Y2U(/))
p,m,Y2xP
specifies that the four-digit PD date representation of a two-digit year input date
field is to appear in the reformatted input record. Real dates are transformed
using the century window established by the Y2PAST option in effect. The
century window is not used for special indicators; they are just expanded
appropriately (for example, p,6,Y2TP transforms C000000 to P00000000).
See p,m,Y2xP under OUTFIL OUTREC for details.
Sample Syntax:
INREC FIELDS=(11,3,Y2XP,X,21,4,Y2WP)
| p,m,f,edit or (p,m,f),edit
specifies that an edited numeric input field is to appear in the reformatted input
record.You can edit BI, FI, PD, PD0, ZD, CSF/FS, DT1, DT2, DT3, TM1, TM2,
TM3 or TM4 fields using either pre-defined edit masks (M0-M26) or specific edit
patterns you define. You can control the way the edited fields look with respect
to length, leading or suppressed zeros, thousands separators, decimal points,
leading and trailing positive and negative signs, and so on.
See p,m,f,edit under OUTFIL OUTREC for details.
Sample Syntax:
| INREC FIELDS=(5:21,8,ZD,M19,X,46,5,ZD,M13,
| 31:(35,6,FS),SIGNS=(,,+,-),LENGTH=10,
| 51:8,4,PD,EDIT=(**II,IIT.TTXS),SIGNS=(,,+,-))
| p,m,f,to or (p,m,f),to
specifies that a converted numeric input field is to appear in the reformatted
input record. You can convert BI, FI, PD, PD0, ZD, CSF/FS, DT1, DT2, DT3,
TM1, TM2, TM3 or TM4 fields to BI, FI, PD, ZD or CSF/FS fields.
See p,m,f,to under OUTFIL OUTREC for details.
Sample Syntax:
| INREC FIELDS=(21,5,ZD,TO=PD,X,(8,4,ZD),FI,LENGTH=2)
| deccon,edit or (deccon),edit
| specifies that an edited decimal constant is to appear in the reformatted input
| record. The decimal constant must be in the form +n or n where n is 1 to 15
| decimal digits. The sign (+ or ) must be specified. A decimal constant
| produces a signed, 15-digit zoned decimal (ZD) result to be edited as specified.
| See deccon,edit under OUTFIL OUTREC for details.
| Sample Syntax:
| INREC FIELDS=(5:+5000,EDIT=(T,TTT),X,
| (-25500),M18,LENGTH=8)
| deccon,to or (deccon),to
| specifies that a converted decimal constant is to appear in the reformatted input
| record. The decimal constant must be in the form +n or n where n is 1 to 15
| decimal digits. The sign (+ or ) must be specified. A decimal constant
| produces a signed, 15-digit zoned decimal (ZD) result to be converted as
| specified.
| See deccon,to under OUTFIL OUTREC for details.
| Sample Syntax:
| INREC FIELDS=(+0,TO=PD,LENGTH=6,3Z,(-512000),FI)
| arexp,edit or (arexp),edit
| specifies that the edited result of an arithmetic expression is to appear in the
| reformatted input record. The arithmetic expression can consist of input fields,
| decimal constants, operators and parentheses. An arithmetic expression
| produces a signed, 15-digit zoned decimal (ZD) result to be edited as specified.
| See arexp,edit under OUTFIL OUTREC for details.
| Sample Syntax:
| INREC FIELDS=(C**,27,2,FI,MIN,
| 83,4,PD,EDIT=(STTTTTTT),SIGNS=(+,-),
| 15:(((15,5,ZD,ADD,+1),MUL,+100),DIV,62,2,PD),M25,LENGTH=10)
| arexp,to or (arexp),to
| specifies that the converted result of an arithmetic expression is to appear in
| the reformatted input record. The arithmetic expression can consist of input
| fields, decimal constants, operators and parentheses. An arithmetic expression
| produces a signed, 15-digit zoned decimal (ZD) result to be converted as
| specified.
| See arexp,to under OUTFIL OUTREC for details.
| Sample Syntax:
| INREC FIELDS=((15,6,FS,SUB,+5),ADD,(-1,MUL,36,6,FS),ZD,X,
| 3,2,FI,MIN,-6,LENGTH=4,TO=PD)
p,m,Y2x,edit
specifies that an edited four-digit year CH date representation of a two-digit
year input date field is to appear in the reformatted input record.
See p,m,Y2x,edit under OUTFIL OUTREC for details.
p,m,Y2x,to
specifies that a converted four-digit year date representation of a two-digit year
input date field is to appear in the reformatted input record.
See p,m,Y2x,to under OUTFIL OUTREC for details.
p,m,lookup
specifies that a character or hexadecimal string from a lookup table is to appear
in the reformatted input record. You can use p,m,lookup to select a specified
character or hexadecimal string based on matching an input value against
character, hexadecimal, or bit constants.
See p,m,lookup under OUTFIL OUTREC for details.
Sample Syntax:
INREC FIELDS=(11,1,
CHANGE=(6,
CR,CREAD,
CU,CUPDATE,
XFF,CEMPTY,
CA,CALTER),
NOMATCH=(11,6),
4X,
21,1,
CHANGE=(10,
B.1......,CVSAM,
B.0......,CNON-VSAM))
seqnum
specifies that a sequence number is to appear in the reformatted input record.
The sequence numbers are assigned in the order in which the records are
received for INREC processing. You can create BI, PD, ZD or CSF/FS
sequence numbers and control their lengths, starting values and increment
values.
See seqnum under OUTFIL OUTREC for details.
Sample Syntax:
INREC FIELDS=(SEQNUM,6,ZD,START=1000,INCR=50,1,60)
v Performance can be improved if you can significantly reduce the length of your
records with INREC. INREC and OUTREC should not be used unless they are
actually needed to reformat your records.
v For variable-length records, the first entry in the FIELDS parameter must specify
| or include the unedited 4-byte record descriptor word (RDW), that is, the first field
| must be 1,4 or 1,m with m greater than 4. DFSORT sets the length of the
reformatted record in the RDW.
| If the first field in the data portion of the input record is to appear unedited in the
reformatted input record immediately following the RDW, the entry in the FIELDS
| parameter can specify both RDW and data field in one (1,m,...). Otherwise, the
| RDW must be specifically included in the reformatted input record (for example,
| 1,4,1,4,HEX).
v If the SORTOUT LRECL is specified or available, DFSORT will use it even if it
does not match the reformatted INREC record length; this can cause padding or
truncation of the reformatted INREC records, or termination. If the SORTOUT
LRECL is not specified or available, DFSORT can automatically use the
reformatted INREC record length as the SORTOUT LRECL, when appropriate.
See the discussion of the SOLRF and NOSOLRF options in OPTION Control
Statement on page 142.
For VSAM data sets, the maximum record size defined in the cluster is
equivalent to the LRECL when processing fixed-length records, and is four bytes
less than the LRECL when processing variable-length records. See VSAM
Considerations on page 14 for more information.
v The variable part of the input record (that part beyond the minimum record
length) can be included in the reformatted input record, and if included, must be
the last part. In this case, a value must be specified for pn that is less than or
equal to the minimum record length (see L4 of the RECORD control statement)
plus 1 byte; mn and an must be omitted.
If both INREC and OUTREC are specified, either both must specify position-only
for the last part, or neither must specify position-only for the last part.
If the reformatted input includes only the RDW and the variable part of the input
record, null records containing only an RDW could result.
v The input records are reformatted before processing, as specified by INREC. The
output records are in the format specified by INREC, unless OUTREC is also
specified.
v Fields referenced in INREC statements can overlap each other and control fields
or both.
v If input is variable records, the output is also variable. This means that each
record is given the correct RDW by DFSORT before output.
v If overflow might occur during summation, INREC can be used to create a larger
SUM field in the reformatted input record (perhaps resulting in a larger record for
sorting or merging) so that overflow does not occur.
v DFSORT issues a message and terminates if an INREC statement is specified
for a tape work data set sort or conventional merge application.
| v If SZERO is in effect, 0 is treated as negative and +0 is treated as positive for
| edited or converted input fields, decimal constants, and the results of arithmetic
| expressions. If NOSZERO is in effect, 0 and +0 are treated as positive for
| edited or converted input fields, decimal constants, and the results of arithmetic
| expressions.
INCLUDE COND=(5,1,GE,CM),FORMAT=CH
INREC FIELDS=(10,3,20,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,CM),FORMAT=CH
OUTREC FIELDS=(10,3,20,8,33,11,5,1)
SORT FIELDS=(20,8,CH,A,10,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.
SOLRF (the IBM-supplied default) is in effect, so unless the SORTOUT LRECL is
specified or available, it will automatically be set to the reformatted record length of
23. The reformatted records look as follows after INREC or OUTREC processing:
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=(20,4,CH,D,10,3,CH,D),FILES=3
SUM FIELDS=(36,4,BI,40,8,PD)
RECORD TYPE=F,LENGTH=(80,,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).
Chapter 3. Using DFSORT Program Control Statements 129
INREC Control Statement
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 prevents overflow of this summary field.
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=(20,4,12,3)
SORT FIELDS=(1,4,D,5,3,D),FORMAT=CH
OUTREC FIELDS=(5X,1,4,H,19:1,2,5,3,DATE1(),80XFF)
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 before
sorting to reduce the input records as much as possible, and using OUTREC after
sorting to add padding, the current date and repeated fields. 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 with a record size of 113 bytes.
SOLRF (the IBM-supplied default) is in effect, so unless the SORTOUT LRECL is
specified or available, it will automatically be set to the reformatted record length of
113. The reformatted output records 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
Thus, the use of INREC and OUTREC allows sorting of 7-byte records rather than
80-byte records, even though the output records are 113 bytes long.
Example 4
INREC FIELDS=(8100,10,1,8099,8110,891)
SUM FIELDS=(1,10,ZD)
SORT FIELDS=(5011,6,CH,A)
OUTREC FIELDS=(11,8099,1,10,8110,891)
This example illustrates how you can sum on a field beyond DFSORTs normal limit
of byte 4092 by using INREC and OUTREC.
The sort field is at input positions 5001 through 5006. The sum field is at
positions 8100 through 8109. The INREC statement is used to reformat the input
records so that the sum field is within the first 4092 bytes. The reformatted input
records look as follows:
Position Contents
1-10 Input positions 8100 through 8109. The sum field now starts in
position 1 rather than in position 8100.
118109 Input positions 1 through 8099, that is, the part of the record before
the sum field. The sort field now starts in position 5011 rather than
in position 5001.
81109000 Input positions 8110 through 9000, that is, the part of the record
after the sum field.
The INREC statement allows the SUM statement to refer to the sum field in the
reformatted record at position 1. The SORT statement must refer to the sort field in
the reformatted record at position 5011. The OUTREC statement is used to restore
the records to their original format, but with the updated sum field from positions 1
through 10.
Example 5
OPTION COPY,Y2PAST=1985
INREC FIELDS=(SEQNUM,4,BI,
8,5,ZD,TO=PD,
31,2,PD,TO=FI,LENGTH=2,
15,6,Y2TP,
25,3,CHANGE=(1,CL92,X01,CM72,X02,CJ42,X03),
NOMATCH=(XFF))
This example illustrates how a sequence number can be generated, how values in
one numeric or date format can be converted to another format, and how a lookup
table can be used.
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.
| ,
( E p,m, s ) , FORMAT=f
f,
COPY
(COPY)
,
, E EQUALS
NOEQUALS
FILES=n
FILSZ=x
SIZE=y
SKIPREC=z
STOPAFT=n
Y2PAST= s
f
A MERGE statement can also be used to specify a copy application. User labels
will not be copied to the output data sets.
You can merge up to 100 data sets with Blockset merge or up to 16 data sets with
Conventional merge. If Blockset merge is not selected, you can use a SORTDIAG
DD statement to force message ICE800I, which gives a code indicating why
Blockset could not be used.
The way in which DFSORT processes short MERGE control fields depends on the
setting for VLSHRT/NOVLSHRT. A short field is one where the variable-length
record is too short to contain the entire field, that is, the field extends beyond the
record. For details about merging short records, see the discussion of the VLSHRT
and NOVLSHRT options in OPTION Control Statement on page 142.
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 625. 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=value and ORDER=value.
If locale processing is to be used, the active locale will only be used to process
character (CH) control fields.
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
FIELDS= ( E p,m,f,s )
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 298.
FIELDS=COPY or FIELDS=(COPY)
FIELDS= COPY
(COPY)
See the discussion of the COPY option on the OPTION statement, in OPTION
Control Statement on page 142.
FORMAT=f
FORMAT=f
EQUALS or NOEQUALS
EQUALS
NOEQUALS
FILES=n
Specifies the number of input files for a merge when input is supplied through
the E32 exit.
FILSZ=x
SIZE=y
SKIPREC=z
STOPAFT=n
Y2PAST= s
f
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.
FILSZ
The input data sets contain exactly 29483 records.
Example 2
MERGE FIELDS=(3,8,ZD,E,40,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 is
| used to indicate that both fields have ZD format.
Example 4
MERGE FIELDS=COPY
FIELDS
The input data set is copied to output. No merge takes place.
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 313.
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
exit= ( n,m )
,
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:
1. The libraries identified by the STEPLIB DD statement
2. The libraries identified by the JOBLIB DD statement (if there is no STEPLIB
DD statement)
3. The link library.
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 the library for the COBOL exits.
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 323 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
HILEVEL=YES
specifies that:
v if an E15 routine is identified on the MODS statement, it is written in COBOL
v if an E35 routine is identified on the MODS statement, it is written in COBOL.
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.
11. The s parameter must be specified for a conventional merge or tape work data
set sort, or when S or T is specified for the e parameter.
Default: None; must be specified if you use exit routines. N is the default for the
fourth parameter.
For details on how to design your routines, refer to Summary of Rules for User Exit
Routines on page 321.
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.
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,7000,,C),
E35=(COBOLE35,7000,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.
relational condition1
.
If the logical expression is true for a given record, the record is omitted from the
output data set.
For example, you can omit those records which have bits 0 and 2 on in a 1-byte
field. Or you can omit those records which have bits 3 and 12 on and bits 6 and
8 off in a 2-byte field.
4. Date Comparisons:
Compare a two-digit year date field to a two-digit year date constant, the current
two-digit year date or another two-digit year date field, using the century window
in effect.
For example, you can omit only those records for which a Z'yymm' date field is
between January 1996 and March 2005. Or you can omit only those records for
which a P'dddyy' field is less than another P'dddyy' field.
For complete details on the parameters of the OMIT control statement, see
INCLUDE Control Statement on page 96.
The OMIT control statement differs from the OMIT parameter of the OUTFIL
statement in the following ways:
v The OMIT statement applies to all input records; the OMIT parameter applies
only to the OUTFIL input records for its OUTFIL group.
v FORMAT=f can be specified with the OMIT statement but not with the OMIT
| parameter. Thus, you can use FORMAT=f and p,m or p,m,f fields with the OMIT
| statement, but you must only use p,m,f fields with the OMIT parameter. For
| example:
| OMIT FORMAT=BI,
| COND=(5,4,LT,11,4,OR,21,4,EQ,31,4,OR,
| 61,20,SS,EQ,CFLY)
|
| OUTFIL OMIT=(5,4,BI,LT,11,4,BI,OR,21,4,BI,EQ,31,4,BI,OR,
| 61,20,SS,EQ,CFLY)
v D2 format can be specified with the OMIT statement but not with the OMIT
parameter.
See OUTFIL Control Statements on page 194 for more details on the OUTFIL
OMIT parameter.
COND
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.
FORMAT=f
| For details on this parameter, see INCLUDE Control Statement on page 96.
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.
| ,
OPTION E ARESALL= n
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)
DYNSPC=n
EFS= name
NONE
EQUALS
NOEQUALS
EXITCK= STRONG
WEAK
FILSZ= x
Ex
Ux
SIZE= y
Ey
Uy
HIPRMAX= OPTIMAL
n
p%
LIST
NOLIST
LISTX
NOLISTX
LOCALE= name
CURRENT
NONE
Figure 12. Syntax Diagram for the Option Control Statement (Part 1 of 3)
MAINSIZE= n
nK
nM
MAX
MOSIZE= MAX
n
p%
MSGDDN=ddname
MSGPRT= ALL
NONE
CRITICAL
NOBLKSET
NOOUTREL
NOOUTSEC
NOSTIMER
NULLOUT= RC0
RC4
RC16
ODMAXBF= n
nK
nM
OVFLO RC0
RC4
RC16
PAD RC0
RC4
RC16
RESALL= n
nK
nM
RESET
NORESET
RESINV= n
nK
nM
SDB= LARGE
YES
INPUT
NO
SKIPREC=z
SMF= SHORT
FULL
NO
SOLRF
NOSOLRF
SORTDD=cccc
SORTIN=ddname
SORTOUT=ddname
SPANINC= RC0
RC4
RC16
STOPAFT=n
SZERO
NOSZERO
TRUNC RC0
RC4
RC16
USEWKDD
Figure 12. Syntax Diagram for the Option Control Statement (Part 2 of 3)
VERIFY
NOVERIFY
VLLONG
NOVLLONG
VLSCMP
NOVLSCMP
VLSHRT
NOVLSHRT
VSAMEMT
NVSAMEMT
VSAMIO
NOVSAMIO
WRKREL
NOWRKREL
WRKSEC
NOWRKSEC
Y2PAST= s
f
ZDPRINT
NZDPRINT
Figure 12. Syntax Diagram for the Option Control Statement (Part 3 of 3)
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 statement (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 625.
Details of aliases for OPTION statement options are given under the description of
individual options. Table 30 on page 189 summarizes the available aliases.
DFSORT accepts but does not process the following OPTION operands: ALGQ,
APP, APPEND, BIAS=value, BLKSET, CASCADE, DIAG, ERASE, EXCPVR=value,
MAXPFIX=value, NEW, NEWFILE, NODIAG, NOERASE, NOINC, NOSWAP,
OPT=value, REP, REPLACE, WRKADR=value, WRKDEV=value, and
WRKSIZ=value.
ARESALL
ARESALL= n
nK
nM
ARESALL applies only to the amount of main storage above virtual. This option
is normally not needed because of the large amount of storage available above
16MB virtual (the default for ARESALL is 0 bytes). The RESALL option applies
to the amount of main storage below 16MB virtual.
n specifies that n bytes of storage are to be reserved.
Limit: 8 digits.
nK specifies that n times 1024 bytes of storage are to be reserved.
Limit: 5 digits.
nM specifies that n times 1048576 bytes of storage are to be reserved.
Limit: 2 digits.
ARESINV= n
nK
nM
ARESINV applies only to the amount of main storage above 16MB virtual. The
RESINV option applies to the amount of main storage below 16MB virtual.
n specifies that n bytes of storage are to be reserved.
Limit: 8 digits.
nK
specifies that n times 1024 bytes of storage are to be reserved.
Limit: 5 digits.
nM
specifies that n times 1048576 bytes of storage are to be reserved.
Limit: 2 digits.
AVGRLEN=n
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 566 and Allocation of Work Data Sets on page 617 for
more information on file size considerations.
n specifies the average input record length. n must be between 4 and 32767
and must include the 4-byte record descriptor word (RDW).
Notes:
1. AVGRLEN=n on the OPTION statement overrides the L5 value on the
RECORD statement (LENGTH operand) if both are specified. The L5 value
on the RECORD statement is ignored for Blockset.
2. L5=n can be used instead of AVGRLEN=n.
CHALT
NOCHALT
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.
CHECK or NOCHECK
CHECK
NOCHECK
CINV
NOCINV
CKPT
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.
COBEXIT COB1
COB2
COPY
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,
Note: User labels will not be copied to the output data sets.
DSPSIZE= MAX
n
DYNALLOC 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 615 for guidelines on the
use of DYNALLOC.
d specifies the device name. You can specify any IBM disk or tape device
supported by your operating system in the same way you would specify it in
the JCL UNIT parameter. You can also specify a group name, such as DISK
or SYSDA.
For best performance, specify an emulated 3390-9 device (such as
RAMAC) or another high-speed IBM disk device, and avoid specifying a
tape, virtual (VIO), or real 3390-9 device.
n specifies the maximum number of requested work data sets. If you specify
more than 255, a maximum of 255 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.
If VIO=NO is in effect
v Work space can be allocated on nontemporary data sets (DSNAME
parameter specified).
v 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.
DYNALLOC= (OFF)
OFF
Directs DFSORT not to allocate work space dynamically, overriding that function
of ICEMAC installation 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 suppress dynamic
allocation of work space.
OFF
directs DFSORT not to allocate work space dynamically.
DYNSPC=n
Generally, DFSORT can automatically determine the input file size. However, in
a few cases, such as when an E15 supplies all of the input records, when
information about a tape data set is not available from a tape management
You may want to use DYNSPC to override the installation default with a larger
or smaller value depending on the amount of disk space available for DFSORT
work data sets, and the amount of data to be sorted for this application. As a
guideline, Table 27 shows the approximate primary space in cylinders that is
allocated on a 3390 when Blockset sorts an unknown number of 6000-byte
records.
Table 27. Example of DYNSPC Primary Space
DYNSPC value (megabytes) Primary space (cylinders)
32 48
64 93
128 183
256 366
512 732
The larger your DYNSPC value, the more data DFSORT can sort when the file
size is unknown. For example, in a test using just dynamically allocated work
space (no Hiperspace or data space) with the primary space shown in Table 27,
and all of the corresponding secondary space, Blockset is able to sort
approximately 150 megabytes with DYNSPC=32 and approximately 1200
megabytes with DYNSPC=256. If Hiperspace or data space can be used along
with dynamically allocated work space, the amount of data DFSORT can sort
will increase according to the amount of Hiperspace or data space available.
n specifies the total default primary space, in megabytes, to be allocated
for all dynamically allocated work data sets (n is not the primary space
for each data set). n must be a value between 1 and 65535.
Do not specify a value which exceeds the available disk space,
because this causes dynamic allocation to fail for sort applications that
use this value.
EFS= name
NONE
name
specifies the name of the EFS program that will be called to interface with
DFSORT.
NONE
specifies no call will be made to the EFS program.
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. DFSORTs locale processing may
eliminate the need for an EFS program. See the LOCALE option later in this
section for information related to locale processing.
EQUALS
NOEQUALS
For sort applications, the sequence of the output records depends upon the
order of:
v The records from the SORTIN file
v The records inserted by an E15 user exit routine
v The E15 records inserted within input from SORTIN.
For merge applications, the sequence of the output records depends upon the
order of:
v 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.
v 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. When EQUALS is in effect with SUM, the first record of summed records is
kept. When NOEQUALS is in effect with SUM, the record to be kept is
unpredictable.
If a technique other than Blockset is selected, NOEQUALS is forced if SUM
is specified.
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 4294967295
(4 gigarecords minus 1); if the number of records exceeds this number,
message ICE121A is issued and DFSORT terminates.
EXITCK STRONG
WEAK
FILSZ= x
Ex
Ux
SIZE= y
Ey
Uy
The FILSZ parameter specifies either the exact number of records to be sorted
or merged, or an estimate 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 9, Improving
Efficiency, on page 563 and File Size and Dynamic Allocation on page 619
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, dataspace sorting, 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
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)
Table 29. SIZE Variations Summary (continued). SIZE=n is equivalent to SIZE=En if installation option FSZEST=YES
is specified.
Conditions SIZE=n SIZE=Un SIZE=En
Update n when number of In any way Significantly Significantly
records changes:
Effects of n=0 Hipersorting and Hipersorting and None
DYNALLOC not used DYNALLOC not used
HIPRMAX= OPTIMAL
n
p%
| Some of these limits depend on system, and other Hipersorting and memory
| object sorting, activity throughout the time a Hipersorting application runs.
Consequently, the amount of Hiperspace a Hipersorting application uses can
vary from run to run.
Hipersorting can cause a small CPU time degradation. When CPU optimization
is a concern, you can use HIPRMAX=0 to suppress Hipersorting.
LIST
NOLIST
Note: LIST or NOLIST are processed only if they are passed on the OPTION
control statement in an extended parameter list or in DFSPARM.
LISTX
NOLISTX
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 z/OS
DFSORT Messages, Codes and Diagnosis Guide
LOCALE= name
CURRENT
NONE
If locale processing is to be used, the active locale will affect the behavior of
DFSORTs 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.
The state of the active locale prior to DFSORT being entered will be
restored on DFSORTs 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 parameter list or in DFSPARM.
2. To use an IBM-supplied locale, DFSORT must have access to the
Language Environment run-time library. For example, this library might be
called SYS1.SCEERUN. If you are unsure of the name of this library 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:
v VLSHRT is not used for SORT or MERGE
v CHALT, INREC, an EFS program, or an E61 user exit must not be used.
4. Locale processing for DFSORTs 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 locale processing may require an additional amount of storage
that depends on the environment supporting the locale as well as the locale
itself. It may be necessary to specify a REGION of several MB or more for
DFSORT applications that use locale processing.
MAINSIZE= n
nK
nM
MAX
Temporarily overrides the SIZE installation option, which specifies the amount of
main storage available to DFSORT. The value you specify must be greater than
the MINLIM value set at DFSORT installation time.
MAINSIZE applies to the total amount of main storage above and below 16MB
virtual. DFSORT determines how much storage to allocate above and below
16MB virtual, but the total amount of storage cannot exceed MAINSIZE.
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 16MB virtual for OUTFIL processing whenever possible.
For details on main storage allocation, see Tuning Main Storage on page 572.
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 value
when Blockset is selected, or up to the MAXLIM installation value when
Blockset is not selected.
| MOSIZE= MAX
n
p%
|
| Note: The bar refers to the 2-gigabyte address within the 64-bit address
| space. The bar separates storage below the 2-gigabyte address called
| below the bar, from storage above the 2-gigabyte address called
| above the bar.
| Several factors can limit the size of a memory object an application uses:
| 1. The MEMLIMIT parameter on the JOB or EXEC JCL statement can limit the
| total number of usable virtual pages above the bar in a single address
| space.
| 2. The IEFUSI exit can limit the total number of usable virtual pages above the
| bar in a single address space.
| 3. MOSIZE can limit the size of a memory object available to an application,
| as detailed below.
| 4. Sufficient available central storage must be present to back DFSORTs
| memory object.
| The amount of available central storage constantly changes, depending on
| current system activity. Consequently, DFSORT checks the amount of
| available central storage throughout a memory object sorting run and
| switches from using a memory object to using disk work data sets if the
| available central storage is too low.
| 5. Other concurrent Hipersorting and memory object sorting applications
| further limit the amount of available storage. A memory object sorting
| application is aware of the storage needs of every other Hipersorting and
| memory object sorting application on the system, and does not attempt to
| back its memory object with storage needed by another Hipersorting or
| memory object sorting application. This prevents overcommitment of storage
| resources in the event of multiple large concurrent Hipersorting and memory
| object sorting applications starting at similar times on the same system.
| 6. The installation options EXPMAX, EXPOLD, and EXPRES can also be used
| to further limit the amount of storage available to memory object sorting
| applications. EXPMAX limits the total amount of available storage that can
| be used at any one time to back DFSORT Hiperspaces and memory
| objects. EXPOLD limits the total amount of old storage that can be used at
| any one time to back DFSORT hiperspaces and memory objects. EXPRES
| sets aside a specified amount of available storage for use by
| non-Hipersorting and non-memory object sorting applications.
| Some of these limits depend on system, and other Hipersorting and memory
| object sorting, activity throughout the time a memory object sorting application
| runs. Consequently, the size of a memory object a memory object sorting
| application uses can vary from run to run.
| MAX
| specifies that DFSORT determines dynamically the maximum size of a
| memory object to be used for memory object sorting.
| n specifies that DFSORT determines dynamically the maximum size of a
| memory object to be used for memory object sorting, subject to a limit of
| nMB. n must be a value between 0 and 2147483646. If n is 0, memory
| object sorting is not used.
| p%
| specifies that DFSORT determines dynamically the maximum size of a
| memory object to be used for memory object sorting, subject to a limit of p
| percent of the available central storage. p must be a value between 0 and
| 100. If p is 0, memory object sorting is not used. The value calculated for
| p% is limited to 2147483646MB, and is rounded down to the nearest MB.
MSGDDN=ddname
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 z/OS DFSORT
Messages, Codes and Diagnosis Guide
MSGPRT= ALL
CRITICAL
NONE
Temporarily overrides the MSGPRT installation option, which specifies the class
of messages to be written to the message data set. For details on use of the
message data set, see z/OS DFSORT Messages, Codes and Diagnosis Guide.
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.
NONE
specifies that no messages and control statements will be printed.
Notes:
1. MSGPRT is processed only if it is passed on the OPTION control statement
in an extended parameter list or in DFSPARM.
2. PRINT=value can be used instead of MSGPRT=value.
NOBLKSET
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.
NOOUTREL
NOOUTSEC
NOSTIMER
If your exits take checkpoints and STIMER=YES is the installation default, you
must specify this parameter.
| NULLOUT= RC0
RC4
RC16
|
| RC16
| specifies that DFSORT should issue message ICE206A, terminate, and give
| a return code of 16 when there are no records for the SORTOUT data set.
| Notes:
| 1. The return code of 0 or 4 set when there are no records for the SORTOUT
| data set can be overridden by a higher return code set for some other
| reason.
| 2. NULLOUT does not apply when SORTOUT is not present, when tape work
| data sets are specified for a sort application, or when the Blockset
| technique is not selected for a merge application. DFSORT does not check
| if there are no records for the SORTOUT data set in these cases.
| 3. NULLOUT applies to the SORTOUT data set. NULLOFL on the OUTFIL
| statement applies to OUTFIL data sets.
| 4. For an ICEGENER application, NULLOUT applies to the SYSUT2 data set if
| DFSORT copy is used. Note that ICEGENER passes back return code 12
| instead of return code 16.
ODMAXBF= n
nK
nM
used for each OUTFIL data set. If you specify less than 256K, 256K is
used. If you specify more than 16384K, 16384K is used.
Limit: 5 digits
nM
specifies that a maximum of n times 1048576 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
OVFLO= RC0
RC4
RC16
Temporarily overrides the OVFLO installation option, which specifies the action
to be taken by DFSORT when BI, FI, PD or ZD summary fields overflow.
RC0
specifies that DFSORT should issue message ICE152I (once), set a return
code of 0 and continue processing when summary fields overflow. The pair
of records involved in a summary overflow is left unsummed and neither
record is deleted. Summary overflow does not prevent further summation.
RC4
specifies that DFSORT should issue message ICE152I (once), set a return
code of 4 and continue processing when summary fields overflow. The pair
of records involved in a summary overflow is left unsummed and neither
record is deleted. Summary overflow does not prevent further summation.
RC16
specifies that DFSORT should issue message ICE195A, terminate and give
a return code of 16 when summary fields overflow.
Note: The return code of 0 or 4 set for summary overflow can be overridden by
a higher return code set for some other reason.
PAD= RC0
RC4
RC16
Temporarily overrides the PAD installation option, which specifies the action to
be taken by DFSORT when the SORTOUT LRECL is larger than the
SORTIN/SORTINnn LRECL, for the cases where DFSORT allows LRECL
padding.
RC0
specifies that DFSORT should issue message ICE171I, set a return code of
0 and continue processing when the SORTOUT LRECL is larger than the
SORTIN/SORTINnn LRECL.
RC4
specifies that DFSORT should issue message ICE171I, set a return code of
4 and continue processing when the SORTOUT LRECL is larger than the
SORTIN/SORTINnn LRECL.
RC16
specifies that DFSORT should issue message ICE196A, terminate and give
a return code of 16 when the SORTOUT LRECL is larger than the
SORTIN/SORTINnn LRECL.
Notes:
1. The return code of 0 or 4 set for LRECL padding can be overridden by a
higher return code set for some other reason.
2. For an ICEGENER application, the GNPAD value is used and the PAD
value is ignored.
3. For some LRECL padding situations (for example, a tape work data set
sort), DFSORT issues ICE043A and terminates with a return code of 16.
The PAD value has no effect in these cases.
4. DFSORT does not check for LRECL padding if:
a. A SORTIN DD (sort/copy), SORTINnn DD (merge) or SORTOUT DD is
not present
b. A SORTIN DD (sort/copy), SORTINnn DD (merge) or SORTOUT DD
specifies a VSAM data set.
5. DFSORT does not check OUTFIL data sets for LRECL padding.
RESALL= n
nK
nM
RESALL applies only to the amount of main storage below 16MB virtual. The
ARESALL option applies to the amount of main storage above 16MB 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 1048576 bytes of storage are to be reserved. If you
specify 0M, 4K is used.
Limit: 2 digits.
| Tip: 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.
RESET
NORESET
Note: A VSAM output data set defined without REUSE is processed as a MOD
data set.
RESINV= n
nK
nM
RESINV applies only to the amount of main storage below 16MB virtual. The
ARESINV option applies to the amount of main storage above 16MB 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). Therefore, if your invoking programs 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
programs executable code.
The amount of space required depends upon what routines you have, how the
data is stored, and which access method you use.
n specifies that n bytes of storage are to be reserved.
Limit: 8 digits
nK
specifies that n times 1024 bytes of storage are to be reserved.
Limit: 5 digits
nM
specifies n times 1048576 bytes of main storage are to be reserved.
Limit: 2 digits.
| Tip: 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.
SDB= LARGE
YES
INPUT
NO
If you want DFSORT to use system-determined block sizes for disk and tape
output data sets, specify one of the following values:
v SDB=LARGE if you want to allow DFSORT to select tape output block sizes
greater than 32760 bytes.
v SDB=YES (or its alias SDB=SMALL) if you want DFSORT to select tape
output block sizes less than or equal to 32760 bytes.
v SDB=INPUT if you want to allow DFSORT to select tape output block sizes
greater than 32760 bytes only when tape input data sets with block sizes
greater than 32760 bytes are used.
DFSORT will not select a tape output block size greater than the BLKSZLIM in
effect. In particular, if a default BLKSZLIM of 32760 is in effect, DFSORT will
not select a tape output block size greater than 32760 bytes. Therefore, in order
to allow DFSORT to select tape output block sizes greater than 32760 bytes for
particular jobs, you may need to ensure that your JCL or data class supplies
appropriately large BLKSZLIM values (for example, 1GB) for those jobs.
Figure 13. SDB=LARGE Block Sizes for Tape Output Data Sets
DFSORT uses the system-determined optimum block size for the output
data set in most cases when the block size is zero. However, the following
conditions prevent DFSORT from using the system-determined block size:
v Output data set block size is available (that is, non-zero) in the JFCB
(disk or tape) or format 1 DSCB (disk) or tape label (only for DISP=MOD
with AL, SL, or NSL label, when appropriate)
v Output is a spool, dummy, VSAM, or unmovable data set, or an HFS file.
v The output data set is on tape with a label type of AL
v DFSORTs Blockset technique is not selected.
In the above cases, DFSORT uses the specified block size, or determines
an appropriate (though not necessarily optimum) block size for the output
data set. The selected block size is limited to 32760 bytes.
YES
specifies that DFSORT is to use the system-determined optimum block size
for an output data set when its block size is zero, but is to limit the selected
block size to a maximum of 32760 bytes. See the discussion of
SDB=LARGE for more information; the only difference between
SDB=LARGE and SDB=YES is that SDB=LARGE allows block sizes
greater than 32760 bytes for tape output data sets, whereas SDB=YES
does not.
INPUT
specifies that DFSORT is to use the system-determined optimum block size
for an output data set when its block size is zero, but is to limit the selected
block size to a maximum of 32760 bytes if the input block size is less than
or equal to 32760 bytes. Thus, SDB=INPUT works like SDB=LARGE if the
input block size is greater than 32760 bytes (only possible for tape input
data sets) and works like SDB=YES if the input block size is less than or
equal to 32760 bytes. See the discussions of SDB=LARGE and SDB=YES
for more information.
NO
specifies that DFSORT is not to use the system-determined optimum block
size. When the output data set block size is zero, DFSORT selects an
appropriate (though not necessarily optimum) block size for the output data
set based on the obtained or derived output or input attributes. SDB=NO
limits the selected block sizes to a maximum of 32760 bytes.
SDB=NO works like SDB=YES if the input block size is greater than 32760
bytes (only possible for tape input data sets). See the discussion of
SDB=YES for more information.
Notes:
1. SDB=NO does not prevent the use of system-determined block size for the
output data set at allocation or in other cases where the output data set
block size is set before DFSORT gets control.
2. When DFSORT uses system-determined block size, the selected output
data set block size may be different from the block size selected previously.
Applications that require a specific output data set block size should be
changed to specify that block size explicitly.
3. SDB and SDB=SMALL can be used instead of SDB=YES. NOSDB can be
used instead of SDB=NO.
SKIPREC=z
Specifies the number of records z you want to skip (delete) 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 313) 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.
z specifies the number of records to be skipped.
SMF= SHORT
FULL
NO
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.
SOLRF
NOSOLRF
SORTDD=cccc
SORTIN=ddname
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 parameter 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.
SORTOUT=ddname
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:
1. SORTOUT is processed only if it is passed on the OPTION control
statement in an extended parameter list or in DFSPARM.
2. If both SORTOUT=ddname and SORTDD=cccc are specified, ddname is
used for the output file. The same ddname cannot be specified for SORTIN
and SORTOUT.
3. If SORTOUT is specified for a conventional merge or for a tape work data
set sort, DFSORT terminates.
SPANINC= RC0
RC4
RC16
STOPAFT=n
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 statement). 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.
n specifies the maximum number of records to be accepted.
Limit: 28 digits (15 significant digits)
SZERO or NOSZERO
SZERO
NOSZERO
TRUNC= RC0
RC4
RC16
Temporarily overrides the TRUNC installation option, which specifies the action
to be taken by DFSORT when the SORTOUT LRECL is smaller than the
SORTIN/SORTINnn LRECL, for the cases where DFSORT allows LRECL
truncation.
RC0
specifies that DFSORT should issue message ICE171I, set a return code of
0 and continue processing when the SORTOUT LRECL is smaller than the
SORTIN/SORTINnn LRECL.
RC4
specifies that DFSORT should issue message ICE171I, set a return code of
4 and continue processing when the SORTOUT LRECL is smaller than the
SORTIN/SORTINnn LRECL.
RC16
specifies that DFSORT should issue message ICE196A, terminate and give
a return code of 16 when the SORTOUT LRECL is smaller than the
SORTIN/SORTINnn LRECL.
Notes:
1. The return code of 0 or 4 set for LRECL truncation can be overridden by a
higher return code set for some other reason.
2. For an ICEGENER application, the GNTRUNC value is used and the
TRUNC value is ignored.
3. For some LRECL truncation situations (for example, a tape work data set
sort), DFSORT issues ICE043A and terminates with a return code of 16.
The TRUNC value has no effect in these cases.
4. DFSORT does not check for LRECL truncation if:
a. A SORTIN DD (sort/copy), SORTINnn DD (merge) or SORTOUT DD is
not present
b. A SORTIN DD (sort/copy), SORTINnn DD (merge) or SORTOUT DD
specifies a VSAM data set.
5. DFSORT does not check OUTFIL data sets for LRECL truncation.
USEWKDD
VERIFY
NOVERIFY
VLLONG
NOVLLONG
NOVLLONG
specifies that DFSORT terminates if a long variable-length output record is
found.
Notes:
1. VLLONG should not be used unless you want the data at the end of long
variable-length output records to be truncated for your DFSORT application;
inappropriate use of VLLONG can result in unwanted loss of data.
2. VLLONG can be used to truncate long OUTFIL data records, but has no
effect on long OUTFIL header or trailer records.
VLSCMP
NOVLSCMP
The compare fields are only padded temporarily for testing; they are not actually
changed for output.
To illustrate how this works, suppose the following INCLUDE statement is used:
INCLUDE COND=(6,1,CH,EQ,C1,OR,70,2,CH,EQ,CT1)
If a variable-length input record has a length less than 71 bytes, the field at
bytes 70-71 is short and the following occurs:
v With VLSCMP, the record is included if byte 6 of the input record is C1 or
omitted if byte 6 is not C1. The comparison of bytes 70-71 equal to CT1 is
false because bytes 70-71 contain either Xhh00 (for a record length of 70
bytes) or X0000 (for a record length of less than 70 bytes). The comparison
involving the non-short field is performed even though a short field is present.
v With NOVLSCMP and VLSHRT, the record is omitted because any short field
makes the entire logical expression false. The comparison involving the
non-short field is not performed because a short field is present.
v With NOVLSCMP and NOVLSHRT, DFSORT terminates because any short
field results in termination.
In general, comparisons involving short fields are false with VLSCMP. However,
if a binary zero value is relevant to the comparison, the use of binary zeros for
padding might make the comparison true. For example, suppose the following
INCLUDE statement is used:
INCLUDE COND=(21,2,CH,EQ,CJX,OR,
(55,2,CH,EQ,58,2,CH,AND,
70,1,BI,LT,X08))
If a variable-length input record has a length less than 70 bytes, the field at byte
70 is short and is padded to X00. This makes the comparison of byte 70 less
than X08 true even though byte 70 is a short field and so probably irrelevant.
Likewise, if a variable-length record has a length less than 55 bytes, the fields
at bytes 55-56 and 58-59 are short and are each padded to X0000, and the
field at byte 70 is short and is padded to X00. This makes the comparison of
bytes 55-56 equal to 58-59 true and the comparison of byte 70 less than X08
true even though all three fields are short and probably irrelevant.
In such cases where padding of short fields with binary zeros may result in
unwanted true comparisons, you can get the result you want by adding an
appropriate check of the record length to the INCLUDE/OMIT logical
expression, such as:
INCLUDE COND=(21,2,CH,EQ,CJX,OR,
(1,2,BI,GE,X0046,AND,
55,2,CH,EQ,58,2,CH,AND,
70,1,BI,LT,X08))
Now the comparisons involving bytes 55-56, 58-59 and 70 can only be true for
records that are 70 bytes (X0046) or longer. Thus, the irrelevant comparisons
involving short fields are eliminated.
Keep in mind that short compare fields are padded with zeros when VLSCMP is
in effect and code your INCLUDE/OMIT logical expressions to allow for that or
even take advantage of it.
VLSCMP
specifies that short variable-length compare fields are padded with binary
zeros.
NOVLSCMP
specifies that short variable-length compare fields are not padded.
VLSHRT or NOVLSHRT
VLSHRT
NOVLSHRT
VSAMEMT
NVSAMEMT
VSAMIO
NOVSAMIO
These conditions ensure that the VSAM data set is processed as NEW for
output and will contain the sorted input records, that is, it will be sorted
in-place.
DFSORT terminates if the same VSAM data set is specified for input and
output and any of the above conditions are not met.
NOVSAMIO
specifies that DFSORT terminates if the same VSAM data set is used for
input and output.
WRKREL
NOWRKREL
WRKSEC
NOWRKSEC
NOWRKSEC
specifies that automatic secondary allocation for temporary JCL
SORTWKdd data sets is not used.
Y2PAST= s
f
Temporarily overrides the Y2PAST installation option, which specifies the sliding
(s) or fixed (f) century window. The century window is used with DFSORTs Y2
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=1 would set a century window of 1962-2061. f must be a value
between 1000 and 3000.
ZDPRINT
NZDPRINT
NZDPRINT
means do not convert positive ZD summation results to printable numbers.
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.
SIZE
The data set to be sorted contains 50000 records.
SKIPREC
Five records are skipped (deleted) 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.
CKPT
DFSORT takes checkpoints during this run.
Example 3
OPTION FILSZ=50,SKIPREC=5,DYNALLOC=3390
SORT FIELDS=(1,2,CH,A),SKIPREC=1,SIZE=200,DYNALLOC=(3380,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 3390.
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=100
STOPAFT
DFSORT accepts 100 records before sorting or copying.
Example 6
OPTION RESINV=32000,MSGPRT=NONE,
MSGDDN=SORTMSGS,SORTDD=ABCD,SORTIN=MYINPUT,
SORTOUT=MYOUTPUT,NOLIST
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=32000,MSGPRT=CRITICAL
MSGDDN=SORTMSGS,SORTDD=ABCD,SORTIN=MYINPUT,
SORTOUT=MYOUTPUT,NOLIST
Example 8
SORT FIELDS=(3,4,CH,A)
OPTION COPY,SKIPREC=10,CKPT
MODS E15=(E15,1024,MODLIB),E35=(E35,1024,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.)
SKIPREC
Ten records are skipped before copying starts.
CKPT
The checkpoint option is not used for copy applications.
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.
| ,
( E ddname )
FILES= suffix
,
( E suffix )
STARTREC=n
ENDREC=n
SAMPLE= n
(n,m)
INCLUDE= ( logical expression )
ALL
NONE
OMIT= ( logical expression )
ALL
NONE
SAVE
,
OUTREC= ( E field )
,VTOF ,VLFILL=byte
,CONVERT
FTOV
VLTRIM=byte
REPEAT=n
SPLIT
SPLITBY=n
NULLOFL= RC0
RC4
RC16
LINES=n
,
HEADER1= ( E field )
,
TRAILER1= ( E field )
,
HEADER2= ( E field )
,
TRAILER2= ( E field )
,
SECTIONS= ( E field )
NODETAIL
REMOVECC
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 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:
v Creation of multiple output data sets containing unedited or edited records from a
single pass over one or more input data sets.
v 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.
v Conversion of variable-length record data sets to fixed-length record data sets.
v Conversion of fixed-length record data sets to variable-length record data sets.
| v Insertion of blanks, zeros, strings, current date, current time, sequence numbers,
| decimal constants, and the results of arithmetic expressions before, between,
| and after the input fields in the reformatted records.
v Sophisticated conversion capabilities, such as hexadecimal display, conversion of
EBCDIC letters from lowercase to uppercase or uppercase to lowercase,
conversion of characters using the ALTSEQ translation table, and conversion of
numeric values from one format to another.
v Sophisticated editing capabilities, such as control of the way numeric fields are
prsented with respect to length, leading or suppressed zeros, thousands
separators, decimal points, leading and trailing positive and negative signs, and
so on.
v Twenty-seven 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 unlimited number of numeric editing
patterns are available via user-defined editing masks.
v Transformation of SMF date and time values to more usable forms.
v Transformation of two-digit year dates to various forms of four-digit year dates
using a specified fixed or sliding century window.
v 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).
v 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).
v Creation of multiple output records from each input record, with or without
intervening blank output records.
| v Repetition and sampling of data records.
| v Splitting of data records in rotation among a set of output data sets.
data set denotes the single non-OUTFIL output data set, but in fact, the
SORTOUT ddname can be used for an OUTFIL data set either explicitly or by
default.
If SORTOUT is identified as an OUTFIL ddname, either explicitly (for example,
via FILES=OUT) or by default (OUTFIL without FILES or FNAMES), the data set
associated with the SORTOUT ddname will be processed as an OUTFIL data set
rather than as the SORTOUT data set.
OUTFIL data sets have characteristics and requirements similar to those for the
SORTOUT data set, but there are differences in the way each is processed. The
major differences are that an E39 exit routine is not entered for OUTFIL data
sets, and that OUTFIL processing does not permit the use of the LRECL value to
pad fixed-format OUTFIL records. (DFSORT will automatically determine and set
an appropriate RECFM, LRECL, and BLKSIZE for each OUTFIL data set for
which these attributes are not specified or available.)
For a single DFSORT application, OUTFIL data sets can be intermixed with
respect to VSAM and non-VSAM, tape and disk, and so on. All of the data sets
specified for a particular OUTFIL statement are processed in a similar way and
thus are referred to as an OUTFIL group. (That is, you group OUTFIL data sets
that use the same operands by specifying them on a single OUTFIL statement.)
For example, the first OUTFIL statement might have an INCLUDE operand that
applies to an OUTFIL group of one non-VSAM data set on disk and another on
tape; a second OUTFIL statement might have OMIT and OUTREC operands that
apply to an OUTFIL group of one non-VSAM data set on disk and two VSAM
data sets.
Records are processed for OUTFIL as they are for SORTOUT, after all other
DFSORT processing is complete. Conceptually, you can think of an OUTFIL
input record as being intercepted at the point between being passed from an
E35 exit and written to SORTOUT, although neither an E35 exit nor SORTOUT
need actually be specified with OUTFIL processing. With that in mind, see
Figure 2 on page 8 for details on the processing that occurs prior to processing
the OUTFIL input record. In particular:
Records deleted by an E15 or E35 exit, an INCLUDE, OMIT or SUM
statement, or the SKIPREC or STOPAFT parameter are not available for
OUTFIL processing
If records are reformatted by an E15 exit, an INREC or OUTREC statement,
or an E35 exit, the resulting reformatted record is the OUTFIL input record to
which OUTFIL fields must refer.
v STARTREC starts processing for an OUTFIL group at a specific OUTFIL input
record. ENDREC ends processing for an OUTFIL group at a specific OUTFIL
| input record. SAMPLE selects a sample of OUTFIL input records for an OUTFIL
group using a specific interval and number of records in that interval. Separately
or together, STARTREC, ENDREC, and SAMPLE select a range of records to
| which subsequent OUTFIL processing will apply.
v INCLUDE, OMIT, and SAVE select the records to be included in the data sets of
an OUTFIL group. INCLUDE and OMIT operate against the specified fields of
each OUTFIL input record to select the output records for their OUTFIL group (all
records are selected by default). SAVE selects the records that are not selected
for any other OUTFIL group.
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.
v 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, strings, current date, current time, sequence numbers,
| decimal constants, and the results of arithmetic expressions.
OUTREC also enables you to produce multiple reformatted output records from
each input record, with or without intervening blank output records.
VTOF or CONVERT can be used with OUTREC to convert variable-length input
records to fixed-length output records.
VLFILL can be used to allow processing of variable-length input records which
are too short to contain all specified OUTREC fields
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 the forward slash (/) separator for
creating blank records and new records, whereas the OUTREC statement does
not.
v FTOV can be used to convert fixed-length input records to variable-length output
records. FTOV can be used with or without OUTREC.
v VLTRIM can be used to remove the trailing bytes with a specified value, such as
blanks, binary zeros or asterisks, from variable-length records. VLTRIM can be
used with or without FTOV.
| v REPEAT can be used to repeat each output record a specified number of times.
| v SPLIT or SPLITBY splits the output records in rotation among the data sets of
| an OUTFIL group.
| With SPLIT, 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.
| SPLITBY can be used to rotate by a specified number of records rather than by
| one record, for example, records 1-10 to the first OUTFIL data set, records 11-20
| to the second OUTFIL data set, and so on.
v 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 ANSI control character format ('A' as in, for example, RECFM=FBA or
RECFM=VBA), and must allow an extra byte in the LRECL for the carriage
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. DFSORT uses
appropriate carriage controls (for example, C'-' for triple space) in header and
trailer records when possible, to reduce the number of report records written.
DFSORT always uses the single space carriage control (C' ') in data records.
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.
v REMOVECC can be used to remove the ANSI control characters from a report.
In this case, an 'A' is not added to or required for the RECFM and an extra byte
is not added to or required for the LRECL.
v Figure 14 illustrates the order in which OUTFIL records and parameters are
processed.
|
OUTFIL input records
OUTFIL STARTREC
OUTFIL SAMPLE
OUTFIL ENDREC
OUTFIL INCLUDE
OUTFIL OMIT
OUTFIL SAVE
OUTFIL OUTREC
OUTFIL FTOV
OUTFIL VTOF or
CONVERT
OUTFIL VLFILL
OUTFIL VLTRIM
OUTFIL REPEAT
OUTFIL Reports
OUTFIL SPLIT
OUTFIL SPLITBY
|
| Figure 14. OUTFIL Processing Order
|
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 FeaturesExamples on
page 265.
FNAMES
FNAMES= ddname
,
( E 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
FILES= d
dd
OUT
,
( E 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
STARTREC=n
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=SKIP20,STARTREC=21
ENDREC=n
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=TOP10,ENDREC=10
OUTFIL FNAMES=FRONT,ENDREC=500
OUTFIL FNAMES=MIDDLE,STARTREC=501,ENDREC=2205
OUTFIL FNAMES=BACK,STARTREC=2206
| SAMPLE= n
(n,m)
| Sample Syntax:
| * PROCESS RECORDS 1, 6, 11, ...
| OUTFIL FNAMES=OUT1,SAMPLE=5
|
| * PROCESS RECORDS 1, 2, 1001, 1002, 2001, 2002
| OUTFIL FNAMES=OUT2,SAMPLE=(1000,2),ENDREC=2500
|
| * PROCESS RECORDS 23, 48, 73
| OUTFIL FNAMES=OUT3,STARTREC=23,ENDREC=75,SAMPLE=25
|
| * PROCESS RECORDS 1001, 1002, 1003, 1101, 1102, 1103, ...
| OUTFIL FNAMES=OUT4,STARTREC=1001,SAMPLE=(100,3)
Selects the records to be included in the data sets for this OUTFIL group.
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,CJ69)
OUTFIL FNAMES=J82,INCLUDE=(5,3,CH,EQ,CJ82)
Selects the records to be omitted from the data sets for this OUTFIL group.
The OMIT parameter operates in the same way as the OMIT statement, except
that:
v The OMIT statement applies to all input records; the OMIT parameter applies
only to the OUTFIL input records for its OUTFIL group.
| v FORMAT=f can be specified with the OMIT statement, but not with the OMIT
| parameter. Thus, you can use FORMAT=f and p,m or p,m,f fields with the
| OMIT statement, but you must only use p,m,f fields with the OMIT parameter.
| For example:
| OMIT FORMAT=BI,
| COND=(5,4,LT,11,4,OR,21,4,EQ,31,4,OR,
| 61,20,SS,EQ,CFLY)
|
| OUTFIL OMIT=(5,4,BI,LT,11,4,BI,OR,21,4,BI,EQ,31,4,BI,OR,
| 61,20,SS,EQ,CFLY)
v The D2 format can be specified with the OMIT statement, but not with the
OMIT parameter.
See OMIT Control Statement on page 139 and INCLUDE Control Statement
on page 96 for complete details.
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.
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=01,OMIT=NONE
OUTFIL OMIT=(5,1,BI,EQ,B110.....)
OUTFIL FNAMES=(OUT1,OUT2),
OMIT=(7,2,CH,EQ,C32,OR,18,3,CH,EQ,CXYZ)
SAVE
Sample Syntax:
OUTFIL INCLUDE=(8,6,CH,EQ,CACCTNG),FNAMES=GP1
OUTFIL INCLUDE=(8,6,CH,EQ,CDVPMNT),FNAMES=GP2
OUTFIL SAVE,FNAMES=NOT1OR2
| ,
OUTREC= ( E s )
c: p,m
,a
p
p,m,HEX
p,HEX
p,m,TRAN=LTOU
p,TRAN=LTOU
p,m,TRAN=UTOL
p,TRAN=UTOL
p,m,TRAN=ALTSEQ
p,TRAN=ALTSEQ
p,m,Y2x
p,m,Y2x(c)
p,m,Y2xP
p,m,f ,edit
(p,m,f) ,to
deccon ,edit
(deccon) ,to
arexp ,edit
(arexp) ,to
p,m,Y2x ,edit
,to
p,m,lookup
seqnum
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 separation fields (blanks, zeros, strings, current date and current
| time), sequence numbers, decimal constants, and the results of arithmetic
| expressions before, between, and after the input fields, and produce multiple
reformatted output records for each input record, with or without intervening
blank output records.
You can use the OUTREC parameter in conjunction with the VTOF or
CONVERT parameter to convert variable-length record data sets to fixed-length
record data sets.
You can use the OUTREC parameter with the FTOV parameter to convert
fixed-length record data sets to variable-length record data sets.
You can use the VLFILL parameter to allow processing of variable-length input
records which are too short to contain all specified OUTREC fields.
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 ANSI carriage control characters to
control page ejects and the placement of the lines in your report, according to
your specifications. You can use the REMOVECC parameter to remove the
ANSI carriage control characters.
When you create an OUTFIL report, the length for the longest or only data
record 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 ANSI
carriage control character.