896
z/OS DFSORT Application Programming Guide SC26-7523-04

z/OS V1R11.0 DFSORT Application Programming Guidepublibz.boulder.ibm.com/epubs/pdf/ice1ca40.pdf · 2009-08-04 · DFSORT Application Programming Guide SC26-7523-04. Note Before using

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

  • z/OS

    DFSORT Application Programming Guide

    SC26-7523-04

    ���

  • z/OS

    DFSORT Application Programming Guide

    SC26-7523-04

    ���

  • NoteBefore using this information and the product it supports, be sure to read the general information under “Notices” on page839.

    Fifth Edition, September 2009

    This edition applies to Version 1 Release 11 of z/OS™ (5694-A01) and to all subsequent releases and modificationsuntil otherwise indicated in new editions.

    This edition replaces SC26–7523–03.

    IBM welcomes your comments. A form for readers’ comments may be provided at the back of this publication, oryou may address your comments to the following address:

    International Business Machines CorporationMHVRCFS, Mail Station P1812455 South RoadPoughkeepsie, NY 12601-5400United States of America

    FAX (United States & Canada): 1+845+432-9405FAX (Other Countries):

    Your International Access Code +1+845+432-9405

    IBMLink™ (United States customers only): IBMUSM10(MHVRCFS)Internet e-mail: [email protected] Wide Web: http://www.ibm.com/servers/eserver/zseries/zos/webqs.html

    If you would like a reply, be sure to include your name, address, telephone number, or FAX number.

    Make sure to include the following in your comment or note:v Title and order number of this documentv Page number or topic related to your commentWhen you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in anyway it believes appropriate without incurring any obligation to you.

    © Copyright International Business Machines Corporation 1973, 2009.US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contractwith IBM Corp.

    http://www.ibm.com/systems/z/os/zos/webqs.html

  • Contents

    Figures . . . . . . . . . . . . . . . ix

    Tables . . . . . . . . . . . . . . . xi

    About this document . . . . . . . . xiiiHow to use this document . . . . . . . . . xiiiRequired product knowledge . . . . . . . . xivReferenced documents . . . . . . . . . . xivAccessing z/OS DFSORT documents on the Internet xvUsing LookAt to look up message explanations . . xvNotational conventions . . . . . . . . . . xvi

    Summary of Changes . . . . . . . . xixSummary of Changes for SC26-7525-04 z/OSVersion 1 Release 11 (PTFs - July, 2008) . . . . . xix

    New Information . . . . . . . . . . . xixOperational Changes that may Require UserAction. . . . . . . . . . . . . . . xxii

    Summary of Changes for SC26-7523-03 z/OSVersion 1 Release 10 . . . . . . . . . . . xxiii

    New Information . . . . . . . . . . . xxiiiOperational Changes that may Require UserAction . . . . . . . . . . . . . . xxiv

    Summary of Changes for SC26-7523-02 z/OSVersion 1 Release 8 (PTFs - April, 2006) . . . . xxv

    New Information . . . . . . . . . . . xxvOperational Changes that may Require UserAction . . . . . . . . . . . . . . xxix

    Summary of Changes for SC26-7523-01 z/OSVersion 1 Release 6 (PTFs - December, 2004) . . . xxx

    New Information . . . . . . . . . . . xxxOperational Changes that may Require UserAction . . . . . . . . . . . . . . xxxiv

    Chapter 1. Introducing DFSORT . . . . 1DFSORT Overview . . . . . . . . . . . . 1DFSORT on the Web. . . . . . . . . . . . 4DFSORT FTP Site . . . . . . . . . . . . . 4Invoking DFSORT . . . . . . . . . . . . 4How DFSORT Works . . . . . . . . . . . 5

    Operating Systems . . . . . . . . . . . 5Control Fields and Collating Sequences . . . . 5Cultural Environment Considerations . . . . . 7DFSORT Processing . . . . . . . . . . . 7

    Input Data Sets—SORTIN and SORTINnn . . . . 11Output Data Sets—SORTOUT and OUTFIL. . . . 12Data Set Considerations . . . . . . . . . . 12

    Sorting or Copying Records . . . . . . . . 12Merging Records . . . . . . . . . . . 13Data Set Notes and Limitations . . . . . . . 13

    z/OS File System Considerations . . . . . . . 16Installation Defaults . . . . . . . . . . . 16Migrating to DFSORT from Other Sort Products . . 22DFSORT Messages and Return Codes . . . . . 22

    Use Blockset Whenever Possible . . . . . . . 23

    Chapter 2. Invoking DFSORT with JobControl Language . . . . . . . . . . 25Using the JCL . . . . . . . . . . . . . 25Using the JOB Statement . . . . . . . . . . 27Using the EXEC Statement . . . . . . . . . 27

    Specifying EXEC Statement Cataloged Procedures 27Specifying EXEC/DFSPARM PARM Options . . 29Aliases for PARM Options . . . . . . . . 60

    Using DD Statements . . . . . . . . . . . 61Duplicate Ddnames. . . . . . . . . . . 64Shared Tape Units . . . . . . . . . . . 64System DD Statements . . . . . . . . . 64Program DD Statements . . . . . . . . . 66

    Chapter 3. Using DFSORT ProgramControl Statements . . . . . . . . . 81Using Program Control Statements . . . . . . 82Control Statement Summary. . . . . . . . . 83

    Describing the Primary Task . . . . . . . . 83Including or Omitting Records . . . . . . . 83Reformatting and Editing Records . . . . . . 83Producing Multiple Output and Reports andConverting Records. . . . . . . . . . . 84Invoking Additional Functions and Options . . 84Using Symbols . . . . . . . . . . . . 84

    General Coding Rules . . . . . . . . . . . 84Continuation Lines . . . . . . . . . . . 86Inserting Comment Statements . . . . . . . 88Coding Restrictions. . . . . . . . . . . 89

    ALTSEQ Control Statement . . . . . . . . . 89Altering EBCDIC Collating Sequence—Examples 90

    DEBUG Control Statement . . . . . . . . . 92Specifying Diagnostic Options—Examples . . . 97

    END Control Statement . . . . . . . . . . 97Discontinue Reading ControlStatements—Examples. . . . . . . . . . 97

    INCLUDE Control Statement . . . . . . . . 98Relational Condition . . . . . . . . . . 101Comparisons . . . . . . . . . . . . 101Including Records in the Output DataSet—Comparison Examples. . . . . . . . 110Substring Comparison Tests . . . . . . . 112Including Records in the Output DataSet—Substring Comparison Example . . . . 114Bit Logic Tests . . . . . . . . . . . . 114Method 1: Bit Operator Tests . . . . . . . 114Padding and Truncation . . . . . . . . . 116Including Records in the Output Data Set—BitOperator Test Examples . . . . . . . . . 116Method 2: Bit Comparison Tests . . . . . . 117Including Records in the Output Data Set—BitComparison Test Examples . . . . . . . . 118Date Comparisons . . . . . . . . . . . 119

    © Copyright IBM Corp. 1973, 2009 iii

    ||||||||

  • Including Records in the Output Data Set—DateComparisons . . . . . . . . . . . . 122Numeric Tests . . . . . . . . . . . . 122Including Records in the Output DataSet--Numeric Tests . . . . . . . . . . 124INCLUDE/OMIT Statement Notes . . . . . 124

    INREC Control Statement . . . . . . . . . 125INREC Statement Notes . . . . . . . . . 148Reformatting Records Before Processing —Examples . . . . . . . . . . . . . . 150

    MERGE Control Statement . . . . . . . . . 160Specifying a MERGE or COPY—Examples . . 163

    MODS Control Statement . . . . . . . . . 164Identifying User Exit Routines—Examples. . . 167

    OMIT Control Statement . . . . . . . . . 167Omitting Records from the Output DataSet—Example . . . . . . . . . . . . 170

    OPTION Control Statement . . . . . . . . 171Aliases for OPTION Statement Options. . . . 220Specifying DFSORT Options orCOPY—Examples . . . . . . . . . . . 221

    OUTFIL Control Statements . . . . . . . . 224OUTFIL Statements Notes . . . . . . . . 354OUTFIL Features—Examples . . . . . . . 358

    OUTREC Control Statement . . . . . . . . 380OUTREC Statement Notes . . . . . . . . 402Reformatting Records After Processing —Examples . . . . . . . . . . . . . . 404

    RECORD Control Statement . . . . . . . . 414Describing the Record Format andLength—Examples . . . . . . . . . . 417

    SORT Control Statement. . . . . . . . . . 418SORT/MERGE Statement Notes . . . . . . 426Specifying a SORT or COPY—Examples . . . 427

    SUM Control Statement . . . . . . . . . . 428SUM Statement Notes . . . . . . . . . 430Adding Summary Fields—Examples. . . . . 432

    Chapter 4. Using Your Own User ExitRoutines . . . . . . . . . . . . . 435User Exit Routine Overview . . . . . . . . 435DFSORT Program Phases . . . . . . . . . 436Functions of Routines at User Exits . . . . . . 438

    DFSORT Input/User Exit/Output LogicExamples . . . . . . . . . . . . . . 438Opening and Initializing Data Sets . . . . . 439Modifying Control Fields . . . . . . . . 440Inserting, Deleting, and Altering Records . . . 440Summing Records . . . . . . . . . . . 440Handling Special I/O . . . . . . . . . 440VSAM User Exit Functions . . . . . . . . 441Determining Action when Intermediate StorageIs Insufficient . . . . . . . . . . . . 441Closing Data Sets . . . . . . . . . . . 441Terminating DFSORT . . . . . . . . . . 441

    Addressing and Residence Modes for User Exits 441How User Exit Routines Affect DFSORTPerformance . . . . . . . . . . . . . . 442Summary of Rules for User Exit Routines . . . . 442

    Loading User Exit Routines . . . . . . . 443User Exit Linkage Conventions . . . . . . 443

    Dynamically Link-Editing User Exit Routines 445Assembler User Exit Routines (Input Phase UserExits) . . . . . . . . . . . . . . . . 445

    E11 User Exit: Opening Data Sets/InitializingRoutines . . . . . . . . . . . . . . 445E15 User Exit: Passing or Changing Records forSort and Copy Applications . . . . . . . 446E16 User Exit: Handling Intermediate StorageMiscalculation . . . . . . . . . . . . 449E17 User Exit: Closing Data Sets . . . . . . 449E18 User Exit: Handling Input Data Sets . . . 449E19 User Exit: Handling Output to Work DataSets . . . . . . . . . . . . . . . 453E61 User Exit: Modifying Control Fields . . . 454

    Assembler User Exit Routines (Output Phase UserExits) . . . . . . . . . . . . . . . . 455

    E31 User Exit: Opening Data Sets/InitializingRoutines . . . . . . . . . . . . . . 456E32 User Exit: Handling Input to a Merge Only 456E35 User Exit: Changing Records . . . . . . 457E37 User Exit: Closing Data Sets . . . . . . 460E38 User Exit: Handling Input Data Sets . . . 461E39 User Exit: Handling Output Data Sets. . . 461

    Sample Routines Written in Assembler . . . . . 462E15 User Exit: Altering Record Length . . . . 462E16 User Exit: Sorting Current Records WhenNMAX Is Exceeded . . . . . . . . . . 463E35 User Exit: Altering Record Length . . . . 463E61 User Exit: Altering Control Fields . . . . 464

    COBOL User Exit Routines . . . . . . . . . 465COBOL User Exit Requirements . . . . . . 465

    COBOL User Exit Routines (Input Phase User Exit) 467COBOL E15 User Exit: Passing or ChangingRecords for Sort . . . . . . . . . . . 467

    COBOL User Exit Routines (Output Phase UserExit) . . . . . . . . . . . . . . . . 473

    COBOL E35 User Exit: Changing Records . . . 473Sample Routines Written in COBOL . . . . . . 478

    COBOL E15 User Exit: Altering Records . . . 478COBOL E35 User Exit: Inserting Records . . . 479

    E15/E35 Return Codes and EXITCK. . . . . . 480

    Chapter 5. Invoking DFSORT from aProgram . . . . . . . . . . . . . 483Invoking DFSORT Dynamically . . . . . . . 483What Are System Macro Instructions? . . . . . 483Using System Macro Instructions . . . . . . . 483Using JCL DD Statements . . . . . . . . . 484Overriding DFSORT Control Statements fromPrograms . . . . . . . . . . . . . . . 484Invoking DFSORT With the 24-Bit Parameter List 485

    Providing Program Control Statements . . . . 485Invoking DFSORT With The Extended ParameterList . . . . . . . . . . . . . . . . . 492

    Providing Program Control Statements . . . . 492Writing the Macro Instruction . . . . . . . . 495

    Parameter List Examples . . . . . . . . 495Restrictions for Dynamic Invocation . . . . . . 499

    Merge Restriction . . . . . . . . . . . 499Copy Restrictions . . . . . . . . . . . 499

    iv z/OS V1R11.0 DFSORT Application Programming Guide

  • Chapter 6. Using ICETOOL. . . . . . 501Overview. . . . . . . . . . . . . . . 502

    ICETOOL/DFSORT Relationship . . . . . . 503ICETOOL JCL Summary. . . . . . . . . 503ICETOOL Operator Summary . . . . . . . 504Complete ICETOOL Examples. . . . . . . 505Using Symbols . . . . . . . . . . . . 505Invoking ICETOOL . . . . . . . . . . 506Putting ICETOOL to Use . . . . . . . . 506

    Job Control Language for ICETOOL . . . . . . 509JCL Restrictions . . . . . . . . . . . 511

    ICETOOL Statements . . . . . . . . . . . 512General Coding Rules . . . . . . . . . 512

    COPY Operator . . . . . . . . . . . . 513Operand Descriptions . . . . . . . . . 513COPY Examples . . . . . . . . . . . 515

    COUNT Operator . . . . . . . . . . . . 516Operand Descriptions . . . . . . . . . 517COUNT Examples. . . . . . . . . . . 521

    DATASORT Operator. . . . . . . . . . . 522Operand Descriptions . . . . . . . . . 524DATASORT Examples . . . . . . . . . 525

    DEFAULTS Operator . . . . . . . . . . . 526Operand Descriptions . . . . . . . . . 528DEFAULTS Example . . . . . . . . . . 529

    DISPLAY Operator . . . . . . . . . . . 531Simple Report . . . . . . . . . . . . 533Tailored Report . . . . . . . . . . . . 534Sectioned Report . . . . . . . . . . . 535Operand Descriptions . . . . . . . . . 536DISPLAY Examples . . . . . . . . . . 564

    MODE Operator . . . . . . . . . . . . 580Operand Descriptions . . . . . . . . . 580MODE Example . . . . . . . . . . . 580

    OCCUR Operator . . . . . . . . . . . . 582Simple Report . . . . . . . . . . . . 583Tailored Report . . . . . . . . . . . . 584Operand Descriptions . . . . . . . . . 585OCCUR Examples . . . . . . . . . . . 595

    RANGE Operator . . . . . . . . . . . . 598Operand Descriptions . . . . . . . . . 598RANGE Example . . . . . . . . . . . 600

    SELECT Operator . . . . . . . . . . . . 600Operand Descriptions . . . . . . . . . 602SELECT Examples. . . . . . . . . . . 606

    SORT Operator . . . . . . . . . . . . . 610Operand Descriptions . . . . . . . . . 611SORT Examples . . . . . . . . . . . 612

    SPLICE Operator . . . . . . . . . . . . 614Operand Descriptions . . . . . . . . . 620SPLICE Examples . . . . . . . . . . . 623

    STATS Operator . . . . . . . . . . . . 641Operand Descriptions . . . . . . . . . 641STATS Example . . . . . . . . . . . 642

    SUBSET Operator . . . . . . . . . . . . 643Operand Descriptions . . . . . . . . . 644SUBSET Examples . . . . . . . . . . . 648

    UNIQUE Operator . . . . . . . . . . . 650Operand Descriptions . . . . . . . . . 651UNIQUE Example. . . . . . . . . . . 652

    VERIFY Operator . . . . . . . . . . . . 652

    Operand Descriptions . . . . . . . . . 653VERIFY Example . . . . . . . . . . . 654

    Calling ICETOOL from a Program . . . . . . 654TOOLIN Interface . . . . . . . . . . . 654Parameter List Interface . . . . . . . . . 654

    ICETOOL Notes and Restrictions . . . . . . . 660ICETOOL Return Codes . . . . . . . . . . 661

    Chapter 7. Using Symbols for Fieldsand Constants . . . . . . . . . . . 663Field and Constant Symbols Overview . . . . . 663

    DFSORT Example . . . . . . . . . . . 664SYMNAMES DD Statement . . . . . . . . 666SYMNOUT DD Statement . . . . . . . . . 666SYMNAMES Statements. . . . . . . . . . 666

    Comment and Blank Statements . . . . . . 666Symbol Statements . . . . . . . . . . 667Keyword Statements . . . . . . . . . . 676Using SYMNOUT to Check Your SYMNAMESStatements . . . . . . . . . . . . . 679

    Using Symbols in DFSORT Statements . . . . . 679SORT and MERGE . . . . . . . . . . 680SUM . . . . . . . . . . . . . . . 681INCLUDE and OMIT. . . . . . . . . . 681INREC and OUTREC. . . . . . . . . . 682OUTFIL . . . . . . . . . . . . . . 684

    Using Symbols in ICETOOL Operators . . . . . 687COUNT . . . . . . . . . . . . . . 687DATASORT . . . . . . . . . . . . . 687DISPLAY . . . . . . . . . . . . . . 688OCCUR . . . . . . . . . . . . . . 688RANGE . . . . . . . . . . . . . . 688SELECT . . . . . . . . . . . . . . 688SPLICE . . . . . . . . . . . . . . 688STATS, UNIQUE and VERIFY . . . . . . . 688SUBSET . . . . . . . . . . . . . . 688ICETOOL Example . . . . . . . . . . 689

    Notes for Symbols. . . . . . . . . . . . 690

    Chapter 8. Using Extended FunctionSupport . . . . . . . . . . . . . . 693Using EFS . . . . . . . . . . . . . . 693Addressing and Residence Mode of the EFSProgram . . . . . . . . . . . . . . . 694How EFS Works . . . . . . . . . . . . 694

    DFSORT Program Phases . . . . . . . . 695DFSORT Calls to Your EFS Program . . . . . 695

    What You Can Do with EFS . . . . . . . . 700Opening and Initializing Data Sets . . . . . 701Examining, Altering, or Ignoring ControlStatements . . . . . . . . . . . . . 701Processing User-Defined Data Types with EFSProgram User Exit Routines . . . . . . . 703Supplying Messages for Printing to the MessageData Set . . . . . . . . . . . . . . 703Terminating DFSORT . . . . . . . . . . 703Closing Data Sets and Housekeeping . . . . 703

    Structure of the EFS Interface Parameter List . . . 703Action Codes . . . . . . . . . . . . 705Control Statement Request List . . . . . . 706

    Contents v

    ||||||

    ||||||

    ||

    ||

  • Control Statement String Sent to the EFSprogram . . . . . . . . . . . . . . 706Control Statement String Returned by the EFSProgram . . . . . . . . . . . . . . 708EFS Formats for SORT, MERGE, INCLUDE, andOMIT Control Statements . . . . . . . . 709D1 Format on FIELDS Operand . . . . . . 709D2 Format on COND Operand . . . . . . 710Length of Original Control Statement . . . . 712Length of the Altered Control Statement . . . 712EFS Program Context Area . . . . . . . . 712Extract Buffer Offsets List . . . . . . . . 712Record Lengths List . . . . . . . . . . 712Information Flags . . . . . . . . . . . 713Message List . . . . . . . . . . . . 714

    EFS Program Exit Routines . . . . . . . . . 715EFS01 and EFS02 Function Description . . . . 715EFS01 User Exit Routine. . . . . . . . . 716EFS02 User Exit Routine. . . . . . . . . 717Addressing and Residence Mode of EFSProgram User Exit Routines . . . . . . . 719

    EFS Program Return Codes You Must Supply . . 720Record Processing Order . . . . . . . . . 720How to Request a SNAP Dump . . . . . . . 722EFS Program Example . . . . . . . . . . 723

    DFSORT Initialization Phase: . . . . . . . 723DFSORT Termination Phase . . . . . . . 725

    Chapter 9. Improving Efficiency . . . 727Improving Performance . . . . . . . . . . 727Design Your Applications to MaximizePerformance . . . . . . . . . . . . . . 728

    Directly Invoke DFSORT Processing . . . . . 728Plan Ahead When Designing New Applications 728Specify Efficient Sort/Merge Techniques . . . 729Specify Input/Output Data Set CharacteristicsAccurately . . . . . . . . . . . . . 729Use Extended Format Data Sets . . . . . . 730Use DFSMSrmm-Managed Tapes, or ICETPEX 731Specify Devices that Improve Elapsed Time . . 731Use Options that Enhance Performance. . . . 731Use DFSORT’s Fast, Efficient ProductivityFeatures . . . . . . . . . . . . . . 733Avoid Options that Degrade Performance . . . 734Use Main Storage Efficiently . . . . . . . 735Allocate Temporary Work Space Efficiently . . 738Use Hipersorting . . . . . . . . . . . 740Sort with Data Space . . . . . . . . . . 740Use Memory Object Sorting . . . . . . . 741Use ICEGENER Instead of IEBGENER . . . . 742ICEGENER Return Codes . . . . . . . . 745

    Use DFSORT’s Performance Booster for The SASSystem . . . . . . . . . . . . . . . 745Use DFSORT’s BLDINDEX Support . . . . . . 745

    Chapter 10. Examples of DFSORT JobStreams. . . . . . . . . . . . . . 747Summary of Examples . . . . . . . . . . 747Storage Administrator Examples . . . . . . . 748REXX Examples . . . . . . . . . . . . 748

    CLIST Examples . . . . . . . . . . . . 749Sort Examples . . . . . . . . . . . . . 749

    Example 1. Sort with ALTSEQ . . . . . . . 749Example 2. Sort with OMIT, SUM, OUTREC,DYNALLOC and ZDPRINT . . . . . . . 750Example 3. Sort with ASCII Tapes . . . . . 751Example 4. Sort with E15, E35, FILSZ,AVGRLEN and DYNALLOC . . . . . . . 752Example 5. Called sort with SORTCNTL,CHALT, DYNALLOC and FILSZ . . . . . . 753Example 6. Sort with VSAM Input/Output,DFSPARM and Option Override . . . . . . 755Example 7. Sort with COBOL E15, EXEC PARMand MSGDDN . . . . . . . . . . . . 756Example 8. Sort with Dynamic Link-Editing ofExits . . . . . . . . . . . . . . . 758Example 9. Sort with the Extended ParameterList Interface . . . . . . . . . . . . 759Example 10. Sort with OUTFIL . . . . . . 762Example 11. Sort with Pipes and OUTFIL SPLIT 764Example 12. Sort with INCLUDE and LOCALE 764Example 13: Sort with z/OS UNIX Files . . . 765Example 14. Sort with IFTHEN . . . . . . 766

    Merge Examples . . . . . . . . . . . . 768Example 1. Merge with EQUALS . . . . . . 768Example 2. Merge with LOCALE and OUTFIL 769

    Copy Examples. . . . . . . . . . . . . 770Example 1. Copy with EXEC PARMs, SKIPREC,MSGPRT and ABEND . . . . . . . . . 771Example 2. Copy with INCLUDE and VLSHRT 772Example 3. Copy with OUTREC, PARSE andBUILD . . . . . . . . . . . . . . 772

    ICEGENER Example . . . . . . . . . . . 774ICETOOL Example . . . . . . . . . . . 775

    Appendix A. Using Work Space . . . 777Introduction . . . . . . . . . . . . . . 777Hiperspace . . . . . . . . . . . . . . 777Work Data Set Devices . . . . . . . . . . 778

    Disk and Tape Devices . . . . . . . . . 778Number of Devices . . . . . . . . . . 778Non-Synchronous Storage Subsystems . . . . 778

    Allocation of Work Data Sets . . . . . . . . 779Dynamic Allocation of Work Data Sets . . . . 780Dynamic Over-Allocation of Work Space . . . 781JCL Allocation of Work Data Sets . . . . . . 782

    Disk Capacity Considerations . . . . . . . . 783Exceeding Disk Work Space Capacity . . . . 783

    Tape Capacity Considerations . . . . . . . . 784Exceeding Tape Work Space Capacity . . . . 784

    Appendix B. Specification/Override ofDFSORT Options . . . . . . . . . . 787Main Features of Sources of DFSORT Options . . 788

    DFSPARM Data Set . . . . . . . . . . 788EXEC Statement PARM Options . . . . . . 788SORTCNTL Data Set . . . . . . . . . . 789SYSIN Data Set . . . . . . . . . . . . 789Parameter Lists . . . . . . . . . . . . 789Override Tables . . . . . . . . . . . 789

    vi z/OS V1R11.0 DFSORT Application Programming Guide

    |

  • Directly Invoked DFSORT . . . . . . . . . 790Notes to Directly Invoked DFSORT Table . . . 798

    Program Invoked DFSORT with the ExtendedParameter List . . . . . . . . . . . . . 798

    Notes to Extended Parameter List Table . . . 806Program Invoked DFSORT with the 24-BitParameter List . . . . . . . . . . . . . 806

    Notes to 24-Bit List Table . . . . . . . . 814

    Appendix C. Data Format Descriptions 815DFSORT Data Formats . . . . . . . . . . 815Where DFSORT Formats Can be Used . . . . . 822DFSORT Formats for COBOL Data Types . . . . 824

    Appendix D. EBCDIC and ASCIICollating Sequences . . . . . . . . 827EBCDIC . . . . . . . . . . . . . . . 827ASCII . . . . . . . . . . . . . . . . 829

    Appendix E. DFSORT AbendProcessing . . . . . . . . . . . . 833

    Checkpoint/Restart . . . . . . . . . . . 833DFSORT Abend Categories . . . . . . . . . 834Abend Recovery Processing for UnexpectedAbends . . . . . . . . . . . . . . . 834Processing of Error Abends with A-Type Messages 835CTRx Abend processing . . . . . . . . . . 835

    Appendix F. Accessibility . . . . . . 837Using assistive technologies . . . . . . . . 837Keyboard navigation of the user interface . . . . 837z/OS information . . . . . . . . . . . . 837

    Notices . . . . . . . . . . . . . . 839Programming Interface Information . . . . . . 840Trademarks . . . . . . . . . . . . . . 840

    Index . . . . . . . . . . . . . . . 841

    Contents vii

  • viii z/OS V1R11.0 DFSORT Application Programming Guide

  • Figures

    1. Control Fields . . . . . . . . . . . . 62. Record Processing Order . . . . . . . . 93. Using ICETOOL to List Installation Defaults 184. Syntax Diagram for EXEC PARM . . . . . 315. Aliases for MSGPRT/MSGCON Options 466. Control Statement Format . . . . . . . . 857. Continuation Line Format. . . . . . . . 878. Valid and Invalid Decimal Constants 1059. Valid and Invalid Character String Constants 107

    10. Valid and Invalid Hexadecimal Constants 10911. Sample Records . . . . . . . . . . . 11212. Syntax Diagram for the Option Control

    Statement . . . . . . . . . . . . . 17113. OUTFIL Processing Order . . . . . . . 23014. Examples of Notation for Binary Fields 42115. Examples of DFSORT Input/User

    Exit/Output Logic . . . . . . . . . . 43716. E18 User Exit Example . . . . . . . . 45317. E38 User Exit Example . . . . . . . . 46118. E39 User Exit Example . . . . . . . . 46219. E15 User Exit Example . . . . . . . . 46320. E16 User Exit Example . . . . . . . . 46321. E35 User Exit Example . . . . . . . . 46422. E61 User Exit Example . . . . . . . . 46523. E15 DFSORT Interface with COBOL . . . . 46924. LINKAGE SECTION Code Example for E15

    (Fixed-Length Records) . . . . . . . . 47025. LINKAGE SECTION Code Example for E15

    (Variable-Length Record). . . . . . . . 47026. E35 Interface with COBOL . . . . . . . 47427. LINKAGE SECTION Code Example for E35

    (Fixed-Length Records) . . . . . . . . 475

    28. LINKAGE SECTION Code Example for E35(Variable-Length Records) . . . . . . . 475

    29. COBOL E15 Routine Example (FLR) . . . . 47930. COBOL E35 Routine Example (VLR) 48031. The 24-Bit Parameter List . . . . . . . 48732. The Extended Parameter List . . . . . . 49333. Specifying the Main Storage Option (24-Bit

    Parameter List) . . . . . . . . . . . 49634. Specifying E32 and ESTAE Routine (24-Bit

    Parameter List) . . . . . . . . . . . 49635. The 24-Bit Parameter List in Main Storage 49736. Coding a 24-Bit Parameter List. . . . . . 49837. Coding an Extended Parameter List . . . . 49938. Simple ICETOOL Job . . . . . . . . . 50539. Parameter List for Parameter List Interface 65540. ICETOOL Parameter List Interface Example 65841. JCL for Parameter List Interface Program

    Example . . . . . . . . . . . . . 66042. Relationship Between DFSORT and an EFS

    Program . . . . . . . . . . . . . 69543. EFS Program Calls for a Sort . . . . . . 69644. EFS Program Calls for a Merge or Copy 69745. Control Statement Processing Sequence 70246. EFS Interface Parameter List . . . . . . 70447. Information Flags . . . . . . . . . . 71348. DFSORT Register Convention . . . . . . 71649. Calling Sequence to EFS02 by DFSORT 71850. EFS Record Processing Sequence for a Sort or

    Merge . . . . . . . . . . . . . . 72151. EFS Record Processing Sequence for a Copy 72252. Faster Sorting with COBOL . . . . . . . 732

    © Copyright IBM Corp. 1973, 2009 ix

  • x z/OS V1R11.0 DFSORT Application Programming Guide

  • Tables

    1. Related documents . . . . . . . . . . xiv2. Referenced documents . . . . . . . . xiv3. Options That Can Ease Migration . . . . . 224. FILSZ Variations Summary . . . . . . . 415. Aliases for PARM Options . . . . . . . 616. DD Statement Parameters Used by DFSORT 627. DCB Subparameters Used by DFSORT . . . 638. Compare Field Formats and Lengths 1029. Permissable Field-to-Field Comparisons for

    INCLUDE/OMIT (Group 1) . . . . . . 10310. Permissable Field-to-Field Comparisons for

    INCLUDE/OMIT (Group 2) . . . . . . 10311. Permissible Field-to-Constant Comparisons

    for INCLUDE/OMIT . . . . . . . . . 10412. Decimal Numbers for Current Date . . . . 10513. Decimal Numbers for Future Dates . . . . 10614. Decimal Numbers for Past Dates . . . . . 10615. Valid and Invalid Strings with Double-Byte

    Data . . . . . . . . . . . . . . 10716. Character Strings for Current Date . . . . 10817. Character Strings for Future Dates . . . . 10818. Character Strings for Past Dates . . . . . 10919. Bit Comparison Example 2: Results for

    Selected Field Values . . . . . . . . . 11620. Bit Comparison Example 3: Results for

    Selected Field Values . . . . . . . . . 11721. Bit Comparison Example 2: Results for

    Selected Field Values . . . . . . . . . 11822. Bit Comparison Example 3: Results for

    Selected Field Values . . . . . . . . . 11923. Permissible Comparisons for Dates . . . . 12124. Logic Table for INCLUDE/OMIT. . . . . . 12525. Examples of Valid and Invalid Column

    Alignment . . . . . . . . . . . . 13026. Examples of Valid and Invalid Blank

    Separation . . . . . . . . . . . . 13127. Examples of Valid and Invalid Binary Zero

    Separation . . . . . . . . . . . . 13128. Examples of Valid and Invalid Character

    String Separation . . . . . . . . . . 13129. Examples of Valid and Invalid Hexadecimal

    String Separation . . . . . . . . . . 13230. Example of DYNSPC Primary Space . . . . 18231. FILSZ Variations Summary . . . . . . . 18732. SIZE Variations Summary . . . . . . . 18833. SDB=LARGE Block Sizes for Tape Output

    Data Sets . . . . . . . . . . . . . 20434. Aliases for OPTION Statement Options 22135. Current date constants . . . . . . . . 25336. Future Date Constants . . . . . . . . 25437. Past Date Constants . . . . . . . . . 25538. Current time constants . . . . . . . . 25639. p,m,Y2x Output. . . . . . . . . . . 26340. p,m,Y2x(c) Output . . . . . . . . . . 26441. p,m,Y2xP Output . . . . . . . . . . 26542. Edit Field Formats and Lengths . . . . . 265

    43. Edit Mask Patterns. . . . . . . . . . 26844. Edit Mask Signs . . . . . . . . . . 27045. Digits Needed for Numeric Fields . . . . 27146. Edit Mask Output Field Lengths . . . . . 27147. To Output Field Lengths . . . . . . . . 27748. Digits for TOTAL Fields . . . . . . . . 33249. Control Field Formats and Lengths . . . . 42150. Summary Field Formats and Lengths 42951. Functions of Routines at Program User Exits

    (Sort) . . . . . . . . . . . . . . 43952. Functions of Routines at Program User Exits

    (Copy and Merge) . . . . . . . . . . 43953. E15 User Exit Parameter List . . . . . . 44754. E32 User Exit Parameter List . . . . . . 45755. E35 User Exit Parameter List . . . . . . 45956. E15 Without a SORTIN Data Set . . . . . 48157. E15 With a SORTIN Data Set Before End of

    Input . . . . . . . . . . . . . . 48158. E15 With a SORTIN Data Set After End of

    Input . . . . . . . . . . . . . . 48159. E35 With a SORTOUT or OUTFIL Data Set

    Before End of Input . . . . . . . . . 48160. E35 Without a SORTOUT or OUTFIL Data Set

    Before End of Input . . . . . . . . . 48261. E35 With a SORTOUT or OUTFIL Data Set

    After End of Input . . . . . . . . . . 48262. E35 without a SORTOUT or OUTFIL Data Set

    After End of Input . . . . . . . . . . 48263. Aliases for Message Option . . . . . . . 49064. Obtaining Various Statistics . . . . . . . 50665. Creating Multiple Versions/Combinations of

    Data Sets . . . . . . . . . . . . . 50766. JCL Statements for ICETOOL . . . . . . 50967. Attributes of Edit Masks . . . . . . . . 53968. Edit Mask Patterns. . . . . . . . . . 53969. Return Area Lengths/Operation-Specific

    Values . . . . . . . . . . . . . . 65670. Functions of an Extended Function Support

    (EFS) Program . . . . . . . . . . . 70071. D1 Format Returned by an EFS Program 71072. Correlator Identifier and D2 Format Returned

    by an EFS Program . . . . . . . . . 71173. Original and Altered Control Statements 72474. Number of Tracks per Cylinder for Disk

    Devices . . . . . . . . . . . . . 73075. Minimum Storage Required for Various File

    Sizes . . . . . . . . . . . . . . 77976. Work Space Requirements for Various Input

    Characteristics . . . . . . . . . . . 78377. Number of Tracks per Cylinder for Disk

    Devices . . . . . . . . . . . . . 78378. Work Space Requirements of the Various Tape

    Techniques . . . . . . . . . . . . 78479. Directly Invoked DFSORT Option

    Specification/Override . . . . . . . . 791

    © Copyright IBM Corp. 1973, 2009 xi

  • 80. Extended Parameter List DFSORT OptionSpecification/Override . . . . . . . . 799

    81. 24-Bit List DFSORT OptionSpecification/Override . . . . . . . . 807

    82. Allowed with Frequently Used Data Types 822

    83. Allowed with Other Data Types . . . . . 82384. Equivalent DFSORT formats for various

    COBOL data types . . . . . . . . . . 82485. EBCDIC Collating Sequence . . . . . . 82786. ASCII Collating Sequence . . . . . . . 829

    xii z/OS V1R11.0 DFSORT Application Programming Guide

  • About this document

    This document is intended to help you to sort, merge, and copy data sets usingDFSORT™. This document is not designed to teach you how to use DFSORT, but isfor programmers who already have a basic understanding of DFSORT, and need atask-oriented guide and reference to its functions and options. If you are a newuser, then you should read z/OS DFSORT: Getting Started first. z/OS DFSORT:Getting Started is a self-study guide that tells you what you need to know to beginusing DFSORT quickly, with step-by-step examples and illustrations.

    How to use this documentThe various sections of this document present related information groupedaccording to tasks you want to do. The first three chapters of the document explainwhat you need to know to invoke and use DFSORT’s primary record-processingfunctions. The remaining chapters explain more specialized features. Theappendixes provide specific information about various topics.v Chapter 1, “Introducing DFSORT,” on page 1, presents an overview of DFSORT,

    explaining what you can do with DFSORT and how you invoke DFSORTprocessing. It describes how DFSORT works, discusses data set formats andlimitations, and explains how installation defaults can affect your DFSORTapplications.

    v Chapter 2, “Invoking DFSORT with Job Control Language,” on page 25, explainshow to use job control language (JCL) to run your DFSORT jobs. It explains howto code JOB, EXEC, and DD statements, and how you can use catalogedprocedures and EXEC PARM options to simplify your JCL and overrideinstallation defaults.

    v Chapter 3, “Using DFSORT Program Control Statements,” on page 81, presentsthe DFSORT control statements you use to sort, merge, and copy data. Itexplains how to filter your data so you work only with the records you need,how to edit data by reformatting and summing records, and how to producemultiple output data sets and reports. It explains how to write statements thatdirect DFSORT to use your own routines during processing.

    v Chapter 4, “Using Your Own User Exit Routines,” on page 435, describes how touse DFSORT’s program exits to call your own routines during programprocessing. You can write routines to delete, insert, alter, and summarize records,and you can incorporate your own error-recovery routines.

    v Chapter 5, “Invoking DFSORT from a Program,” on page 483, describes how youuse a system macro instruction to initiate DFSORT processing from your ownassembler program. It also lists specific restrictions on invoking DFSORT fromPL/I and COBOL.

    v Chapter 6, “Using ICETOOL,” on page 501, describes how to use themulti-purpose DFSORT utility ICETOOL. It explains the JCL and operators youcan use to perform a variety of tasks with ICETOOL.

    v Chapter 7, “Using Symbols for Fields and Constants,” on page 663, explains howto define symbols and use them in DFSORT control statements and ICETOOLoperators.

    v Chapter 8, “Using Extended Function Support,” on page 693, explains how touse the Extended Function Support (EFS) interface to tailor control statements, tohandle user-defined data types and collating sequences, and to have DFSORTissue customized informational messages during processing.

    © Copyright IBM Corp. 1973, 2009 xiii

  • v Chapter 9, “Improving Efficiency,” on page 727, recommends ways with whichyou can maximize DFSORT processing efficiency. This chapter covers a widespectrum of improvements you can make, from designing individualapplications for efficient processing at your site to using DFSORT features suchas Hipersorting, dataspace sorting, and ICEGENER.

    v Chapter 10, “Examples of DFSORT Job Streams,” on page 747, containsannotated example job streams for sorting, merging, and copying records.

    v Appendix A, “Using Work Space,” on page 777, explains main storageconsiderations and how to estimate the amount of intermediate storage youmight require when sorting data.

    v Appendix B, “Specification/Override of DFSORT Options,” on page 787,contains a series of tables you can use to find the order of override for similaroptions that are specified in different sources.

    v Appendix C, “Data Format Descriptions,” on page 815, gives examples of theassembled data formats.

    v Appendix D, “EBCDIC and ASCII Collating Sequences,” on page 827, lists thecollating sequences from low to high order for EBCDIC and ISCII/ASCIIcharacters.

    v Appendix E, “DFSORT Abend Processing,” on page 833, describes the ESTAErecovery routine for processing abends, and the Checkpoint/Restart facility.

    v “Notices” on page 839, includes the notices, Programming Interface information,and the trademark list.

    Required product knowledgeTo use this document effectively, you should be familiar with the followinginformation:v Job control language (JCL)v Data managementv Tape and disk hardware

    You should also be familiar with the information presented in the following relateddocuments:

    Table 1. Related documents

    Document Title Document Order Number

    z/OS DFSORT Messages, Codes and DiagnosisGuide

    SC26-7525

    z/OS MVS JCL Reference SA22-7597

    z/OS MVS JCL User’s Guide SA22-7598

    z/OS DFSMS Using Data Sets SC26-7410

    z/OS DFSMS Using Magnetic Tapes SC26-7412

    Referenced documentsThis document refers to the following documents:

    Table 2. Referenced documents

    Document title Order number

    z/OS DFSMSdfp Checkpoint/Restart SC26-7401

    xiv z/OS V1R11.0 DFSORT Application Programming Guide

  • Table 2. Referenced documents (continued)

    Document title Order number

    z/OS DFSMS Macro Instructions for Data Sets SC26-7408

    z/OS DFSMS Using Data Sets SC26-7410

    z/OS MVS JCL Reference SA22-7597

    z/OS MVS JCL User’s Guide SA22-7598

    z/OS MVS Programming: Assembler ServicesReference IAR-XCT

    SA22-7607

    z/OS MVS Programming: Assembler ServicesGuide

    SA22-7605

    z/OS Program Directory GI10-0670

    z/OS UNIX System Services User’s Guide SA22-7801

    The z/OS DFSORT Application Programming Guide is a part of a more extensiveDFSORT library. These documents can help you work with DFSORT moreeffectively.

    Task Publication Title Order Number

    Planning For andCustomizing DFSORT

    z/OS DFSORT Installation andCustomization

    SC26-7524

    Learning to Use DFSORT z/OS DFSORT: Getting Started SC26-7527

    Diagnosing Failures andInterpreting Messages

    z/OS DFSORT Messages,Codes and Diagnosis Guide

    SC26-7525

    Tuning DFSORT z/OS DFSORT Tuning Guide SC26-7526

    Accessing z/OS DFSORT documents on the InternetIn addition to making softcopy documents available on CD-ROM, IBM providesaccess to unlicensed z/OS softcopy documents on the Internet. To find z/OSdocuments on the Internet, first go to the z/OS home page: http://www.ibm.com/servers/eserver/zseries/zos

    From this Web site, you can link directly to the z/OS softcopy documents byselecting the Library icon. You can also link to the IBM Publications Center toorder printed documentation.

    Using LookAt to look up message explanationsLookAt is an online facility that lets you look up explanations for most of the IBM®

    messages you encounter, as well as for some system abends and codes. UsingLookAt to find information is faster than a conventional search because in mostcases LookAt goes directly to the message explanation.

    You can use LookAt from these locations to find IBM message explanations forz/OS® elements and features, z/VM®, VSE/ESA™, and Clusters for AIX® andLinux®:v The Internet. You can access IBM message explanations directly from the LookAt

    Web site at www.ibm.com/servers/eserver/zseries/zos/bkserv/lookat/.

    About this document xv

    |||

    http://www.ibm.com/systems/z/os/zos/bkserv/lookat/

  • v Your z/OS TSO/E host system. You can install code on your z/OS systems toaccess IBM message explanations using LookAt from a TSO/E command line(for example: TSO/E prompt, ISPF, or z/OS UNIX® System Services).

    v Your Microsoft® Windows® workstation. You can install LookAt directly from thez/OS Collection (SK3T-4269) or the z/OS and Software Products DVD Collection(SK3T-4271) and use it from the resulting Windows graphical user interface(GUI). The command prompt (also known as the DOS > command line) versioncan still be used from the directory in which you install the Windows version ofLookAt.

    v Your wireless handheld device. You can use the LookAt Mobile Edition fromwww.ibm.com/servers/eserver/zseries/zos/bkserv/lookat/lookatm.html with ahandheld device that has wireless access and an Internet browser.

    You can obtain code to install LookAt on your host system or Microsoft Windowsworkstation from:v A CD in the z/OS Collection (SK3T-4269).v The z/OS and Software Products DVD Collection (SK3T-4271).v The LookAt Web site (click Download and then select the platform, release,

    collection, and location that suit your needs). More information is available inthe LOOKAT.ME files available during the download process.

    Notational conventionsThe syntax diagrams in this document are designed to make coding DFSORTprogram control statements simple and unambiguous. The lines and arrowsrepresent a path or flowchart that connects operators, parameters, and delimiters inthe order and syntax in which they must appear in your completed statement.Construct a statement by tracing a path through the appropriate diagram thatincludes all the parameters you need, and code them in the order that the diagramrequires you to follow. Any path through the diagram gives you a correctly codedstatement, 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 onthe next line or at an indicated spot.

    A continuation line begins with a single arrowhead.

    v Strings in upper-case letters, and punctuation (parentheses, apostrophes, and soon), must be coded exactly as shown.

    xvi z/OS V1R11.0 DFSORT Application Programming Guide

    http://www.ibm.com/systems/z/os/zos/bkserv/lookat/lookatm.html

  • – Semicolons are interchangeable with commas in program control statementsand the EXEC PARM string. For clarity, only commas are shown in thisdocument.

    v Strings in all lowercase letters represent information that you supply.v Required parameters appear on the same horizontal line (the main path) as the

    operator, while optional parameters appear in a branch below the main path.

    �� RequiredOptional

    ��

    v Where you can make one choice between two or more parameters, thealternatives are stacked vertically.

    �� Operator Required Choice 1Required Choice 2Required Choice 3

    Optional Choice 1Optional Choice 2

    ��

    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 themain path (as in the example above, right), then selections are optional, and youcan choose either one or none of them.

    v The repeat symbol shows where you can return to an earlier position in thesyntax diagram to specify a parameter more than once (see the first examplebelow), to specify more than one choice at a time from the same stack (see thesecond example below), or to nest parentheses (see the third example below).

    Do not interpret a repeat symbol to mean that you can specify incompatibleparameters. For instance, do not specify both ABEND and NOABEND in thesame EXEC statement, or attempt to nest parentheses incorrectly.Use any punctuation or delimiters that appear within the repeat symbol toseparate repeated items.

    v A double arrowhead at the end of a line indicates the end of the syntax diagram.

    a,b,c Choice-1Choice-2Choice-3

    , (,

    Notational Conventions

    About this document xvii

  • Notational Conventions

    xviii z/OS V1R11.0 DFSORT Application Programming Guide

  • Summary of Changes

    This document contains terminology, maintenance, and editorial changes. Technicalchanges or additions to the text and illustrations are indicated by a vertical line tothe left of each change.

    You might notice changes in the style and structure of some content in thisdocument—for example, more specific headings for notes, such as Tip andRequirement. The changes are ongoing improvements to the consistency andretrievability of information in DFSORT documents.

    Summary of Changes for SC26-7525-04 z/OS Version 1 Release 11(PTFs - July, 2008)

    This document contains information that was previously presented in z/OSDFSORT Application Programming Guide, SC26-7523-03.

    The following sections summarize the changes to that information.

    New InformationThis edition includes the following new enhancements:

    Find and ReplaceFINDREP is a new option that allows you to do various types of find and replaceoperations on your records. FINDREP makes it easy to replace character orhexadecimal input constants anywhere in your records with character, hexadecimalor null output constants. For input and output constants of different lengths, bytesafter the replaced constants will be shifted left or right, as appropriate. Forfixed-length records, blanks will be filled in on the right as needed. Forvariable-length records, the record length will be changed as needed.

    FINDREP can be used in an INREC, OUTREC or OUTFIL statement, or in anIFTHEN clause, in the same way BUILD and OVERLAY can be used.

    Various options of FINDREP allow you to define one or more input constants anda corresponding output constant (IN, OUT), define one or more pairs of input andoutput constants (INOUT), start and end the find scan at specified positions(STARTPOS, ENDPOS), stop after a specified number of constants are replaced(DO), increase or decrease the length of the output record (MAXLEN), define theaction to be taken if nonblank characters overrun the end of the record(OVERRUN), and specify whether output constants are to replace or overlay inputconstants (SHIFT).

    DFSORT symbols can be used for constants specified with FINDREP.

    Group OperationsWHEN=GROUP is a new type of IFTHEN clause that allows you to do varioustypes of operations involving groups of records. WHEN=GROUP makes it easy topropagate fields from the first record of a group to the other records of the group,add an identifier to each record of the group, or add a sequence number to each

    © Copyright IBM Corp. 1973, 2009 xix

    |

    |

    ||

    |

    |

    |

    ||||||||

    ||

    ||||||||

    |

    |||||

  • record of the group. These functions are useful by themselves, and can alsofacilitate other types of group operations such as sorting groups, including oromitting groups, and so on.

    WHEN=GROUP can be used in IFTHEN clauses in an INREC, OUTREC orOUTFIL statement in the same way WHEN=INIT can be used.

    Various options of WHEN=GROUP allow you to use logical expressions to definethe beginning and end of a group (BEGIN, END), define the number of records ina group (RECORDS), and define the fields, identifiers and sequence numbers to beadded to the records of each group (PUSH).

    DFSORT symbols can be used for columns, fields and constants specified withWHEN=GROUP clauses.

    DATASORTDATASORT is a new operator of ICETOOL that allows you to sort data recordsbetween header (first) records and trailer (last) records. DATASORT makes it easyto sort the data records while keeping one or more header records and/or one ormore trailer records in place. DATASORT does not require an ″identifier″ in theheader or trailer records; it can treat the first n records as header records and thelast n records as trailer records.

    Various options of DATASORT allow you to define the number of header recordsand/or trailer records (HEADER or FIRST, TRAILER or LAST), the ddname for theinput data set (FROM), the ddname for the output data set (TO), and the SORTand other DFSORT control statements to be used for the DATASORT operation(USING).

    DFSORT symbols can be used for the number of header and trailer recordsspecified with DATASORT.

    SUBSETSUBSET is a new operator of ICETOOL that allows you to create a subset of theinput or output records by specifying that you want to keep or remove header(first) records, trailer (last) records, or records with specific relative recordnumbers. SUBSET makes it easy to keep or remove records based on these criteria.SUBSET does not require an ″identifier″ or ″sequence number″ in the records to bekept or removed.

    Various options of SUBSET allow you to define the criteria (HEADER or FIRST,TRAILER or LAST, RRN), the ddname for the input data set (FROM), the ddnamefor the output data set to contain the records that meet the criteria and/or don’tmeet the criteria (TO, DISCARD), whether the records that meet the criteria are tobe kept or removed (KEEP, REMOVE), whether the criteria are to be applied to theinput or output records (INPUT, OUTPUT), and DFSORT control statements to beused for the SUBSET operation (USING).

    DFSORT symbols can be used for the number of header and trailer records and forthe relative record numbers specified with SUBSET.

    SELECT First n DuplicatesICETOOL’s SELECT operator now allows you to select the first n records witheach key or the first n duplicate records with each key. New FIRST(n) andFIRSTDUP(n) options make it easy to select records representing ″top″ and″bottom″ categories (for example, the top 5 students in each class).

    xx z/OS V1R11.0 DFSORT Application Programming Guide

    |||

    ||

    ||||

    ||

    |||||||

    |||||

    ||

    |||||||

    |||||||

    ||

    |||||

  • DFSORT symbols can be used for n with FIRST(n) or FIRSTDUP(n).

    SPLICE with Non-Blank FieldsICETOOL’s SPLICE operator now allows you to create a single record for each keyby splicing the base record with every specified nonblank field from each overlayrecord. A new WITHANY option makes it easy to collect information frommultiple records with the same key. You can now do a splice involving duplicaterecords with nonconsecutive or missing WITH fields, something that could not beaccomplished previously with the existing WITHEACH option.

    DISPLAY with CountICETOOL’s DISPLAY operator now allows you to display counts in reports. NewCOUNT(’string’), EDCOUNT(formatting), BCOUNT(’string’) andEDBCOUNT(formatting) options make it easy to print overall record count andbreak record count statistics in various forms in a report, similar to the existingstatistics for a report (overall total, maximum, minimum and average and breaktotal, maximum, minimum and average).

    DFSORT symbols can be used for ’string’ with COUNT(’string’) andBCOUNT(’string’).

    DISPLAY and OCCUR with Multiple and Multipart TitlesICETOOL’s DISPLAY and OCCUR operators now allow you to display up to threetitle lines, each composed of up to three strings. The enhancedTITLE(’string1’,’string2’,’string3’) option makes it easy to use multiple strings foreach title, including a combination of inline constants, and constants from DFSORTsymbols including system information. The use of up to three TITLE optionsmakes it easy to display multiline titles.

    A new TLEFT option allows you to left justify the title lines instead of centeringthem. A new TFIRST option allows you to only display the title lines on the firstpage of the report instead of on every page of the report.

    DFSORT symbols can be used for ’string1’, ’string2’ and ’string3’ withTITLE(’string1’,’string2’,’string3’).

    DISPLAY and OCCUR without Carriage ControlICETOOL’s DISPLAY and OCCUR operators now allow you to create reportswithout carriage control characters and with RECFM=FB instead of RECFM=FBA.A new NOCC option makes it easy to suppress the carriage control character. WithNOCC, a blank line is used instead of a page eject control character to separateelements of the report.

    COUNT in Output RecordICETOOL’s COUNT operator now allows you to create a count data set with anoutput record containing the record count. New WRITE(countdd), TEXT(’string’),DIGITS(n) and EDCOUNT(formatting) options make it easy to create an outputdata set with a record containing text and the record count in various forms.

    DFSORT symbols can be used for ’string’ with TEXT(’string’).

    COUNT with Add and SubtractICETOOL’s COUNT operator now allows you to add a value to, or subtract avalue from, the record count. New ADD(n) and SUB(n) options make it easy to

    Summary of Changes xxi

    |

    |||||||

    |||||||

    ||

    |||||||

    |||

    ||

    ||||||

    |||||

    |

    |||

  • increase or decrease, respectively, the actual record count to get a resultingmodified record count. This is especially useful for dealing with data sets thatcontain header and/or trailer records.

    The resulting modified record count is displayed in the count message inTOOLMSG and in the count data set, and used to determine if the criteriaspecified by the existing EMPTY, NOTEMPTY, HIGHER(x), LOWER(y), EQUAL(v)or NOTEQUAL(w) option is satisfied.

    DFSORT symbols can be used for n with ADD(n) and SUB(n).

    BLKSIZE Default for Input DUMMYDFSORT will no longer terminate for a SORTIN DD DUMMY or SORTINnn DDDUMMY statement with RECFM and LRECL, but no BLKSIZE. Instead, DFSORTwill use an an appropriate BLKSIZE to process the DUMMY data set successfully.

    Note: If DFSORT’s Blockset technique is not selected, DFSORT may still terminatefor a SORTIN DD DUMMY or SORTINnn DD DUMMY statement withRECFM and LRECL, but no BLKSIZE.

    SKIP=0L Default for SECTIONSDFSORT will no longer terminate when an OUTFIL SECTIONS field is notfollowed by a keyword (SKIP, HEADER3, TRAILER3). Instead, DFSORT will use adefault keyword of SKIP=0L to process the sections successfully with no blanklines between sections on the same page.

    DFSORT symbols can be used for section fields.

    SORTOUT=ddname Default for FNAMESDFSORT will now use the ddname specified by a SORTOUT=ddname option inDFSPARM, the ddname specified by a SORTOUT=ddname option in a parameterlist, or the ddname specified in a TO(ddname) option of an ICETOOL operator, asthe default ddname for an OUTFIL statement without a FNAMES or FILES option.

    Operational Changes that may Require User ActionThe following are operational changes that may require user action for existingDFSORT/ICETOOL applications that use certain functions as specified:v Prior to this PTF, an ICETOOL job with an operator (for example, SELECT) that

    uses TO(ddname) and USING(xxxx) with //ddname and //xxxxOUT DDstatements and an OUTFIL statement without FNAMES or FILES, would treatthe ddname data set as a SORTOUT data set and the xxxxOUT data set as theOUTFIL data set.With this PTF, the same job will treat the ddname data set as the OUTFIL dataset and ignore the xxxxOUT data set. If you want to treat the xxxxOUT data setas the OUTFIL data set, change your ICETOOL operator to use TO(xxxxOUT).

    v Prior to this PTF, an OUTFIL statement with FTOV and IFOUTLEN=n would setthe LRECL of the OUTFIL data set and the length of each OUTFIL record to n.With this PTF, the same situation will result in setting the LRECL of the OUTFILdata set and the length of each record to n+4. If you want to set the LRECL ofthe OUTFIL data set and the length of each OUTFIL record to n, changeIFOUTLEN to specify n-4.

    xxii z/OS V1R11.0 DFSORT Application Programming Guide

    |||

    ||||

    |

    ||||

    |||

    |||||

    |

    |||||

    |

    ||

    |||||

    |||

    ||

    ||||

  • Summary of Changes for SC26-7523-03 z/OS Version 1 Release 10This document contains information that was previously presented in DFSORTApplication Programming Guide, SC26-7523-02.

    The following sections summarize the changes to that information.

    New InformationThis edition includes the following new enhancements:

    Installation OptionsICEPRMxx members in concatenated PARMLIB can now be used to specifychanges to DFSORT’s installation options. Each ICEPRMxx member can containoptions to be changed for any or all of DFSORT’s eight installation environments(JCL, INV, TSO, TSOINV and TD1-TD4). Up to ten ICEPRMxx members can beactivated by a START ICEOPT started task command. The options in the activatedmembers will be merged with the ICEMAC defaults at run-time.

    A different ICEPRMxx member, or combination of ICEPRMxx members, fordifferent LPARs can be activated at IPL time by including a START ICEOPTcommand in an appropriate COMMNDxx member in PARMLIB, or at any time byissuing a START ICEOPT command from the console.

    ICEPRMxx members are now the recommended way to change DFSORTinstallation defaults since they are easier to use and more flexible then the oldmethod using the ICEMAC macro and usermods. However, the old method is stillsupported.

    The ICETOOL DEFAULTS operator can be used at any time to produce a reportshowing the merged PARMLIB/ICEMAC installation default values for eachenvironment that will be used at run-time, as well as the active ICEPRMxx andICEMAC values.

    VSAM Extended Address VolumeDFSORT now supports VSAM input and output data sets on Extended AddressVolumes to the extent that z/OS supports these data sets.

    Improvements in Performance and Resource Usage andReportingMemory object sorting can now be used for DFSORT applications that use theINREC, OUTREC or SUM functions.

    The channel programs associated with DFSORT’s input, output and work data setscan now reside above 16 megabytes virtual.

    Total storage usage for dataspace sorting can now be controlled with the EXPMAX,EXPRES and EXPOLD installation options.

    DFSORT now provides new fields ICEMNVLX, ICEMNVLY and ICEMNVLZ in itsSMF type 16 record to aid in tuning main storage usage.

    The information DFSORT passes to the termination exit (ICETEXIT) now includessetting ICEPTST flag bit 6 on if the phase TCB timings are not valid.

    Summary of Changes xxiii

  • Syntax for Run-Time ParametersDFSORT now allows additional syntactical forms for all of its PARM and controlstatement run-time parameters. Any parameter of the form keyword=value cannow also be specified as keyword(value) or keyword=(value). Any parameter ofthe form keyword=(list) can now also be specified as keyword(list).

    Improved DiagnosticsDFSORT now provides additional information in messages ICE098I, ICE253I andICE254I to aid in diagnosing and correcting out-of-space conditions associated withmessage ICE046A.

    DFSORT now provides specific reason codes and associated documentation to aidin diagnosing and correcting errors associated with the following messages:ICE017A, ICE018A, ICE024A, ICE042A, ICE043A, ICE109A, ICE126A and ICE251A.

    Operational Changes that may Require User ActionThe following are operational changes that may require user action for existingDFSORT/ICETOOL applications that use certain functions as specified:

    DFSORT ISPF and ISMF Panels RemovedThe English and Japanese ISPF panels, and the ISMF Sort operator, have beenremoved. These facilities are no longer available.

    Installation OptionsICEPRMxx members are now the recommended way to change DFSORTinstallation defaults since they are easier to use and more flexible then the oldmethod using the ICEMAC macro and usermods. However, the old method is stillsupported.

    Dataspace SortingThe existing EXPMAX, EXPOLD and EXPRES installation options now apply todataspace sorting as well as to memory object sorting and Hipersorting

    IOMAXBF Default ChangedThe IBM-supplied default for the existing IOMAXBF installation option has beenchanged from 33554432 (32 MB) to 35651584 (34 MB).

    STIMER Option IgnoredThe STIMER installation option, and the STIMER and NOSTIMER run-timeoptions, are now ignored. These options are no longer meaningful since DFSORTnow uses the TIMEUSED service rather than the STIMER service to monitorprocessor time.

    ICEDTEX MacroPreviously, fields ICEDSBKA, ICEDSBKB and ICEDSBKC in the ICEDTEX macroprovided statistics on expanded storage pages available for dataspace sorting,while fields ICEDSBTA, ICEDSBTB and ICEDSBTC provided total expanded andcentral storage pages available for dataspace sorting. Since this level of DFSORTand z/OS no longer supports expanded storage, fields ICEDSBKA, ICEDSBKB andICEDSBKC are no longer relevant and have been removed. If you have anICETEXIT program that uses fields ICEDSBKA, ICEDSBKB and ICEDSBKC, youshould remove any references to those fields (you can change your program to usefields ICEDSBTA, ICEDSBTB and ICEDSBTC instead) and recompile your programbefore using it with this level of DFSORT.

    xxiv z/OS V1R11.0 DFSORT Application Programming Guide

  • Output Data Set AllocationPreviously, if an allocation of 0 primary tracks was specified for a SORTOUT orOUTFIL output data set, at least 1 primary track was allocated. In this release, if anallocation of 0 primary tracks is specified for a SORTOUT or OUTFIL data set, 0primary tracks will be allocated provided that:v The application is a SORTv An E35 exit is not specifiedv No records are to be written to the output data set.

    For this situation, if the output data set was allocated with 0 secondary tracks, itwill not have any space available. Thus, any subsequent attempt to add records tothat data set will fail with an out of space condition unless you explicitly specify aspace allocation for that data set.

    Summary of Changes for SC26-7523-02 z/OS Version 1 Release 8(PTFs - April, 2006)

    This document contains information that was previously presented in z/OSDFSORT Application Programming Guide, SC26-7523-01.

    The following sections summarize the changes to that information.

    New InformationThis edition includes the following new enhancements:

    INCLUDE and OMIT EnhancementsCOND now allows you to compare date fields in various formats to past andfuture dates (relative to the date of your DFSORT run) using new DATEn+r,DATEn-r, DATEn(c)+r, DATEn(c)-r, DATEnP+r, DATEnP-r, Y’DATEn’+r andY’DATEn’-r constants. &DATEn+r, &DATEn-r, &DATEn(c)+r, &DATEn(c)-r,&DATEnP+r and &DATEnP-r can be used as aliases for DATEn+r, DATEn-r,DATEn(c)+r, DATEn(c)-r, DATEnP+r and DATEnP-r, respectively.

    COND now allows you to test a field for numerics (field,EQ,NUM) ornon-numerics (field,NE,NUM) in character (FS), zoned decimal (ZD) or packeddecimal (PD) format.

    COND now allows you to use &DATEn, &DATEn(c) and &DATEnP as aliases forDATEn, DATEn(c) and DATEnP, respectively.

    INREC and OUTREC EnhancementsPARSE and IFTHEN PARSE are new options that allow you to extract variableposition/length fields into fixed-length parsed fields defined as %nn fields. PARSEgives you powerful new capabilities for handling variable fields such as delimitedfields, comma separated values (CSV), tab separated values, blank separatedvalues, keyword separated fields, null-terminated strings, and many other types.

    You can use various PARSE options to define the rules for extracting variable fieldsinto up to one hundred %nn fixed-length parsed fields (%00-%99), and then usethese %nn fields where you can use p,m fields in BUILD, OVERLAY, IFTHENBUILD, IFTHEN OVERLAY and FIELDS. You can edit, convert, justify, squeeze,translate, and do arithmetic with %nn fields.

    Summary of Changes xxv

  • BUILD, OVERLAY, IFTHEN BUILD, IFTHEN OVERLAY and FIELDS now allowyou to use a new JFY option to left-justify or right-justify the data in a field. For aleft-justified field, leading blanks are removed and the characters from the firstnonblank to the last nonblank are shifted left, with blanks inserted on the right ifneeded. For a right-justified field, top trailing blanks are removed and thecharacters from the last nonblank to the first nonblank are shifted right, withblanks inserted on the left if needed.

    Optionally for JFY, specific leading and trailing characters can be changed toblanks before justification begins, a leading string can be inserted, a trailing stringcan be inserted, and the output length can be changed.

    BUILD, OVERLAY, IFTHEN BUILD, IFTHEN OVERLAY and FIELDS now allowyou to use a new SQZ option to left-squeeze or right-squeeze the data in a field.For a left-squeezed field, all blanks are removed and the characters from the firstnonblank to the last nonblank are shifted left, with blanks inserted on the right ifneeded. For a right-squeezed field, all blanks are removed and the characters fromthe last nonblank to the first nonblank are shifted right, with blanks inserted onthe left if needed.

    Optionally for SQZ, specific characters can be changed to blanks before squeezingbegins, a leading string can be inserted, a trailing string can be inserted, a stringcan be inserted wherever a group of blanks is removed between the first nonblankand the last nonblank, blanks can be kept as is between paired apostrophes orpaired quotes, and the output length can be changed.

    BUILD, OVERLAY, IFTHEN BUILD, IFTHEN OVERLAY and FIELDS now allowyou to insert past and future dates (relative to the date of your DFSORT run) intoyour records in various forms using new DATEn+r, DATEn-r, DATEn(c)+r,DATEn(c)-r, DATEnP+r and DATEnP-r constants. &DATEn+r, &DATEn-r,&DATEn(c)+r, &DATEn(c)-r, &DATEnP+r and &DATEnP-r can be used as aliasesfor DATEn+r, DATEn-r, DATEn(c)+r, DATEn(c)-r, DATEnP+r and DATEnP-r,respectively.

    BUILD, OVERLAY, IFTHEN BUILD, IFTHEN OVERLAY and FIELDS now allowyou to use FL format to convert 4-byte or 8-byte hexadecimal floating-point valuesto integer values.

    BUILD, OVERLAY, IFTHEN BUILD, IFTHEN OVERLAY and FIELDS now allowyou to use new TO=PDF and TO=PDC options to convert numeric values to PDvalues with F or C for the positive sign, respectively. The TO=PDC option isequivalent to the existing TO=PD option.

    BUILD, OVERLAY, IFTHEN BUILD, IFTHEN OVERLAY and FIELDS now allowyou to use &DATEn, &DATEn(c), &DATEnP, &YDDD=(abc), &YDDDNS=(ab),&TIMEn, &TIMEn(c) and &TIMEnP as aliases for DATEn, DATEn(c), DATEnP,YDDD=(abc), YDDDNS=(ab), TIMEn, TIMEn(c) and TIMEnP, respectively.

    IFTHEN WHEN now allows you to compare date fields in various formats to pastand future dates (relative to the date of your DFSORT run) using new DATEn+r,DATEn-r, DATEn(c)+r, DATEn(c)-r, DATEnP+r, DATEnP-r, Y’DATEn’+r, andY’DATEn’-r constants. &DATEn+r, &DATEn-r, &DATEn(c)+r, &DATEn(c)-r,&DATEnP+r and &DATEnP-r can be used as aliases for DATEn+r, DATEn-r,DATEn(c)+r, DATEn(c)-r, DATEnP+r and DATEnP-r, respectively.

    xxvi z/OS V1R11.0 DFSORT Application Programming Guide

  • IFTHEN WHEN now allows you to test a field for numerics (field,EQ,NUM) ornon-numerics (field,NE,NUM) in character (FS), zoned decimal (ZD) or packeddecimal (PD) format.

    IFTHEN WHEN now allows you to use &DATEn, &DATEn(c) and &DATEnP asaliases for DATEn, DATEn(c) and DATEnP, respectively.

    OUTFIL EnhancementsBLKCCH1 is a new report option that allows you to avoid forcing a page eject atthe start of the report header; the ANSI carriage control character of ’1’ (page eject)in the first line of the report header (HEADER1) is replaced with a blank.

    BLKCCH2 is a new report option that allows you to avoid forcing a page eject atthe start of the first page header; the ANSI carriage control character of ’1’ (pageeject) in the first line of the first page header (HEADER2) is replaced with a blank.

    BLKCCT1 is a new report option that allows you to avoid forcing a page eject atthe start of the report trailer; the ANSI carriage control character of ’1’ (page eject)in the first line of the report trailer (TRAILER1) is replaced with a blank.

    SPLIT1R is a new option that allows you to write contiguous groups of records inone rotation among multiple output data sets. A specified number of records iswritten to each output data set and extra records are written to the last output dataset.

    PARSE and IFTHEN PARSE are new options that allow you to extract variableposition/length fields into fixed-length parsed fields defined as %nn fields. PARSEgives you powerful new capabilities for handling variable fields such as delimitedfields, comma separated values (CSV), tab separated values, blank separatedvalues, keyword separated fields, null-terminated strings, and many other types.

    You can use various PARSE options to define the rules for extracting variable fieldsinto up to one hundred %nn fixed-length parsed fields (%00-%99), and then usethese %nn fields where you can use p,m fields in BUILD, OVERLAY, IFTHENBUILD, IFTHEN OVERLAY and OUTREC. You can edit, convert, justify, squeeze,translate, and do arithmetic with %nn fields.

    BUILD, OVERLAY, IFTHEN BUILD, IFTHEN OVERLAY and OUTREC now allowyou to use a new JFY option to left-justify or right-justify the data in a field. For aleft-justified field, leading blanks are removed and the characters from the firstnonblank to the last nonblank are shifted left, with blanks inserted on the right ifneeded. For a right-justified field, trailing blanks are removed and the charactersfrom the last nonblank to the first nonblank are shifted right, with blanks insertedon the left if needed.

    Optionally for JFY, specific leading and trailing characters can be changed toblanks before justification begins, a leading string can be inserted, a trailing stringcan be inserted, and the output length can be changed.

    BUILD, OVERLAY, IFTHEN BUILD, IFTHEN OVERLAY and OUTREC now allowyou to use a new SQZ option to left-squeeze or right-squeeze the data in a field.For a left-squeezed field, all blanks are removed and the characters from the firstnonblank to the last nonblank are shifted left, with blanks inserted on the right ifneeded. For a right-squeezed field, all blanks are removed and the characters fromthe last nonblank to the first nonblank are shifted right, with blanks inserted onthe left if needed.

    Summary of Changes xxvii

  • Optionally for SQZ, specific characters can be changed to blanks before squeezingbegins, a leading string can be inserted, a trailing string can be inserted, a stringcan be inserted wherever a group of blanks is removed between the first nonblankand the last nonblank, blanks can be kept as is between paired apostrophes orpaired quotes, and the output length can be changed.

    BUILD, OVERLAY, IFTHEN BUILD, IFTHEN OVERLAY and OUTREC now allowyou to insert past and future dates (relative to the date of your DFSORT run) intoyour records in various forms using new DATEn+r, DATEn-r, DATEn(c)+r,DATEn(c)-r, DATEnP+r and DATEnP-r constants. &DATEn+r, &DATEn-r,&DATEn(c)+r, &DATEn(c)-r, &DATEnP+r and &DATEnP-r can be used as aliasesfor DATEn+r, DATEn-r, DATEn(c)+r, DATEn(c)-r, DATEnP+r and DATEnP-r,respectively.

    TRAILERx, BUILD, OVERLAY, IFTHEN BUILD, IFTHEN OVERLAY and OUTRECnow allow you to use FL format to convert 4-byte or 8-byte hexadecimalfloating-point values to integer values.

    TRAILERx, HEADERx, BUILD, OVERLAY, IFTHEN BUILD, IFTHEN OVERLAYand OUTREC now allow you to use new TO=PDF and TO=PDC options to convertnumeric values to PD values with F or C for the positive sign, respectively. TheTO=PDC option is equivalent to the existing TO=PD option.

    BUILD, OVERLAY, IFTHEN BUILD, IFTHEN OVERLAY and OUTREC now allowyou to use &DATEn, &DATEn(c), &DATEnP, &YDDD=(abc), &YDDDNS=(ab),&TIMEn, &TIMEn(c) and &TIMEnP as aliases for DATEn, DATEn(c), DATEnP,YDDD=(abc), YDDDNS=(ab), TIMEn, TIMEn(c) and TIMEnP, respectively.

    INCLUDE, OMIT and IFTHEN WHEN now allow you to compare date fields invarious formats to past and future dates (relative to the date of your DFSORT run)using new DATEn+r, DATEn-r, DATEn(c)+r, DATEn(c)-r, DATEnP+r, DATEnP-r,Y’DATEn’+r, and Y’DATEn’-r constants. &DATEn+r, &DATEn-r, &DATEn(c)+r,&DATEn(c)-r, &DATEnP+r and &DATEnP-r can be used as aliases for DATEn+r,DATEn-r, DATEn(c)+r, DATEn(c)-r, DATEnP+r and DATEnP-r, respectively.

    INCLUDE, OMIT and IFTHEN WHEN now allow you to test a field for numerics(field,EQ,NUM) or non-numerics (field,NE,NUM) in character (FS), zoned decimal(ZD) or packed decimal (PD) format.

    INCLUDE, OMIT and IFTHEN WHEN now allow you to use &DATEn,&DATEn(c) and &DATEnP as aliases for DATEn, DATEn(c) and DATEnP,respectively.

    Symbol EnhancementsA symbol can now be used for a %nn parsed field. For example, if Account,%01 isdefined in SYMNAMES, Account can be used for %01. A symbol for %nn can beused in DFSORT control statements where %nn can be used. A symbol for %nnresults in substitution of %nn.

    A symbol can now be used for an output column. For example, if Start_address,18is defined in SYMNAMES, Start_address: can be used for 18:. symbol: can be usedin DFSORT control statements where c: can be used. A symbol for p or p,m orp,m,f results in substitution of p: for symbol: (output column).

    A symbol can now be used for a new system symbol string constant.symbol,S’string’ can be used to define a string containing any combination of

    xxviii z/OS V1R11.0 DFSORT Application Programming Guide

  • EBCDIC characters and system symbols you want to use to form a character string.For example, if whererun,S’ &JOBNAME. on &SYSPLEX’ is defined inSYMNAMES, whererun can be used for the resulting constant. You can usedynamic system symbols such as &JOBNAME, &DAY, and so on, system-definedstatic system symbols such as &SYSNAME, &SYSPLEX, and so on, andinstallation-defined static system symbols specified by your installation in anIEASYMxx member of SYS1.PARMLIB.

    A symbol for a system symbol string can be used in DFSORT and ICETOOLcontrol statements where a symbol for a character string can be used. DFSORT willreplace each system symbol in S’string’ with its substitution text to create acharacter string in the format C’new_string’.

    ICETOOL EnhancementsDISPLAY now allows you to use FL format to convert 4-byte or 8-byte hexadecimalfloating-point values to integer values.

    DISPLAY and OCCUR now allow you to use a new TBETWEEN(n) option tospecify the number of blanks between title elements (title, page number, date,time).

    SELECT and SPLICE now allow you to use an INREC statement to reformat yourrecords before they are selected or spliced. All of the operands of the INRECstatement (PARSE, BUILD, OVERLAY, IFTHEN, IFOUTLEN and FIELDS) are nowavailable with SELECT and SPLICE.

    SORT and MERGE EnhancementsThe maximum length for a PD or ZD sort or merge field has been raised to 256.

    SUM EnhancementsThe maximum position for the end of a sum field has been raised to 32752.

    Other EnhancementsDFSORT supports large physical sequential data sets for input, output and workdata sets.

    DSA can now be specified as a run-time option. This allows you to adjust themaximum amount of storage available to DFSORT for dynamic storage adjustmentof individual Blockset sort applications when SIZE/MAINSIZE=MAX is in effect.

    DFSORT now accepts and ignores zero values in the starting and ending addressof the RECORD statement image in the 24-bit Parameter List. You can set theseaddresses to zero if you don’t want to pass a control statement to DFSORT usingthe third and fourth words of the parameter list.

    Operational Changes that may Require User ActionThe following are operational changes that may require user action for existingDFSORT/ICETOOL applications that use certain functions as specified:

    New reserved words for symbolsThe following are new DFSORT/ICETOOL reserved words (uppercase only, asshown), which are no longer allowed as symbols: DATE1..., DATE2..., DATE3...,PDC and PDF.

    If you used these words as symbols, you must change them to other words, suchas lowercase or mixed case forms (for example, Date1p, date3(/) or pdc).

    Summary of Changes xxix

  • FL ConversionDFSORT’s INREC, OUTREC and OUTFIL statements, and ICETOOL’s DISPLAYoperator, can now convert FL (hexadecimal floating-point) values to integer values,providing you are running in z/Architecture mode. If you use FL in INREC,OUTREC, OUTFIL or DISPLAY when running in ESA/390 mode, FL will berecognized and the error messages issued may be different than those issuedpreviously when FL was not allowed in INREC, OUTREC, OUTFIL or DISPLAY.

    If you want to use FL in INREC, OUTREC, OUTFIL or DISPLAY, you must berunning in z/Architecture mode.

    OUTREC Statement with SELECT or SPLICEDFSORT will now issue error message ICE652A and terminate if an OUTRECstatement is used with ICETOOL’s SELECT or SPLICE operator. This will make iteasier to identify this error condition.

    Note: If ABEND is in effect, DFSORT will ABEND with U0652, but will not issueICE652A

    If you want to reformat your records after SELECT or SPLICE processing, use anOUTFIL statement rather than an OUTREC statement.

    Summary of Changes for SC26-7523-01 z/OS Version 1 Release 6(PTFs - December, 2004)

    This document contains information that was previously presented in z/OSDFSORT Application Programming Guide, SC26-7523-00.

    The following sections summarize the changes to that information.

    New InformationThis edition includes the following new enhancements:

    ICETOOL EnhancementsICETOOL’s DISPLAY, OCCUR, RANGE, SELECT, SPLICE, STATS, UNIQUE andVERIFY operators now allow you to use larger numeric values for ON and BREAKfields. PD, ZD and FS fields can now be up to 31 digits (or more in some cases). BIand FI fields can now be up to 8 bytes (or more in some cases).

    ICETOOL’s RANGE operator now allows you to use larger decimal values for theHIGHER(n), LOWER(n), EQUAL(n) and NOTEQUAL(n) options. These values cannow be up to 31 digits.

    ICETOOL’s DISPLAY, OCCUR, RANGE, SELECT, SPLICE, STATS and UNIQUEoperators now allow you to use new UFF (unsigned free form) and SFF (signedfree form) formats for ON and BREAK fields. UFF extracts a positive numericvalue from a free form field (for example, ’ $1234.56’ is treated as +123456). SFFextracts a positive or negative value from a free form field (for example, ’(1,234.56)’is treated as -123456).

    ICETOOL’s DISPLAY and OCCUR operators now allow you to use new DC1-DC3(TOD date), DE1-DE3 (ETOD date), TC1-TC4 (TOD time) and TE1-TE4 (ETODtime) formats for ON and BREAK fields. These new formats produce meaningfulrepresentations of TOD and ETOD date and time values.

    xxx z/OS V1R11.0 DFSORT Application Programming Guide

  • ICETOOL’s DISPLAY and OCCUR operators now allow you to specify multilineheadings for the columns of your reports. You can specify one, two or three lineheadings with the HEADER option.

    ICETOOL’s DISPLAY and OCCUR operators now allow you to use new edit masksG1-G6 to display numeric values with 4 decimal digits in various ways.

    ICETOOL’s DISPLAY and OCCUR operators now allow you to use newYDDD(abc) and YDDDNS(abc) options to insert the year (yyyy) and day of theyear (ddd) of your ICETOOL run into your titles in various forms.

    ICETOOL’s COUNT operator now allows you to use a new RC4 option to setRC=4 (instead of RC=12) or RC=0 based on the count of records in a data set.

    ICETOOL’s SPLICE operator now allows you to use a new KEEPBASE option tokeep the base records as well as the spliced records.

    ICETOOL’s SPLICE operator now allows you to use new VLENMAX orVLENOVLY options to set the length of spliced records to the maximum of thebase or overlay record length, or to the overlay record length.

    OUTFIL EnhancementsOUTFIL now allows you to reformat records in one of the following three waysusing unedited, edited, or converted input fields and a variety of constants:v BUILD or OUTREC: The existing OUTREC parameter, or its new alias of BUILD,

    allows you to reformat each record by specifying all of its items one by one.BUILD or OUTREC gives you complete control over the items you want in yourreformatted OUTFIL records and the order in which they appear. You can delete,rearrange and insert fields and constants.

    v OVERLAY: The new OVERLAY parameter allows you to reformat each record byspecifying just the items that overlay specific columns. Overlay lets you changespecific existing columns without affecting the entire record.

    v IFTHEN clauses: The new IFTHEN clauses allow you to reformat differentrecords in different ways by specifying how BUILD or OVERLAY items areapplied to records that meet given criteria. IFTHEN clauses let you usesophisticated conditional logic to choose how different record types arereformatted.

    OUTFIL OUTREC, as well as BUILD, OVERLAY, and IFTHEN, now allows you touse larger numeric values for fields and decimal constants to be edited, convertedor used in arithmetic expressions. PD, ZD and FS fields, and decimal constants,can now be up to 31 digits. BI and FI fields can now be up to 8 bytes.

    OUTFIL OUTREC, as well as BUILD, OVERLAY, and IFTHEN, now allows you touse new UFF (unsigned free form) and SFF (signed free form) formats for fields tobe edited, converted or used in arithmetic expressions.

    OUTFIL OUTREC, as well as BUILD, OVERLAY, and IFTHEN, now allows you touse new DC1-DC3 (TOD date), DE1-DE3 (ETOD date), TC1-TC4 (TOD time) andTE1-TE4 (ETOD time) formats for fields to be edited, converted or used inarithmetic expressions. These new formats produce meaningful representations ofTOD and ETOD date and time values.

    Summary of Changes xxxi

  • OUTFIL OUTREC, as well as BUILD, OVERLAY, and IFTHEN, now allows you touse a set field in the CHANGE option (for example,1,2,CHANGE=(4,C’FY’,C’0001’,C’VV’,21,4)).

    OUTFIL OUTREC, as well as BUILD, OVERLAY and IFTHEN, now allows you torestart the sequence number when the binary value of a specified field changes (forexample, SEQNUM,5,ZD,RESTART=(11,4)).

    OUTFIL OUTREC, as well as BUILD, OVERLAY, and IFTHEN, now allows you touse DATE, DATE=(abcd), DATENS=(abc), YDDD=(abc), YDDDNS=(ab), TIME,TIME=(abc) and TIMENS=(ab) options to insert the date and time of your DFSORTrun into your records in various forms.

    OUTFIL OUTREC, as well as BUILD, OVERLAY, and IFTHEN, now allows you touse new TO=ZDC and TO=ZDF options to convert numeric values to ZD valueswith C or F for the positive sign, respectively. The TO=ZDF option is equivalent tothe existing TO=ZD option.

    OUTFIL INCLUDE and OMIT now allow you to use larger FS values for comparefields. These values can now be up to 32 digits.

    OUTFIL INCLUDE and OMIT now allow you to use larger decimal constants forcomparison to BI and FI fields. Decimal constants can now be up to+18446744073709551615 for comparison to BI fields. Decimal constants can now bebetween -9223372036854775808 and +9223372036854775807 for comparison to FIfields.

    OUTFIL INCLUDE and OMIT now allow you to use new UFF (unsigned freeform) and SFF (signed free form) formats for compare fields. A UFF or SFF fieldcan be compared to a UFF, SFF, FS, CSL or CST field or to a decimal constant.

    OUTFIL TRAILERx now allows you to use larger numeric values for statisticalfields (total, maximum, minimum, average). PD, ZD and FS fields, and decimalconstants, can now be up to 31 digits. BI and FI fields can now be up to 8 bytes.

    OUTFIL TRAILERx now allows you to use new UFF (unsigned free form) and SFF(signed free form) formats for statistical fields (total, maximum,minimum, average).

    OUTFIL TRAILERx now allows you to use TO=fo and fo (to) options to convertstatistical fields (total, maximum, minimum, average) and counts to BI, FI, PD, ZD,ZDC, ZDF or FS output values.

    OUTFIL TRAILERx now allows you to use COUNT+n=(edit), COUNT+n=(to),COUNT-n=(edit) and COUNT-n=(to) to add or subtract n from a count to beedited or converted (for example, COUNT+1=(TO=ZD)).

    OUTFIL HEADERx and TRAILERx now allow you to insert hexadecimal strings(X’yy...yy’ or nX’yy...yy’) in your headers and trailers.

    OUTFIL HEADERx and TRAILERx now allow you to use new YDDD=(abc) andYDDDNS=(ab) options to insert the year (yyyy) and day of the year (ddd) of yourDFSORT run in your headers and trailers. OUTFIL HEADERx and TRAILERx nowallow you to use PAGE=(edit) and PAGE=(to) to edit or convert the page number(for example, PAGE=(M11,LENGTH=3)).

    xxxii z/OS V1R11.0 DFSORT Application Programming Guide

  • INREC and OUTREC EnhancementsINREC and OUTREC now allow you to reformat records in one of the followingthree ways using unedited, edited, or converted input fields and a variety ofconstants:v BUILD or FIELDS: The existing FIELDS parameter, or its new alias of BUILD,

    allows you to reformat each record by specifying all of its items one by one.BUILD or FIELDS gives you complete control over the items you want in yourreformatted INREC or OUTREC records and the order in which they appear.You can delete, rearrange and insert fields and constants.

    v OVERLAY: The new OVERLAY parameter allows you to reformat each record byspecifying just the items that overlay specific columns. Overlay lets you changespecific existing columns without affecting the entire record.

    v IFTHEN clauses: The new IFTHEN clauses allow you to reformat differentrecords in different ways by specifying how BUILD or OVERLAY items areapplied to records that meet given criteria. IFTHEN clauses let you usesophisticated conditional logic to choose how different record types arereformatted.

    INREC and OUTREC now allow you to use larger numeric values for fields anddecimal constants to be edited, converted or used in arithmetic expressions. PD,ZD and FS fields, and decimal constants, can now be up to 31 digits. BI and FIfields can now be up to 8 bytes.

    INREC and OUTREC now allow you to use new UFF (unsigned free form) andSFF (signed free form) formats for fields to be edited, converted or used inarithmetic expressions.

    INREC and OUTREC now allow you to use new DC1-DC3 (TOD date), DE1-DE3(ETOD date), TC1-TC4 (TOD time) and TE1-TE4 (ETOD time) formats for fields tobe edited, converted or used in arithmetic expressions. These new formats producemeaningful representations of TOD and ETOD date and time values.

    INREC and OUTREC now allow you to use a set field in the CHANGE option.

    INREC and OUTREC now allow you to restart the sequence number when thebinary value of a specified field changes.

    INREC and OUTREC now allow you to use new TO=ZDC and TO=ZDF options toconvert numeric values to ZD values with C or F for the positive sign, respectively.The TO=ZDF option is equivalent to the existing TO=ZD option.

    INREC and OUTREC now allow you to use new DATE, DATE=(abcd),DATENS=(abc), YDDD=(abc), YDDDNS=(ab), TIME, TIME=(abc) andTIMENS=(ab) options to insert the date and time of your DFSORT run into yourrecords in various forms.

    SORT and MERGE EnhancementsSORT and MERGE now allow you to use larger FS values for control fields. Thesevalues can now be up to 32 digits.

    SORT and MERGE now allow you to use new UFF (unsigned free form) and SFF(signed free form) formats for control fields.

    Summary of Changes xxxiii

  • SORT and MERGE now allow you to use other characters besides ’+’ (plus) as apositive sign in control field values for CSL, CST, ASL, and AST formats. A ’−’(minus) sign is treated as negative and any other sign (for example, blank) istreated as positive.

    INCLUDE and OMIT EnhancementsINCLUDE and OMIT now allow you to use larger FS values for compare fields.These values can now be up to 32 digits.

    INCLUDE and OMIT now allow you to use larger decimal constants forcomparison to BI and FI fields. Decimal constants can now be up to+18446744073709551615 for comparison to BI fields. Decimal constants can