Utilities: SyncSort UFIT. UF Information Technology. EI&O Document ID: D0073 Last Updated: 06/27/2002



Similar documents
Utilities for Partitioned Data Sets

CA Application Quality and Testing Tools

Introduction to the new mainframe Chapter 7: Batch processing and the Job Entry Subsystem (JES)

Beyond the Software Life Cycle

COWLEY COLLEGE & Area Vocational Technical School

Chapter 4: Computer Codes

CCF/CCF-II/MDH Transmission Guides

DMX-h ETL Use Case Accelerator. Web Log Aggregation

UNIX Remote Job Entry User s Guide A. L. Sabsevitz K. A. Kelleman

Using IDCAMS to Manage VSAM Data Sets

Considerations for Mainframe Application Modernisation

CA Integrated Agent Services

Section of DBMS Selection & Evaluation Questionnaire

Control-D CA-DISPATCH Conversion Guide

VSAM-ADMIN. VSAM data set organisation. fair software associates die faire Alternative für Systemsoftware

Mail 2 ZOS FTPSweeper

Interactive System Productivity Facility (ISPF)

OS/390. TSO/E CLISTs SC

CA Datacom Task Storage Options. User Key ECSA and Data Space

DMX-h ETL Use Case Accelerator. Word Count

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)

Record Storage and Primary File Organization

CA Endevor Software Change Manager

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

Origins of Operating Systems OS/360. Martin Grund HPI

The Hexadecimal Number System and Memory Addressing

CICS Transactions Measurement with no Pain

User Manual. DG LINK Application Program This document applies to firmware version 2.00 and above.

The use of binary codes to represent characters

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

CA Telon Application Generator

Operating Systems CSE 410, Spring File Management. Stephen Wagner Michigan State University

Building Applications Using Micro Focus COBOL

User Manual Microsoft Dynamics AX Add-on LabAX Label Printing

1 Introduction. Contents. Scanner support

INTRODUCTION The collection of data that makes up a computerized database must be stored physically on some computer storage medium.

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

The Answer to the 14 Most Frequently Asked Modbus Questions

CA Log Analyzer for DB2 for z/os

PRT3 Printer Module: ASCII Protocol Programming Instructions

Traditional IBM Mainframe Operating Principles

What's New in ADP Reporting?

FASTFIND LINKS. Document Organization Product Version Getting Help Contents MK-96RD646-02

TIBCO Substation ES Configuration and Resources

München BMC Internet Service Retrieval. Axel Griepenstroh SC

Merging Labels, Letters, and Envelopes Word 2013

Compiler Forecast: Cloudy with. Cloud Computing for your z/os compilers

Modbus Communications for PanelView Terminals

Houston Region Diesel Engine Database Minimum System Requirements Installation Instructions Quick Start Guide version 0.1

CA JCLCheck Workload Automation

The programming language C. sws1 1

Numbering Systems. InThisAppendix...

Number Representation

Sage Abra SQL HRMS Reports. User Guide

Alpha e-pay v2 Merchant User Manual (v1.9)

Access Queries (Office 2003)

Work Order Management. Release 8.7.2

Utility Mainframe System Administration Training Curriculum

IBM Emulation Mode Printer Commands

Keystation Pro 88 Advanced Guide. Contents: 1 Getting Started. 2 Terminology. 3 Performance Operations of the Keystation Pro 88

Integrating Web Services and Natural Objects Using EntireX

1 Description of The Simpletron

Universal Data Mover. User Guide. Indesca / Infitran. Version udm-user-4101

Axia IP-Audio Driver Update v June, 2013

Business e-cash Manager Plus Automated Clearing House (ACH)

1. Define: (a) Variable, (b) Constant, (c) Type, (d) Enumerated Type, (e) Identifier.

Modern Mainframe development and Application Lifecycle Management

PRT-CTRL-SE. Protege System Controller Reference Manual

Unit Testing with zunit

Chapter 13. Chapter Outline. Disk Storage, Basic File Structures, and Hashing

Using This Reference Manual Chapter 1 to Issue ACL Commands

Aeries Student Information System Attendance Notes October 3, 2008

ASSEMBLY LANGUAGE PROGRAMMING (6800) (R. Horvath, Introduction to Microprocessors, Chapter 6)

LSN 2 Number Systems. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

I PUC - Computer Science. Practical s Syllabus. Contents

CA Deliver r11.7. Business value. Product overview. Delivery approach. agility made possible

Paper Merges and Joins Timothy J Harrington, Trilogy Consulting Corporation

ACCELLOS HELPDESK CUSTOMER GUIDE

Field Developed Solution Catalog. Version 7.0

MACHINE INSTRUCTIONS AND PROGRAMS

B) Mean Function: This function returns the arithmetic mean (average) and ignores the missing value. E.G: Var=MEAN (var1, var2, var3 varn);

DB2 for z/os Best Practices with Virtual Provisioning

Unicode Support in Enterprise COBOL. Nick Tindall Stephen Miller Sam Horiguchi August 13, 2003

For OS/390, VM, VSE. Extended Reporting Facility Guide 6.2 SP3

