Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Contents (Exploded View) : z/OS DFSORT Application Programming Guide Previous Topic

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

z/OS

DFSORT Application Programming Guide


Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Contents (exploded view)
z/OS DFSORT Application Programming Guide
SC23-6878-00

Note
Abstract for DFSORT Application Programming Guide
Summary of changes
Summary of changes for SC23-6878-00 z/OS Version 2 Release
1
New information
64-bit support
Performance and resource usage improvements
XTIOT, uncaptured UCBs and DSAB above 16
megabytes virtual
Extended address volumes
Alphanumeric comparison tests
More PARSE fields
Repeating PARSE fields
Alphanumeric tests for PARSE fields
Insert a string at the end of variable-length records
Symbol enhancements
Improved diagnostics
Operational changes that may require user action
Central storage controls
Message changes
New Reserved Words for Symbols
Introducing DFSORT
DFSORT overview
DFSORT on the Web
DFSORT FTP site
Invoking DFSORT
How DFSORT works
Operating systems
Control fields and collating sequences
Cultural environment considerations
DFSORT processing
Input data sets—SORTIN and SORTINnn
Output data sets—SORTOUT and OUTFIL
Data set considerations
Sorting or copying records
Merging records
Data set notes and limitations
General considerations
Padding and truncation
QSAM considerations
VSAM considerations
XTIOT, uncaptured UCBs and DSAB above 16 megabytes
z/OS file system considerations
Installation defaults
Migrating to DFSORT from other sort products
DFSORT messages and return codes
Use Blockset whenever possible
Invoking DFSORT with Job Control Language
Using the JCL
Using the JOB statement
Using SET and PROC symbols in DFSORT control statements
Using the EXEC statement
Specifying EXEC statement cataloged procedures
SORT cataloged procedure
SORTD cataloged procedure
Specifying EXEC/DFSPARM PARM options
Aliases for PARM options
Using DD statements
Duplicate ddnames
Shared tape units
System DD statements
Program DD statements
SORTLIB DD statement
When Required
Example 1 SORTLIB DD Statement
SYMNAMES DD and SYMNOUT DD statements
SORTIN DD statement
When Required
Data set characteristics
General coding notes
Example 2 SORTIN DD statement
Example 3 volume parameter on SORTIN DD
SORTINnn DD statement
When required
Data set characteristics
General coding notes
Example 4 SORTIN01-03 DD statements
(merge)
Example 5 SORTIN01-02 DD statements
(merge)
SORTWKdd DD statement
When required
Devices
General coding notes
Disk work data set coding notes
Virtual I/O
Example 6 SORTWK01 DD statement, disk work
data set
Example 7 SORTWK01-03 DD statement, tape
intermediate storage
SORTOUT and OUTFIL DD statements
When required
Data set characteristics
Block size
Reblockable indicator
General coding notes
Example 8 SORTOUT DD statement
SORTCKPT DD statement
Example 9 SORTCKPT DD statement
SORTCNTL DD statement
Example 10 SORTCNTL DD statement
DFSPARM DD statement
General coding notes
Example 11 DFSPARM DD statement
Example 12 DFSPARM DD statement
SORTDKdd DD statement
SORTDIAG DD statement
Example 13 SORTDIAG DD statement
SORTSNAP DD statement
Using DFSORT program control statements
Using program control statements
Control statement summary
Describing the primary task
Including or omitting records
Reformatting and editing records
Producing multiple output and reports and converting
records
Joining two files
Invoking additional functions and options
Using symbols
General coding rules
Continuation lines
Inserting comment statements
Coding restrictions
EFS restrictions when an EFS program is in effect
Using control statements from other IBM programs
ALTSEQ control statement
Altering EBCDIC collating sequence—examples
Example 1
Example 2
Example 3
Example 4
Example 5
DEBUG control statement
Specifying diagnostic options—examples
Example 1
Example 2
END control statement
Discontinue reading control statements—examples
Example 1
Example 2
INCLUDE control statement
Relational condition
Comparisons
Relational condition format
Fields
p1,m1,f1
p2,m2,f2
Constants
Decimal number format
Current date as decimal number
Future date as decimal number
Past date as decimal number
Character string format
Current date as character string
Future date as character string
Past date as character string
Hexadecimal string format
Padding and truncation
Cultural environment considerations
Including records in the output data set—comparison
examples
Example 1
Example 2
Example 3
Example 4
Example 5
Example 6
Example 7
Substring comparison tests
Relational condition format
Fields
p1,m1
Constant
Including records in the output data set—substring
comparison example
Example
Bit logic tests
Method 1: Bit operator tests
Relational condition format
Fields
p1,m1
Mask
Hexadecimal string format
Bit string format
Padding and truncation
Including records in the output data set—bit operator
test examples
Example 1
Example 2
Example 3
Method 2: Bit comparison tests
Relational condition format
Fields
p1,m1
Bit constant
Bit string format
Padding and truncation
Including records in the output data set—bit
comparison test examples
Example 1
Example 2
Example 3
Date comparisons
Relational condition format
Fields
p1,m1,Y2x
p2,m2,Y2x
Constant
Comparisons
Including records in the output data set—date
comparisons
Example 1
Example 2
Numeric tests
Relational condition format
Fields
p1,m1,f1
NUM
Including records in the output data set--numeric tests
Example 1
Example 2
Alphanumeric tests
Relational condition format
Including records in the output data set--alphanumeric
tests
Example 1
Example 2
INCLUDE/OMIT statement notes
INREC control statement
INREC statement notes
Reformatting records before processing — examples
Example 1
INREC method
OUTREC method
Example 2
Example 3
Example 4
Example 5
Example 6
Example 7
Example 8
Example 9
Example 10
Example 11
Example 12
Example 13
Example 14
JOINKEYS control statement
JOIN control statement
MERGE control statement
Specifying a MERGE or COPY—examples
Example 1
Example 2
Example 3
Example 4
MODS control statement
Identifying user exit routines—examples
Example 1
Example 2
OMIT control statement
Omitting records from the output data set—example
Example
OPTION control statement
Aliases for OPTION statement options
Specifying DFSORT options or COPY—examples
Example 1
Example 2
Example 3
Example 4
Example 5
Example 6
Example 7
Example 8
Example 9
Example 10
OUTFIL control statements
OUTFIL statements notes
OUTFIL features—examples
Example 1
Example 2
Example 3
Example 4
Example 5
Example 6
Example 7
Example 8
Example 9
Example 10
Example 11
Example 12
Example 13
Example 14
Example 15
Example 16
Example 17
Example 18
Example 19
Example 20
Example 21
Example 22
Example 23
Example 24
Example 25
Example 26
Example 27
Example 28
Example 29
Example 30
Example 31
OUTREC control statement
OUTREC statement notes
Reformatting records after processing — examples
Example 1
Example 2
Example 3
Example 4
Example 5
Example 6
Example 7
Example 8
Example 9
Example 10
Example 11
Example 12
Example 13
Example 14
Example 15
Example 16
Example 17
Example 18
Example 19
RECORD control statement
Describing the record format and length—examples
Example 1
Example 2
REFORMAT control statement
SORT control statement
SORT/MERGE statement notes
Specifying a SORT or COPY—examples
Example 1
Example 2
Example 3
Example 4
Example 5
Example 6
SUM control statement
SUM statement notes
Adding summary fields—examples
Example 1
Example 2
Example 3
Example 4
Example 5
Using a JOINKEYS application for joining two files
Overview
JOINKEYS application processing
Sample JOINKEYS applications
JCL for a JOINKEYS application
JOINKEYS statements
JOIN statement
REFORMAT statement
JOINKEYS application notes
JOINKEYS application examples
Example 1 - Paired F1/F2 records without duplicates
Example 2 - Paired F1/F2 records with duplicates
(cartesian)
Example 3 - Paired F1 records
Example 4 - Unpaired F2 records
Example 5 - Paired and unpaired F1/F2 records
(indicator method)
Example 6 - Paired and unpaired F1/F2 records (FILL
method)
Using your own user exit routines
User exit routine overview
DFSORT program phases
Functions of routines at user exits
DFSORT input/user exit/output logic examples
Opening and initializing data sets
Modifying control fields
Inserting, deleting, and altering records
Summing records
Handling special I/O
Routines for read errors
Routines for write errors
VSAM user exit functions
Determining action when intermediate storage is
insufficient
Closing data sets
Terminating DFSORT
32-bit and 64-bit parameter lists
64-bit address terminology
Addressing and residence modes for user exits
How user exit routines affect DFSORT performance
Summary of rules for user exit routines
Loading user exit routines
User exit linkage conventions
Linkage examples
Dynamically binding or link-editing user exit routines
Assembler user exit routines (input phase user exits)
E11 user exit: opening data sets/initializing routines
E15 user exit: passing or changing records for sort and
copy applications
Information DFSORT passes to your routine at E15
user exit
Which E15 parameter list will be used
32-bit E15 parameter list
64-bit E15 parameter list
E15 return codes
Storage usage for E15 user exit
E16 user exit: handling intermediate storage
miscalculation
E16 return codes
E17 user exit: closing data sets
E18 user exit: handling input data sets
Using E18 user exit with QSAM/BSAM
Information your routine passes to DFSORT at
E18 user exit
Using E18 user exit with VSAM
E18 user exit restrictions
Information your routine passes to DFSORT at
E18 user exit
E18 password list
E18 user exit list
E19 user exit: handling output to work data sets
Using E19 user exit with QSAM/BSAM
Information your routine passes to DFSORT at
E19 user exit
E61 user exit: modifying control fields
Some uses of E61 user exit
Information DFSORT passes to your routine at E61
user exit
Assembler user exit routines (output phase user exits)
E31 user exit: opening data sets/initializing routines
E32 user exit: handling input to a merge only
Information DFSORT passes to your routine at E32
user exit
Which E32 parameter list will be used
32-bit E32 parameter list
64-bit E32 parameter list
E32 return codes
E35 user exit: changing records
Information DFSORT passes to your routine at E35
user exit
Which E35 parameter list will be used
32-bit E35 parameter list
64-bit E35 parameter list
E35 return codes
Summing records at E35 user exit
Storage usage for E35 user exit
E37 user exit: closing data sets
E38 user exit: handling input data sets
Using E38 user exit with VSAM
E39 user exit: handling output data sets
Using E39 user exit with QSAM/BSAM
Using E39 user exit with VSAM
Sample E15 and E35 routines using the 64-bit parameter lists
Sample routines written in assembler using the 32-bit
parameter lists
E15 user exit: altering record length
E16 user exit: sorting current records when NMAX is
exceeded
E35 user exit: altering record length
E61 user exit: altering control fields
COBOL user exit routines
COBOL user exit requirements
COBOL requirements for copy processing
COBOL storage requirements
COBOL user exit routines (input phase user exit)
COBOL E15 user exit: passing or changing records for
sort
E15 interface with COBOL
E15 LINKAGE SECTION examples
E15 LINKAGE SECTION fields for fixed-length and
variable-length records
E15 return codes
E15 procedure division requirements
COBOL user exit routines (output phase user exit)
COBOL E35 user exit: changing records
E35 interface with COBOL
E35 LINKAGE SECTION examples
E35 LINKAGE SECTION fields for fixed-length and
variable-length records
E35 return codes
E35 procedure division requirements
Sample routines written in COBOL
COBOL E15 user exit: altering records
COBOL E35 user exit: inserting records
E15/E35 return codes and EXITCK
Invoking DFSORT from a program
Invoking DFSORT dynamically
What are system macro instructions?
Using system macro instructions
Using JCL DD statements
Overriding DFSORT control statements from programs
Invoking DFSORT with the 24-bit parameter list
Entry point name
Providing program control statements
CONTROL statement images example
Format of the 24-bit parameter list
Invoking DFSORT with the extended (31-bit) parameter list
Entry point name
Providing program control statements
Format of the extended parameter list
Invoking DFSORT with the 64-bit parameter list
Entry point name
64-bit address terminology
Providing program control statements
Format of the 64-bit parameter list
Writing the macro instruction
Parameter list examples
Restrictions for dynamic invocation
Merge restriction
Copy restrictions
Using ICETOOL
Overview
ICETOOL/DFSORT relationship
ICETOOL JCL summary
ICETOOL operator summary
Complete ICETOOL examples
Using symbols
Using SET and PROC symbols in control statements
Invoking ICETOOL
Putting ICETOOL to use
Obtaining various statistics
Creating multiple versions/combinations of data
sets
Job control language for ICETOOL
JCL restrictions
ICETOOL statements
General coding rules
COPY operator
Operand descriptions
Copy examples
Example 1
Example 2
Example 3
COPY operator with JOINKEYS example
COUNT operator
Operand descriptions
COUNT examples
Example 1
Example 2
Example 3
Example 4
Example 5
DATASORT operator
Operand descriptions
DATASORT examples
Example 1
Example 2
DEFAULTS operator
Operand descriptions
DEFAULTS example
DISPLAY operator
Simple report
Tailored report
Sectioned report
Operand descriptions
DISPLAY examples
Example 1
Example 2
Example 3
Example 4
Example 5
Example 6
Example 7
Example 8
Example 9
Example 10
Example 11
Example 12
Example 13
MERGE operator
Operand descriptions
MERGE examples
Example 1
Example 2
MODE operator
Operand descriptions
MODE example
OCCUR operator
Simple report
Tailored report
Operand descriptions
OCCUR examples
Example 1
Example 2
Example 3
Example 4
Example 5
RANGE operator
Operand descriptions
RANGE example
RESIZE operator
Operand descriptions
RESIZE examples
Example 1
Example 2
Example 3
SELECT operator
Operand descriptions
SELECT examples
Example 1
Example 2
Example 3
Example 4
Example 5
Example 6
Example 7
Example 8
Example 9
SORT operator
Operand descriptions
Sort examples
Example 1
Example 2
Example 3
SORT operator with JOINKEYS example
SPLICE operator
Operand descriptions
SPLICE examples
Example 1 - Create one spliced record for each
match in two files
Example 2 - Combine complete records from four
files
Example 3 - Create files with matching and non-
matching records
Example 4 - Create a matrix of values
Example 5 - Create multiple spliced records for
each match in two types of records
Example 6 - Pull records from a master file in sorted
order
Example 7 - Pull records from a master file in their
original order
Example 8 - Create a report showing if needed
parts are on-hand
Example 9 - Create a report showing if needed
parts are on-hand - advanced
Example 10 - Create spliced variable-length records
from two files
STATS operator
Operand descriptions
STATS example
SUBSET operator
Operand descriptions
SUBSET examples
Example 1
Example 2
Example 3
UNIQUE operator
Operand descriptions
UNIQUE example
VERIFY operator
Operand descriptions
VERIFY example
Calling ICETOOL from a program
TOOLIN interface
Parameter list interface
Explanation of fields
Parameter list interface example
ICETOOL notes and restrictions
Notes on using JOINKEYS with COPY and SORT
ICETOOL return codes
Using symbols for fields and constants
Field and constant symbols overview
DFSORT example
SYMNAMES DD statement
SYMNOUT DD statement
SYMNAMES statements
Comment and blank statements
Symbol statements
Keyword statements
Using SYMNOUT to check your SYMNAMES statements
Using symbols in DFSORT statements
SORT and MERGE
SUM
INCLUDE and OMIT
INREC and OUTREC
OUTFIL
JOINKEYS
REFORMAT
OPTION
Using symbols in ICETOOL operators
COUNT
DATASORT
DISPLAY
OCCUR
RANGE
SELECT
SPLICE
STATS, UNIQUE and VERIFY
SUBSET
ICETOOL Example
Using SET and PROC symbols in DFSORT and ICETOOL
statements
Using JPn parameters in EXEC PARM for DFSORT
Using JPn parameters in EXEC PARM for ICETOOL
Description of JPn"string"
Example 1
MYPROC procedure
Execution of MYPROC
Record in SEL member
Records in OVLY member
Example 2
Notes for symbols
Using extended function support
Using EFS
Addressing and residence mode of the EFS program
How EFS works
DFSORT program phases
DFSORT calls to your EFS program
Initialization phase
Major call 1
Major call 2
Major call 3
Input phase
Termination phase
Major call 4
Major call 5
What you can do with EFS
Opening and initializing data sets
Examining, altering, or ignoring control statements
Processing user-defined data types with EFS program
user exit routines
Supplying messages for printing to the message data
set
Terminating DFSORT
Closing data sets and housekeeping
Structure of the EFS interface parameter list
Action codes
Control statement request list
Control statement string sent to the EFS program
Special handling of OPTION and DEBUG control
statements
Control statement string returned by the EFS program
Rules for parsing
EFS formats for SORT, MERGE, INCLUDE, and OMIT
control statements
D1 format on FIELDS operand
D2 format on COND operand
Length of original control statement
Length of the altered control statement
EFS program context area
Extract buffer offsets list
Record lengths list
Information flags
Message list
EFS program exit routines
EFS01 and EFS02 function description
EFS01 user exit routine
EFS01 parameter list
EFS02 user exit routine
EFS02 parameter list
Addressing and residence mode of EFS program user
exit routines
EFS program return codes you must supply
Record processing order
How to request a SNAP dump
EFS program example
DFSORT initialization phase:
Major call 1
Major call 2
Major call 3
DFSORT termination phase
Major call 4
Major call 5
Improving efficiency
Improving performance
Design your applications to maximize performance
Directly invoke DFSORT processing
Plan ahead when designing new applications
Efficient blocking
Specify efficient sort/merge techniques
Sorting techniques
Blockset sorting techniques
Notes
Peerage/vale sorting techniques
Merging techniques
Blockset merging techniques
Conventional merging technique
Specify input/output data set characteristics accurately
Input file size
Variable-length records
Disk devices
Use extended format data sets
Use DFSMSrmm-managed tapes, or ICETPEX
Specify devices that improve elapsed time
Use options that enhance performance
CFW
DSA
DSPSIZE
FASTSRT
SDB
HIPRMAX
MOSIZE
Use DFSORT's fast, efficient productivity features
INCLUDE or OMIT, STOPAFT, and SKIPREC
OUTFIL
LOCALE
SUM
Eliminating duplicate records
ICETOOL
Avoid options that degrade performance
CKPT
EQUALS
EQUCOUNT
LOCALE
NOCINV
NOBLKSET
VERIFY
Tape work data sets
User exit routines
Dynamic binding or link-editing
EFS programs
Use main storage efficiently
Tuning main storage
Releasing main storage
Allocate temporary work space efficiently
Disk work storage devices
Virtual I/O for work data sets
Tape work storage devices
Use Hipersorting
Sort with data space
Use memory object sorting
Use ICEGENER instead of IEBGENER
ICEGENER return codes
Use DFSORT's performance booster for The SAS System
Use DFSORT's BLDINDEX support
Examples of DFSORT job streams
Summary of examples
Storage administrator examples
REXX examples
CLIST examples
Sort examples
Example 1. Sort with ALTSEQ
Example 2. Sort with OMIT, SUM, OUTREC, DYNALLOC
and ZDPRINT
Example 3. Sort with ASCII tapes
Example 4. Sort with E15, E35, FILSZ, AVGRLEN and
DYNALLOC
Example 5. Called sort with SORTCNTL, CHALT,
DYNALLOC and FILSZ
Example 6. Sort with VSAM input/output, DFSPARM and
option override
Example 7. Sort with COBOL E15, EXEC PARM and
MSGDDN
Example 8. Sort with dynamic link-editing of exits
Example 9. Sort with the extended parameter list
interface
Example 10. Sort with OUTFIL
Example 11. Sort with Pipes and OUTFIL SPLIT
Example 12. Sort with INCLUDE and LOCALE
Example 13: Sort with z/OS UNIX files
Example 14. Sort with IFTHEN
Example 15. Sort with 64-bit parameter lists, E15, E35
and OUTFIL
MERGE examples
Example 1. Merge with EQUALS
Example 2. Merge with LOCALE and OUTFIL
Copy examples
Example 1. Copy with EXEC PARMs, SKIPREC, MSGPRT
and ABEND
Example 2. Copy with INCLUDE and VLSHRT
Example 3. Copy with OUTREC, PARSE and BUILD
ICEGENER example
ICETOOL example
Using work space
Introduction
Central storage
Work data set devices
Disk and tape devices
Number of devices
Non-synchronous storage subsystems
Allocation of work data sets
Dynamic allocation of work data sets
Automatic dynamic allocation
Device defaults
File size and dynamic allocation
Dynamic over-allocation of work space
JCL allocation of work data sets
Disk capacity considerations
Exceeding disk work space capacity
Tape capacity considerations
Exceeding tape work space capacity
Specification/override of DFSORT options
Main features of sources of DFSORT options
DFSPARM data set
EXEC statement PARM options
SORTCNTL data set
SYSIN data set
Parameter lists
Override tables
Directly invoked DFSORT
Notes to directly invoked DFSORT table
Program invoked DFSORT with the extended parameter list
Notes to extended parameter list table
Program invoked DFSORT with the 24-bit parameter list
Notes to 24-bit list table
Data format descriptions
DFSORT data formats
Where DFSORT formats can be used
DFSORT formats for COBOL data types
EBCDIC and ASCII collating sequences
EBCDIC
ASCII
DFSORT abend processing
Checkpoint/restart
DFSORT abend categories
Abend recovery processing for unexpected abends
Processing of error abends with A-type messages
CTRx abend processing
Accessibility
Using assistive technologies
Keyboard navigation of the user interface
z/OS information
Notices
Programming interface information
Trademarks

Notices | Terms of use | Support | Contact z/OS | zFavorites

Copyright IBM Corporation 1990, 2014

You might also like