DATA_TYPE Values and Data File Storage Formats

In This Issue: Excel Sorting with Text and Numbers

Title. Syntax. stata.com. odbc Load, write, or view data from ODBC sources. List ODBC sources to which Stata can connect odbc list

Intel Hexadecimal Object File Format Specification Revision A, 1/6/88

z/os Hybrid Batch Processing and Big Data Session zba07

SMFUTIL - THE SMF DATA MOVER

HP Service Virtualization

Database 2 Lecture I. Alessandro Artale

CA Database Management Solutions for IMS for z/os

Transcription:

UFIT Utilities: SyncSort EI&O Document ID: D0073 Last Updated: 06/27/2002 This document briefly describes how to use SyncSort in z/os (OS/390) to sort an OS data set. It describes the SYNCSORT cataloged procedure, lists required ddnames used by SyncSort, gives an example of sorting a file, and includes how to obtain SyncSort manuals. Related search terms include utilities, JCL, PL/I, Assembler, and COBOL. 2046 NE Waldo Rd, Suite 2100 Gainesville Florida 32609-8942 (352) 392.2061 <editor@cns.ufl.edu> UF Information Technology 1

Table of Contents SyncSort...3 DD Names...3 REGION Size...4 The SYNCSORT Cataloged Procedure...4 Basic JCL for SyncSort...4 Program-Initiated Sorts...5 How to Specify Options...5 SyncSort Control Statements...6 Sorting Example...7 Documentation...8 Questions...8 2

SyncSort SyncSort is the only general-purpose sort program supported under z/os (OS/390) at EI&O. You can use SyncSort any of the following ways: through the SYNCSORT cataloged procedure, by invoking it in your own JCL (// EXEC PGM=SORT,...), from a program written in Assembler, COBOL, or PL/I. This document primarily describes how to use the SYNCSORT cataloged procedure. You should have a general familiarity with JCL and/or one of the languages mentioned above. SyncSort has the following functions: sort -- to rearrange data set records in chronological or alphabetical order, producing a specific sequential form merge -- to combine as many as 32 sequential data sets into 1 data set under the same sequence copy -- to reproduce a file, bypassing the sorting process entirely DD Names SyncSort uses the following ddnames: SORTIN SORTIN01-- SORTIN16 SORTWK01-- SORTWK16 SORTOUT SYSOUT SYSIN defines the input data set for a sorting application; not required for a merge-only operation. define the input data sets for a merging application; not required for a sorting application. define intermediate storage data sets for a sorting application; not required for a merge. defines the output data set for a sorting or merging application; should not be the same as the SORTIN data set because a system failure could then destroy both your output and your data. is used as the system message data set. defines the application control data set. 3

REGION Size SyncSort uses the default system region size unless you specify a region size. The current system default at EI&O is 1M (1024K). SyncSort allows you to specify up to 4M by using the REGION= parameter on the JOB or EXEC statement. The SYNCSORT Cataloged Procedure The SYNCSORT procedure is the only supported sort procedure. Figure 1 shows the JCL for SYNCSORT. You need to supply the SORTIN, SORTOUT, and SYSIN DD statements. Figure 1. JCL for the SYNCSORT Procedure. //jobname JOB (,,time,lines),'your name',class=class /*ROUTE PRINT node.location //SORT EXEC SYNCSORT //SORTIN DD...input data set... //SORTOUT DD...output data set... //SYSIN DD *... sort control statements... The following optional keyword parameters can be added to the EXEC statement: OPTION='options' The default is no options. Add this parameter to the EXEC statement as in shown below to specify any desired SyncSort options. For valid options, see the "Options" section below. //SORT EXEC SYNCSORT,OPTION='options' REGION=nM Use this keyword to specify the region size for the SORT utility. For example, //SORT EXEC SYNCSORT,REGION=2M WKVOL=vol Basic JCL for SyncSort By default, the sortwork data sets will be allocated on the work packs. Use this parameter to specify a particular volume. Figure 2 shows the basic JCL needed to sort a data set if you do not use the SYNCSORT cataloged procedure. If you have a very large data set, you may need to request more than 5 cylinders of work space. Also, do NOT specify more SORTWKnn DD statements than there are temporary packs available. There are currently four. This causes negative system and job performance and may result in your job being cancelled. 4

Figure 2. JCL for Using SyncSort. //SORTIT JOB (,,time,lines),'your name',class=class /*ROUTE PRINT node.location //SORT EXEC PGM=SORT,PARM='options' //SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR //SYSOUT DD SYSOUT=A //SYSPRINT DD SYSOUT=A //SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(5,3)) //SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,(5,3)) //SORTWK03 DD UNIT=SYSDA,SPACE=(CYL,(5,3)) //SORTIN DD DSN=your.input.data.set,DISP=OLD //SORTOUT DD... DD statement for output data set... //SYSIN DD *... SyncSort control statements Program-Initiated Sorts Refer to the documentation for Assembler, COBOL, or PL/I for information on how to invoke SyncSort from within a program. How to Specify Options Using the SYNCSORT cataloged procedure, you can add an OPTION parameter to the EXEC statement as follows: // EXEC SYNCSORT,OPTION='options' If you are using your own JCL rather than using the SYNCSORT cataloged procedure, you can specify options in the PARM parameter of the EXEC statement, as in this example: // EXEC PGM=SORT,REGION=region,PARM='options' For program-initiated sorts, use the $ORTPARM DD statement, as in this example: //$ORTPARM DD * CORE=MAX-32K RESET (col 72) X Parameters and Options The following are SyncSort default parameters, which you can change as described above. BMSG CMP=CLC BMSG lists alternate parameters specified through $ORTPARM on the output message data set. This default causes limited validation of the data contained in 5

fields designated as packed or zoned decimal. To have the sort terminate if data in PD or ZD fields are invalid, specify CMP=CPD. CORE=MAX-44K NOSNAP NOEQUALS NOIOERR LIST MSGDD=SYSOUT PRINT121 NORC16 RELEASE=ON NORLSOUT no RESET SECOND=ON For program-invoked sorts with exit routines, you must determine the amount of memory needed by the exits, then specify CORE=MAX-nnnK. NOSNAP will suppress the SyncSort SNAP dump, which is produced in the event of a critical error. If you have a SYSUDUMP DD statement, you will receive the normal OS dump. If you require a SNAP dump, specify the DEBUG parameter. For a more efficient sort, the order of the records is not preserved. If the order needs to be retained, use the EQUALS keyword. Error messages are issued when an I/O error occurs. If IOERR=ABE is specified, a USER 999 ABEND will occur. Control statements will be listed on the SYSOUT data set. NOLIST will turn this off. The default DD name of the message data set is SYSOUT. Any other valid DD name can be substituted. To be compatible with the display options of COBOL exit routines, the defined characteristics of the message data set are:dcb=(lrecl=121,blksize=121,recfm=fa) An unsuccessful sort will issue a return code of 16. If RC16=ABE is specified, a USER 16 ABEND will occur. Unused space in sortwork data sets will be released during execution time unless the sort is program-initiated. To release excess space on the SORTOUT data set, RLSOUT can be specified. RESET must be given as a parameter if the SORTOUT data set is a VSAM file that was created with the REUSE option to prevent SyncSort from treating SORTOUT as a MOD data set. A secondary allocation is given to the sortwork data sets if needed. VLTEST=0 No validity testing of variable-length records will be done. SyncSort Control Statements SyncSort uses the following program control statements: SORT, MERGE, ALTSEQ, END, 6

INCLUDE, INREC, MODS, OMIT, OUTREC, RECORD, and SUM. For a sort application, the SORT statement specifies the sort order. The general form of the SORT statement is as follows: SORT FIELDS=(sort key,sort key,...,sort key),filsz=en in which "n" is an estimate of the number of records to be sorted. Sort keys specify the fields within the record upon which to sort, their data types, and whether they are to be sorted in ascending or descending order. Each sort key has the following four parts: starting byte, length in bytes, format, and order. start length format specifies the starting byte position in the record relative to byte 1, which is the first byte. For variable-length records, the offset must include the record descriptor, so the first byte of the data portion of the record is position 5. specifies the length of the field in bytes. must be a valid data type, such as one of the following: CH ZD PD FI FL AC BI AQ EBCDIC characters zoned decimal packed decimal signed integers floating point ASCII characters unsigned binary alternate sequence as specified by the ALTSEQ control statement order Sorting Example is either A for ascending order, D for descending order, or E as modified by an E61 exit. The following example helps to illustrate how to SORT a data set. Suppose you have a card-image (80-byte records) data set called UF.userid.GRADES, which is to be sorted alphabetically by student name within the same letter grade. Assume the name is in columns 1-25 and the letter grade is in column 50 of each record, and there are approximately 100 students in the file. Figure 3 shows a sample job setup using the SYNCSORT cataloged procedure. 7

The input data set is UF.userid.GRADES. The output data set will be sent to the printer. Figure 3. Example to SORT a Data Set. //SORTLST JOB (,,time,lines),'your name',class=class /*ROUTE PRINT node.location //SORT EXEC SYNCSORT //SORTIN DD DSN=UF.userid.GRADES,DISP=SHR //SORTOUT DD SYSOUT=A //SYSIN DD * SORT FIELDS=(50,1,CH,A,1,25,CH,A),FILSZ=E100 Documentation Documentation for the SyncSort utility is in the SyncSort Release 3.4 Programmer's Guide from SyncSort, Inc. You can order manuals from the vendor at this address: SyncSort Incorporated 50 Tice Boulevard Woodcliff Lake, NJ 07675 Phone 201/930-9700 e-mail: mvs_tech@syncsort.com Fax: (201) 930-8284 Attn: Syncsort Product Services Questions If you need assistance using SyncSort at EI&O, contact the EI&O Support Desk by phone at (352) 392-2061 or e-mail to consult@lists.ufl.edu. Your Comments are Welcome We welcome your comments and suggestions on this and all UFIT documentation. Please send your comments to: UFIT 2046 NE Waldo Rd, Suite 2100 Gainesville Florida 32609-8942 (352) 392.2061 <editor@cns.ufl.edu> UF Information Technology 8