0% found this document useful (0 votes)
331 views202 pages

Sort

Sort utilities examples options dfsort icetool merge examples
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
331 views202 pages

Sort

Sort utilities examples options dfsort icetool merge examples
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 202

SORT/MERGE Utilities

User's Guide

File and Volume Management

REFERENCE 47 A2 08UF 07

DPS7000/XTA NOVASCALE 7000

DPS7000/XTA NOVASCALE 7000

SORT/MERGE Utilities
User's Guide

File and Volume Management

February 2005
BULL CEDOC 357 AVENUE PATTON B.P.20845 49008 ANGERS CEDEX 01 FRANCE

REFERENCE 47 A2 08UF 07

The following copyright notice protects this book under Copyright laws which prohibit such actions as, but not limited to, copying, distributing, modifying, and making derivative works.

Copyright

Bull SAS 1997, 2005

Printed in France Suggestions and criticisms concerning the form, content, and presentation of this book are invited. A form is provided at the end of this book for this purpose. To order additional copies of this book or other Bull Technical Publications, you are invited to use the Ordering Form also provided at the end of this book.

Trademarks and Acknowledgements


We acknowledge the right of proprietors of trademarks mentioned in this book. Intel and Itanium are registered trademarks of Intel Corporation. Windows and Microsoft software are registered trademarks of Microsoft Corporation. UNIX is a registered trademark in the United States of America and other countries licensed exclusively through the Open Group. Linux is a registered trademark of Linus Torvalds.

The information in this document is subject to change without notice. Bull will not be liable for errors contained herein, or for incidental or consequential damages in connection with the use of this material.

Preface

OBJECTIVES
This manual describes GCOS 7 Sort and Merge utilities. It applies to all GCOS 7-V8 systems (from Technical Status TS8560).

INTENDED READERSHIP
This manual is intended for all users of GCOS 7-V8 who need to sort or merge records in files of all organizations.

STRUCTURE OF THIS MANUAL


Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 gives an introduction to the Sort and Merge utilities. describes the files and resources needed by Sort/Merge. describes the JCL statements SORT and MERGE and their parameters. describes the JCL statements GSORT and GMERGE and their parameters. presents the DSL (Data Services Language) commands for the Sort utility. presents the DSL (Data Services Language) commands for the Merge utility. gives additional information and practical advice on how to perform a Sort.

47 A2 08UF

iii

Sort/Merge User's Guide

Appendix A Appendix B Appendix C Appendix D

contains lists of error messages for Sort and Merge. contains an example of a Sort report, produced in the SYSOUT file. gives the collating sequences available with Sort. gives the syntax of the GCL command SORT_FILE which can be used to perform a sort (in interactive or batch mode). gives the syntax of the GCL command MERGE_FILE which can be used to perform a merge (in interactive or batch mode). describes the necessary conditions for loading UFAS indexed output files by Sort and Merge. describes the effect of the parameters DATAFORM (=SARF or =SSF) and TRUNCSSF/NTRNCSSF on files processed by SORT and MERGE. indicates what restrictions apply to checkpoints with cartridge files for SORT and for MERGE. discusses Sort/Merge and the UFAS Access Method.

Appendix E

Appendix F Appendix G

Appendix H Appendix I

iv

47 A2 08UF

Preface

ASSOCIATED DOCUMENTS

File Management UFAS-EXTENDED User's Guide.....................................................................47 A2 04UF Data Management Utilities User's Guide.........................................................47 A2 26UF GAC-EXTENDED User's Guide.......................................................................47 A2 12UF Job Management IOF Terminal User's Reference Manual .......................................................... 47 A2 38UJ ......................................................................................................................... 47 A2 39UJ ......................................................................................................................... 47 A2 40UJ JCL Reference Manual .................................................................................... 47 A2 11UJ JCL User's Guide ............................................................................................. 47 A2 12UJ Error Messages Messages and Return Codes Directory........................................................... 47 A2 10UJ Languages COBOL 85 Reference Manual.........................................................................47 A2 05UL COBOL 85 User's Guide..................................................................................47 A2 06UL Library Maintenance Library Maintenance Reference Manual......................................................... 47 A2 01UP Library Maintenance User's Guide ................................................................. 47 A2 02UP

47 A2 08UF

Sort/Merge User's Guide

SYNTAX NOTATION
The following conventions are used for presenting JCL command syntax. ITEM An item in upper case is a literal value, to be specified as shown. The upper case is merely a convention; in practice you can specify the item in upper or lower case. An item in lower case is non-literal, indicating that a user-supplied value is expected. In most cases it gives the type and maximum length of the value: dec5 hexa512 char105 name31 file78 a decimal integer value of up to 5 digits a string of up to 512 hexadecimal characters a string of up to 105 alphanumeric characters a name of up to 31 characters a file name of up to 78 characters

item

In some cases, it gives the format of the value: a nnn hh.mm a single alphabetic character a 3-digit number a time in hours and minutes

In other cases, it is simply descriptive of the value: device-class condition any-characters ITEM bool An underlined item is a default value. A boolean value which is either 1 or 0. A boolean parameter can be specified by its keyword alone, optionally prefixed by "N". Specifying the keyword alone always sets the value to 1. Prefixing the keyword with "N" always sets it to 0. Braces indicate a choice of values. Only one may be selected. Square brackets indicate that the enclosed item is optional. enclosed in square brackets is mandatory. An item not

{} [] ()

Parentheses indicate that a single value or a list of values can be specified. A list of values must be enclosed by parentheses, with each value separated by a comma or a space. Ellipses indicate that the item concerned can be specified more than once. These are literal characters to be specified as shown. All parameters below a dashed line do not appear in the help menus.

... +=$*/ ---

vi

47 A2 08UF

Preface

Example 1: { { { IMMED { WHEN={ [dd.mm.yy.]hh.mm { { +nnnn{W|D|H|M} { This means you can specify: Nothing at all (WHEN=IMMED applies). WHEN=IMMED (the same as nothing at all). WHEN=22.30 to specify a time (and today's date). WHEN=10.11.87.22.30 to specify a date and time. WHEN=+0002W to specify 2 weeks from now. WHEN=+0021D to specify 21 days from now. WHEN=+005H to specify 5 hours from now. WHEN=+0123M to specify 123 minutes from now. } } } } } } } }

Example 2: [ PAGES=(dec4[-dec4] ...) ] An optional parameter giving either a single value or a list of values enclosed in parentheses, with each value separated by a comma or space. Each value can consist of either a single number or a pair of numbers connected by a hyphen. For example: PAGES=(2,4,10-25,33-36,78 83 90)

Example 3: [ REPLACE ={ bool | 0 } ] A boolean parameter whose default value is zero. You can specify: Nothing at all (REPLACE=0 applies) REPLACE=0 or simply NREPLACE REPLACE=1 or simply REPLACE

REMARKS FORM
Suggestions and criticisms concerning the form, content and purpose of this manual are invited. A Technical Publications Remarks Form is provided at the end of the manual for this purpose.

47 A2 08UF

vii

Sort/Merge User's Guide

viii

47 A2 08UF

Table of Contents

1. Introduction..............................................................................................1-1
1.1 BASIC CONCEPTS............................................................................................... 1-1 1.2 SORT/MERGE FUNCTIONALITIES ..................................................................... 1-2 1.3 STAND ALONE AND SUBROUTINE SORT/MERGE.......................................... 1-3 1.3.1 1.3.2 1.4.1 1.4.2 1.4.3 Using Sort ........................................................................................ 1-3 Using Merge ..................................................................................... 1-3 Activating Sort/Merge ..................................................................... 1-4 JCL Compatibility ............................................................................ 1-4 Extended JCL Syntax...................................................................... 1-4

1.4 JCL STATEMENTS ............................................................................................... 1-4

1.5 THE DATA SERVICES LANGUAGE (DSL) ......................................................... 1-5 1.6 SORT WORK FILE ................................................................................................ 1-5 1.7 SORT/MERGE REPORT....................................................................................... 1-5 1.8 SORT/MERGE LEVELS........................................................................................ 1-6 1.8.1 1.8.2 1.9.1 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 Overview of Basic Sort/Merge........................................................ 1-6 Overview of Extended Sort/Merge ................................................. 1-6 Large Memory Sort.......................................................................... 1-7 Parallel Sort...................................................................................... 1-7 BPB (Read Ahead/Write Behind) ................................................... 1-8 Fast Read/Write of Relative Files................................................... 1-9 Support of VOLSET ......................................................................... 1-9 OUTFILE AS INFILE......................................................................... 1-9

1.9 FUNCTIONS OF NEW SORT/MERGE ................................................................. 1-7

1.10COBOL SORT AND MERGE .............................................................................. 1-10 1.11DUMPS IN CASE OF ABORT............................................................................. 1-10

47 A2 08UF Rev06

ix

Sort/Merge User's Guide

2. Files and Resources ................................................................................2-1


2.1 JCL STATEMENTS ............................................................................................... 2-1 2.1.1 2.1.2 Sort.................................................................................................... 2-1 Merge ................................................................................................ 2-1

2.2 SORT FILES AND RESOURCES ......................................................................... 2-2 2.3 MERGE FILES AND RESOURCES ...................................................................... 2-3

3. SORT and MERGE Statements ...............................................................3-1


3.1 SORT STATEMENT .............................................................................................. 3-2 3.1.1 3.1.2 3.1.3 3.2.1 3.2.2 3.3.1 3.3.2 Syntax ............................................................................................... 3-2 Explanation of Parameters ............................................................. 3-4 Parallel Sort Using SORT Statement ........................................... 3-10 Syntax ............................................................................................. 3-11 Explanation of Parameters ........................................................... 3-13 DEFINE Parameters for SORT and MERGE Statements ........... 3-14 File Specification for SORT and MERGE Statements................ 3-18 3.3.2.1 3.3.2.2 Parameters............................................................................ 3-18 Examples............................................................................... 3-21

3.2 MERGE STATEMENT ......................................................................................... 3-11

3.3 FILE DEFINITION AND SPECIFICATION .......................................................... 3-14

3.4 EXAMPLES OF SORT AND MERGE STATEMENTS........................................ 3-22

4. GSORT and GMERGE Statements .........................................................4-1


4.1 GSORT STATEMENT ........................................................................................... 4-2 4.1.1 4.1.2 4.1.3 4.1.1 4.1.2 Syntax ............................................................................................... 4-2 Explanation of Parameters ............................................................. 4-3 Implicit Values ............................................................................... 4-10 Syntax ............................................................................................. 4-11 Explanation of Parameters ........................................................... 4-12

4.2 GMERGE STATEMENT ...................................................................................... 4-11

5. DSL for Sort..............................................................................................5-1


5.1 COMMAND FILE ORGANIZATION ...................................................................... 5-1 5.2 FUNCTION PARAGRAPH .................................................................................... 5-2 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 DESCEND Command ...................................................................... 5-2 COLLATE Command ....................................................................... 5-3 OUTPUT Command ......................................................................... 5-5 DUPREC Command......................................................................... 5-6 DELETE Command.......................................................................... 5-6

47 A2 08UF Rev06

Table of Contents

5.1.6 5.1.7 5.1.8 5.1.9 5.1.10 5.1.11 5.1.12 5.1.13 5.1.14 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7

INTINFO Command.......................................................................... 5-7 SORTSIZE Command (Optimization)............................................. 5-8 MIN Command ................................................................................. 5-8 AVERAGE Command ...................................................................... 5-8 WRDISK Command ......................................................................... 5-9 DEBUG Command ........................................................................... 5-9 NBSORT Command......................................................................... 5-9 LOWYEAR Command.................................................................... 5-10 Examples of FUNCTION Paragraph............................................. 5-10 KEY[S] Command.......................................................................... 5-12 INCLUDE/OMIT Commands.......................................................... 5-15 Condition Elements....................................................................... 5-15 Example of INCLUDE/OMIT Commands ..................................... 5-19 SUM Command .............................................................................. 5-20 ARRANGE Command.................................................................... 5-22 Examples of RECORD Paragraph................................................ 5-25

5.3 RECORD PARAGRAPH ..................................................................................... 5-11

5.4 END PARAGRAPH ............................................................................................. 5-26

6. DSL for Merge ..........................................................................................6-1


6.1 FUNCTION PARAGRAPH .................................................................................... 6-2 6.1.1 6.1.2 6.1.3 6.1.4 6.1.5 DESCEND Command ...................................................................... 6-2 DELETE Command.......................................................................... 6-2 COLLATE Command ....................................................................... 6-2 DEBUG Command ........................................................................... 6-3 LOWYEAR Command...................................................................... 6-3

6.2 RECORD PARAGRAPH ....................................................................................... 6-4 6.3 END PARAGRAPH ............................................................................................... 6-7

7. Sort Execution .........................................................................................7-1


7.1 SORTING VARIABLE LENGTH RECORDS ........................................................ 7-1 7.2 SORT RECORD SIZE ........................................................................................... 7-2 7.3 MAXIMUM RECORD SIZE.................................................................................... 7-3 7.4 SIZE OF DISK WORK FILE .................................................................................. 7-4 7.5 ESTIMATING MEMORY SIZE FOR A "MEMORY SORT" .................................. 7-8 7.6 NOTES ON PERFORMANCE ............................................................................... 7-9 7.7 CHECKPOINT/RESTART ................................................................................... 7-11 7.8 CONCURRENT ACCESS (GAC)........................................................................ 7-12

47 A2 08UF Rev06

xi

Sort/Merge User's Guide

A. Sort and Merge Error Messages ........................................................... A-1


A.1 ERRORS MESSAGES FOR THE SORT STATEMENT .......................................A-2 A.2 ERROR MESSAGES FOR THE MERGE STATEMENT ......................................A-6 A.3 EXECUTION ERROR MESSAGES FOR SORT/GSORT AND MERGE/GMERGE.......................................................................................A-8 A.3.1 A.3.2 Invalid Records................................................................................A-8 List of Execution Error Messages .................................................A-9

B. Sort/Merge Report.................................................................................. B-1


B.1 REPORT = ALL .....................................................................................................B-1 B.2 REPORT = AUDIT (DEFAULT).............................................................................B-2 B.3 REPORT = PARAM...............................................................................................B-3 B.4 REPORT = NONE..................................................................................................B-3

C. Collating Sequences .............................................................................. C-1 D. SORT_FILE Command (GCL) ................................................................ D-1


D.1 EXECUTING SORT_FILE .....................................................................................D-1 D.2 SORT_FILE (SRTF, SORT) COMMAND ..............................................................D-2

E. MERGE_FILE Command (GCL) ............................................................. E-1


E.1 EXECUTING MERGE_FILE ..................................................................................E-1 E.2 MERGE_FILE (MRGF) COMMAND......................................................................E-2

F. UFAS Indexed Output File Loaded by Sort or Merge .......................... F-1 G. Use of DATAFORM = {SARF/SSF} and of [TRUNCSSF/NTRNCSSF] by SORT and MERGE..................................................................G-1 H. Restrictions to Checkpoint/Restart with Cartridge Files for Sort/MergeH-1 I. Sort/Merge and the UFAS Access Method ..............................................I-1
I.1 SORT ...................................................................................................................... I-1 I.2 MERGE ................................................................................................................... I-2

Index

.........................................................................................................j-1

xii

47 A2 08UF Rev06

Table of Contents

Illustrations

Figures Figure 3-1. Format of the JCL Statement SORT ............................................................. 3-3 Figure 3-2. Format of the JCL Statement MERGE ........................................................ 3-12 Figure 3-3. File Definition for SORT and MERGE Statements ...................................... 3-14 Figure 4-1. Format of the JCL Statement GSORT .......................................................... 4-2 Figure 4-2. Format of the JCL Statement GMERGE ..................................................... 4-11 Figure 5-1. Sample Output Formats ................................................................................ 5-5 Figure 5-2. Example of KEY[S] Command .................................................................... 5-14 Figure 5-3. Using Comparison Operators ...................................................................... 5-17 Figure 5-4. Using Numeric Condition Operators............................................................ 5-18 Figure 5-5. Example of INCLUDE/OMIT Commands .................................................... 5-19 Figure 5-6. Example of SUM Command ........................................................................ 5-21 Figure 5-7. Example of the ARRANGE Command ........................................................ 5-23 Figure 6-1. Example of RECORD Paragraph .................................................................. 6-5 Tables Table 3-1. Definition Parameters for Disk Files ............................................................. 3-19 Table 3-2. Definition Parameters for Tape Files ............................................................ 3-20 Table 5-1. Data Types.................................................................................................... 5-13 Table 5-2. Example of KEY[S] Command...................................................................... 5-16 Table 5-3. Possible Data Types in RECORD Paragraph (Sort) .................................... 5-24 Table 6-1. Possible Data Types in RECORD Paragraph ................................................ 6-6 Table 7-1. Disk Capacities ............................................................................................... 7-7 Table C-1. EBCDIC (DPS 7000) PLW Character Set......................................................C-1 Table C-2. Series 100 Character Set...............................................................................C-5 Table C-3. H2000 Collating Sequence for EBCDIC Files................................................C-7 Table C-4. ASCII Collating Sequence..............................................................................C-8

47 A2 08UF Rev06

xiii

Sort/Merge User's Guide

xiv

47 A2 08UF Rev06

1. Introduction

This manual describes the Sort and Merge utilities available to a GCOS 7 user.

1.1

BASIC CONCEPTS

Sort The Sort utility reads one or more input files and outputs the records in increasing or decreasing order of a "key" contained in each record. Merge The Merge utility reads one or more input files which are already in increasing or decreasing order (of a "key" contained in each record) and produces a single output file containing all the input records in "key" order (the same order as in the input files). Features These utilities incorporate facilities to minimize the task of job description and optimize the efficiency and flexibility of the sort or merge operations. The variety of optional parameters permit a user to tailor the sort or merge to the requirements of the application. JCL and DSL The control language used to describe a sort or merge operation consists of Job Control Language (JCL) statements which describe the user's files and operating environment, and a set of commands written in the Data Services Language (DSL) that describe functions based on fields within the user's input records. Interactive Use It is also possible to perform a sort or a merge interactively via the GCL commands SORT_FILE and MERGE_FILE which are described in Appendix D and in Appendix E, respectively. A batch file is still necessary for Data Service Language unless you specify COMFILE=::TN or DSLFILE=::TN to input such commands from your terminal.

47 A2 08UF

1-1

Sort/Merge User's Guide

1.2

SORT/MERGE FUNCTIONALITIES
The Sort utility provides the following features: Four output record formats Specification of up to 64 key fields per sort (up to 8 data types) Summation of values in up to 16 fields of identically keyed records Pre-sort record selection based on data values in the input record (up to 16 conditions can be specified) Field level record restructuring (up to 128 fields can be specified) Use of disk for work files Allocation of a temporary disk work file if none has been specified by the user Use of EBCDIC, Series 100, ASCII or Series 200/2000 collating sequence, or a privately defined collating sequence Sorting only part of a file Checkpoint/Restart facilities File concatenation on input (up to 9 files).

The Merge utility provides the following features: Merging of up to eight input files Specification of up to 64 fields per merge Summation of values in up to 16 fields of identically keyed records Pre-merge record selection based on input data values (up to 16 conditions can be specified) Field level record restructuring (up to 128 fields can be specified) Use of EBCDIC, Series 100, ASCII or Series 200/2000 collating sequences or a privately defined collating sequence.

1-2

47 A2 08UF

Introduction

1.3

STAND ALONE AND SUBROUTINE SORT/MERGE

1.3.1

Using Sort

There are two main ways of using sort: As a stand alone load module. It reads INFILE and writes the sorted output on OUTFILE. The statements involved are SORT (existing statement) and GSORT (new statement). As a "subroutine" called by a user program. The statements to define the workfile(s) of the subroutine sort are SORTWORK (existing statement) and GSORTWRK (new statement). For a discussion of these two statements, see the appropriate programming language manuals.

1.3.2

Using Merge

Merge can be used only in stand alone execution mode. The statements involved are MERGE (existing statement) and GMERGE (new statement). The COBOL verb MERGE executes in-line-code generated by the COBOL compiler. This in-line-code is independent of the GCOS 7 Merge utility.

47 A2 08UF

1-3

Sort/Merge User's Guide

1.4

JCL STATEMENTS

1.4.1

Activating Sort/Merge

Both the sort and merge processes are activated as job steps through extended JCL statements. The existing statements are SORT and MERGE. A sequence of parameters is associated with each of these statements. These are described in detail in Chapter 3. A new syntax and new functionalities are provided through 2 new statements: GSORT and GMERGE. These new statements are described in detail in Chapter 4. The parameters specify the files involved (input, output, work), they describe the location of the Data Services Language commands and select general job control processing options. To use the new Sort in stand alone, you can use the SORT statement (see Chapter 3) or the GSORT statement (see Chapter 4). To use the new Merge facility, you use the MERGE statement (see Chapter 3) or the GMERGE statement (see Chapter 4). To describe the workfile(s) of a subroutine Sort, you use the SORTWRK or GSORTWRK extended JCL statement. These statements are described in the appropriate programming language manuals (for example, the COBOL User Guide, and the GPL System Primitives).

1.4.2

JCL Compatibility

The statements: SORT, MERGE, SORTWORK remain valid on GCOS 7. You can keep the current Sort/Merge JCL statements and use the utilities (which improve performance). You may also use the new statements and access all the new functions. These functions are listed in paragraph 1.9 and the corresponding interfaces are described in detail later in this manual.

1.4.3

Extended JCL Syntax

However, if you want to use all the new Sort/Merge capabilities, you must use the new statements GSORT and GMERGE (described in Chapter 4), and GSORTWRK to describe the workfile(s) to be used by a subroutine sort. GSORTWRK is described in the appropriate programming language manual (for example, the COBOL User Guide, and the GPL System Primitives).

1-4

47 A2 08UF

Introduction

1.5

THE DATA SERVICES LANGUAGE (DSL)


A record level command file, written in DSL, must be provided as an input enclosure or as a previously established member of a source library. Commands in this file are described in Chapter 5 for the Sort utility and Chapter 6 for the Merge utility. All but one of these commands are optional. The mandatory command, KEYS, establishes the key fields for the sort or merge process. The keys consist of one or more fields in the input record. For example, a set of records are to be sorted according to an employee code contained in bytes 1 to 4 of each record, and, for each code, they are to be sorted in order of age (contained in bytes 8 and 9). Set bytes 1 to 4 as the major key and bytes 8 and 9 as the minor key. Sort sorts the input records in sequence according to employee code, and for each code, in sequence according to age. Merge uses the major key (employee code) to merge records. It uses also the minor key (age) when some records have the same major key value. When two records have the same employee code, they are compared on the value of the age field.

1.6

SORT WORK FILE


When the input file is small enough to fit in memory, the sort may only require main memory. Otherwise a work file is needed. This file may be preallocated by the user and may be permanent or temporary. If the file is not preallocated by the user, Sort will allocate a temporary file on the implicit VOLSET (if it exists) or on resident disk volume(s). The size of this file can be specified by the user or can be calculated by Sort. The new Sort may use one workfile (mono-process sort) or several workfiles (multiprocess sort). In the case of several workfiles, there will be simultaneous I/Os on the workfiles and possibly a reduced elapsed time.

1.7

SORT/MERGE REPORT
Error messages are printed in the Job Occurrence Report as a result of errors detected in the SORT/GSORT and MERGE/GMERGE statements. Error messages are also printed in the Sort/Merge Report and/or in the JOR (Job Occurrence Report) as the result of errors detected at execution time. Both types of error message are discussed in Appendix A.

47 A2 08UF

1-5

Sort/Merge User's Guide

1.8

SORT/MERGE LEVELS
The Sort/Merge products are available at 2 levels: Basic Sort/Merge. Extended Sort/Merge. Each of these is discussed below.

1.8.1

Overview of Basic Sort/Merge

The Basic Sort is supplied as part of the GCOS 7 base (that is, no specific MI is needed). The Basic Sort/Merge offers the following: Mono process Sort/Merge, Implicit and maximum memory=512K, BPB, if available in the access method concerned but limited to BPB-buffers of 64K bytes. The Basic Sort/Merge offers improved performance. However, it does not offer the extra features which are described below for the Extended Sort.

1.8.2

Overview of Extended Sort/Merge

A separate MI is needed (that is, the Extended Sort/Merge has to be bought). This product is not supplied as part of the GCOS 7 base. The Extended Sort/Merge offers: Mono-process or multi-process Sort. In mono-process activation, the Extended Sort uses the fast INFILE/OUTFILE read/write. Mono-process Merge. It uses the fast INFILE/OUTFILE read/write. Implicit memory 512K bytes per process. Maximum Sort memory = 64 Megabytes for mono-process. Maximum Sort memory = 1 Gigabytes for multi-process. A special BPB (specific to Sort/Merge) is called for UFAS files without conditions when the UFAS access method is not used (BPB-buffers not limited to 64K bytes).

1-6

47 A2 08UF

Introduction

BPB of the access method, if an access method is called. support of the VOLSET facility.

1.9

FUNCTIONS OF NEW SORT/MERGE


The functions of the new Sort/Merge product are discussed in more detail below.

1.9.1

Large Memory Sort

For a mono-process sort (implicit case) the Basic Sort is limited to 512K bytes of memory. The Extended Sort is limited to 64 Megabytes in mono-process. But you must note that for a given file size there is a memory size beyond which the performance does not increase. The reason is that even the fastest sort still takes the time necessary to read the input file and then to write the sorted output file. For example, a 1 Gbyte file needs about 4Mbyte of memory to be sorted in a minimum time. A small memory size (about 100K bytes) does not meet the above condition and also reduces the block size used by the sort to read/write the workfile and the possibility to use read ahead/write behind (also called BPB) on input and output files. So it is very important to use a sort memory size between 512K and 4Mbytes. Larger memory sizes are useful only to possibly reduce the global number of I/Os of the job flow ("memory sort") or for huge files. Refer to Chapter 7 to see how to estimate the memory size needed for a "memory sort".

1.9.2

Parallel Sort

A parallel sort is also known as a multi-process sort. In multi-process activation, the Extended Sort is able to use about 1 Gigabyte of core memory. In addition, it is able to use several CPUs and disks in parallel, and a fast read/write for the INFILE and OUTFILE. Thus the elapsed time will decrease by using more hardware/software resources. The parallel capabilities of the new Sort/Merge product are useful even on a mono processor DPS 7000 (for example, as the TDS capabilities are). When the input and output files are read/written with BPB (that is, read ahead/write behind), the sort may become "I/O bound" by the workfile. In such a case, (for example, for a large file), the sort can be done as several parallel sub-sorts each one using a private workfile on a private disk. Then workfiles I/Os can be done on each disk at the same time. Then the parallel sort can increase the performance to reach the minimum time. The minimum time is the time to read the input file with BPB and then write the output file with BPB without being slowed down by the workfile(s) I/Os.

47 A2 08UF

1-7

Sort/Merge User's Guide

A parallelism of workfile I/Os implies several disks, one disk per slave-sort. The new JCL statement GSORT allows you to assign several workfiles (either static or dynamic allocation). The new JCL introduces the possibility for a parallel sort to define either: a list of n media for the dynamic allocation of n temporary workfiles (WKFILE, WKALC), or to allocate n workfiles by n ASSIGN statements WKASG1, ... WKASGn. Note that you must specify the memory size for a parallel sort according to the number of processes. The minimum memory is 512K bytes per process. The recommended number of processes is between two and four. A larger number of processes is reserved for cases where a very large memory is to be used (up to 32 Mb * number of processes).

1.9.3

BPB (Read Ahead/Write Behind)

GCOS 7-V6 (TS6150) introduced the UFAS Batch Booster or BPB facility. The Batch Booster is a facility to improve I/O performance on UFAS files. The Batch Booster is also known as the BPB (blocks per buffer) option since it is requested via the BPB parameter. This facility is described in the manual UFAS-EXTENDED User's Guide. The BPB parameter exists in the JCL statement DEFINE (in the case of a sort called from a program STEP). BPB is available in the INFILE/OUTFILE parameter groups of the SORT/MERGE statements and in the INDEF/OUTDEF parameter groups of the GSORT/GMERGE statements. When the Sort/Merge calls an access method to read/write the input/output user files, the BPB is activated as defined by the access method concerned. For performance purposes, Sort/Merge does not call the access method if this is not mandatory. For UFAS user files, when Sort does not call UFAS: The Basic Sort activates the BPB function only if the UFAS BPB product is purchased. In this case, the BPB is limited to 64K BPB buffers as under UFAS (less if the sort memory is under 512K). The Extended Sort activates the BPB function even if the UFAS BPB product has not been purchased. In this case, the BPB is limited to (memory size)/8 and not 64K bytes. The BPB factor cannot exceed 32. In a multi-process sort where the Sort specific BPB function is being used, the number of blocks per buffer is a multiple of the number of sort processes (BPB = n*NBSORT). Merge activates BPB under the same conditions as Sort does, except that the BPB limit of (memory size)/8 does not apply. When using the BPB facility, you may specify a value of BPB between 1 and 32, and you must allow for the memory needed for the extra buffers (requested by BPB) in calculating the memory allocated to the sort (SIZE option at step level).

1-8

47 A2 08UF

Introduction

Appendix I defines the conditions under which Sort/Merge calls the UFAS access method to read a UFAS input file or write a UFAS output file.

1.9.4

Fast Read/Write of Relative Files

When UFAS Relative UFAS files are read/written in sequential access mode, the new Sort/Merge product does not call UFAS as did the previous product. Thus, the CPU time may be significantly lower for the new Sort/Merge product.

1.9.5

Support of VOLSET

For the new Sort/Merge product, a VOLSET name always represents a list of MEDIA. It will be used exactly as an explicit list of media. When a VOLSET is used in a workfile assignment of a Parallel Sort, then only 10 media of the VOLSET are used. These 10 media are those which have the most free space (at the moment that the media are selected).

1.9.6

OUTFILE AS INFILE

If you want a dynamic allocation of the output file with the same characteristics as the input file, you may use OUTALC without any allocation parameters. If you specify OUTALC = (...), the missing characteristics will be copied from the INFILE ones. This applies to both the GSORT and GMERGE statements (see Chapter 4).

47 A2 08UF

1-9

Sort/Merge User's Guide

1.10

COBOL SORT AND MERGE


COBOL programs can perform sorts and merges using the COBOL statements SORT and MERGE. The COBOL statements SORT and MERGE are defined in the COBOL 85 Language Reference Manual and the COBOL 85 User's Guide. The COBOL 85 User's Guide provides the following information: a comparison between the COBOL statements SORT/MERGE and the SORT/MERGE utilities; the use of the JCL statement SORTWORK or GSORTWRK when executing programs containing a COBOL statement SORT; the use of the keywords AVERAGE, MIN, SIZE and SORTSIZE in the OPTIONS parameter of the JCL statement STEP; an example of a COBOL SORT. The COBOL 85 User's Guide also describes the use of the ACTUAL KEY phrase in conjunction with the OUTPUT Data Service Language (DSL) command of the Sort utility.

1.11

DUMPS IN CASE OF ABORT


Since the sort memory may be huge, the implicit dump will contain only the information of the processes and segments related to the cause of the abort. The implicit DUMP is the binary dump which is output on the binary dump library (of your configuration). If you want a total dump, you must specify DUMP=ALL in the step options. However, beware that if a large step memory has been requested (via the SIZE parameter), then DUMP = ALL will result in a very large dump which may overflow your binary dump library and SYSOUT file.

1-10

47 A2 08UF

2. Files and Resources

2.1

JCL STATEMENTS

2.1.1

Sort

There are two JCL statements available for sorting: SORT and GSORT. SORT is the existing JCL statement. GSORT is a new JCL statement. Both statements "execute" the new Sort product. However, if you want to use all the features of the new Sort product, you should use the GSORT statement (instead of the SORT statement). The SORT statement is described in Chapter 3. The GSORT statement is described in Chapter 4.

2.1.2

Merge

There are two JCL statements available for merging: MERGE and GMERGE. MERGE is the existing JCL statement. GMERGE is a new JCL statement. Both statements "execute" the new Merge product. However, if you want to use all the features of the new Merge product, you should use the GMERGE statement (instead of the MERGE statement). The MERGE statement is described in Chapter 3. The GMERGE statement is described in Chapter 4.

47 A2 08UF

2-1

Sort/Merge User's Guide

2.2

SORT FILES AND RESOURCES


1. 2. Input and output files can be UFAS or Queued, independently of each other. Input and output files can be on disk, tape, or cartridge independently of each other. For example, an input disk file may produce an output disk or tape file, an input tape file may produce an output disk or tape file. Similarly, input and output files can be temporary or permanent independently of each other. Input and output files can have any UFAS organization or be Queued. Input and output files need not have the same organization as each other. See Appendix F for details on the loading of UFAS indexed files as Sort or Merge output files. The output may be written to the input file provided that input file concatenation is not used. See the descriptions of the SORT and GSORT statements. Options are available to reduce the device requirements of Sort: A single device can be reserved for the input file and the output file, provided, of course, the volumes supporting them are of the same device class (REPLIN). This option, however, saves device drive(s) at the cost of increasing elapsed time, due to volume mounting and dismounting during the sort. 7. 8. 9. Output records are padded or truncated depending on the size of the output record compared with the input (or altered) record. If a workfile is specified, temporary or not, it will be used by the Sort only if the Sort operation cannot be completed in memory. If no workfile is specified, implicit workfile(s) will be used if needed. At run time, if the sort can be completed in main memory no work file is created. Otherwise a temporary work file is created dynamically.

3. 4.

5. 6.

10. If the DSL command SORTSIZE is used, Sort will check whether there is sufficient space in memory for the sort to be completed. If the memory is not sufficient, Sort checks if the size of the workfile is sufficient when it opens the workfile.

2-2

47 A2 08UF

Files and Resources

2.3

MERGE FILES AND RESOURCES


1. 2. 3. 4. The file specified as INFILE1 is known as the primary file. Other input files, INFILE2 through INFILE8, must have the same RECSIZE and RECFORM as the primary file. Input and output files may be UFAS or Queued, independently of each other. Any combination of UFAS and Queued files may be merged. Input and output files can have any organization supported by UFAS or Queued. Input and output files need not have the same organization as each other. See Appendix F for precisions on the loading of UFAS indexed files as Sort or Merge output files.

47 A2 08UF

2-3

Sort/Merge User's Guide

2-4

47 A2 08UF

3. SORT and MERGE Statements

This chapter describes the JCL statements SORT (for sorting) and MERGE (for merging). SORT and MERGE each require that the input, output and command files be specified. All other parameters of the JCL statements are optional. Default values exist, which, if they are appropriate to the application, allow the specification of certain parameters to be omitted. The optional parameters concern work files (Sort only), reporting, performance optimization, error record processing, part-file processing, checkpointing, and abnormal termination.

47 A2 08UF

3-1

Sort/Merge User's Guide

3.1

SORT STATEMENT

3.1.1

Syntax

The syntax of the JCL Statement SORT is shown in Figure 3-1. The following abbreviations are used in this figure: sifd: sofd: smdp: sequential-input-file-description sequential-output-file-description sort/merge-define-parameters

The symbolic names sifd and sofd refer to standard file descriptions which are to be found in the JCL Reference Manual. The following parameters are not permitted with the SORT/MERGE statements: BYPASS CATNOW VOLWR/NVOLWR OPTIONAL DEFER SITE Note that the above parameters (with the exception of SITE) are available within the assignment/define parameter groups of the GSORT/GMERGE statements. The POOL option is not used with Merge. POOL can be used with Sort. NPOOL can also be used to prevent the POOL option from being applied when dealing with concatenated input files. The sort/merge define parameters are explained below under "Sort/Merge Define Parameters". All parameters not explained below are standard parameters of the ASSIGN JCL statement. The parameter groups sequential-input-file-description, sequential-output-filedescription, and print-file-description are not expanded in Figure 3-1. See the JCL Reference Manual for all information concerning these standard parameter groups. However, a few of the parameters in these groups, because they are specific to the SORT JCL statement, are summarized below.

3-2

47 A2 08UF

SORT and MERGE Statements

SORT

INFILE [INFILE1 [INFILE2 [INFILE3 [INFILE4 [INFILE5 [INFILE6 [INFILE7 [INFILE8

= = = = = = = = =

(sifd [smdp]) (sifd) (sifd) (sifd) (sifd) (sifd) (sifd) (sifd) (sifd) ]]]]]]]]

{(sofd [smdp] ) [REPLIN] } OUTFILE = {(INFILE) } {(SYS.OUT SYSOUT [DATAFORM = SSF])} COMFILE = (sifd) [ { {CAT } }] [ {{external-file-name} [FILESTAT = {UNCAT }] [CATALOG=digit1]}] [WKDISK[S] = ({ {TEMPRY} }] [ { SIZE = digits5 }] [ { }] [ ] [ [{POOL,FIRST}] ] [ [{POOL,NEXT }] ] [ [{NPOOL }] ] [ ] [ [{RESIDENT }] ] [ [{ {WORK } }] ] [ [{DEVCLASS = device-class MEDIA = ({ })}]) ] [ [{ {volume-name [...]} }] ] [ [{ }] ] [ ] [ [{AUDIT}] [ [{PARAM}] [REPORT = [{ }] [ [{ALL }] [ [{NONE }] [PRTFILE = (print-file-description)] [SIZE = dec3] [ [ [ [{ABORT }] [INVREC = ([{ }] [ [{CONTINUE}] [ [ [ {PRINTID}] ] [ {PRINT }] ] [ { }] ] [ERROPT = { }])] [ { }] ] [ {LOG }] ] [ {IGNORE }] ]

[LOGFILE = (soft smdp) ] [REPEAT] [START = dec10] [HALT = dec10]

[SIZEOPT = (size-parameters)] [STEPOPT = (step-parameters)];

Figure 3-1. Format of the JCL Statement SORT

47 A2 08UF

3-3

Sort/Merge User's Guide

3.1.2
INFILE

Explanation of Parameters
This specifies the input file. This parameter, together with INFILEn, is used by SORT to generate the ASSIGN and DEFINE JCL statements necessary for SORT execution. The keywords INFILE1 through INFILE8 may be used to specify files that must be concatenated with INFILE. In this case, all input files, including the file specified in INFILE, must have the same record format and record length and be organized in the same way (in sequence). If there is disk file concatenation the NPOOL option should be applied to all files in the step. (See the POOL and NPOOL options in the WKDISK paragraph below.) The INFILEn parameters must appear immediately after the INFILE parameter and the values used for n must start at 1 and must be in sequence For example: INFILE=(...),INFILE1=(...),INFILE2=(...) is correct. INFILE=(...),INFILE2=(...),INFILE3=(...) is not correct.

INFILEn

OUTFILE

This specifies the output file. REPLIN is used to indicate to SORT that the volume(s) supporting the output file need not be mounted before the sort starts, and may use the device supporting the input file volume(s). This parameter may be used to minimize the device requirements of a sort. In the case of multi-volume input and output files, the MOUNT parameter of the sequential-output-file-description must be set equal to 1 for both input and output file. INFILE: OUTFILE=INFILE allows the output from SORT to overwrite the input file. It must not be specified when there is file concatenation on input or when SHARE=MONITOR is specified. When OUTFILE=INFILE, the file to be sorted and overwritten will be assigned with ACCESS=SPWRITE unless an explicit access value is given in the INFILE parameter group. This default access value implies exclusive access to the file, but it is the only safe way to use OUTFILE=INFILE. SYSOUT specifies that the output file is to be written as a standard SYSOUT subfile. SYS.OUT must be used for the external file name if the SYSOUT parameter is used.

3-4

47 A2 08UF

SORT and MERGE Statements

DATAFORM=SSF can be used for assigning SYS.OUT, as well as INFILE or OUTFILE. In OUTFILE it involves the creation of SSF headers at the beginning of the record. If an input file is declared as SSF, the default processing option is TRUNCSSF for the sort. NTRNCSSF should be used with caution. The DATAFORM parameter is used to indicate the DATAFORM both on input and on output. Thus the records which are read and written will correspond with the specified DATAFORM. Records which are internal to the sort have no header. For more details on the use of DATAFORM, refer to Appendix G of this manual. COMFILE This specifies the location of the Data Service Language commands. The language type of the specified DSL command file may be either SSF or SARF. The command file must either be a sequentially readable file or a library member. This specifies a disk work file which can be either permanent, in which case it must have been preallocated, or temporary, in which case the space specified in the SIZE parameter will be allocated when the file is opened. The file will be formatted by SORT as needed. If the work file is to occupy more than one volume, the devices must all have the same attributes. If the WKDISK parameter is not specified, SORT will be executed without a work file being preallocated, in which case a temporary work file on the resident disk will be allocated at run time (unless the sort can be completed in main memory). The SORTSIZE DSL command (see Chapter 5) can be used to declare the number of input records to the sort (if known) so that the file created will be of that size. Otherwise, its size will be 10 cylinders*. The preallocation of a permanent file allows the definition of an increment size which will be used by the sort if necessary. For a dynamically created file or if WKDISK has been specified with SIZE option, the increment size is defined by the sort (1/16 of the size or a minimum of 2 cylinders*). * cylinders: For VBO organization = physical cylinders. The actual size depends on the disk organization.

WKDISK [S]

47 A2 08UF

3-5

Sort/Merge User's Guide

For FBO organization = logical cylinders (1000 KBytes). The actual size does not depend on the disk organization (a disk file that is dynamically assigned is always 10 000 KBytes).

IMPORTANT
When SORT work file preallocation is activated before SORT execution, care must be taken with file definition parameters. Only FILEFORM=UFAS, FILEORG=SEQ) is accepted by SORT on FBO volumes. On VBO volumes, (FILEFORM=BFAS or UFAS, FILEORG=SEQ) is recommended. Other values for FILEFORM and FILEORG will cause a warning message to be issued by SORT. The recommended UFAS CISIZE or BFAS SEQ BLKSIZE for a preallocated SORT work file is 4096 bytes (with any RECFORM and RECSIZE compatible with that value). However, other BFAS SEQ VBO BLKSIZE or UFAS SEQ CISIZE values are possible together with suitable SORT memory size values. (See the SIZE parameter for the total amount of memory to be allocated to SORT)

In a multi-programming environment, the use of a resident volume for the work file can cause a considerable increase in the read/write head movement on that volume. Therefore, it is preferable to preallocate a permanent file on a disk other than that used for input and output files, and, if possible, on a disk not being used currently by another job. External-file-name. The rules for external-file-name are given in the JCL Reference Manual. SIZE (with WKDISK) indicates that the file is temporary, and gives its size in cylinders (dec5). SIZE=0 allows the sort to be ordered in main memory. For more information, see Chapter 7. POOL and NPOOL. The POOL, FIRST and POOL, NEXT options are explained in the JCL Reference Manual. NPOOL specifies that each time a POOL option for assigning a file is met, it is ignored. During the translation of the SORT statement (Figure 3-1) into basic JCL, POOL, FIRST and POOL, NEXT are automatically generated when there is input file concatenation. By specifying POOL or NPOOL for each SORT INFILE (and possibly for SORT OUTFILE or SORT WKDISK), the user can correct this automatic generation, if necessary.

3-6

47 A2 08UF

SORT and MERGE Statements

When concatenated input files are used, POOL must be used for tape files and NPOOL for disk files (including workfile disks). Mono-process Sort You must use either no workfile or only one workfile and then define it via WKDISK[S]. Multi-process (Parallel) Sort You can use the WKDISK[S] keyword to introduce a list of MEDIA. Such a list is limited by GCOS 7 to 10 MEDIA. One TEMPRY workfile will be dynamically allocated for each subsort, numbered from 1 to n (where NBSORT = n is given in the DSL for a multi-process sort), using the media list in a circular way. For example, if MEDIA = (A,B,C) and NBSORT = 3, then the 1st workfile in allocated on A, B, C, the 2nd workfile on B, C, A, and the 3rd workfile on C, A, B. If the MEDIA list is shorter than n MEDIA (NBSORT = n), then n is reduced according to the exact number of MEDIA in the list. FILESTAT = UNCAT means the file is permanent and uncataloged. FILESTAT= CAT means the file is permanent and cataloged. CATALOG is used to override the normal catalog search rules when several private catalogs have been specified in an ATTACH JCL statement. Normally a file is searched for in all the attached catalogs, starting from the first one specified in the ATTACH statement. However, when the CATALOG parameter is used, only the nth catalog specified in the ATTACH statement is searched, where dec1=n. RESIDENT specifies that the file is stored on one or more disk volumes that are resident. DEVCLASS specifies the device class for the device associated with an uncataloged file. For example, MS/M500. DEVCLASS should not be specified if FILESTAT=CAT. MEDIA specifies a list of volume=names. WORK signifies a work volume. MEDIA should not be specified if FILESTAT=CAT. In a list of volume-names specified by MEDIA, it is not possible to mix VBO and FBO disks.

47 A2 08UF

3-7

Sort/Merge User's Guide

REPORT

This specifies the type of report required from SORT (see Appendix B). Unless PRTFILE is specified, the report is written to the SYSOUT file. AUDIT (default value in batch mode) causes diagnostic and process error information to be printed as well as a statistical summary of record processing. PARAM causes a list of parameters to be printed, in addition to diagnostic and process error information. ALL combines AUDIT and PARAM. NONE limits the report to process information.

PRTFILE SIZE

This specifies a permanent SYSOUT file. The file must be a native one with LABEL=NATIVE or LABEL=NONE. This specifies the total memory in units of 1024 bytes to be allocated to SORT for the execution. This includes code, data and buffers. For a mono-process sort, the SIZE is limited to 64 Mbytes. For a parallel sort, the limit is NBSORT*32 Mbytes. The maximum limit is therefore 32*32 Mbytes, though this will depend on the machine configuration. If SIZE is less than NBSORT*32 Mbytes, then each slave sort will use (approximately) SIZE/NBSORT Mbytes. The default value is 512 Kbytes per process. To use the Large Memory Sort with a SIZE > 512 via the JCL statement SORT, you must use SIZEOPT instead of SIZE. See the description of the SIZEOPT parameter below. You are recommended to always specify SIZE explicitly as this ensures that the memory used by the Sort is equal to the memory declared to GCOS 7 (the Declared Working Set, DWS).

INVREC

This specifies the action to be taken by SORT if an invalid record is encountered in the input file; that is, a record whose length is smaller than the minimum needed to apply the INCLUDE/OMIT clauses, or the KEY and/or SUM and/or ARRANGE clauses of the DSL commands. ABORT (default value) specifies that SORT should terminate when an invalid record is found. CONTINUE specifies that SORT should continue. ERROPT indicates what is to be done with an invalid record.

3-8

47 A2 08UF

SORT and MERGE Statements

PRINTID indicates that the invalid record's number relative to the start of the sort is to be printed in the report. This is the default value. PRINT has the same meaning as PRINTID but the entire invalid record will be printed in hexadecimal and alphanumeric formats. LOG indicates that the invalid record is to be written to the file specified in LOGFILE. IGNORE indicates that no message is to be printed. LOGFILE START This contains a description of a native output file in which the invalid records are to be logged. This gives the record number with which sorting is to begin. Values from 1 to 2147483647 are acceptable. The default value is 1. This gives the record number with which sorting is to end. The same values are acceptable as for START. The default is end-of-file. This specifies that checkpoints are to be taken during the sort. The default is that no checkpoints are taken. The SIZEOPT parameter can be used to specify parameters used in the JCL statement SIZE (see the JCL Reference Manual). To use the Large Memory Sort with a SIZE > 512, you must specify the size via SIZEOPT. In this case, SIZEOPT can give a value up to 65536 (that is, 64 Megabytes). The STEPOPT parameter can be used to specify the parameters included in the JCL statement STEP (see the JCL Reference Manual); in particular: DUMP, DEBUG. Note that the REPEAT parameter inside STEPOPT has the same effect as the REPEAT keyword.

HALT

REPEAT SIZEOPT

STEPOPT

47 A2 08UF

3-9

Sort/Merge User's Guide

3.1.3

Parallel Sort Using SORT Statement

The FUNCTION paragraph of the Sort DSL supports the new parameter NBSORT (where NBSORT = digit2 = number of slave processes of a parallel sort). The maximum value is 32. This is useful only for parallel sorts launched under the current JCL statement SORT whose syntax does not accept NBSORT as a JCL parameter. For a parallel sort launched by the JCL statement SORT, the WKDISK assignment provides the media list as the GSORT WKFILE assignment does. If you want to run a parallel sort via the JCL statement SORT, you must also specify: ... ,STEPOPT=(H_PSORT), ... Example: To request a parallel sort via the JCL statement SORT: $JOB PSORT, HOLDOUT; SORT IF= ..., OF= ..., COMFILE = *DSL, STEPOPT=(H_PSORT), SIZEOPT =(2048), WKDISK = (AAA, DVC=MS/B10, MD=(MYVOL1, MYVOL2), SIZE=50); $INPUT DSL,PRINT; FUNCTION: NBSORT=2 RECORD: KEY= 1 10 END: $ENDINPUT; $ENDJOB;

3-10

47 A2 08UF

SORT and MERGE Statements

3.2

MERGE STATEMENT

3.2.1

Syntax

The JCL statement for MERGE is shown in Figure 3-2. The following abbreviations are used in this figure: sifd: sofd: smdp: sequential-input-file-description sequential-output-file-description sort/merge-define-parameters

The following symbolic names refer to standard parameter groups which are described in the JCL Reference Manual: sequential-input-file-description sequential-output-file-description print-file-description The sort/merge-define-parameters are explained below under "Sort/Merge Define Parameters". The parameter groups sequential-input-file-description, sequential-output-file-description, and print-file-description are not expanded in Figure 3-2. See the JCL Reference Manual for all information concerning these standard parameter groups.

47 A2 08UF

3-11

Sort/Merge User's Guide

MERGE

INFILE1 INFILE2 [INFILE3 [INFILE4 [INFILE5 [INFILE6 [INFILE7 [INFILE8

= = = = = = = =

(sifd (sifd (sifd (sifd (sifd (sifd (sifd (sifd

[smdp]) [smdp]) [smdp]) [smdp]) [smdp]) [smdp]) [smdp]) [smdp])]]]]]]

COMFILE = (sifd)

{AUDIT}]

[ {PARAM}] [REPORT = { }] [ {ALL }] [ {NONE }] [PRTFILE = (print-file-description)] [BUFFER = dec3] [SIZEOPT = (size-parameters)] [STEPOPT = (step-parameters)];

Figure 3-2. Format of the JCL Statement MERGE

3-12

47 A2 08UF

SORT and MERGE Statements

3.2.2
INFILEn

Explanation of Parameters
This specifies the input files. This parameter is used by MERGE to generate JCL statements ASSIGN and DEFINE during MERGE execution. Note that the NBEFN parameter described in the JCL Reference Manual for the parameter group sequential-file-description is not valid for MERGE. This specifies the output files. SYSOUT specifies that the output file is to be written as a standard SYSOUT subfile. SYS.OUT must be used for the external-file-name if the SYSOUT parameter is used. DATAFORM=SSF can be used for assigning SYS.OUT, as well as OUTFILE. In OUTFILE it involves the creation of SSF headers at the beginning of the record. The DATAFORM parameter is used to indicate the DATAFORM on output. Thus the records which are written will correspond with the specified DATAFORM. Records which are internal to the merge have no header.

OUTFILE

COMFILE, REPORT, PRTFILE BUFFER

See the corresponding explanation for SORT.

Normally, 30K bytes of memory are reserved for the input and output buffers of a MERGE (where K = 1024). Depending on the block sizes of the files, and the number of buffers per file, this may be too low or too high. The user can override the default value by using the BUFFER parameter, with dec3 equal to the number of units of 1024 bytes required. The total MERGE memory requirement will be: (12 + dec3) x 1024 bytes. The buffer requirement is calculated by adding together the products of the block size and the buffering factor of all the input files and the output file. Optimization: It is always better to specify a large BUFFER. The SIZEOPT parameter can be used to specify parameters used in the SIZE JCL statement. However, the size-parameters are not considered in determining the merge memory size (see BUFFER key-word above). See the corresponding explanation for the SORT statement.

SIZEOPT

STEPOPT

47 A2 08UF

3-13

Sort/Merge User's Guide

3.3

FILE DEFINITION AND SPECIFICATION

3.3.1

DEFINE Parameters for SORT and MERGE Statements

Note that the following paragraphs do not apply to the GSORT and GMERGE statements. The sort/merge-define-parameters (smdp) which can be included in the INFILE and OUTFILE parameters of the JCL statement SORT and in the INFILEn and OUTFILE parameters of the JCL statement MERGE are shown in Figure 3-3.
[ {UFAS}] [FILEFORM { }] [ {BAFS}] [BLKOFF = dec3] [ {RETCODE}] [ {SKIP }] [ERROPT = { }] [ {ABORT }] [ {IGNORE }] [RECSIZE = dec5] [BLKSIZE = dec5] [ {FB}] [ {F }] [RECFORM = {VB}] [NBSN] [ {V }] [ {U }] [WRCHECK] [DUMMYREC = dec3] [ {TTRDD}] [ADDRFORM = { }] [ {LRRR }] [ {2}] [NBBUF = { }] [ {1}] [ {1 }] [BPB = { }] [ {dec2}] For SORT only : [ {SSF }] [DATAFORM = { }] [ {SARF}] [{TRUNCSSF}] [{NTRNCSSF}] For V5 MERGE : [ {SSF }] [DATAFORM = { }] [ {SARF}] [{TRUNCSSF}] [{NTRNCSSF}]

Figure 3-3. File Definition for SORT and MERGE Statements

3-14

47 A2 08UF

SORT and MERGE Statements

The use of the parameters shown in Figure 3-3 is described below. All these parameters also form part of the JCL statement DEFINE, except for WRCHECK: FILEFORM BLKOFF ERROPT RECSIZE FILEFORM BLKSIZE RECFORM NBSN This specifies the access method, UFAS or BFAS. The following file organizations are supported by these access methods: UFAS Sequential, Indexed, Relative, BFAS Sequential (disk or tape).

IMPORTANT
The default value of FILEFORM for Sort/Merge disk output file is UFAS (no longer BFAS). This involves changes in file dimensioning. It is strongly recommended to specify suitable values for BLKSIZE (CISIZE value) and for file SIZE. Remember that only sequential and linked-queued organizations exist for BFAS disk files, and that BFAS sequential disk files explicitly or implicitly allocated on FBO volumes will have the "queued monosubfile" organization and will also require more space than on VBO volumes. BLKOFF This is used when ANSI Level 1 tape files are to be processed. The data offset from the beginning of the block is specified by dec3. The maximum value is 255. This specifies the action to be taken in case of an I/O error on the file. RETCODE signifies that the Sort/Merge utility should display the return code via SYSOUT and then terminate. This is the default value. SKIP signifies that the block at which the I/O error occurred should be skipped and processing should continue with the next block. ABORT signifies that the Sort/Merge should terminate immediately. IGNORE signifies that the remainder of the block which has not been read should be padded with blanks and processing should continue with the incorrectly read block. The IGNORE option should be used with care since invalid decimal data may be introduced, resulting in abnormal termination of Sort or Merge.

ERROPT

47 A2 08UF

3-15

Sort/Merge User's Guide

RECSIZE

This specifies the size of a logical record in a UFAS or BFAS file. For fixed length records, dec5 is the size, in bytes. For variable length records, dec5 is the maximum size, in bytes, not including the record descriptor word (RDW). The RECSIZE parameter is mandatory for non-preallocated output files. This gives the size of a block for UFAS or BFAS files. The BLKSIZE parameter is mandatory for non-preallocated output files. For BFAS disk files and tapes: Fixed - dec5 is the size, in bytes, of the block not including the block serial number. Variable - dec5 is the maximum block size, in bytes, not including the block descriptor word. For UFAS disk files, the block size should be the same as the control interval size. That is, BLKSIZE = CISIZE. When an UFAS disk output file or private printfile or logfile needs a CISIZE value specification, this value must be given through the BLKSIZE keyword. Note that the CISIZE parameter is not available within the Sort/Merge DEFINE parameter. Consequently, if FILEFORM is not indicated as BFAS, and the device-class is not explicitly stated as tape or cartridge, a BLKSIZE parameter given in the Sort/Merge OUTFILE parameters is interpreted as a CISIZE for a UFAS disk file (instead of BLKSIZE for BFAS disk or tape file).

BLKSIZE

RECFORM

This specifies the logical record format for UFAS and BFAS files: FB-fixed length, blocked (default value). F-fixed length, unblocked. VB-variable length, blocked. V-variable length, unblocked. U-undefined format. NBSN is for UFAS and BFAS tape or cassette files only. It indicates that the file has no block serial numbering. Default is the contrary.

3-16

47 A2 08UF

SORT and MERGE Statements

WRCHECK

This is only used for BFAS disk output files. When this parameter is used, each block written to the output file is reread to check that it has been correctly written. If the WRCHECK parameter is not used, no read after write will be carried out. This is used when creating a BFAS indexed sequential file. The number of data records between each dummy record in the output file is specified by dec3. This parameter is used only in the JCL statement SORT for the input file. It is used to specify the format of the input record disk addresses to be included in the output record. ADDRFORM is significant only when one of the values ADDATA, ADDROUT or KEYADDR is used in the OUTPUT DSL command. Before using either the TTRDD or the LRRR option the user must ensure that the file organization can support it. TTRDD signifies that the address is to be stored in the form: Bytes 1 and 2 : relative track number in the file (TT). Byte 3 : block number on the track (R). Bytes 4 and 5 : displacement within the block (DD). TTRDD is the default value. UFAS interprets it as SFRA. LRRR signifies that the address is to be stored in the form: Bytes 1, 2 and 3 : Logical record number; that is, the serial number of the record within the file. Bytes 4 and 5 : undefined value. LRRR is applicable to any file organization with fixed length records. However, for the current release, LRRR is not supported for diskettes. LRRR cannot be used in either indexed sequential or random organization.

DUMMYREC

ADDRFORM

NBBUF

This specifies the number of buffers to be used by Sort and Merge when processing the file. The default value is 2, that is, double buffering, but single buffering may be required in order to minimize memory usage (the value is then 1) This specifies the number of blocks per buffer. That is, the number of blocks to be read at each physical access of the input file, or the number of blocks to be written at each physical access of the output file. This parameter specifies whether Sort/Merge input or output file records are to be interpreted (or created) with Standard System Format (SSF) or with Standard Access Record Format (SARF, default).

BPB

DATAFORM

47 A2 08UF

3-17

Sort/Merge User's Guide

TRUNCSSF

This parameter specifies that SSF prefixes of input data records must be ignored and that SSF control records of SSF (or SSF-like) input file must be skipped. This is the default value for SORT for Queued and tape input files. This parameter specifies the contrary of TRUNCSSF. This is the default value for UFAS disk input files.

NTRNCSSF

3.3.2

File Specification for SORT and MERGE Statements

3.3.2.1

Parameters

Note that the following paragraphs do not apply to the GSORT and GMERGE statements used with the OUTALC parameter. Neither do they apply to GCL commands SORT_FILE (see Appendix D) and MERGE_FILE (see Appendix E) used with the DYNALC parameter. The parameter values for FILEFORM, RECFORM, RECSIZE and NBSN can be specified when assigning the file; otherwise the pre-existing values from the file label will apply (see the UFAS EXTENDED User Guide). On the other hand, if the file is to be created or if the file is to be input and does not have self-sufficient labels (for example, an unlabelled tape file), then the above parameters must be specified in the file description. The circumstances under which these parameters must be specified are described below. Parameters are either optional (O) or mandatory (M). Optional means that if the parameter value is not explicitly given in the JCL, the default value for this parameter is used. Mandatory means that a value must be given in JCL for the corresponding parameter since no default value is provided. The parameters required for disk files are summarized in Table 3-1. The parameters required for tape files are summarized in Table 3-2.

3-18

47 A2 08UF

SORT and MERGE Statements

Table 3-1. Definition Parameters for Disk Files

File Type Permanent or temporary disk input Permanent or preallocated disk output

File Organization Extra Parameters Required UFAS none BFAS UFAS none BFAS FILEFORM RECFORM RECSIZE BLKSIZE (*) FILEFORM RECFORM RECSIZE BLKSIZE

Optional or Mandatory

Temporary or nonpreallocated disk output

UFAS (*)

O O M O M O M M

BFAS

(*) A default value of 2048 bytes will be taken for CISIZE

47 A2 08UF

3-19

Sort/Merge User's Guide

Table 3-2. Definition Parameters for Tape Files

File Type

File Organization

Extra Parameters Required none

Optional or Mandatory

Permanent or temporary labelled tape inputfile Unlabelled tape inputfile

BFAS UFAS

BFAS (*) UFAS

FILEFORM RECFORM RECSIZE BLKSIZE FILEFORM RECFORM NBSN RECSIZE BLKSIZE

O O M M O O O (*) M M

Permanent or temporary labelled or unlabelled tapeoutput file

BFAS UFAS

(*) Unlabelled tape files are always processed by GCOS 7 assuming they do not have a block serial number.

For the GSORT/GMERGE statements using OUTALC [= ...] with/without OUTDEF and INDEF[i] parameter groups, the automatic output file allocation and definition applies as for the CREATE utility (or GCL command LOAD_FILE). See the manual Data Management Utilities. For the SORT/MERGE statements, and for SORT_FILE/MERGE_FILE GCL commands without DYNALC, non-existing output files must be specified with consistent definition and allocation parameters.

3-20

47 A2 08UF

SORT and MERGE Statements

3.3.2.2

Examples

Input Files UFAS or Queued input files may be specified in the SORT statement as follows: On a resident disk: INFILE = (FILE1) INFILE = (LIB1, SUBFILE=MB1) On a user disk: INFILE = (FILE2, DEVCLASS = MS/FSA, MEDIA = DISK10) On tape: INFILE = (FILE3, DEVCLASS = MT/T9/D1600, MEDIA = TAPE1) for UFAS for Queued

Output Files UFAS or Queued output files may be specified in the SORT statement as follows: Preallocated file on disk: OUTFILE = (FL7, DVC = MS/B10, MD = DISK3) Member of a preallocated cataloged library: OUTFILE = (LIB7, SUBFILE = MB6) Temporary UFAS file on disk: OUTFILE = (FILE9, DEVCLASS = MS/FSA, MEDIA = DISK5, FILESTAT = TEMPRY, FILEFORM = UFAS, SIZE = 4, RECSIZE = 127, RECFORM = V) (Default CISIZE is 2048 bytes (2K)) Permanent UFAS files on disk are the same as for temporary UFAS files with the following differences: FILESTAT = UNCAT or FILESTAT = CAT (or FILESTAT omitted); EXPDATE can be specified. BFAS tape file : OUTFILE = (FILE0, DVC = MT/T9, MD = TAPE4, RECSIZE = 90, BLKSIZE = 270, EXPDATE = 95/01/01, NBSN) NOTE: For disk files that did not pre-exist, the default value is UFAS. for Queued for UFAS

47 A2 08UF

3-21

Sort/Merge User's Guide

3.4

EXAMPLES OF SORT AND MERGE STATEMENTS


An input file named PAYLIST on tape volume TV24 with a record length of 200 bytes and a block size of 4000 bytes is to be sorted. The output file, called SPAYLIST, will also be on tape, on the volume TV81. The block size of the output file will be 2000 bytes. The DSL commands for Sort are held as a source library member, SCPAY, in a RESIDENT source library named SQLL.PY. The memory allocated to the sort is 512K bytes. If the sort is performed using the default disk work file provided by SORT, then the statement will be: SORT INFILE= (PAYLIST,DEVCLASS=MT/T9,MEDIA=TV24) OUTFILE=(SPAYLIST,EXPDATE=300,DEVCLASS=MT/T9, MEDIA=TV81,RECSIZE=200,BLKSIZE=2000) SIZE=512 COMFILE=(SQLL.PY,SUBFILE=SCPAY);

If the WKDISK parameter is used then the statement will have the following form: SORT INFILE= (PAYLIST,DEVCLASS=MT/T9,MEDIA=TV24) OUTFILE=(SPAYLIST,EXPDATE=300,DEVCLASS=MT/T9, MEDIA=TV81,RECSIZE=200,BLKSIZE=2000) WKDISK= (SIZE=15,DEVCLASS=MS/FSA,MEDIA=BD14) COMFILE=(SQLL.PY,SUBFILE=SCPAY);

In this case the sort file is a temporary file of 15 cylinders on an FSA disk volume named BD14. The temporary file is named H_SRTWKD.

3-22

47 A2 08UF

SORT and MERGE Statements

If the file SPAYLIST is too large to be accommodated in the disk space available the user may wish to split the sort process into two parts and then subsequently merge the results to form the complete sorted file. If the file contains 10 000 records then a two-part sort and merge would be of the form: $JOB SORT LSPAY,USER=LX518,PROJECT=INTER; INFILE= (PAYLIST,DEVCLASS=MT/T9,MEDIA=TV24) OUTFILE=(SPAYLIXA,DEVCLASS=MT/T9,MEDIA=TVVV, RECSIZE=200,BLKSIZE=2000) SIZE=50 COMFILE=(SQLL.PY,SUBFILE=SCPAY); HALT=5000; SORT INFILE= (PAYLIST,DEVCLASS=MT/T9,MEDIA=TV24) OUTFILE=(SPAYLIXB,DEVCLASS=MT/T9,MEDIA=TVVB, RECSIZE=200,BLKSIZE=2000) SIZE=50 COMFILE=(SQLL.PY,SUBFILE=SCPAY); START=5001; MERGE INFILE1=(SPAYLIXA,DEVCLASS=MT/T9,MEDIA=TVVV) INFILE2=(SPAYLIXB,DEVCLASS=MT/T9,MEDIA=TVVB) OUTFILE=(SPAYLIST,DEVCLASS=MT/T9,MEDIA=TV81, RECSIZE=200,BLKSIZE=2000) COMFILE=MERCAR; $INPUT MERCAR; . . . . DSL commands . . . $ENDINPUT; $ENDJOB; Note how the DSL commands for Merge are entered as an input enclosure. The two-part operation is performed using the intermediate files SPAYLIXA and SPAYLIXB, on tape volumes TVVV and TVVB.

47 A2 08UF

3-23

Sort/Merge User's Guide

3-24

47 A2 08UF

4. GSORT and GMERGE Statements

This chapter describes the statements GSORT (for sorting) and GMERGE (for merging). GSORT and GMERGE each require that the input, output and command files be specified. All other parameters of the statements are optional. Default values exist, which, if they are appropriate to the application, allow the specification of certain parameters to be omitted. The optional parameters concern work files (Sort only), reporting, performance optimization, error record processing, part-file processing, checkpointing, and abnormal termination.

47 A2 08UF

4-1

Sort/Merge User's Guide

4.1

GSORT STATEMENT

4.1.1

Syntax

The GSORT statement may be used in batch or interactive mode (JCL). The syntax of the JCL statement GSORT is shown in Figure 4-1.
GSORT { { INFILE = (asg) | INFILES =((asg1), (asg2), ... (asgk))} [,INDEF=(def)] ,OUTFILE = (asg) [,OUTDEF = (def)] [,OUTALC [=(alc)] [,SYSOUT = (sysout)]] | FILE=(asg) [,DEF=(def)] } ,COMFILE = (asg) [,COMDEF = (def)] [,PRTFILE = (asg) [,PRTDEF = (def)] [,PRTALC [=(alc)]] [,PRTOUT = (sysout)]] [,LOGFILE = (asg) [,LOGDEF = (def)] [,LOGALC [=(alc)]]] [,LOGOUT = (sysout)] [ { ,WKFILE = (asg) [,WKALC =(alc)] | [MODALC =(alc)] WKASG1 = (asg) [,WKALC1 = (alc)] ,WKASG2 = (asg) [,WKALC2 = (alc)] ,WKASG3 = (asg) [,WKALC3 = (alc)] ... ... ... ,WKASGn = (asg) [,WKALCn = (alc)] } ] [,REPORT = { AUDIT | PARAM | ALL | NONE }] [,SIZE = digits8] [,REPEAT] [,INVREC = ({ABORT | CONTINUE}] [,ERROPT = {PRINTID | PRINT | LOG | IGNORE}])] [,START = digits10] [,MEM] [,NBSORT = digits2] [,FILLER = {char1 | hexa2}] [,SIZEOPT = (sizeopt)] [,STEPOPT = (stepopt)] ; [,HALT = digits10]

Figure 4-1. Format of the JCL Statement GSORT

4-2

47 A2 08UF

GSORT and GMERGE Statements

4.1.2
INFILES

Explanation of Parameters
If several files (GSORT accepts up to 9 files, as for the SORT) are to be input to the sort, you must use the syntax: INFILES = ( (asg1), (asg2),.....(asgk)), ... The INDEF option is then valid for any of the concatenated input files. For example: INFILES=((MY.SL1,MB=MB1), (MY.SL2,MB=MB2)), or INFILES=((MY.FL1), (MY.FL2), (MY.FL3)), Unless specified otherwise by explicit POOL, FIRST or POOL, NEXT, in the INFILES assignments, GSORT implicitly generates POOL, FIRST or POOL, NEXT on concatenated files explicitly assigned on tapes or cartridges.

FILE

The existing SORT allows the sorted file to be written onto the INFILE by using the syntax OUTFILE = INFILE. To achieve this function with GSORT, you must replace both INFILE and OUTFILE by the single FILE specification (with DEF instead of INDEF). For example: If you want to read (input) and overwrite (output) the file named INOUT.FILE (an uncataloged file), you must specify: FILE=(INOUT.FILE, MD=MYVOL, DVC=MS/FSA)

OUTFILE, OUTALC, OUTDEF These keywords introduce the standard parameters for the output file. OUTALC has a special meaning, as for the standard GCOS 7 utilities (CREATE, etc.): If the file referenced by OUTFILE does not exist and the OUTALC keyword is present, even without any specified allocation values (OUTALC=( ... ), ..), the Sort/Merge will copy the missing OUTALC and OUTDEF characteristics from the corresponding INFILE ones. For Merge, the model file is INFILE1. This is not applicable to subroutine sort.

47 A2 08UF

4-3

Sort/Merge User's Guide

Example: IF=MY.FILE, OUTALC, OF=(OUT.FILE, MD=MYVOL, DVC = MS/FSA, CATNOW) For a detailed description of the automatic allocation process, please read the manual Data Management Utilities. PRTDEF, LOGDEF These keywords introduce the define parameters for PRTFILE and LOGFILE, respectively. They must be correctly supplied if the corresponding file is to be allocated. These keywords introduce the allocation parameters for PRTFILE and LOGFILE, respectively. The default values SIZE = 1, INCRSIZE = 1, and UNIT = CYL, apply if PRTALC/LOGALC are specified without values.

PRTALC, LOGALC

SYSOUT, PRTOUT, LOGOUT These keywords introduce the standard sysout parameters for OUTFILE, PRTFILE, and LOGFILE, respectively. WKFILE, WKALC These keywords are one of the two ways to allocate the sort workfile(s). The other way is using WKASGi, WKALCi, and MODALC described below. WKFILE and WKALC define one file assignment, which is used as follows: Mono-process Sort You must use either no workfile or only one workfile and then define it via WKFILE and WKALC. These keywords allow you to specify the corresponding standard parameter sets (asg) and (alc) for the single workfile.

4-4

47 A2 08UF

GSORT and GMERGE Statements

Multi-process (Parallel) Sort You can use the WKFILE and WKALC keywords to introduce a list of MEDIA. Such a list is limited by GCOS 7 to 10 MEDIA. One TEMPRY workfile will be dynamically allocated for each sub-sort, numbered from 1 to n (where NBSORT=n), using the media list in a circular way. For example, if MEDIA = (A,B,C) and NBSORT = 3, then the 1st workfile in allocated on A, B, C, the 2nd workfile on B, C, A, and the 3rd workfile on C, A, B. If the MEDIA list is shorter than n MEDIA (NBSORT = n), then n is reduced according to the exact number of MEDIA in the list. The SIZE of each TEMPRY file will be the SIZE specified by: WKALC = (... SIZE= ...) divided by n. If no SIZE is specified under WKALC = (), then a default size is defined by sort as with the JCL statement SORT (see the description of the WKDISK parameter in paragraph 3.1.2). The default size is valid for each of the n worfiles. A WKFILE given with VOLSET will be considered by Sort as a list of media. This list is retrieved by the H_RTVLID GCOS 7 primitive. If there are more than 10 media in the VOLSET, the retrieved list is limited to 10 media. Examples: For a mono-process sort, a TEMPRY workfile of 10 CYLs on RESIDENT or implicit VOLSET is defined as follows: WKFILE=(WORK, FILESTAT=TEMPRY), WKALC=(SIZE=10), A multi-process sort with NBSORT=2 may have a workfile defined as: WKFILE=(AAA, DVC=MS/B10, MD=(MYVL1, MYVL2)) WKALC = (SIZE = 10), The Sort will not use the file named AAA (whether it exists or not). Instead, the Sort will dynamically assign and allocate two TEMPRY workfiles of 5 cylinders each on the media MYVOL1 and MYVOL2. The implicit UNIT is CYL.

47 A2 08UF

4-5

Sort/Merge User's Guide

MODALC

This keyword implies the presence of the WKASGi assigns, and they specify a multi-workfile sort (parallel sort). MODALC specifies the common parameters for any of the WKASGi workfiles. If used, MODALC must appear before WKASGi and WKALCi. Otherwise, an error message will be given and the JCL translation aborted. MODALC allows you to specify default SIZE, INCRSIZE, and UNIT for any of the workfiles. The rules are: if UNIT exists for the ith workfile via its own WKALCi, it remains unchanged. if not, this ith workfile inherits the UNIT from MODALC (if current) or of the default unit CYL.

The same rule applies for SIZE and INCRSIZE. The default values are: SIZE = 10 CYL | 200 TRACK | 100 x 100KB | 2500 BLOCK, depending on the value of UNIT. INCRSIZE = max (SIZE/16,2), whatever the SIZE and UNIT. Examples: WKASG1=(W1 TEMPRY), WKALC1=(SIZE=1, INCRSIZE=1), WKASG2=(W2 TEMPRY), WKALC2=(SIZE=1, INCRSIZE=1) may also be written: MODALC=(SIZE=1,INCRSIZE=1), WKASG1=(W1 TEMPRY), WKASG2=(W2 TEMPRY)

4-6

47 A2 08UF

GSORT and GMERGE Statements

WKASGi, WKALCi

These keywords introduce the n workfiles of a parallel sort in the most general form. The workfiles are ranked from 1 to n (NBSORT = n must be greater than one). They are defined by the standard (asg) and (alc) file parameter sets. The workfiles may be pre-allocated by the user or defined for dynamic allocation by the sort at run time. See also the MODALC parameter above. With these WKASGi assignments, there is no restriction to VOLSET (no limitation to 10 media). Note that a parallel sort may also be activated via the WKFILE and WKALC keywords as explained above. A parallel sort is actually parallel if the workfiles, the input file, and the output file are each on a different media (or set of media). GSORT supports only 16 workfiles assigns. But the limit of 32 slave sorts remains valid for "memory sorts" (NBSORT = 32 and no workfiles) and also for basic JCL STEP level executions. Examples: To specify 2 workfiles of 33 VBO-MS/B10 CYLs each, with INCRSIZE=1, on specified media, and another workfile on an MS/FSA media with a specific allocation equivalent to 33 CYLs of VBO-MS/B10, you specify: MODALC=(SIZE=33,INCRSIZE=1), WKASG1=(W1 FILESTAT=TEMPRY, DVC=MS/B10, MEDIA=V1), WKASG2=(W2 FILESTAT=TEMPRY, DVC=MS/B10, MEDIA=V2) WKASG3=(W3 FILESTAT=TEMPRY, DVC=MS/FSA, MEDIA=D1), WKALC3=(SIZE=17), or a more simple way: MODALC=(SIZE=3960,INCRSIZE=100,UNIT=BLOCK), WKASG1=(W1 FILESTAT=TEMPRY, DVC=MS/B10, MEDIA=V1), WKASG2=(W2 FILESTAT=TEMPRY, DVC=MS/B10, MEDIA=V2), WKASG3=(W3 FILESTAT=TEMPRY, DVC=MS/FSA, MEDIA=D1), The most simple way to cope with any mix of device class and volume organization, is to use UNIT = BLOCK.

47 A2 08UF

4-7

Sort/Merge User's Guide

To specify 2 workfiles of 300 blocks each, with INCRSIZE=1, on specified MS/FSA media, you specify: MODALC=(SIZE=300,UNIT=BLOCK,INCRSIZE=1), WKASG1=(W1 FILESTAT=TEMPRY, DVC=MS/FSA, MEDIA=V4), WKASG2=(W2 FILESTAT=TEMPRY, DVC=MS/FSA, MEDIA=V5), REPORT, SIZE, REPEAT, INVREC, ERROPT, START, HALT These options are the same as in the SORT statement, with exactly the same syntax. However, in interactive mode, REPORT = NONE is the default for both the JCL statement GSORT and the GCL command SORT_FILE. The SIZE (memory size in Kbytes) option is incremented to digits8. The implicit memory SIZE in the GSORT statement is 512 K bytes per process (see also the description of the SIZE parameter in paragraph 3.1.2). Mono-Process Sort For a mono-process sort, the memory SIZE is limited to 64 Megabytes. Multi-Process Sort For a multi-process sort, the limit is: (NBSORT x 32Mb), up to 32 x 32 Mb in the limit of the machine configuration. If the user specifies a SIZE value which exceeds NBSORT x 32Mb, then the sort will be done under only NBSORT x 32Mb. If the specified SIZE does not exceed NBSORT x 32Mb, then each process will run under about SIZE divided by NBSORT. Examples: For a mono-process "in memory" sort: GSORT IF= ..., OF= ..., MEM, SIZE=4096, START=12, HALT=15500, REPORT=ALL, INVREC=(CONTINUE), REPEAT; For a multi-process sort (NBSORT=2), with two workfiles on specified media: GSORT IF= ..., OF= ..., NBSORT=2, SIZE=4096, START=12, REPORT=ALL, INVREC=(ERROPT=PRINT), REPEAT, WKFILE=(AAA, DVC=MS/FSA, MEDIA=(V1, V2)), WKALC = (SIZE = 10);

4-8

47 A2 08UF

GSORT and GMERGE Statements

or: GSORT IF= ..., OF= ..., NBSORT=2, SIZE=4096, START=12, REPORT=ALL, INVREC=(ERROPT=PRINT), REPEAT, MODALC=(SIZE=50,INCRSIZE=1), WKASG1=(W1, FILESTAT=TEMPRY, DVC=MS/FSA, MEDIA=V1), WKASG2=(W2, FILESTAT=TEMPRY, DVC=MS/FSA, MEDIA=V2); Note that in the these two examples, REPEAT allows an automatic STEP restart, but Sort takes no checkpoints. The checkpoint facility is not allowed for multi-process jobs. MEM This keyword forces a memory sort (that is, a sort done "in memory"). The memory allocated to sort will be used only to receive records (no workfile buffers). If the file to be sorted is too large to fit in memory, then the sort aborts (refer to Chapter 7 to see how to estimate memory size). This GSORT keyword is equivalent to WKDISK=(SIZE=0) in a SORT JCL statement. Example: GSORT IF= ..., OF= ..., MEM, SIZE=4096, REPORT=NONE, INVREC=(CONTINUE); With the MEM keyword, the sort will not allocate any workfiles. The result is a "memory sort" (which may abort if the memory is insufficient). NBSORT This keyword specifies the number of "slaves sorts" of a parallel sort. Its value should be equal to the number of workfiles defined by WKASGi (and WKALCi) or to the number of MEDIA defined by WKDISK. Otherwise, n will be set equal to: min (NBSORT, number of workfile/media assigned) If the resulting value is 1, due to the media list, then the sort will abort because of the mismatch between parallel sort and one workfile. For "non memory sorts", the number of slave sorts depends mainly (for performance reasons) on the number of distinct MEDIA that can be used, and at a lower level on the number of physical channels for these MEDIA. The recommended value, for "non-memory" sorts, is between 2 and 4.

47 A2 08UF

4-9

Sort/Merge User's Guide

The number of CPUs is irrelevant, except for CPU bound sorts. One CPU allows a useful level of simultaneity between workfile I/Os on several MEDIA. For "memory sorts", the multi-process sort allows a 1 Gigabyte memory. The maximum memory per process is 32 Megabytes. The NBSORT value will be chosen in order to allow the desired memory value. For example, if you want to run a sort with SIZE = 128 Megabytes, you choose SIZE = 131072 (that is, 128 x 1024 bytes) and NBSORT = 4 (since 4 x 32 = 128 Megabytes). At run time, this keyword and its value are placed in the "OPTIONS = string" (by the GSORT statement) to be retrieved by the sort (H_GETOPT). Example: GSORT IF= ..., OF=..., NBSORT=2, ... FILLER This keyword specifies the character to be used for padding output records, when necessary. The default option is "blank". Example: GSORT IF = ..., OF = ..., FILLER = *, or GSORT IF = ..., OF = ..., FILLER = 5C, 5C being the hexadecimal code for the * character. STEPOPT=(), SIZEOPT=() These options are, as for the current SORT JCL commands, the standard JCL step and SIZE options.

4.1.3

Implicit Values

The implicit values of the sort keywords remain unchanged (same values as in the current JCL statement SORT), except for the sort memory SIZE which is now 512K per process.

4-10

47 A2 08UF

GSORT and GMERGE Statements

4.2

GMERGE STATEMENT

4.2.1

Syntax

The GMERGE statement may be used in batch or interactive mode (JCL). The syntax of the JCL statement GMERGE is shown in Figure 4-2.

GMERGE INFILE1 ,INFILE2 ,INFILE3 ... ... ... ,INFILEi = (asg1) [ ,INDEF1 = (def1) ] = (asg2) [ ,INDEF2 = (def2) ] = (asg3) [ ,INDEF3 = (def3) ]

= (asgi) [,INDEFi = (defi) ] [,OUTDEF = (def)] [,COMDEF = (def)] [,OUTALC [=(alc)]]

,OUTFILE = (asg) ,COMFILE = (asg)

[,PRTFILE = (asg) [,PRTDEF = (def)] [,PRTALC [=(alc)]]] [,SYSOUT = (sysout)] [,PRTOUT = (sysout)] [,REPORT = { AUDIT | PARAM | ALL | NONE } ] [,BUFFER = digits3] [,FILLER = { char1 | hexa2 }] [,SIZEOPT = (sizeopt)] [,STEPOPT = (stepopt)];

Figure 4-2. Format of the JCL Statement GMERGE

47 A2 08UF

4-11

Sort/Merge User's Guide

4.2.2
INFILEi

Explanation of Parameters
INFILE1 to INFILEi (i <= 8 as for MERGE) are the input files to be merged. The implicit values for the DEFINE parameters are the same as for SORT. The REPORT option has the same meaning as in the MERGE statement. The BUFFER option has the same meaning as in the MERGE statement.

REPORT

BUFFER

The meanings for the other parameters of GMERGE are the same as for the corresponding keywords in the GSORT statement.

4-12

47 A2 08UF

5. DSL for Sort

The DSL (Data Services Language) commands for Sort are described in this chapter. These DSL commands apply to Sorts requested via the JCL statements SORT (described in Chapter 3) and GSORT (described in Chapter 4) and the GCL command SORT_FILE (described in Appendix D). These DSL commands are placed in a command file. They describe the record-level functions to be performed during the sort. These functions are based on the nature of the input data. Since the KEYS command is always mandatory, a command file must be provided with every sort. DSL commands are interpreted according to keyword analysis, not position. command file should be thought of as a continuous stream of characters. The

5.1

COMMAND FILE ORGANIZATION


The DSL commands are organized into three paragraphs called FUNCTION, RECORD, and END. Of these, the FUNCTION paragraph is optional but, if supplied, must precede the other two. FUNCTION paragraph commands are used to select special processing options. The default options are underlined in the text; if a parameter comprises only a keyword (e.g. DESCEND in the FUNCTION paragraph) the default option is the reverse of that implied when the parameter is specified. The RECORD paragraph follows FUNCTION (if supplied) and contains a set of commands that provide Sort with information regarding the content and format of individual fields within the user's records. A RECORD paragraph is mandatory since it includes the KEYS command. The final paragraph in the command file consists simply of the keyword END which terminates the file. Each paragraph heading can be followed by a colon. Within a paragraph, commands may appear in any order, and must be separated from one another by either blanks or commas. Elements of a command may be parenthesized at the user's discretion to enhance readability or aid organization. Comments may be inserted to improve readability. A comment has the form /*comment*/.

47 A2 08UF

5-1

Sort/Merge User's Guide

5.2

FUNCTION PARAGRAPH
The format of the FUNCTION paragraph is the following: FUNCTION: [DESCEND] [COLLATE={EBCDIC|G100|H200|ASCII|'hexa512'}] [OUTPUT{DATA|ADDATA|KEYADDR|ADDROUT}] [DUPREC{NONE|FIFO}] [DELETE] [INTINFO] [SORTSIZE=dec11] [MIN=dec5] [AVERAGE=dec5] [WRDISK {WRDATA|WRCKD}] [DEBUG] [NBSORT=dec2] [LOWYEAR=dec2] The commands of the FUNCTION paragraph are described in 5.2.1 to 5.2.11.

5.2.1

DESCEND Command

Unless otherwise specified, Sort will output records in ascending order of the key values; that is, a record whose key value is 1 will appear before a record whose key value is 2, and alphabetic characters will appear in the order appropriate to their collating sequence. When DESCEND is specified, this order is reversed and records are sorted into a descending key value order.

5-2

47 A2 08UF

DSL for Sort

5.2.2

COLLATE Command

The COLLATE command allows the user to state explicitly which collating sequence is to be employed by Sort. There are five sequences available: EBCDIC: G100: H200: ASCII 'hexa512': Extended Binary Coded Decimal Interchange Code (the standard GC0S 7 code set) Series 100 Code Set Series 200/2000 Binary Collating Sequence American National Interchange Standard Code for Information

Privately defined collating sequence

If COLLATE is omitted then the default value is EBCDIC. The effects of using the above collating sequences are described below. EBCDIC G100 This is the standard internal code of GC0S 7. This value should only be specified when the input file has been translated from a Series 100 environment to the GC0S 7 environment. This translation can be performed using the Series 100 File Translator. G100 causes the records to be sorted into the same order as would have occurred if the sort was performed on a Series 100 system (Table C-2 of Appendix C). he use of G100 for translated files is not mandatory. If the following conditions apply: keys do not contain special characters, keys do not mix numeric and non-numeric characters in the same positions,

then G100 is not necessary. The EBCDIC collating sequence can be used. The performance of Sort is better using EBCDIC than any other collating sequence.

47 A2 08UF

5-3

Sort/Merge User's Guide

H200

This value causes the records to be sorted into the same order as would have occurred if the sort was performed on a Series 200/2000 system. It allows the user to maintain the original Series 200/2000 collating system for a file written in the standard native format and code set. The H200 character set contains fewer graphic symbols than the EBCDIC character set (e.g. there are no lower case letters in the H200 character set). Therefore, certain characters, not in the H200 character set, are translated for sorting purposes into specific H200 characters. This translation does not affect the output file (i.e. the original code set is retained). The resulting order is that shown in Table C-3 of Appendix C.

ASCII

This value specifies that the ASCII (American National Standard Code for Information Interchange) collating sequence be applied. The sequence is shown in Table C-4 of Appendix C. This table shows the low-order to high-order sequence as it is applied to the complete range of EBCDIC hexadecimal values available for a character in GCOS. The ASCII collating sequence may only be applied to a GCOS (EBCDIC) standard file. To define a collating sequence other than the above, the hexadecimal representation of all the characters in the character set are entered in order, starting with the highest (that which should always win a comparison) and ending with the lowest (that which always loses). The data is assumed to be in EBCDIC code. The collating sequence must include 256 characters, that is 512 hexadecimal digits. For example, if it is desired to sort with numeric characters higher than alphabetic characters (0123456789ABC...), the DSL command would begin: COLLATE = 'F0F1F2F3... F9C1C2C3...'

'hexa512'

5-4

47 A2 08UF

DSL for Sort

5.2.3

OUTPUT Command

The OUTPUT command is used to specify the contents of the records output by Sort. Depending on the value given to the parameter, the output record may contain the entire input record content, or combinations of disk address, data and key fields. The four values of the parameter are given below. DATA The output record will consist only of data that appears in the corresponding input record. Either the entire record or only those fields extracted from the record during the sort (via the ARRANGE command) will be included in the output record. The output record will consist of original input data as above but will also contain a prefix field giving the original record's disk address. The output record will contain no data at all but will contain the disk address of the original input record. Information on the use of such output is given in the COBOL User's Guide (ACTUAL KEY Phrase). The output record will begin with a field giving the disk address of the original record. This will be followed by the contents of the major and minor key fields of the corresponding input record.

ADDATA

ADDROUT

KEYADDR

The format of the disk address may be TTRDD, where TT is the relative track number, R is the block number relative to the beginning of the track and DD is the record displacement within the block. The format may also be LRRR (logical record number) in which case bytes 1 to 3 of the output record contain the logical record number; the contents of bytes 4 and 5 are undefined. An example of the output record formats for these values is given in Figure 5-1.

Input record disk address TTRDD key1 key2


data1 data2 key3 data3

Ouput record format for each value OUTPUT = DATA


OUTPUT = ADDATA key1 TTRDD key2 key1 data1 key2 data2 data1 key3 data2 data3 key3 data3

OUTPUT = ADDROUT TTRDD

OUTPUT = KEYADDR TTRDD

key1

key2

key3

Figure 5-1. Sample Output Formats

47 A2 08UF

5-5

Sort/Merge User's Guide

DATA and ADDATA are used when the user wants the output file to contain all or most of the original data. ADDROUT and KEYADDR are suitable for applications requiring an index of sorted records, or when there is a limitation on space available for the output file. ADDATA, ADDROUT and KEYADDR should not be used when concatenated files are specified for input. The values ADDATA, ADDROUT and KEYADDR are only valid when the input file is disk resident. Note that for ADDROUT and KEYADDR output to tape, the record length specified must be at least 18 bytes. A file containing disk addresses in the form TTRDD can be read into a COBOL program and can be used to access the file that was previously input to the Sort utility (see the COBOL 85 User's Guide, ACTUAL KEY Phrase).

5.2.4

DUPREC Command

The DUPREC command specifies the action to be taken when two or more records have identical values for each of the key fields specified. The meaning of the two values is given below: NONE All of the records with identical key fields are output in a random sequence. FIFO First-In-First-Out. The duplicate records are output in the order in which they occur in the input file.

5.2.5

DELETE Command

The DELETE command specifies that all but one record of a set with identical key field values should be deleted. The choice of which of these records to retain for the output file is dependent on the value of the DUPREC command. In a given series of records of equal key values, if DUPREC is NONE, one of the duplicate records will be selected at random; if FIFO has been selected, the first record in will be the one retained. If, in the RECORD paragraph, summation (SUM) is specified then DELETE must not be specified in the FUNCTION paragraph since deletion is automatic with summation.

5-6

47 A2 08UF

DSL for Sort

5.2.6

INTINFO Command

The INTINFO command produces a listing in the Sort/Merge Report of certain internal Sort variables. You are recommended to use this option as it costs nothing in performance and may be useful in checking the sort execution. The format of the listing is: ***** SORT INTERNAL VALUES ***** SORTALGO=dec1, SORTFRM={F|V|C}, ARTBSZ=dec5, BLKART=dec5 NBSORTMEM = dec1, MAXNBSORTMEM = dec11, MAXNBDES = dec6 MRGORDER = dec6 NBMONOPH1 =dec11, NBEXPECTED = dec11, NBPHASE2 = dec6 where SORTALGO: SORTFRM: 0 = normal sort, 1 = large record sort, 2 = merge sort. intermediate record format, F = Fixed, V = Variable, C = Celldivided variable. Letters followed by 0 (Fixed group) or by 1 (Variable group). Refer to Chapter 7 for a description of "cell" division. intermediate record size (bytes). record block size on work file (bytes). block length of work file descriptors for phases 1, 2, 3 (bytes). block length of work file descriptors for the Sort and Merge phases (bytes). number of intermediate record places in memory for initial phase. number of intermediate records possible for the initial phase of a sort in memory. maximum number of channels for the final phase. maximum number of channels for the intermediate phase. number of strings expected if there is a random distribution of sort keys. number of runs in phase 2.

ARTBSZ: BLKART: BLKDES1: BLKDES2: NBSORTMEM: MAXNBSORTMEM: MAXNBDES: MRGORDER: NBMONOPH1: NBPHASE2:

47 A2 08UF

5-7

Sort/Merge User's Guide

NOTES:

1. 2. 3.

Phase 1 of Sort (or pre-sort) reads or receives input records and creates strings of sorted records. Phase 2 of Sort executes the necessary total or partial string merges. Phase 3 of Sort is the final merge phase that writes or sends sorted output records.

5.2.7

SORTSIZE Command (Optimization)

An estimate of the number of input records can be specified in the SORTSIZE command. This number is used by Sort in order to: optimize memory utilization, if a "memory" sort is possible, check that the size of the work file is adequate, if this has been allocated by the user, calculate the size of the work file if none has been allocated by the user. SORTSIZE is an optional command. However, for efficiency reasons, it is recommended that this command be used whenever possible and that the number of records be estimated as accurately as possible. Over-estimation will produce a more efficient sort than under-estimation. A work file is opened only if the sort cannot be completed in main memory.

5.2.8

MIN Command

The MIN command specifies the minimum length of records in the input file. The MIN length covers any element in the record specified by position and length (for example, KEY fields, INCLUDE fields, OMIT fields, etc.). However, if you know that all input records are greater than a given length, then this is the correct MIN value. MIN is significant only when variable length records are being sorted. Variable Length Records in Chapter 7. See Sorting

5.2.9

AVERAGE Command

The AVERAGE command specifies the average length of variable length records in the input file. AVERAGE is significant only when variable length records are being sorted. This value is very important in getting the best out of disk work space. It is advisable never to sort variable length records without using it.

5-8

47 A2 08UF

DSL for Sort

5.2.10
Options:

WRDISK Command

WRDATA

can be explicitly specified if the work file has been preformatted with physical blocks of 1024 bytes. The physical format is thus not changed by the sort process. is the default option. Sort selects the most convenient physical block size. This is the most usual mode in the absence of segmented disks.

WRCKD

NOTE:

The WRDISK command is ignored when the Sort work file is allocated on an FBO disk.

5.2.11

DEBUG Command

This parameter activates the debugging mechanism, in particular for controlling the sequence of records. CPU time is increased by about 10% as a result. It is mainly used when sort errors occur. It also allows a dump to be obtained when exceptions or internal sort errors occur provided that DUMP=DATA is specified in the STEPOPT parameter of the JCL statement SORT/GSORT.

5.2.12

NBSORT Command

NBSORT is valid only for a parallel sort requested via the SORT statement (and not via the GSORT statement). The NBSORT command specifies the number of slave processes of a parallel sort. The maximum value is 32. For a parallel sort launched by the JCL statement SORT, the WKDISK assignment provides the media list as the GSORT WKFILE assignment does. If you want to run a parallel sort via the JCL statement SORT, you must also specify: ,STEPOPT=(H_PSORT), ... See also paragraph 3.1.3.

47 A2 08UF

5-9

Sort/Merge User's Guide

5.2.13

LOWYEAR Command

The keyword "LOWYEAR" (century LOWest YEAR) denotes a year in the range 0 - 99 which is to be the start year of a 100-year window. For example, if under the SORT or MERGE commands you specify in the FUNCTION paragraph that LOWYEAR = 61, then the decimal fields PDECY, UDECY, DISPY and COMPY are sorted in the ascending sequence (61, 62...98, 99, 00, 01...59, 60). The value 0 is authorised and gives PDECY, UDECY, DISPY, and COMPY types the same ordering sequence as PDEC, UDEC, DISP and HEXA types.

5.2.14

Examples of FUNCTION Paragraph

Example: FUNCTION: DUPREC = FIFO SORTSIZE = 10250 The Sort output is to be in ascending order. Records with identical key field values will appear in the output file in the same order as in the input file. The output file record will contain the same fields as the input record. Example: FUNCTION: OUTPUT = KEYADDR DELETE SORTSIZE = 5320 The FUNCTION paragraph above specifies that the output file, to be ordered in ascending key sequence, should contain only the key and the original disk address of each record. DUPREC = NONE has been chosen by default. Thus the DELETE command ensures that if two or more records are found to have the same key, only one of them, selected at random, will have its address written in the output file. Example: FUNCTION: LOWYEAR = 50 This specifies that PDECY, UDECY, DISPY and COMPY fields are to be sorted according to the following ascending sequence : (50, 51...98, 99, 00, 01...48, 49) instead of 00 to 99.

5-10

47 A2 08UF

DSL for Sort

5.3

RECORD PARAGRAPH
The commands in the RECORD paragraph specify fields within the user's input records which must be examined by Sort during execution. They are as follows: RECORD: KEY[S]=key-element [key-element]... [{INCLUDE=condition-element [AND condition-element]... [INCLUDE=condition-element [AND condition-element]...]... [OMIT=condition-element [AND condition-element]... [OMIT=condition-element [AND condition-element]...]...}] [SUM=sum-element [AND sum-element]...] [ARRANGE=arrange-element [AND arrange-element]...] KEY specifies one or more key fields whose values determine the sort order. optional spelling KEYS has the same meaning as KEY. The

INCLUDE and OMIT are mutually exclusive record selection commands specifying whether or not an input record is to be included in, or omitted from the sort on the basis of field contents. Both commands must not appear in the same paragraph. SUM specifies a field whose value is to be added together for a series of records with identical key values. The sum of these values will be stored in the record that will be retained for output. However, overflow during summation is not detected. ARRANGE permits the user to select certain fields from the input record to be omitted, or to be placed elsewhere. Remember that if an incorrect record is encountered in the input file (particularly for variable length records), the above option will not always suffice. Sometimes, INVREC should be used (see the SORT Statement in Chapter 3 and the GSORT Statement in Chapter 4). Unless the INVREC parameter group is specified in the JCL statement SORT, any fields referenced by INCLUDE or OMIT commands must be present in Sort input records, and any fields referenced by KEY[S], SUM or ARRANGE commands must be present in included Sort input records. Introduction of the the 61 Rule in the context of Year 2000 necessitates modification of the syntax of the DSL command. There are new record field types for the commands KEY/KEYS/SUM/INCLUDE/OMIT. The new types are PDECY, UDECY, DISPY and COMPY. For PDECY, UDECY and DISPY types, the record fields have a length of 2 bytes holding two digits that represent the four-digit years. For the COMPY type, the record fields have a length of 1 byte holding 2 packed decimal digits. In all cases sorting is in accordance with the 61 Rule and any modification of the LOWYEAR value in the FUNCTION paragraph.

47 A2 08UF

5-11

Sort/Merge User's Guide

5.3.1

KEY[S] Command

Every sort requires the specification of at least one key field. Up to 64 key fields may be specified by means of the KEY[S] command. The maximum length of a key field is 256 bytes. The format of the key-element in this command is as follows: pos length [dtype] [RV] In the key-element, pos is the byte position of the first byte of the key field relative to the first data byte of the record, and length is the length in bytes of the key field. The numbering of data bytes in a record starts at 1. For example, the numbers 1,3 refer to the field consisting of the first three data bytes of a record. They can be separated by a comma or a space. The dtype entry is one of the data type keywords given in Table 5-1. When not specified, the default data type is CHAR. The RV parameter specifies that the contents of this particular key field should be ordered in the opposite sequence from that prevailing for the sort as a whole.

5-12

47 A2 08UF

DSL for Sort

Table 5-1. Data Types

Keyword UBIN SBIN CHAR UDEC PDEC * FBIN HEXA DISP UDECY PDECY DISPY COMPY

Meaning Unsigned binary data (2- or 4-byte) Signed fixed binary data (2- or 4-byte) Character string (maximum 256 characters) Unpacked decimal data (maximum 31 decimal digits and sign) Packed decimal data (maximum 31 decimal digits and sign packed into 16 bytes). The length is given in bytes (maximum 16) Normalized floating point signed hexadecimal data (4-, 8- or 16-byte) Character string (maximum 256 characters), irrespective of whether COLLATE was specified Unsigned unpacked decimal data (up to 32 decimal digits). Unpacked decimal (2 decimal digits) to be compared according to the 61 Rule and LOWYEAR Packed decimal (2 bytes) to be compared according to the 61 Rule and LOWYEAR Unsigned unpacked decimal (2 decimal digits) to be compared according to the 61 Rule and LOWYEAR Unsigned packed decimal (1 byte for 2 digits) to be compared according to the 61 Rule and LOWYEAR

* If sign non-existent (COBOL), use CHAR

47 A2 08UF

5-13

Sort/Merge User's Guide

Figure 5-2 shows the use of the KEY[S] command to declare two fields in a user record as key fields for sorting. The states of the file before and after sorting are also shown.

R EC OR D : KEYS = 4 1 5 1 In p u t F ile R e c o rd F ie ld s A R ec1 R ec2 R ec3 R ec4 R ec5 R ec6 R ec7 3 7 6 4 7 8 8 B 1 2 1 1 1 2 3 C X X X X X X X D X Y X Z Y X X E 9 6 5 1 3 4 6 R ec6 R ec3 R ec7 R ec1 R ec5 R ec2 R ec4 A 8 6 8 3 7 7 4 O u tp u t F ile R e c o rd F ie ld s B 2 1 3 1 1 2 1 C X X X X X X X D X X X X Y Y Z E 4 5 6 9 3 6 1 X4 X5 X6 X9 Y3 Y6 Z1 K e y F ie ld V a lu e s

Figure 5-2. Example of KEY[S] Command

The file consists of seven records, labelled Rec1 to Rec7 for the purpose of the example. Each record is five bytes long and contains five 1-byte fields. The KEY[S] command declares fields 4 and 5, in that order as the sorting key fields. The output file is ordered as if Sort has sorted the records according to the content of field 4, and then for a given value of field 4 further sorted the records on the basis of the content of field 5, wherever necessary.

5-14

47 A2 08UF

DSL for Sort

5.3.2

INCLUDE/OMIT Commands

The INCLUDE and OMIT commands establish record selection criteria for the sort by testing fields in the input record. To test a value the user writes up to 16 condition elements, a combination of operators and operands, which yield a value of TRUE or FALSE. The details of constructing condition elements are described below. If they are omitted, variable length records need not contain all key/arrange/sum fields, but if they are included, they must contain all key/arrange/sum fields.

5.3.3

Condition Elements

Unless INVREC = CONTINUE is specified as a parameter of the JCL statement SORT, all the input records must be long enough to hold all the fields specified by the INCLUDE and/or OMIT commands. A condition element consists of an expression that specifies a test to be made. Two types of expression may appear in a condition element: a "comparison operation" which uses a comparison operator to compare the field value against another specified value; a "numeric condition" which tests the field for a positive, negative or zero value. Comparison Operation A condition element consisting of a comparison operator has one of the following forms: field comparison: literal comparison: pos length operator pos length [dtype] pos length operator [dtype] 'literal'.

The field comparison compares one field with another. The literal comparison compares a field of a specific data type with a literal value. The values of dtype (data type) and their respective keywords can be found in Table 5-1. Pos is the byte position of the first byte of the field to be compared relative to the first data byte of the record, and length is the length in bytes of that field. The numbering of data bytes in a record starts at 1. For example the numbers 1, 3 refer to the field consisting of the first three data bytes of a record. They can be separated by a comma or a space. The operator is one of the comparison operators shown in Table 5-2.

47 A2 08UF

5-15

Sort/Merge User's Guide

Table 5-2. Example of KEY[S] Command

Operation a EQ b a NE b a LT b a LE b a GT b a GE b

True if a is equal to b a is not equal to b a is less than b a is less than or equal to b a is greater than b a is greater than or equal to b

A literal operand is a character string delimited by apostrophes as shown in the preceding format. If the apostrophe (') is to be included as a character within a string literal, it must be duplicated. For example, the literal 'can''t' specifies the string can't. With the exception of FBIN, each data type listed in Table 5-1 can be used as a literal. If a literal string of digits is to be compared against a field with a numeric data type, then the literal is converted to the appropriate numeric data type using, if necessary, right justification and leading zeros to equalize the length. If the literal is to be compared with a character field, the user must ensure that the length of the literal is equal to the length of the comparison field, by adding blanks as padding characters in the correct positions, if necessary. The sample INCLUDE command shown below contains one condition element. INCLUDE = 1,1 EQ 2,1 /*FIRST BYTE = SECOND BYTE*/ Here, two fields are being compared to see if they are equal. The fields are one byte long and are bytes 1 and 2 of the record. The operator EQ indicates that the test is for equality. If bytes 1 and 2 are equal, the condition element yields the value TRUE and the record will be included in the sort. If the same condition element were used after an OMIT, yielding the same value, the record would be omitted from the sort. A single INCLUDE or OMIT command may contain more than one condition element, specifying several tests to be carried out. The parameter AND is used as a condition element separator, as shown below: OMIT = 1,1 EQ 2,1 AND 3,3 EQ 10,3 When multiple condition elements, separated by AND, are present in a statement, records will be selected (for omission or inclusion as appropriate) only if all the condition elements yield a TRUE value. Thus in an OMIT command, all condition elements being TRUE would cause the record to be omitted.

5-16

47 A2 08UF

DSL for Sort

Alternatives for record selection can be established by using a sequence of INCLUDE commands or a sequence of OMIT commands. When a sequence of INCLUDE or OMIT commands occurs in a RECORD paragraph, the commands are processed in the order in which they appear. Processing of a sequence is terminated as soon as a complete command is found to be TRUE; the remaining commands in the sequence are then ignored. The example below illustrates multiple INCLUDE commands in the same paragraph: INCLUDE 1,5 EQ 6,5 AND 1,1 EQ 10,1 INCLUDE 1,5 EQ 6,5 AND 1,1 NE 10,1 The first INCLUDE command performs two tests. First the 5-byte fields beginning at bytes 1 and 6, respectively, are compared. Let us assume they are equal. Byte 1 is then compared to byte 10. If they are equal, the conditions of the command have all been met and the record is included; the second INCLUDE command will be ignored, and will have no effect on the selection of the record. If bytes 1 and 10 are not equal however, the second INCLUDE command will be processed and will cause the record to be included in the sort input record stream. Figure 5-3 shows more sample condition elements using comparison operators. The numbers indicate the values in the field and not necessarily their internal representation.

Input Record 12345 ABCD EFGH 12345678 ZXA 100

Byte

6 Condition Element 4,2 1,1 26,3 1,1 6,5 EQ GT GT NE GT

11 14

15

22 Value

23

25

26 28

18,2 28,1 UDEC 1,3 UDEC 2,1 UDEC CHAR'ABCDD'

TRUE TRUE FALSE TRUE TRUE

Figure 5-3. Using Comparison Operators

47 A2 08UF

5-17

Sort/Merge User's Guide

Numeric Conditions A condition element consisting of a numeric expression has the following general form: pos length operator dtype Pos and length are the same as for the comparison operations. The operator here is one of the three numeric condition operators shown below: POS NEG ZERO Positive non-zero value Negative non-zero value Zero

The permitted values of dtype (data type) are SBIN, UDEC, PDEC and FBIN. They are described in Table 5-1. Sample condition elements using numeric condition operators are shown in Figure 5-4. Note that the field values are not the true internal numeric representations. Algebraic representations are used for illustrative purposes.

In p u t R e c o rd : 1 0 00 0 800 -3 4 5 6 000

B y te

6 8

13

14

16

C o n d itio n E le m e n t 1 ,5 2 ,5 2 ,5 9 ,8 PO S PO S ZER O NEG UDEC UDEC UDEC UDEC

V a lu e TRUE TRUE FALSE TRUE

Figure 5-4. Using Numeric Condition Operators

5-18

47 A2 08UF

DSL for Sort

5.3.4

Example of INCLUDE/OMIT Commands

Figure 5-5 shows the contents of the first 5 records in a file and the results of using certain INCLUDE and OMIT commands with this file.

1. In c lud e a ll re c o rd s w h o s e first b y te is a G
R E C O R D : IN C L U D E = 1 ,1 E Q 'G '

R e c1 R e c2

G G

H
H

I I

J
J

K
L

R e c o rd s s e le c ted : A ll b u t R e c 4 . 2. O m it a ll re c ord s w h o se firs t by te is no t G . R E C O R D : O M IT = 1 ,1 N E 'G '

R e c3 R e c4 R e c5

G F G

H H I

I I F

J J F

M N F

R e c o rd s s e le c ted : A ll b u t R e c 4 .

3. In c lud e a ll re co rd s w h o s e firs t b y te is G a n d w h o s e s e c on d b y te is I
R E C O R D : IN C L U D E = 1 ,1 E Q 'G ' A N D 2 ,1 E Q 'I' R e c ord s s e le c te d : R e c 5 .

Figure 5-5. Example of INCLUDE/OMIT Commands

47 A2 08UF

5-19

Sort/Merge User's Guide

5.3.5

SUM Command

The SUM command is used to accumulate the values in one or more specified fields for all the records of the same key. SUM is not valid for HFAS files. The fields to be summed are specified in a sum-element which has the following format pos length dtype POS and length are explained under "Comparison Operations" above. The permitted values of dtype (data type) are SBIN, UDEC, PDEC, FBIN, UDECY, PDECY, COMPY and DISPY. They are described in Table 5-1. Up to 16 fields may be specified for a record; fields must not overlap, and a key field or part of a key field must not be specified for summation. The SUM command applies only to a group of records with identical key values. Its effect is to accumulate a total of data values for the specified fields throughout the group of duplicate keyed records and to store this total in the record which will be retained for output. Overflow is not detected. The selection of this record is governed by the DUPREC command. The DELETE command must not be specified in the same run as SUM since the deletion of duplicate keyed records is automatic. The selection is done the same way as when the DELETE command is used (see above DELETE Command). Other restrictions on the selection of fields for summation are that each field must be one that will appear on the output record (that is, SUM is incompatible with the ADDROUT and KEYADDR parameters of the OUTPUT command); and that every sum field must appear as an arrange sub-element in an ARRANGE command if the ARRANGE command is used. Within this context, the sum field must be specified exactly as it was initially; it may appear within the boundaries of a larger field but sum fields must not overlap each other or overlap key fields. A portion of a sum field must not be specified as an ARRANGE element. If a sum field is duplicated in the output record by the ARRANGE command, then summation occurs only for the first occurrence of that field in the output record. The remaining occurrences of that field will have an indeterminate value. In the example shown in Figure 5-6, three record values are summed into one record for output. The original file and key fields are shown first and then the sorted file, first without summation and deletion and then as it would actually be output.

5-20

47 A2 08UF

DSL for Sort

Input File Record Fields A B Rec1 Rec2 Rec3 Rec4 Rec5 Rec6 Rec7 3 7 6 2 4 2 3 1 2 1 1 1 1 1 C X X X X X X X D 9 6 5 3 3 8 3

Key Fields Values X9 X6 X5 X3 X3 X8 X3

RECORD: KEYS = 3,1 4,1 SUM = 1,1 UDEC Sorted File Record Fields A B Rec4 Rec5 Rec7 Rec3 Rec2 Rec6 Rec1 2 4 3 6 7 2 3 1 1 1 1 2 1 1 C X X X X X X X D 3 3 3 5 6 8 9 Rec4 Rec3 Rec2 Rec6 Rec1 Output File Record Fields A B 9 6 7 2 3 1 1 2 1 1 C X X X X X D 3 5 6 8 9

Figure 5-6. Example of SUM Command In the output file, field A or Rec4 contains the summed values for the three occurrences of records with the identical key field values X and 3. Note that field A in other records is unaffected.

47 A2 08UF

5-21

Sort/Merge User's Guide

5.3.6

ARRANGE Command

The ARRANGE command is used to define the structure of the output record, if it is to be different from that of the input record. The structure is defined by listing all the fields of the record in the sequence in which they are to appear in the output record. Each field is defined in the list by means of an arrange element, which has the following format: (pos, length [,dtype,] [,'literal']) FBIN-type literals are not permitted. These types of definition are explained under "Comparison Operations" above. Sort structures each output record to conform to the structure defined in the ARRANGE command, and then writes the record in the output file. Fields not specified in the command are omitted. Note that the arrange-elements in this command refer to the position of the field in the input record; the position of the field in the output record is determined by the order of the arrange-elements in the command. The maximum "length" of an arrange-element is 256. The ARRANGE command may contain a maximum of 128 arrange-elements. A field may be repeated in the output record by repeating the corresponding arrange-element at the appropriate positions in the command. The limit of 128 on the number of entries includes all the repetitions, and also key fields, irrespective of whether or not the key fields are included in the ARRANGE command. Fields that have been defined as sum fields in the SUM command must appear in the ARRANGE command, either in their entirety or as subfields of other fields. ARRANGE can be used only when OUTPUT is DATA or ADDATA.

5-22

47 A2 08UF

DSL for Sort

A sample RECORD paragraph containing an ARRANGE command is shown in Figure 5-7. Also shown are the input file and the output file.

RECORD: KEYS = 1,1 RV INCLUDE = 2,1 EQ 'Y' AND 1,1 LT '7' ARRANGE = (3,2), (2,1), (1,1) Input File Record Fields A Rec1 Rec2 Rec3 Rec4 Rec5 4 3 7 5 1 B Y X Y Y Y C 10 15 24 14 11 D Z W Z W Z Rec4 Output File Record Fields

C
14 10 11

B
Y Y Y

A
5 4 1

Rec1
Rec5

Figure 5-7. Example of the ARRANGE Command

Field D in Figure 5-7 has been omitted. Field B has retained its original place, and fields A and C have been rearranged. The records are ordered in descending sequence of values in field A, the reverse of the default sequence.

47 A2 08UF

5-23

Sort/Merge User's Guide

Table 5-3 gives all the data types which can be used in the RECORD paragraph of the command which executes the sort. An S in the square indicates that this type is possible. (S = Sort).

Table 5-3. Possible Data Types in RECORD Paragraph (Sort)

U B IN

S B IN

CHAR

UDEC PDEC UDECY PDEPY S S

F B IN

HEXA

D IS P DISPY S

COMPY

KEYS IN C L U D E /O M IT C o m p a ris o n o f fie ld s IN C L U D E /O M IT L ite ra l IN C L U D E /O M IT N u m e ric C o n d itio n in a fie ld SUM

ARRANGE L ite ra l

5-24

47 A2 08UF

DSL for Sort

5.3.7

Examples of RECORD Paragraph

Example 1: RECORD: INCLUDE = (40,4 EQ CHAR 'MAIN') AND (30,2 LT 32,2 SBIN) KEY = (10,5 CHAR) (15,3 PDEC RV) SUM = (25,5 PDEC) (50,4 SBIN) INCLUDE specifies that the records to be included in the sort must meet the following criteria: The character string MAIN must appear in bytes 40 through 43. The fixed binary value in bytes 30 and 31 must be less than the fixed binary value in bytes 32 and 33. KEY nominates the following fields: Major key is an alphanumeric character string in bytes 10 through 14. Minor key is a packed decimal value in bytes 15 through 17 which is to be sorted in reverse order to the sequence specified for the output file. SUM establishes the following two sum fields: Five-byte packed decimal field beginning at byte 25. Four-byte binary field beginning at byte 50. Example 2: RECORD: KEY = (8,2 SBIN RV) (15,5 CHAR) OMIT = (1,7 NEG PDEC) OMIT = (1,7 ZERO PDEC) The effects of the RECORD paragraph commands shown above are as follows. OMIT is specified twice, establishing alternatives for record exclusion; first, if field 1,7 is negative, the record is excluded. Otherwise, the second OMIT is processed and if field 1,7 is zero, the field is excluded. If neither condition is true (that is, field 1,7 is positive), the record is not excluded from the sort. KEY establishes the following two key fields: Major key is a fixed binary value in bytes 8 through 9 to be sorted in reverse order from the order prevailing for the sort as a whole. Minor key is the 5-character field beginning at byte 15.

47 A2 08UF

5-25

Sort/Merge User's Guide

5.4

END PARAGRAPH
The END paragraph must be the last item in any DSL command file. It consists solely of the keyword END: There are no commands associated with it.

5-26

47 A2 08UF

6. DSL for Merge

The DSL (Data Services Language) commands for Merge are described in this chapter. These DSL commands apply to Merges requested via the JCL statements MERGE (described in Chapter 3) and GMERGE (described in Chapter 4) and the GCL command MERGE_FILE (described in Appendix E). As for Sort, the DSL commands for Merge are provided via the COMFILE parameter. They are organized into FUNCTION and RECORD paragraphs, and are terminated by the paragraph END. The commands within these paragraphs are similar to those used for Sort. The input to Merge consists of up to eight files, all of which must have identical values for the parameter RECSIZE. The files must all have been ordered on the basis of an identical key field or set of key fields and in the same order (ascending or descending). One of these input files, specified by the INFILE1 parameter group in the MERGE statement, is treated during the merge as the primary input file; all other input files will be referred to as secondary files in the following description. The difference between primary and secondary files will be explained later in this chapter. The output file produced by Merge is ordered in the same sequence (i.e. ascending or descending) based on the same set of key fields as the primary file.

47 A2 08UF

6-1

Sort/Merge User's Guide

6.1

FUNCTION PARAGRAPH
The FUNCTION paragraph describes overall characteristics of the merge. All of its commands are optional and the user may leave out the paragraph altogether if the associated default values serve his purpose. If present, the FUNCTION paragraph must precede the RECORD paragraph. The general form of a Merge FUNCTION paragraph is shown below. FUNCTION: [DESCEND] [DELETE] [COLLATE={EBCDIC|G100|H200|ASCII|'hexa512'}] [DEBUG] [LOWYEAR= digit2)]

6.1.1

DESCEND Command

When present, the DESCEND command declares that the input files are in descending order and that the output file will also be in descending order.

6.1.2

DELETE Command

When present, the DELETE command specifies that multiple occurrences of records with the same key value in the input files will cause all but one of the records to be excluded from the output file.

6.1.3

COLLATE Command

The COLLATE command specifies the collating sequence to be used. The collating sequence specified for MERGE/GMERGE must be the same as that used in the preceding SORT/GSORT (used to sort the files). For more details, see the description of COLLATE in Chapter 5.

6-2

47 A2 08UF

DSL for Merge

6.1.4

DEBUG Command

This is the same as for SORT/GSORT. Merge CPU/ELAPSED times are not increased since input record sequence control is mandatory. If DEBUG is specified together with DUMP=DATA (in the STEPOPT parameter group of the JCL statement MERGE/GMERGE), a dump will be produced if the Merge aborts.

6.1.5

LOWYEAR Command

The keyword "LOWYEAR" (century LOWest YEAR) denotes a year in the range 0 - 99 which is to be the start year of a 100-year window. For example, if under the SORT or MERGE commands you specify in the FUNCTION paragraph that LOWYEAR = 61, then the decimal fields PDECY, UDECY, DISPY and COMPY are sorted in the ascending sequence (61, 62...98, 99, 00, 01...59, 60). The value 0 is authorised and gives PDECY, UDECY, DISPY, and COMPY types the same ordering sequence as PDEC, UDEC, DISP and HEXA types.

47 A2 08UF

6-3

Sort/Merge User's Guide

6.2

RECORD PARAGRAPH
The RECORD paragraph for MERGE/GMERGE is the same as that for SORT/GSORT. The commands are interpreted largely as for SORT/GSORT with the following differences. KEY[S] is used to specify key fields. Since it is assumed that the primary merge file is in the order desired for output, the key fields are used for reference when merging. That is, a secondary merge file record with the key value A will be placed in the output file contiguous to the primary record, or the set of records whose key field value is A. Minor key fields are likewise used to merge secondary records in the appropriate position within the file. INCLUDE and OMIT work exactly as for SORT/GSORT but are applied to all the input files. The SUM command as applied to the merge is based on the primary-file-first order of precedence for retaining one of a group of records with the same key field values. Thus, the sum of the specified field will automatically be stored in the record which is to be retained. If a SUM statement is present then DELETE must not be specified in an associated FUNCTION paragraph. The ARRANGE command works as for Sort. If an input record is too short for all the fields referenced in the INCLUDE or OMIT commands, or if an included input record is too short for all the fields referenced by the KEY[S], ARRANGE, and SUM commands, the Merge step will abort with the relevant error messages. Introduction of the the 61 Rule in the context of Year 2000 necessitates modification of the syntax of the DSL command. There are new record field types for the commands KEY/KEYS/SUM/INCLUDE/OMIT. The new types are PDECY, UDECY, DISPY and COMPY. For PDECY, UDECY and DISPY types, the record fields have a length of 2 bytes holding two digits that represent the four-digit years. For the COMPY type, the record fields have a length of 1 byte holding 2 packed decimal digits. In all cases sorting is in accordance with the 61 Rule and any modification of the LOWYEAR value in the FUNCTION paragraph.

6-4

47 A2 08UF

DSL for Merge

An example of the RECORD paragraph used in a merge of two files is given in Figure 6-1.

RECORD : KEYS = (1, 1) INFILE1 (Primary File) Record Fields A 1 2 A 1 3 A 2 5 B 0 0 B 1 0

(2, 1) INFILE2 Record Fields A 2 1 A 3 5 A 7 4 A 8 0 B 0 1 Output FILE Record Fields A 1 2 A 1 3 A 2 1 A 2 5 A 3 5 A 7 4 A 8 0 B 0 0 B 0 1 B 1 0 Key Fields A 1 A 1 A 2 A 2 A 3 A 7 A 8 B 0 B 0 B 1

Figure 6-1. Example of RECORD Paragraph

47 A2 08UF

6-5

Sort/Merge User's Guide

Table 6-1 gives all the data types which can be used in the RECORD paragraph of the command which executes a Merge of several files. An M in the square indicates that this type is possible. Table 6-1. Possible Data Types in RECORD Paragraph UBIN KEYS INCLUDE/OMIT Comparison of fields INCLUDE/OMIT Literal INCLUDE/OMIT Numeric condition in a field SUM ARRANGE Literal M M M SBIN M M M M CHAR M M M UDEC PDEC UDECY PDECY M M M M M M M M FBIN HEXA DISP DISPY M M M M COMPY M M M M

M M

M M

M M

M M

6-6

47 A2 08UF

DSL for Merge

6.3

END PARAGRAPH
The END paragraph must be the last item in any DSL command file. It consists solely of the keyword: END: There are no commands associated with it.

47 A2 08UF

6-7

Sort/Merge User's Guide

6-8

47 A2 08UF

7. Sort Execution

7.1

SORTING VARIABLE LENGTH RECORDS


The following factors affect the efficiency of a variable length record sort: the maximum record length (specified in the RECSIZE parameter or in the file label); the minimum record length (may be specified in the MIN* command); the average record length (may be specified in the AVERAGE* command). The record lengths specified by the user in the RECSIZE parameter and in the MIN or AVERAGE commands influence the way in which records are stored in memory by Sort. The organization of records in memory has an important effect upon performance. Therefore, it is important that the values chosen for RECSIZE and MIN or AVERAGE be as accurate as possible. Variable length records are stored in memory in a work area which is divided up into "cells". A cell can store no more than one record, though a record can span more than one cell. Obviously, if the length of a cell is 400 bytes and the average record length is 100 bytes, then 300 bytes will normally be unused in each cell. The way in which the cell length is calculated from RECSIZE and MIN or AVERAGE is described below. If MIN is not specified the minimum record length is equal to the shortest record referred to by the KEY or SUM commands. * See Chapter 5, FUNCTION paragraph

Use of the AVERAGE command is strongly recommended. If it is not used the work file can in some cases be much bigger than the file to be sorted. The cell length is calculated as a function of (AVERAGE, MIN, RECSIZE) which minimizes the space lost on the workfile. If AVERAGE is not specified, it is calculated as: (MIN + RECSIZE)/2 For variable format the value of AVERAGE must therefore be fixed with care in order to optimize work file space. The workfile space actually used is shown in the Sort Report. For example, if the sort report indicates: WORKFILE USED IN % OF INFILE : 110 it means that the space used on the workfile is 10% more than the INFILE size. The best AVERAGE value will give the lower % of INFILE.

47 A2 08UF

7-1

Sort/Merge User's Guide

7.2

SORT RECORD SIZE


Whether or not it spans more than one cell, a record can be significantly modified by the OUTPUT, ARRANGE, etc. commands. Let the input record size be i bytes and the record size after sort be s bytes. Then s is calculated as follows: 1. If OUTPUT = DATA, DUPREC = NONE and no ARRANGE elements are specified: s = i. 2. If OUTPUT = DATA, DUPREC = FIFO and no ARRANGE elements are specified: s = i+4 bytes. 3. If OUTPUT = DATA, DUPREC = NONE and ARRANGE is used, there are two possibilities: a) If all key fields are contained within the ARRANGE specification: s=sum-of-the-sizes-of-the-ARRANGE-fields.

b) If some key fields are not present in the ARRANGE fields: s=sum-of-ARRANGE+sum-of-KEY-fields-not-present-in-ARRANGE. For example: RECORD: KEYS = (10, 4 30, 6) s = (5+3+4) | | ARRANGE elements Therefore s = 18 If DUPREC = FIFO, add four bytes to the value of s. 4. 5. If OUTPUT = ADDATA and DUPREC = NONE, add 5 to the value of s obtained in step 1, 2 or 3. If OUTPUT = ADDROUT or KEYADDR, s = sum-of-KEY-fields+5 If DUPREC = FIFO, s = sum-of-KEY-fields+5+4 For example: FUNCTION: OUTPUT = ADDROUT DUPREC = NONE RECORD: KEYS = (10, 7 19, 15 80, 20) s = (7+15+20)+5 = 47 The size of s determines the size of the work file required. (See paragraph 7.4.) + ARRANGE = (4, 5 20, 3 10, 4)

(6) | | excluded key

7-2

47 A2 08UF

Sort Execution

7.3

MAXIMUM RECORD SIZE


A record written to the work file is restricted to the smaller of the following values: 2048*NS + 1022 or 31*1024 - 10 In fact, these maximum values can only occur under certain circumstances which depend on the values given for the Sort parameters. However, once a record is larger than 10K bytes it is more efficient to execute the sort on the basis of: keys + record addresses and then to recreate the sorted file by means of direct access to records. This avoids the need to restrict the record size. (NS = number of 1024-byte sectors per track.)

47 A2 08UF

7-3

Sort/Merge User's Guide

7.4

SIZE OF DISK WORK FILE


It is not possible to estimate the size of the disk work file entirely accurately because the user would personally have to do all the calculations executed by the sort program in order to use the allocated disk space. These calculations take a large number of factors into account. For example: The choice of block size used in the work file, and therefore the losses on a given track, are determined by the main memory allocated. The losses in a given block are determined by the type of disk. It is not possible to foresee the number of strings created. At the end of each string a block is written without its necessarily being filled with records. This means that even the best result that can be expected will still be an overestimate. For internal reasons the sort program makes justifications at the beginning of each track. For variable format, the way records are split into cells depends on MIN, AVERAGE, MAX, etc. Thus, the way records are split depends on the various record sizes in the file. Many other factors are also involved. It is therefore recommended to use, as a basis: 1. 2. 3. A very simplified formula for estimating the size of the work file. Some additional hints. In all subsequent sorts, the appropriate information given in the Sort Report.

The sort program gives the following assistance for the use of the work file: 1. 2. Extension of the work file as necessary and if an increment was specified either in PREALLOC or in ALLOCATE (limited to a certain number of extents). Sort Report information: Either the percentage of allocated space actually used at the end of a normal sort:

For example: % OF WORK FILE SPACE USED: 87 Or the percentage of allocated space which would have been needed to allow the sort to be completed:

7-4

47 A2 08UF

Sort Execution

For example: MANDATORY % OF ALLOCATED WKDISK: 121 Estimation of Work File Size The work file size can be estimated by the following formula: WORK = 1.2*F* (1+48*(2C+6) -----------M s*CKPT ------i*T*NCT

This estimate should be rounded up to the next whole cylinder. NOTE: Cylinders and tracks: in VBO = physical, in FBO = logical. A logical cylinder has a size of 1000 KBytes and contains 20 logical tracks. See Table 7-1 for the relationship between physical size and disk model. Meaning of abbreviations: WORK = F= M= Size of work file in cylinders. (See Note 1 above.) Size of input file in bytes. Size of memory necessary for sort (in bytes): total memory allocated: 2*max (input buffer size, output buffer size) Note that this means twice the input buffer size, or twice the output buffer size, whichever is the maximum. i= s= C= T= NCT = CKPT = Size of input record (in bytes). Size of output record (in bytes). Total size of all key items (in bytes). Normal size of disk track used for work file (in bytes). (See Note 1 above.) Number of tracks per cylinder on disk used for work file. (See Note 1 above.) 1.2 where checkpoint is requested, otherwise 1.

For variable format, s is the size (in bytes) of the average number of cells spanned by one record.

47 A2 08UF

7-5

Sort/Merge User's Guide

Each cell contains: Key items (size C). 7 bytes for: record number (4 bytes) cell number (1 byte) record size (2 bytes). The rest of the cell contains "non-key" bytes of the record which is to be split. Each record occupies a whole number of cells, depending on the size chosen for the cell and the size of the record itself. Once the user knows how the cell size is chosen and used (see above), he can estimate the amount of space needed by the file to be sorted after division into cells. In this case the size of the work file can be adapted by means of the AVERAGE command which determines the cell length (see Chapter 5, AVERAGE Command). The estimate for workfile size proposed above is even more reliable in an average situation, i.e. if: Allocated memory is more than 512K bytes. The record is less than 1 Kbytes. The resulting number of cylinders obtained for the work file size is considerably larger than 1. For variable format, the distribution of record sizes is known and is specified to the sort program. It is advisable, at least when performing a sort for the first time on a given file, to allocate more disk space than estimated, especially if the estimate is low (e.g. 1 cylinder). For subsequent (e.g. periodic) runs the appropriate Sort Report information, if any, may be used in order to allocate a smaller work file. Note that such information is only valid if the main parameters are not changed (same input file, of course; same memory size, record size, etc.).

7-6

47 A2 08UF

Sort Execution

Table 7-1. Disk Capacities

VBO disks Disk Type MS/D500 MS/M500 MS/B10 (Device Class) (1) (1) Cylinders per volume Extra cylinders for back-up tracks Tracks per cylinder Total number of tracks (excl. back-up tracks) Bytes per track Bytes per cylinder Total capacity (M bytes) 707 4 838 5

FBO disks* (on Fixed Sector Architecture: FSA) MS/FSA

1730 320, 650, 1330, 2100 logical cylinders 5

2 x 24

2 x 20

15 20 logical tracks per logical cylinder 25950 6400, 13000, 26600, 42000

33936

33520

29344 704254 2 x 498

19069 762760 2 x 639

36381 51200 (50 KBytes) 36381 51200 (50 KBytes) 1000 320, 650, 1330, 2100

(1)Dual-spindle unit * The physical data storage unit on FBO/FSA disks is the datablock with a fixed size of 512 bytes - supported on DPS 7000/An.

47 A2 08UF

7-7

Sort/Merge User's Guide

7.5

ESTIMATING MEMORY SIZE FOR A "MEMORY SORT"


To estimate the memory needed to sort a file without a workfile (i.e., in memory), you must first add 10 bytes to the recsize or cellsize (see below). If the input records are of variable length, and/or if there are ARRANGE or FIFO commands, or special data type keys (different from CHAR), you must first calculate the sort record size (see paragraph 7.2). You must estimate the number of "cells", because one input record may span several cells. Then, you add 10 bytes per cell. The memory for an "in memory sort" must be greater than: number of cells * (size of a cell + 10) In the simplest case (fixed length input records, no ARRANGE or FIFO commands, no special data type keys), the memory must be greater than: number of input records * (recsize + 10) Note that INCLUDE and/or OMIT commands may change the number of records actually sorted. To give a margin of security for a memory sort, you should add a few percent (10% say) to the estimated memory calculated as described above.

7-8

47 A2 08UF

Sort Execution

7.6

NOTES ON PERFORMANCE
1. Give sufficient memory to the Sort (SIZE option). If no BPB is used, the following table gives the recommended memory size as a function of the size of the file to be sorted: Size of the file to be sorted Size of the Memory allocated to the sort 18 Mb 512 Kb 100 Mb 1 Mb 460 Mb 2 Mb 1 Gb 4 Mb

In case of a multi-process sort, also apply the following: Size of Memory >= NBSORT * 512Kbytes 2. To the memory determined from the above table, add the memory necessary for the buffers (taking the higher of the INFILE and OUTFILE values): Size of Buffers = 2 * BPB * Blocksize File placement: avoid placing the input and output files on the same pack as the disk work files. A multi-process sort is justified in the following 3 cases: performance is I/O bound (by I/Os on the single workfile), performance is CPU bound and more than one CPU is available, you want to do a "memory" sort for a file of more than 64 Megabytes.

3. 4.

The performance limitation by I/O throughput (on the single workfile) occurs mainly if BPB is applied to INFILE and/or OUTFILE. In fact, the workfile is handled with blocks limited to 32Kbytes. Using BPB, you can read/write 32*Blocksize bytes in a single operation (on INFILE and/or OUTFILE). 5. A multi-process sort may be less efficient than a mono-process sort in the following cases: where there are only a small number of records to be sorted (generally under 10 minutes of elapsed time), where the input file(s) are to be read by the UFAS access method (see Appendix I Sort/Merge and the UFAS Access Method for details of the files concerned) unless the number of records to be sorted is substantial (generally over 10 minutes of elapsed time).

See also Appendix I Sort/Merge and the UFAS Access Method for the impact of BPB. 6. 7. 8. The NBSORT workfiles must each be on a different disk. Using checkpoint facilities involves slight performance degradation. Use the SORTSIZE command. An exact value will produce a well tailored sort. In case of doubt it is better to supply a value that is too big than no value at all.

47 A2 08UF

7-9

Sort/Merge User's Guide

9.

Do not be concerned at the "missing page" condition. When using a large memory the initial access on each page does imply one missing page, but with no loss in elapsed or CPU time.

7-10

47 A2 08UF

Sort Execution

7.7

CHECKPOINT/RESTART
If the REPEAT parameter is specified in the JCL statement SORT, checkpoints will be taken during the course of the sort (only for a mono-process sort) with a fixed frequency corresponding to 20M bytes written to or read from the work file (depending on the phase of the sort). For a multi-process sort, the REPEAT parameter will allow a restart only from the beginning of the step. In the event of error, the operator can decide whether or not to restart Sort from the last checkpoint.

47 A2 08UF

7-11

Sort/Merge User's Guide

7.8

CONCURRENT ACCESS (GAC)


The SORT and MERGE statements can specify concurrent access options (GAC) on its input and output files. In fact, the step can use files under GAC (ASSIGN statement with SHARE = MONITOR) in only two ways: ACCESS=SPREAD or SPWRITE (input or output file), READLOCK=STAT (input file only). Except for the special case of OUTFILE = INFILE, the input file can be explicitly specified with either of the following sets of options (on INFILE): SHARE=MONITOR, READLOCK={NORMAL|EXCL}, ACCESS={SPREAD|SPWRITE} SHARE = MONITOR, READLOCK = STAT (Statistical read not taking into account any modifications made to the file during concurrent access but after the actual read). For an output file under GAC (including the case of OUTFILE = INFILE), the only possible combination is: SHARE = MONITOR, ACCESS = SPWRITE It must be included in the OUTFILE description, or in the INFILE description if OUTFILE = INFILE, (in which case the default is ACCESS = SPWRITE).

IMPORTANT
1. Unless the user wants a statistical read or unless a file is catalogued with SHARE = MONITOR, it is strongly recommended to assign the files involved in the sort with SHARE = NORMAL (default value). The sharing conditions will be the same, but at lower cost. 2. If you want to use SORT with concatenation and with GAC, you should specify ACCESS = SPREAD/SPWRITE with INFILE assign or READLOCK=STAT in defining SORT IF = ... . Without this type of specification, it is mandatory to use REPEAT and to begin the concatenation with the files that are monitored by GAC (SHARE = MONITOR), otherwise the sort processing will abort.

See the GAC-EXTENDED User's Guide.

7-12

47 A2 08UF

A. Sort and Merge Error Messages

This Appendix discusses the error messages which are output in the Job Occurrence Report and in the Sort/Merge Report. The Sort/Merge Report is produced in a SYSOUT subfile (see Appendix B). The diagnostics which can appear in the Job Occurrence Report are caused by syntax or inconsistency errors in the JCL statements: SORT, GSORT, MERGE, and GMERGE. Most of the messages are self-explanatory. Note also that after the expansion of an extended JCL statement, errors may later be found in the resulting basic JCL statement (such as ASSIGN). These errors in basic JCL are described in the JCL Reference Manual. Execution diagnostics appear in the Sort/Merge Report. They are the result of errors detected in the DSL commands or errors encountered whilst processing the input or output files. Sort and Merge also set the severity value that can be tested with the JUMP JCL statement. The possible values are: SEV0: SEV1: the function has been correctly executed. the function has been correctly executed. However a warning is given to the user who should carefully examine the report. For example, an empty output file may have been created. This situation would be normal for Sort if, for example, the input file was empty. But the specification of an empty input file may have been the result of a user error. (Sort only) the function has not been completed, due to an I/O error. If the REPEAT parameter was used in the SORT statement, the function can be restarted (see Checkpoint/Restart Chapter 7). the function has not been completed, due to a user error or a system error whose origin cannot be precisely diagnosed.

SEV3:

SEV4:

47 A2 08UF

A-1

Sort/Merge User's Guide

A.1

ERRORS MESSAGES FOR THE SORT STATEMENT


Below is a list of messages that can be produced in the Job Occurrence Report as a result of errors in the JCL statement SORT. These messages do not apply to the GSORT statement. Error Number 106 Text and explanation CONTRADICTORY VALUES IN LABEL AND FILEFORM PARAMETERS Verify both parameters. An HFAS fileform implies an H200 type label, a standard label implies a native fileform. CONTRADICTORY PARAMETERS VALUES IN HALT AND START

Verify both values. The value given for HALT must be greater than or equal to the value given for START. CONTRADICTORY VALUES IN ABORT AND CONTINUE PARAMETERS In INVREC, ABORT and CONTINUE are mutually exclusive. ERROR IN OUTFILE PARAMETER; ILLEGAL VALUE OF MEDIA IN CASE OF REPLIN When a disk sort is executed and the input file and the work file are on the same media, the REPLIN parameter is not allowed in OUTFILE because it would cause the work file to be dismounted before the end of the sort. ERROR IN COMFILE PARAMETER; ILLEGAL VALUE INPUT-ENCLOSURE-NAME Verify the syntax of the input enclosure name. ERROR IN SIZE PARAMETER; ILLEGAL VALUE MUST BE >=22K ERROR IN MEMORY PARAMETER; ILLEGAL VALUE MUST LIE BETWEEN 8 AND 120K ERROR IN START PARAMETER; ILLEGAL VALUE MUST LIE BETWEEN 1 AND 2 147 483 647 ERROR IN HALT PARAMETER; ILLEGAL VALUE MUST LIE BETWEEN 1 AND 2 147 483 647 ERROR IN BUFFER PARAMETER; ILLEGAL VALUE MUST BE < OR = TO 32767

A-2

47 A2 08UF

Sort and Merge Error Messages

Error Messages for the SORT Statement (Cont'd) Error Number 106 (Cont'd) Text and explanation ERROR IN INFILE PARAMETER; ILLEGAL VALUE REPLIN OR SIZE Neither REPLIN nor SIZE should appear in INFILE description. ERROR IN WKDISK PARAMETER; ILLEGAL VALUE FILESTAT, END, MOUNT, or EXDATE None of these parameters is allowed in WKDISK. ERROR IN WKDISK PARAMETER; ILLEGAL VALUE LABEL OR SORT DEFINITION PAR. Neither LABEL nor sort-definition parameters should appear under WKDISK. The file used as a work file always has native labels. ERROR IN WKDISK PARAMETER; ILLEGAL VALUE SUBFILE SUBFILE is not a valid parameter in WKDISK description. ERROR IN COMFILE PARAMETER; ILLEGAL VALUE MOUNT OR EXPDATE Neither MOUNT nor EXPDATE are valid parameters for the COMFILE description. ERROR IN COMFILE PARAMETER; ILLEGAL VALUE LABEL OR MEDIA NAME TABLE LABEL is not a valid parameter in COMFILE description. The library is assumed to be native. The library cannot be a multivolume file. ERROR IN COMFILE PARAMETER; ILLEGAL VALUE SORT DEFINITION FORBIDDEN Parameters of sort definition are not allowed for COMFILE which must be an already created library. ERROR IN PRTFILE PARAMETER; ILLEGAL VALUE SORT DEFINITION PARAMETERS The PRTFILE is either created and there is no need to specify sort-definition parameters, or the PRTFILE is a tape file to be created by SORT and default values will be used.

47 A2 08UF

A-3

Sort/Merge User's Guide

Error Messages for the SORT Statement (Cont'd) Error Number 106 (Cont'd) Text and explanation ERROR IN WKDISK PARAMETER; ILLEGAL VALUE DATABUF, BPB OR REPLIN None of these parameters is allowed in WKDISK. ERROR IN COMFILE PARAMETER; ILLEGAL VALUE DATABUF, BPB OR REPLIN None of these parameters is allowed in COMFILE. ERROR IN PRTFILE PARAMETER; ILLEGAL VALUE DATABUF, BPB, REPLIN OR SIZE None of these parameters is allowed in PRTFILE. ERROR IN DATBUF PARAMETER; ILLEGAL VALUE MUST BE EQUAL TO 1 OR 2 ERROR IN BPB PARAMETER; ILLEGAL VALUE MUST BE GREATER OR EQUAL TO 1 ERROR IN LOGFILE PARAMETER; ILLEGAL VALUE DATABUF, BPB OR REPLIN 108 ERROR IN DEVCLASS PARAMETER CONTRADICTORY VALUES IN INPUT AND OUTPUT FILES When REPLIN is used in OUTFILE, the input and output file must be of the same device-class 110 CONTRADICTORY PARAMETERS RESIDENT, DEVCLASS When a resident volume is described, the device-class should not be specified. 111 MEDIA PARAMETER MAY APPEAR ONLY IF DEVCLASS EXPLICITLY GIVEN No default value is supplied for DEVCLASS. So when the volume is not resident, DEVCLASS and MEDIA must be specified together.

A-4

47 A2 08UF

Sort and Merge Error Messages

Error Messages for the SORT Statement (Cont'd) Error Number 112 Text and explanation ERROR IN NOBSN PARAMETER : NOBSN PARAMETER : NOBSN MAY NOT APPEAR IN THE PRESENT CONTEXT OF DISK FILE The use of NOBSN is restricted to tape files... ERROR IN WKDISK PARAMETER : SIZE MAY NOT APPEAR IN THE PRESENT CONTEXT (EFN ALREADY DEFINED) External-file name and SIZE are mutually exclusive in WKDISK ERROR IN COMFILE PARAMETER : DEVCLASS MAY NOT APPEAR IN THE PRESENT CONTEXT WITHOUT MEDIA 113 MANDATORY PARAMETER RECSIZE MISSING MANDATORY PARAMETER BLKSIZE MISSING MANDATORY PARAMETER DEVCLASS MISSING MANDATORY PARAMETER SUBFILE MISSING MANDATORY PARAMETER INFILE MISSING MANDATORY PARAMETER OUTFILE MISSING MANDATORY PARAMETER COMFILE MISSING MANDATORY PARAMETER EFN MISSING EFN stands for external file name MANDATORY PARAMETER LOGFILE MISSING 126 CONTRADICTORY VALUES : MEMORY, BUFFER-SIZE, DATABUF, BPB (MEMORY, BUFFER) form a group of exclusive parameters from the group (SIZE,DATABUF,BPB).

47 A2 08UF

A-5

Sort/Merge User's Guide

A.2

ERROR MESSAGES FOR THE MERGE STATEMENT


These messages do not apply to the GMERGE statement. Error Number 106 Text and explanation CONTRADICTORY VALUES IN LABEL AND FILEFORM PARAMETERS Verify both parameters. An HFAS fileform implies an H200 type label, a standard label implies a native fileform. CONTRADICTORY VALUES IN SIZE AND FILESTAT PARAMETERS 107 ERROR IN COMFILE PARAMETER; ILLEGAL VALUE INPUT-ENCLOSURE-NAME Verify the syntax of the input-enclosure-name. ERROR IN COMFILE PARAMETER; ILLEGAL VALUE OF MOUNT OR EXPDATE Neither MOUNT nor EXPDATE are allowed for COMFILE. ERROR IN COMFILE PARAMETER; ILLEGAL VALUE LABEL OR MEDIA NAME TABLE LABEL is not a valid parameter in COMFILE description. The library is assumed to be native. The library cannot be a multivolume file. ERROR IN COMFILE PARAMETER; ILLEGAL VALUE MERGE DEFINITION FORBIDDEN Parameters of merge definition are not allowed for COMFILE which must be an existing library. ERROR IN PRTFILE PARAMETER; ILLEGAL VALUE MERGE DEFINITION FORBIDDEN Either the PRTFILE exists, and there is no need to specify merge definition parameters, or the PRTFILE is a tape file to be created by Merge and default values will be used. ERROR IN COMFILE PARAMETER; ILLEGAL VALUE DATABUF, BPB OR SIZE None of these parameters is allowed in COMFILE. ERROR IN PRTFILE PARAMETER; ILLEGAL VALUE DATABUF, BPB OR SIZE None of these parameters is allowed in PRTFILE

A-6

47 A2 08UF

Sort and Merge Error Messages

Error Messages for the MERGE Statement (Cont'd) Error Number 107 (Cont'd) Text and explanation ERROR IN DATBUF PARAMETER; ILLEGAL VALUE MUST BE EQUAL TO 1 OR 2 ERROR IN BPB PARAMETER; ILLEGAL VALUE MUST BE GREATER OR EQUAL TO 1 110 CONTRADICTORY PARAMETERS RESIDENT, DEVCLASS When a resident volume is described, the device-class should not be specified. 111 112 MEDIA PARAMETER MAY APPEAR ONLY IF DEVCLASS EXPLICITLY GIVEN ERROR IN NOBSN PARAMETER : NOBSN MAY NOT APPEAR IN THE PRESENT CONTEXT OF DISK FILE NOBSN is meaningful only for tape files. ERROR IN COMFILE PARAMETER : DEVCLASS MAY NOT APPEAR IN THE PRESENT CONTEXT WITHOUT MEDIA 113 MANDATORY PARAMETER RECSIZE MISSING MANDATORY PARAMETER BLOCKSZ MISSING MANDATORY PARAMETER SUBFILE MISSING MANDATORY PARAMETER H200FORM MISSING MANDATORY PARAMETER OUTFILE MISSING MANDATORY PARAMETER COMFILE MISSING 126 ERROR IN INPUT FILE; ILLEGAL VALUE SIZE The SIZE parameter cannot appear in an input file description since the file already exists.

47 A2 08UF

A-7

Sort/Merge User's Guide

A.3

EXECUTION ERROR MESSAGES FOR SORT/GSORT AND MERGE/GMERGE


These messages apply to the SORT, GSORT, MERGE, and GMERGE statements. The execution error messages are produced as part of the Sort Report in a SYSOUT subfile (see Appendix B); The general format is as follows: *** TDXX.YY: error-message [return-code] ["secondary information"] XX = number of procedure giving rise to error. YY = error code within the procedure. error-message is a phrase that describes the diagnosis or error. return-code appears either with the abnormal execution of a system primitive or when there is an internal sort error. "secondary information" appears when there is an I/O error on the work file. It allows the user to identify the completion code, the device in use, the address of the error, presented as: Cylinder/Track. Example: **** SORT EXECUTION LISTING **** *** TD11.18: I/O ERROR ON WORK FILE: WKDISK-READ RC = 5F8B0481 --> TRID11, IOFAIL COMPLETION CODE=8104, DEVICE NAME=MS12, ADDRESS=380 **** SORT AUDIT INFORMATION **** In this example: XX = 11 (procedure), YY = 18 followed by a return-code (RC) and ending with secondary information (COMPLETION CODE, DEVICE, ADDRESS).

A.3.1

Invalid Records

For records with an invalid length the following message is displayed: INVALID RECORD cause: record number The cause may be INCLUDE/OMIT or KEY/ARRANGE/SUM depending on the unsatisfied criteria. Record-number is the record serial number maintained by Sort. Sort counts the records when reading the input file starting at 1 for the first record.

A-8

47 A2 08UF

Sort and Merge Error Messages

A.3.2

List of Execution Error Messages

The execution error messages for SORT/GSORT and MERGE/GMERGE, along with a description of the circumstances which cause them are given below. TD00.00 Meaning: DSORT INVALID MESSAGE XX YYYY XX = module number (hexa digits 2) YYYY = error number (hexa digits 4) An error occurred that caused the module number or the error number to be incorrect. The problem must be reported to Technical Support. INTERNAL SORT ERROR XX = Module number (hexa digits 2) where the internal error has been detected. YY = Number (hexa digits 2) of the internal error detected. Meaning: TDXX.17 Meaning: TDXX.18 Meaning: TDXX.19 The problem must be reported to Technical Support. UNABLE TO LAUNCH CHANNEL PROGRAM XX = Module number where the error has been detected. The problem must be reported to Technical Support. I/O ERROR ON WORK FILE : WKDISK-WRITE XX = Module number where the error has been detected. Detailed information (completion code, involved address) is given below. KEY/ARRANGE/SUM FIELD(S) OUT OF INPUT RECORD XX = Module number where the error has been detected. Meaning: TDXX.20 The involved record is too small to hold all the indicated fields. The user program must be corrected. OVER 2147483647 INPUT RECORDS XX = Module number where the error has been detected. Meaning: TDXX.21 Meaning: The number of records exceeds the capacity of 31 bits (more than 2**31-1 records). ATTEMPT TO REQUEST A SORTED RECORD AFTER END OF SORT-OUTPUT Self-explanatory. The user program (Sort output procedure) must be changed ; or problem in system processor must be reported to Technical Support of this system processor.

TDXX.YY

47 A2 08UF

A-9

Sort/Merge User's Guide

List of Execution Error Messages (Cont'd) TD01.01 Meaning: INVALID SCA SCA version is neither 0 (standard value) nor 1 (BMICK REL/RET). See SH_DCSCA. The user program must be corrected. INVALID SRTDEF The SRTDEF is not correct. Details are given by the messages TD01.65 to TD01.81 messages. The user program must be corrected. INVALID SRTDEF The option string (see JCL statement STEP) cannot be interpreted. JCL must be corrected. KEY NUMBER MUST BE 1 TO 64 The number of key fields is greater than 64. The program must be corrected. INVALID KEY TABLE The key definition table (pointed to by SRTDEF) is wrong. Details are given by messages TD01.82 to 86. The user program must be corrected. UNABLE TO CREATE SEGMENT The main segment (record segment) used for sorting cannot be created. A return code from H_SGCR is given. The error could be internal to Sort but most frequently : either too much memory is required for Sort (SIZE in JCL, SRTDEF) or the number of vacant entries is insufficient (linkage problem). UNABLE TO CREATE SEGMENT The common sort segment used for sorting cannot be created. A return code from H_SGCR is given. The error could be internal to Sort but most frequently : either too much memory is required for Sort (SIZE in JCL, SRTDEF) or the number of vacant entries is insufficient (linkage problem).

TD01.02 Meaning:

TD01.03 Meaning: TD01.04 Meaning: TD01.05 Meaning:

TD01.06 Meaning:

TD01.07 Meaning:

A-10

47 A2 08UF

Sort and Merge Error Messages

List of Execution Error Messages (Cont'd) TD01.08 Meaning: UNABLE TO CREATE SEGMENT The generated code segment use for sorting cannot be created. A return code from H_SGCR is given. The error could be internal to Sort but most frequently : either too much memory is required for Sort (SIZE in JCL, SRTDEF) or the number of vacant entries is insufficient (linkage problem). UNABLE TO CREATE WORK FILE DEFINITION A dynamic FD (file definition table) is required and cannot be created. A return code from H_CRFD is given. It could be a linkage problem (ENTRYOV). UNABLE TO DELETE WORK FILE DEFINITION Sort is deleting useless FD (file definition table). The return code from H_DLFD is given. The problem must be reported to Technical Support. UNABLE TO IDENTIFY WORK FILE Sort is unable to know which volume supports the workfile ($H_RTVLID). The return code from H_RTVLID is given. INVALID RUN.TIME : SCB The SCB table in the run time module does not begin with the characters "SCB1". Check for the link. The user program must be corrected. INVALID RUN.TIME : SCR The SCR table in the run time module does not begin with the characters "CURR". Check for the link. The user program must be corrected. UNABLE TO CHANGE SEGMENT SIZE The main segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO CHANGE SEGMENT SIZE The common Sort segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF).

TD01.09 Meaning:

TD01.10 Meaning:

TD01.11 Meaning: TD01.12 Meaning:

TD01.13 Meaning:

TD01.14 Meaning:

TD01.15 Meaning:

47 A2 08UF

A-11

Sort/Merge User's Guide

List of Execution Error Messages (Cont'd) TD01.16 Meaning: UNABLE TO CHANGE SEGMENT SIZE The generated code segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). INVALID SORT CALL NESTING Several nested Sorts have tried to use the same run time static resources. The user program must be corrected. UNABLE TO RETRIEVE SORT RUN-TIME RESOURCES An abnormal return-code from H_SGSIZE is given when trying to identify a run-time segment. Possible user linkage error or the problem must be reported to Technical Support. UNABLE TO CHANGE SEGMENT SIZE The segment for an old COBOL key comparison routine cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). ERROR IN COBOL-COMPILER/SORT INTERFACE Self-explanatory. The problem must be reported to Technical Support. NO TAPE-WORK-FILE SUBROUTINE-SORT AVAILABLE Self-explanatory. JCL must be modified ($SORTWORK) to supply a disk work file. PARALLEL SORT IS NOT AVAILABLE IN TDS CONTEXT Self-explanatory. SRTDEF : NO VALID KEY SPECIFICATION The user program must be corrected. SRTDEF : INVALID COBOL_COMP The user program must be corrected. SRTDEF : INVALID LOCAL_PTR The user program must be corrected.

TD01.17 Meaning: TD01.18 Meaning:

TD01.19 Meaning:

TD01.20 Meaning: TD01.21 Meaning:

TD01.22 Meaning: TD01.65 Meaning: TD01.66 Meaning: TD01.67 Meaning:

A-12

47 A2 08UF

Sort and Merge Error Messages

List of Execution Error Messages (Cont'd) TD01.68 Meaning: TD01.69 Meaning: TD01.70 Meaning: TD01.71 Meaning: TD01.72 Meaning: TD01.73 Meaning: TD01.74 Meaning: TD01.75 Meaning: TD01.76 Meaning: TD01.77 Meaning: TD01.78 Meaning: TD01.79 Meaning: TD01.80 Meaning: SRTDEF : INVALID CODE_LENGTH The user program must be corrected. SRTDEF : ALL FILLER FIELDS ARE NOT 0 The user program must be corrected. SRTDEF : SIZE IS NEGATIVE The user program must be corrected. SRTDEF : NO_WORK_FILES MUST BE -1 TO +255 The user program must be corrected. SRTDEF : IN_VOLUME IS NEGATIVE The user program must be corrected. SRTDEF : INPUT RECORD LENGTH IS NOT > 0 The user program must be corrected. SRTDEF : REPORT IS > "01"B The user program must be corrected. SRTDEF : COLL_SEQ IS NOT 1 The user program must be corrected. SRTDEF : DUP_REC_SEQ MUST BE ZERO OR "F" The user program must be corrected. SRTDEF : DUP_REC_DEL IS NOT ZERO The user program must be corrected. SRTDEF : IN_FD IS NOT NULL The user program must be corrected. SRTDEF : OUT_FD IS NOT NULL The user program must be corrected. SRTDEF : INVALID KEY_PTR The user program must be corrected.

47 A2 08UF

A-13

Sort/Merge User's Guide

List of Execution Error Messages (Cont'd) TD01.81 Meaning: TD01.82 Meaning: TD01.83 Meaning: TD01.84 Meaning: TD01.85 Meaning: TD01.86 Meaning: TD01.87 Meaning: TD02.01 Meaning: TD02.02 Meaning: TD02.03 Meaning: KEY # XXXXX : INVALID POSITION The user program must be corrected. XXXXX = rank of the incorrect field. KEY # XXXXX : INVALID SENSE The user program must be corrected. XXXXX = rank of the incorrect field. KEY # XXXXX : LENGTH IS NOT POSITIVE The user program must be corrected. XXXXX = rank of the incorrect field. KEY # XXXXX : INVALID TYPE The user program must be corrected. XXXXX = rank of the incorrect field. KEY # XXXXX : INVALID LENGTH FOR TYPE The user program must be corrected. XXXXX = rank of the incorrect field. SRTDEF : INVALID COBOL KEY COLLATING SEQUENCE The user program must be corrected. RECOMPILE AND RELINK COBOL PROGRAM IF YOU WANT UP-TO-DATE DISK-SORT The merge Sort is used instead of the distribution Sort in this case. This is only a warning. ABOVE CHARACTER ALREADY MENTIONED IN USER COLLATING SEQUENCE The collating sequence is incorrect. The sort DSL must be corrected. SEPARATOR MISSING The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". "=" MISSING AFTER PRECEDING KEY_WORD The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?".

A-14

47 A2 08UF

Sort and Merge Error Messages

List of Execution Error Messages (Cont'd) TD02.04 Meaning: TD02.05 Meaning: TD02.06 Meaning: TD02.07 Meaning: TD02.08 Meaning: FUNCTION PARAGRAPH MISSING The DSL (Data Services Language) must be corrected. Each error is underlined by a "?". RECORD PARAGRAPH MISSING The DSL (Data Services Language) must be corrected. Each error is underlined by a "?". ABOVE KEY-WORD IS OUT OF CONTEXT IN FUNCTION PARAGRAPH. RECORD PARAGRAPH INSERTED The DSL (Data Services Language) must be corrected. Each error is underlined by a "?". ABOVE KEY-WORD IS OUT OF CONTEXT IN RECORD PARAGRAPH. FUNCTION PARAGRAPH INSERTED The DSL (Data Services Language) must be corrected. Each error is underlined by a "?". ILLEGAL CHARACTER(S) IGNORED The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". NUMERIC VALUE OUT OF BINARY WORD VALUE LIMITS The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". LITERAL > 256 INTERNAL CHARACTERS The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". ZERO LENGTH LITERAL The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". INVALID LENGTH FOR COLLATE SEQUENCE The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?".

TD02.09 Meaning: TD02.10 Meaning:

TD02.11 Meaning:

TD02.12 Meaning:

47 A2 08UF

A-15

Sort/Merge User's Guide

List of Execution Error Messages (Cont'd) TD02.13 Meaning: TD02.14 Meaning: TD02.15 Meaning: TD02.16 Meaning: TD02.17 Meaning: TD02.18 Meaning: TD02.19 Meaning: TD02.20 Meaning: TD02.21 Meaning: TD02.22 Meaning: > 1024 CHARACTERS FOR RECORD PARAGRAPH LITERALS The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". ODD LENGTH FOR HEXADECIMAL LITERAL The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". INVALID OR UNEXPECTED LITERAL The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". MULTIPLE USE OF KEYWORD The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". UNEXPECTED END OF OPTION STRING LITERAL The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". UNEXPECTED END OF DSL The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". INVALID NUMERIC VALUE The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". ILLEGAL ZERO VALUE The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". PARAMETER VALUE > MAXIMUM ALLOWED The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". KEYWORD VALUE IS NOT ALPHANUMERIC The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?".

A-16

47 A2 08UF

Sort and Merge Error Messages

List of Execution Error Messages (Cont'd) TD02.23 Meaning: TD02.24 Meaning: TD02.25 Meaning: TD02.26 Meaning: TD02.27 Meaning: TD02.28 Meaning: TD02.29 Meaning: TD02.30 Meaning: TD02.31 Meaning: TD02.32 Meaning: UNKNOWN KEYWORD OR OUT OF CONTEXT The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". INVALID FIELD POSITION The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". INVALID FIELD LENGTH The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". INVALID FIELD LENGTH FOR FIELD TYPE The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". 2ND CHAR FIELD LENGTH NOT = 1ST LENGTH The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". UNEXPECTED LITERAL The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". UNEXPECTED NUMERIC VALUE The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". UNEXPECTED ALPHANUMERIC VALUE The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". WKTAPE CANNOT BE SUPPORTED BY DSORT The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". OUTPUT DATA MUST BE (DEFAULT) FOR H200 FILES self-explanatory

47 A2 08UF

A-17

Sort/Merge User's Guide

List of Execution Error Messages (Cont'd) TD02.33 Meaning: TD02.34 Meaning: TD02.35 Meaning: TD02.36 Meaning: TD02.37 Meaning: TD02.38 Meaning: TD02.39 Meaning: TD02.40 Meaning: TD02.41 Meaning: TD02.42 Meaning: INVALID COLLATE SPECIFICATION The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". COLLATE SEQUENCE FOR H200 FILE MUST GIVE 64 CHARACTERS self-explanatory FUNCTION PARAGRAPH MUST APPEAR 1ST AND ONCE The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". ARRANGE/SUM IMPOSSIBLE WITH OUTPUT = KEYADDR/ADDROUT The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". SUM AND DELETE CANNOT BE USED TOGETHER The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". INCLUDE AND OMIT CANNOT BE USED TOGETHER The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". MULTIPLE RECORD PARAGRAPH The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". OVER 64 KEYS SPECIFIED The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". OVER 16 SUM FIELDS SPECIFIED self-explanatory OVER 128 ARRANGE FIELDS SPECIFIED The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?".

A-18

47 A2 08UF

Sort and Merge Error Messages

List of Execution Error Messages (Cont'd) TD02.43 Meaning: TD02.44 Meaning: TD02.45 Meaning: TD02.46 Meaning: TD02.47 Meaning: TD02.48 Meaning: TD02.49 Meaning: TD02.50 Meaning: TD02.51 Meaning: TD02.52 Meaning: OVER 16 INCLUDE/OMIT CONDITIONS SPECIFIED The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". INVALID FIELD SPECIFICATION The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". FIELD LENGTH MISSING The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". ILLEGAL FIELD TYPE The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". FIELD TYPE MISSING The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". MULTIPLE LITERAL TYPE The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". LITERAL MISSING The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". "AND" MISSING The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". END PARAGRAPH MUST BE EMPTY OR COMMENT The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". LENGTH OF ARRANGED RECORD > 32767 The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?".

47 A2 08UF

A-19

Sort/Merge User's Guide

List of Execution Error Messages (Cont'd) TD02.53 Meaning: TD02.54 Meaning: TD02.55 Meaning: TD02.56 Meaning: NO ZONE SPECIFIED IN ARRANGE LIST The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". OVER 128 ERRORS ON ABOVE LINE The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". NO VALID KEY SPECIFICATION OCCURRED The option string or DSL (Data Services Language) must be corrected. Each error is underlined by a "?". UNABLE TO CREATE SEGMENT The main segment (record segment) used for sorting cannot be created. A return code from H_SGCR is given. The error could be internal to Sort but most frequently : either too much memory is required for Sort (SIZE in JCL, SRTDEF) or the number of vacant entries is insufficient (linkage problem). UNABLE TO OPEN COMFILE A return code from H_OPEN is given. corrected. UNABLE TO GET DSL RECORD A return code from H_OPEN is given. The problem must be reported to Technical Support. UNABLE TO CLOSE COMFILE A return code from H_OPEN is given. The problem must be reported to Technical Support. ERRORS IN STATE IOF PARAMETERS A return code is given from H_STIOF. The problem must be reported to Technical Support. UNABLE TO IDENTIFY PRTFILE A return code is given from H_RTVLID. A user JCL error has occurred, or the problem must be reported to Technical Support. JCL must be

TD02.57 Meaning: TD02.58 Meaning: TD02.59 Meaning: TD02.60 Meaning: TD02.61 Meaning:

A-20

47 A2 08UF

Sort and Merge Error Messages

List of Execution Error Messages (Cont'd) TD02.62 Meaning: TD02.64 INFILES NUMBER IS < 2 OR > 8 Use INFILE if only one input file; 8 files is the maximum. SUM FIELD VV {OVERLAPS { SUM FIELD } WW} { { KEY FIELD } } { } {OUT OF ALL ARRANGE FIELDS } DSL must be corrected. VV, WW are the ranks of the fields involved among the sum or key fields. USER SORT KEYS ARE TOO LONG The total length of the sum or key fields exceeds 7000 bytes. The user program must be corrected. USER RECORD IS TOO LONG The sort record size exceeds 15000 bytes. Either the user record is too long or too many keys overlap. The user program must be corrected. INSUFFICIENT MEMORY SIZE The size parameter is too small according to the other parameters. The user program must be corrected. UNABLE TO CHANGE SEGMENT SIZE The main segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO CREATE SEGMENT The node segment (record segment) used for sorting cannot be created. A return code H_SGCR is given. The error could be internal to Sort but most frequently: either too much memory is required for Sort (SIZE in JCL,SRTDEF) or the number of vacant entries is insufficient (linkage problem). UNABLE TO CHANGE SEGMENT SIZE The node segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF).

Meaning:

TD03.01 Meaning: TD03.02 Meaning:

TD03.03 Meaning: TD03.04 Meaning:

TD03.05 Meaning:

TD03.06 Meaning:

47 A2 08UF

A-21

Sort/Merge User's Guide

List of Execution Error Messages (Cont'd) TD03.07 Meaning: UNABLE TO CHANGE SEGMENT SIZE The generated code segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO MODIFY SEGMENT ATTRIBUTES The problem must be reported to Technical Support. UNABLE TO CREATE SEGMENT The segment used for large COBOL key tables cannot be created. A return code from H_SGCR is given. The error could be internal to Sort but most frequently: either too much memory is required for Sort (SIZE in JCL,SRTDEF) or the number of vacant entries is insufficient (linkage problem). UNABLE TO CHANGE SEGMENT SIZE The segment used for large COBOL key tables cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO CHANGE SEGMENT SIZE The common sort segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO CHANGE SEGMENT SIZE A record storage area segment cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO MODIFY SEGMENT ATTRIBUTES The problem must be reported to Technical Support. UNABLE TO CREATE SEGMENT A return code H_SGCR is given. The error could be internal to Sort but most frequently: either too much memory is required for Sort (SIZE in JCL,SRTDEF) or the number of vacant entries is insufficient (linkage problem).

TD03.08 Meaning: TD03.09 Meaning:

TD03.10 Meaning:

TD03.11 Meaning:

TD03.12 Meaning:

TD03.13 Meaning: TD03.14 Meaning:

A-22

47 A2 08UF

Sort and Merge Error Messages

List of Execution Error Messages (Cont'd) TD03.15 Meaning: UNABLE TO CREATE SEGMENT A return code H_SGCR is given. The error could be internal to Sort but most frequently: either too much memory is required for Sort (SIZE in JCL,SRTDEF) or the number of vacant entries is insufficient (linkage problem). PARALLEL SORT ASKED BUT NOT PURCHASED Parallel sorts are available if you have the MI for the Extended Sort. If you have purchased the Extended Sort and you get this message, please report the problem to your Service Center. UNABLE TO CREATE SEGMENT A return code H_SGCR is given. The error could be internal to Sort but most frequently: either too much memory is required for Sort (SIZE in JCL,SRTDEF) or the number of vacant entries is insufficient (linkage problem). MEMORY FORCED PURCHASED SORT) TO 512K (LIMIT FOR NOT

TD03.16 Meaning:

TD03.17 Meaning:

TD03.18 Meaning:

For the Basic Sort, the memory limit is 512K bytes. If you want to use more memory during sorts, you must install the Extended Sort (separate MI). UNABLE TO DEFINE CHANNEL PROGRAM The problem must be reported to Technical Support. NO DISK WORK FILE ASSIGNED NO WORK FILES (SRTDEF) implies an already assigned work file which is not supplied. The user program must be corrected. UNABLE TO CREATE WORK FILE DEFINITION A dynamic FD (file definition table) is required and cannot be created. A return code from H_CRFD is given. It could be a linkage problem (ENTRYOV). UNABLE TO OPEN WORK FILE Check the work file state and assignment. If these are correct, then the problem must be reported to Technical Support.

TD04.01 Meaning: TD04.02 Meaning:

TD04.03 Meaning:

TD04.04 Meaning:

47 A2 08UF

A-23

Sort/Merge User's Guide

List of Execution Error Messages (Cont'd) TD04.05 Meaning: TD04.06 Meaning: TD04.07 Meaning: TD04.08 Meaning: TD04.09 Meaning: TD04.10 Meaning: TD04.11 Meaning: TD04.12 Meaning: TD04.13 Meaning: UNABLE TO RETRIEVE WORK FILE EXTENTS If RC = BUSY then SHARE = NORMAL. Otherwise the problem must be reported to Technical Support. MUCH TOO MANY EXTENTS IN WORK FILE The problem must be reported to Technical Support. Installation's resident disc space should be reorganized. WORK FILE IS NOT ALLOCATED IN CYLINDERS The user program must be corrected. ALL THE WORK FILE VOLUMES ARE NOT PREMOUNTED JCL must be corrected. WORK FILE IS NOT ON DISK JCL must be corrected. ALL THE WORK FILE EXTENTS ARE NOT IN CYLINDERS Abnormal file. The problem must be reported to Technical Support. SEVERAL DISK TYPES FOR WORK FILE JCL must be corrected. See your Service Center. INSUFFICIENT MEMORY SIZE The SIZE parameter is too small in relation to the other parameters. The user program must be corrected. WORK FILE OVERFLOW The work file has been extended as much as possible. It is still insufficient to hold the whole input file. Either the work file is actually too short or some incorrect parameter (record size, memory size) has caused an unexpected work file occupancy (e.g. one record per block). WORK FILE OVERFLOW : RECORD SIZES CHECK FOR AVERAGE

TD04.14 Meaning:

The work file is too small according to the Sort parameters (record size, number of records). The work file must be redefined.

A-24

47 A2 08UF

Sort and Merge Error Messages

List of Execution Error Messages (Cont'd) TD04.15 Meaning: UNABLE TO CREATE SEGMENT The buffer segment used for sorting cannot be created. A return code from H_SGCR is given. The error could be internal to Sort but most frequently : either too much memory is required for Sort (SIZE in JCL, SRTDEF) or the number of vacant entries is insufficient (linkage problem). UNABLE TO CHANGE SEGMENT SIZE The buffer segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL, SRTDEF). UNABLE TO LOCK B SEGMENT A return code from H_SGLOCK is given. Either SIZE is smaller than the locked memory needed or the problem must be reported to Technical Support. UNABLE TO CHANGE SEGMENT SIZE The main segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO GET SEMAPHORES Linkage problem (insufficient semaphore pool). caused by nested sorts. UNABLE TO CHANGE SEGMENT SIZE Could be

TD04.16 Meaning:

TD04.17 Meaning:

TD04.18 Meaning:

TD04.19 Meaning: TD04.20 Meaning:

The node segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). USER SORT KEYS ARE TOO LONG The total length of the sum or key fields exceeds 7000 bytes. The user program must be corrected. USER RECORD IS TOO LONG The sort record size exceeds 15000 bytes. Either the user record is too long or too many keys overlap. The user program must be corrected. UNABLE TO ALLOCATE DYNAMIC DISK WORK FILE A return code from H_DYNAL is given

TD04.21 Meaning: TD04.22 Meaning:

TD04.23 Meaning:

47 A2 08UF

A-25

Sort/Merge User's Guide

List of Execution Error Messages (Cont'd) TD04.24 Meaning: TD04.25 Meaning: TD04.26 Meaning: TD04.27 Meaning: TD04.28 Meaning: UNABLE TO ASSIGN DYNAMIC DISK WORK FILE A return code from H_DYNASG is given. UNABLE TO DEASSIGN DYNAMIC DISK WORK FILE A return code from H_DDASG is given. The problem must be reported to Technical Support. UNABLE TO CLOSE DYNAMIC DISK WORK FILE A return code from H_CLOSE is given. The problem must be reported to Technical Support. MEMORY_SORT OVERFLOW A memory-sort is required and the memory is too small. The user program must be corrected. UNABLE TO DELETE WORK FILE DEFINITION Sort is deleting useless FD (file definition table). A return code from H_DFLD is given. The problem must be reported to Technical Support. UNABLE TO IDENTIFY WORK FILE Sort is unable to determine which volume supports the work file ($H_RTVLID). A return code from H_RTVLID is given. SORT NESTING OVERFLOW Too many dynamic resources needed by nested sorts. SORT MEMORY TOO SHORT FOR WORK FILE FILE-BLOCK SIZE RC = 5F841807 --> TRID 4, LNERR If you receive this message, refer to the description of WKDISK[S] in Chapter 3 (JCL statement SORT). INTERNAL SORT ERROR The problem must be reported to Technical Support. INTERNAL SORT ERROR The problem must be reported to Technical Support.

TD04.29 Meaning: TD04.30 Meaning: TD04.31

Meaning: TD04.32 Meaning: TD04.33 Meaning:

A-26

47 A2 08UF

Sort and Merge Error Messages

List of Execution Error Messages (Cont'd) TD04.34 Meaning: TD04.35 Meaning: TD04.36 Meaning: TD04.37 Meaning: UNABLE TO EXTEND WORK FILE Self explanatory. UNABLE TO RETRIEVE WORK FILE DEFINITION The problem must be reported to Technical Support. NON SEQUENTIAL FILEORG OF WORKFILE IS RISKY AND SHOULD BE CHANGED Self-explanatory. JCL should be changed. UNABLE TO CREATE SEGMENT The segment used for work file extents description cannot be created. Return code from H_SGCR is given. The error could be internal to Sort but most frequently : either too much memory is required for Sort (SIZE in JCL, SRTDEF) or the vacant entries are insufficient (linkage problem). UNABLE TO CHANGE SEGMENT SIZE The segment used for work file extents description cannot be adjusted to the desired size. Return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL, SRTDEF). WORK FILE ASSIGNED ON FBO OR FSA VOLUMES IS NOT UFAS SEQUENTIAL Self-explanatory. JCL must be corrected. Return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO DEFINE CHANNEL PROGRAM The problem must be reported to Technical Support. UNABLE TO DELETE CHANNEL PROGRAM The problem must be reported to Technical Support. UNABLE TO CHANGE SEGMENT SIZE The main segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF).

TD04.38 Meaning:

TD04.39 Meaning:

TD06.01 Meaning: TD06.02 Meaning: TD06.03 Meaning:

47 A2 08UF

A-27

Sort/Merge User's Guide

List of Execution Error Messages (Cont'd) TD06.04 Meaning: UNABLE TO CHANGE SEGMENT SIZE The buffer segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). INTERNAL SORT ERROR The problem must be reported to Technical Support. INTERNAL SORT ERROR The problem must be reported to Technical Support. INTERNAL SORT ERROR The problem must be reported to Technical Support. UNABLE TO LOCK B_SEGMENT Return code from H_SGLOCK is given. Either $SIZE is smaller than the locked memory needed or the problem must be reported to Technical Support. UNABLE TO DEFINE CHANNEL PROGRAM The problem must be reported to Technical Support. UNABLE TO DELETE CHANNEL PROGRAM The problem must be reported to Technical Support. UNABLE TO CHANGE SEGMENT SIZE The main segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO CHANGE SEGMENT SIZE The main segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). INTERNAL SORT ERROR The problem must be reported to Technical Support. INTERNAL SORT ERROR The problem must be reported to Technical Support.

TD06.05 Meaning: TD06.06 Meaning: TD06.07 Meaning: TD06.08 Meaning:

TD08.01 Meaning: TD08.02 Meaning: TD08.03 Meaning:

TD08.04 Meaning:

TD08.05 Meaning: TD08.06 Meaning:

A-28

47 A2 08UF

Sort and Merge Error Messages

List of Execution Error Messages (Cont'd) TD08.07 Meaning: TD08.08 Meaning: TD08.09 Meaning: INTERNAL SORT ERROR The problem must be reported to Technical Support. INTERNAL SORT ERROR The problem must be reported to Technical Support. UNABLE TO LOCK B_SEGMENT Return code from H_SGLOCK is given. Either $SIZE is smaller than the locked memory needed or the problem must be reported to Technical Support. UNABLE TO DEFINE CHANNEL PROGRAM The problem must be reported to Technical Support. UNABLE TO DELETE CHANNEL PROGRAM The problem must be reported to Technical Support. UNABLE TO CHANGE SEGMENT SIZE The main segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO CHANGE SEGMENT SIZE The buffer segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). INTERNAL SORT ERROR The problem must be reported to Technical Support. INTERNAL SORT ERROR The problem must be reported to Technical Support. UNABLE TO MODIFY SEGMENT ATTRIBUTES The problem must be reported to Technical Support. UNABLE TO MODIFY SEGMENT ATTRIBUTES The problem must be reported to Technical Support.

TD10.01 Meaning: TD10.02 Meaning: TD10.03 Meaning:

TD10.04 Meaning:

TD10.05 Meaning: TD10.06 Meaning: TD10.07 Meaning: TD10.08 Meaning:

47 A2 08UF

A-29

Sort/Merge User's Guide

List of Execution Error Messages (Cont'd) TD10.09 Meaning: UNABLE TO CHANGE SEGMENT SIZE The generated code segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO CHANGE SEGMENT SIZE The node segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO CHANGE SEGMENT SIZE The node segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO CHANGE SEGMENT SIZE A buffer segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO LOCK B_SEGMENT SIZE A return code from H_SGLOCK is given. Either SIZE is smaller than the lock memory needed or the problem must be reported to the Service Center. UNABLE TO CHANGE SEGMENT SIZE A work segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO CHANGE SEGMENT SIZE A work segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO CHANGE SEGMENT SIZE A pseudo-buffer segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF).

TD10.10 Meaning:

TD10.11 Meaning:

TD10.12 Meaning:

TD10.13 Meaning:

TD10.14 Meaning:

TD10.15 Meaning:

TD10.16 Meaning:

A-30

47 A2 08UF

Sort and Merge Error Messages

List of Execution Error Messages (Cont'd) TD10.17 Meaning: TD12.01 Meaning: TD12.02 Meaning: TD12.03 Meaning: INTERNAL SORT ERROR The problem must be reported to Technical Support. UNABLE TO DEFINE CHANNEL PROGRAM The problem must be reported to Technical Support. UNABLE TO DELETE CHANNEL PROGRAM The problem must be reported to Technical Support. UNABLE TO CHANGE SEGMENT SIZE The main segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO CHANGE SEGMENT SIZE The node segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO CHANGE SEGMENT SIZE The generated code segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO CHANGE SEGMENT SIZE The buffer segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO MODIFY SEGMENT ATTRIBUTES The problem must be reported to Technical Support. UNABLE TO MODIFY SEGMENT ATTRIBUTES The problem must be reported to Technical Support. UNABLE TO CHANGE SEGMENT SIZE The segment used for large COBOL key tables cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF).

TD12.04 Meaning:

TD12.05 Meaning:

TD12.06 Meaning:

TD12.07 Meaning: TD12.08 Meaning: TD12.09 Meaning:

47 A2 08UF

A-31

Sort/Merge User's Guide

List of Execution Error Messages (Cont'd) TD12.10 Meaning: UNABLE TO CHANGE SEGMENT SIZE A pseudo-buffer segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). UNABLE TO LOCK B_SEGMENT A return code from H_SGLOCK is given. Either SIZE is smaller than the locked memory needed or the problem must be reported to Technical Support. UNABLE TO OPEN PRTFILE JCL error or the problem must be reported to Technical Support. UNABLE TO CREATE PRTFILE BANNER Incorrect PRTFILE or the problem must be reported to Technical Support. UNABLE TO CREATE RECORD 118 ON PRTFILE Incorrect PRTFILE or the problem must be reported to Technical Support. UNABLE TO PUT RECORD ON PRTFILE Incorrect PRTFILE or the problem must be reported to Technical Support. INCONSISTENT DATA : DATA LOSS When the ENDSRT procedure was called, the number of returned entities was lower than the number of released entities. INCONSISTENT DATA : DATA GAIN When the ENDSRT procedure was called, the number of returned entities was greater than the number of released entities. UNABLE TO OPEN LOGFILE The LOGFILE JCL parameter must be corrected or the problem must be reported to Technical Support.

TD12.11 Meaning:

TD14.01 Meaning: TD14.02 Meaning: TD14.03 Meaning: TD14.04 Meaning: TD14.05 Meaning:

TD14.06 Meaning:

TD14.07 Meaning:

A-32

47 A2 08UF

Sort and Merge Error Messages

List of Execution Error Messages (Cont'd) TD14.08 Meaning: TD14.09 Meaning: TD14.10 Meaning: TD14.11 Meaning: TD14.12 Meaning: TD14.13 Meaning: TD14.14 Meaning: TD14.15 Meaning: TD14.16 Meaning: TD18.01 Meaning: LOGFILE OVERFLOW The LOGFILE assignment is not correct or the DSL implies that many invalid records have been put in the LOGFILE. UNABLE TO PUT RECORD ON LOGFILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. UNABLE TO CLOSE LOGFILE The problem must be reported to Technical Support. UNABLE TO CORRECTLY RESET SORT RESOURCES ** ** ** ** The problem must be reported to Technical Support. END OF FILE REACHED BEFORE LAST RECORD TO BE PROCESSED The HALT option indicated more records than there are in the file. This is only a warning issued by the module XX. OUTFILE IS EMPTY The user is advised that there is no output record. This is only a warning issued by the module XX. CHECK FOR RECORD TRUNCATION The user has defined the output record shorter than the input record. This is only a warning issued by the module XX. CHECK FOR RECORD PADDING The user has defined the output record longer than the input record. This is only a warning issued by the module XX. UNABLE TO CHANGE SEGMENT SIZE The main segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. UNABLE TO GET RECORD/BLOCK FROM INPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support.

47 A2 08UF

A-33

Sort/Merge User's Guide

List of Execution Error Messages (Cont'd) TD18.02 Meaning: TD18.03 Meaning: TD19.01 Meaning: TD19.02 Meaning: TD19.03 Meaning: TD19.04 Meaning: UNABLE TO CLOSE INPUT FILE The problem must be reported to Technical Support. UNABLE TO CLOSE LOGFILE The problem must be reported to Technical Support. UNABLE TO RETRIEVE INPUT FILE IDENTIFICATION The problem must be reported to Technical Support. UNABLE TO OPEN INPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. UNABLE TO GET RECORD/BLOCK FROM INPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. UNABLE TO RETRIEVE GETCI, CHECKCI ADDRESS FOR INPUT FILE Check file labels, characteristics, assignment (UFAS involved). If they are correct, the problem must be reported to Technical Support. INVALID INPUT RECFORM) FILE PARAMETER (FILEFORM OR

TD19.05 Meaning: TD22.01 Meaning: TD22.02 Meaning: TD22.03 Meaning:

Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. UNABLE TO PUT RECORD/BLOCK ON OUTPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. UNABLE TO CLOSE OUTPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. OUTPUT FILE OVERFLOW Either the output file is actually too small or some incorrect parameter (e.g. output record or block size) implies an abnormal output file occupancy (e.g. one record per block).

A-34

47 A2 08UF

Sort and Merge Error Messages

List of Execution Error Messages (Cont'd) TD22.04 Meaning: TD22.05 Meaning: TD23.01 Meaning: TD23.02 Meaning: TD23.03 Meaning: TD23.04 Meaning: UNABLE TO GET RECORD/BLOCK FROM INPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. UNABLE TO CLOSE INPUT FILE The problem must be reported to Technical Support. UNABLE TO OPEN OUTPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. UNABLE TO PUT RECORD/BLOCK ON OUTPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. UNABLE TO RETRIEVE GETCI, CHECKCI ADDRESS FOR OUTPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. OUTPUT FILE OVERFLOW Either the output file is actually too small or some incorrect parameter (e.g. output record or block size) implies an abnormal output file occupancy (e.g. one record per block). INVALID INPUT RECFORM) FILE PARAMETER (FILEFORM OR

TD23.05 TD23.06 Meaning: Meaning: TD25.01 Meaning: TD25.02 Meaning:

UNABLE TO PUT RECORD/BLOCK ON OUTPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. CHECKPOINT ERROR The checkpoint conditions are probably not satisfied. If so, then the program or the JCL must be corrected. BREAK POINT : QUIT An abort has been requested by the response QUIT.

47 A2 08UF

A-35

Sort/Merge User's Guide

List of Execution Error Messages (Cont'd) TD25.03 Meaning: TD26.01 Meaning: TD26.02 Meaning: INTERNAL SORT ERROR The problem must be reported to Technical Support. ONLY OUTPUT=DATA IS CORRECT FOR TAPE INPUT FILES JCL or DSL must be corrected. MIN IS GREATER THAN MAXIMAL INPUT RECORD LENGTH JCL or DSL or SRTDEF must be corrected. MIN is defined as the length of the shortest record which can hold all the KEY, ARRANGE, SUM and INCLUDE/OMIT fields. INCLUDE/OMIT FIELD END OUT OF MINIMAL INPUT RECORD JCL or DSL must be corrected. MIN is defined as the length of the shortest record which can hold all the KEY, ARRANGE, SUM and INCLUDE/OMIT fields. KEY/SUM/ARRANGE FIELD END OUT OF MINIMAL INPUT RECORD JCL or DSL must be corrected. MIN is defined as the length of the shortest record which can hold all the KEY, ARRANGE, SUM and INCLUDE/OMIT fields. AVERAGE IS GREATER THAN MAXIMAL INPUT RECORD LENGTH JCL or DSL must be corrected. AVERAGE IS LOWER THAN MINIMAL INPUT RECORD LENGTH JCL or DSL must be corrected. MIN is defined as the length of the shortest record which can hold all the KEY, ARRANGE, SUM and INCLUDE/OMIT fields. DUMMY INPUT FILE This function is not available. The user program must be corrected.

TD26.03 Meaning:

TD26.04 Meaning:

TD26.05 Meaning: TD26.06 Meaning:

TD26.07 Meaning:

A-36

47 A2 08UF

Sort and Merge Error Messages

List of Execution Error Messages (Cont'd) TD26.08 Meaning: UNABLE TO RETRIEVE INPUT FILE DEFINITION The sort cannot determine the characteristics of the input file. A return code from H_RFLDEF or a return code set by Sort is given. JCL error or non-standard file. TD26.09 Meaning: TD26.10 Meaning: TD26.11 Meaning: ERRORS IN SORT PARAMETERS This message is only a general title for specific messages. USER SORT KEYS ARE TOO LONG The SUM or KEY field length exceeds 7000 bytes. The user program must be corrected. USER RECORD IS TOO LONG The sort record size exceeds 15000 bytes. Either the user record is too long or too many keys overlap. The user program must be corrected. TD26.12 Meaning: TD26.13 Meaning: TD26.14 Meaning: TD26.15 Meaning: UNABLE TO OPEN INPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. UNABLE TO GET RECORD/BLOCK FROM INPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. UNABLE TO CLOSE INPUT FILE The problem must be reported to Technical Support. UNABLE TO CHANGE SEGMENT SIZE The main segment used for sorting cannot be adjusted to the desired size. A return code from H_SGSIZE is given. Generally caused by the SIZE parameter (JCL,SRTDEF). INVALID MONITORED SORT_INPUT_FILE ASSIGNMENT Conditions for use of "SHARE = MONITOR" (GAC) for input file assignment are not satisfied. JCL must be corrected.

TD26.16 Meaning:

47 A2 08UF

A-37

Sort/Merge User's Guide

List of Execution Error Messages (Cont'd) TD26.17 Meaning: TD26.64 UNABLE TO GET INPUT FILE SIZE Check the input file assignment in your JCL. If it is correct, please contact your Service Center, or submit a STAR. END OF { INCLUDE } ZZZZZ IS BEYOND INPUT RECORD SIZE { OMIT } { KEY } { SUM } { ARRANGE } ZZZZZ = rank of the field which is beyond the record size. Meaning: The involved field ends beyond the end of the input record. The DSL or the user program must be corrected. TD27.01 Meaning: UNABLE TO RETRIEVE OUTPUT FILE DEFINITION The sort cannot discover the characteristics of the output file. A return code from H_RFLDEF or a return code set by Sort is given. JCL error or non-standard file. DUMMY OUTPUT FILE This function is not available. UNABLE TO OPEN OUTPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. UNABLE TO CLOSE OUTPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. UNABLE TO ALLOCATE OUTPUT FILE Check the other messages which accompany this one. These will be of the form DUxx.yy (PREALLOC). See the desciption of PREALLOC in the Data Management Utilities User Guide. Generally, the problem is due either to a shortage of disk space or to a bad file definition.

TD27.02 Meaning: TD27.03 Meaning: TD27.04 Meaning: TD27.05 Meaning:

A-38

47 A2 08UF

Sort and Merge Error Messages

List of Execution Error Messages (Cont'd) TD30.21 Meaning: ATTEMPT TO REQUEST A SORTED RECORD AFTER END OF SORT_OUTPUT The program or processor calling Sort is erroneously starting an infinite loop after the H_RETSRT primitive has returned the return code DATALIM, or after the COBOL verb RETURN has activated the paragraph or Chapter "AT END". KEY SEQUENCE ERROR User error : at least one merge input file is out of sequence according to merge key(s) specifications. The unsorted input file and the concerned input record rank appear in the subsequent merge report lines. UNABLE TO CREATE SEGMENT A return code from H_SGCR is given. The error could be internal to Sort but most frequently : either too much memory is required for Sort (SIZE in JCL, SRTDEF) or the UNABLE TO GET SEMAPHORES Linkage problem (insufficient semaphore pool). caused by nested sorts. UNABLE TO DEFINE CHANNEL PROGRAM The problem must be reported to Technical Support. UNABLE TO DEFINE CHANNEL PROGRAM The problem must be reported to Technical Support. UNABLE TO GET RECORD/BLOCK FROM INPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. UNABLE TO GET RECORD/BLOCK FROM INPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. UNABLE TO GET RECORD/BLOCK FROM INPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. UNABLE TO START A SERVANT PROCESS Check if you have tried to run a multi-process LM. If not, the problem must be reported to Technical Support. Could be

TD31.22 Meaning:

TD33.01 Meaning:

TD33.02 Meaning: TD33.03 Meaning: TD33.04 Meaning: TD33.05 Meaning: TD33.06 Meaning: TD33.07 Meaning: TD33.08 Meaning:

47 A2 08UF

A-39

Sort/Merge User's Guide

List of Execution Error Messages (Cont'd) TD33.09 Meaning: TD33.10 Meaning: TD33.11 Meaning: TD34.01 Meaning: TD34.02 Meaning: TD34.03 Meaning: INTERNAL SORT ERROR The problem must be reported to Technical Support. INTERNAL SORT ERROR The problem must be reported to Technical Support. INTERNAL SORT ERROR The problem must be reported to Technical Support. UNABLE TO DELETE CHANNEL PROGRAM The problem must be reported to Technical Support. UNABLE TO DELETE CHANNEL PROGRAM The problem must be reported to Technical Support. UNABLE TO CREATE SEGMENT A return code from H_SGCR is given. The error could be internal to Sort but most frequently : either too much memory is required for Sort (SIZE in JCL, SRTDEF) or the UNABLE TO CREATE SEGMENT A return code from H_SGCR is given. The error could be internal to Sort but most frequently : either too much memory is required for Sort (SIZE in JCL, SRTDEF) or the UNABLE TO CREATE SEGMENT A return code from H_SGCR is given. The error could be internal to Sort but most frequently : either too much memory is required for Sort (SIZE in JCL, SRTDEF) or the UNABLE TO CREATE SEGMENT A return code from H_SGCR is given. The error could be internal to Sort but most frequently : either too much memory is required for Sort (SIZE in JCL, SRTDEF) or the UNABLE TO CREATE SEGMENT A return code from H_SGCR is given. The error could be internal to Sort but most frequently : either too much memory is required for Sort (SIZE in JCL, SRTDEF) or the

TD34.04 Meaning:

TD35.01 Meaning:

TD35.02 Meaning:

TD35.03 Meaning:

A-40

47 A2 08UF

Sort and Merge Error Messages

List of Execution Error Messages (Cont'd) TD35.04 Meaning: UNABLE TO CREATE SEGMENT A return code from H_SGCR is given. The error could be internal to Sort but most frequently : either too much memory is required for Sort (SIZE in JCL, SRTDEF) or the UNABLE TO CREATE SEGMENT A return code from H_SGCR is given. The error could be internal to Sort but most frequently : either too much memory is required for Sort (SIZE in JCL, SRTDEF) or the UNABLE TO CREATE SEGMENT A return code from H_SGCR is given. The error could be internal to Sort but most frequently : either too much memory is required for Sort (SIZE in JCL, SRTDEF) or the UNABLE TO GET SEMAPHORES Linkage problem (insufficient semaphore pool). caused by nested sorts. UNABLE TO DEFINE CHANNEL PROGRAM The problem must be reported to Technical Support. UNABLE TO DEFINE CHANNEL PROGRAM The problem must be reported to Technical Support. UNABLE TO GET RECORD/BLOCK FROM INPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. UNABLE TO GET RECORD/BLOCK FROM INPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. UNABLE TO GET RECORD/BLOCK FROM INPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. UNABLE TO GET RECORD/BLOCK FROM INPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. Could be

TD35.05 Meaning:

TD35.06 Meaning:

TD35.07 Meaning: TD35.08 Meaning: TD35.09 Meaning: TD35.10 Meaning: TD35.11 Meaning: TD35.12 Meaning: TD35.13 Meaning:

47 A2 08UF

A-41

Sort/Merge User's Guide

List of Execution Error Messages (Cont'd) TD35.14 Meaning: TD35.15 Meaning: TD35.16 Meaning: TD35.17 Meaning: TD35.18 Meaning: TD36.01 Meaning: UNABLE TO GET RECORD/BLOCK FROM INPUT FILE Check file labels, characteristics, assignment. If they are correct, the problem must be reported to Technical Support. UNABLE TO DELETE CHANNEL PROGRAM The problem must be reported to Technical Support. UNABLE TO DELETE CHANNEL PROGRAM The problem must be reported to Technical Support. UNABLE TO START A SERVANT PROCESS Check if you have tried to run a multi-process LM. If not, the problem must be reported to Technical Support. INTERNAL SORT ERROR The problem must be reported to Technical Support. UNABLE TO CREATE SEGMENT A return code from H_SGCR is given. The error could be internal to Sort but most frequently : either too much memory is required for Sort (SIZE in JCL, SRTDEF) or the UNABLE TO DEFINE CHANNEL PROGRAM The problem must be reported to Technical Support. UNABLE TO DEFINE CHANNEL PROGRAM The problem must be reported to Technical Support. UNABLE TO DELETE CHANNEL PROGRAM The problem must be reported to Technical Support. UNABLE TO DELETE CHANNEL PROGRAM The problem must be reported to Technical Support. UNABLE TO CREATE WORK FILE DEFINITION A dynamic FD (file definition table) is required and cannot be created. A return code from H_CRFD is given. It could be a linkage problem (ENTRYOV).

TD36.02 Meaning: TD36.03 Meaning: TD36.04 Meaning: TD36.05 Meaning: TD37.01 Meaning:

A-42

47 A2 08UF

Sort and Merge Error Messages

List of Execution Error Messages (Cont'd) TD37.02 Meaning: TD37.03 Meaning: TD37.04 Meaning: UNABLE TO ASSIGN DYNAMIC DISK WORK FILE A return code from H_DYNASG is given. UNABLE TO RETRIEVE WORK FILE DEFINITION The problem must be reported to Technical Support. UNABLE TO DELETE WORK FILE DEFINITION Sort is deleting useless FD (file definition table). The return code from H_DLFD is given. The problem must be reported to Technical Support. UNABLE TO ALLOCATE DYNAMIC DISK WORK FILE A return code from H_DYNAL is given. TOO FEW WORK DISKS (<2) FOR A PARALLEL SORT Self-explanatory. UNABLE TO RETRIEVE WORK FILE DEFINITION The problem must be reported to Technical Support. UNABLE TO IDENTIFY WORK FILE Sort is unable to know which volume supports the workfile ($H_RTVLID). The return code from H_RTVLID is given. STATIC H_WSTAxx ASSIGNMENTS CONSECUTIVE FROM H_WSTA01 Self-explanatory. H_SRTWKD AND H_WSTAxx CAN'T BE TOGETHER ASSIGNED Self-explanatory. USER SORT CALL VIOLATION The primitives H_BEGSRT, H_RELSRT, H_SRT, H_RETSRT and H_ENDSRT have been called in the wrong order. In COBOL, this incorrect order could be caused by wrong end of paragraph, section ... etc. MUST BE

TD37.05 Meaning: TD37.06 Meaning: TD37.07 Meaning: TD37.08 Meaning: TD37.09 Meaning: TD37.10 Meaning: TD99.99 Meaning:

47 A2 08UF

A-43

Sort/Merge User's Guide

A-44

47 A2 08UF

B. Sort/Merge Report

The contents of the Sort/Merge Report, which is produced in a SYSOUT subfile are determined by the value assigned by the user to the REPORT parameter of the SORT/GSORT or MERGE/GMERGE JCL statement. Specifiable values are AUDIT, PARAM, ALL, or NONE. The appearance of Sort Execution Diagnostics or Sort Parameter Diagnostics terminate the report. If Sort itself aborts (independently from DSL) the information corresponding to INTINFO will still be available. Report for the New Sort Product There is no change in the sort report for a mono-process sort. For a parallel sort, there is a global sort report as for a mono-process sort. If you specify INTINFO (internal information, in the DSL), you will get the global sort report and a report of the same form for each slave sort. There is no change in the merge report.

B.1

REPORT = ALL
The following is an example of a Sort Report with REPORT = ALL (full report):
******* SORT REPORT ******* **** SORT PARAMETER LISTING **** FUNCTION: DUPREC = FIFO INTINFO RECORD : KEY = 1 10 END : **** END OF SORT REPORT **** **** SORT AUDIT INFORMATION **** INPUT FILE : TRID.ALEA150 OUTPUT FILE : ;102478.OUTALEA TOTAL NUMBER OF RECORDS READ : 10000 TOTAL NUMBER OF RECORDS WRITTEN : 10000 TOTAL NUMBER OF RECORDS OMITTED : 0 TOTAL NUMBER OF RECORDS DELETED : 0 TOTAL NUMBER OF INVALID RECORDS : 0 % OF WORK FILE SPACE USED : 62 INFILE: FILEFORM=BFAS, FILEORG=SEQUENTIAL, RECFORM=FB, BLKSZ=5000, RECSZ=50 OUTFILE: FILEFORM=BFAS, FILEORG=SEQUENTIAL, RECFORM=FB, BLKSZ=6000, RECSZ=50 **** SORT INTERNAL VALUES **** SORTALGO: SORTFRM=FO, ARTBSZ=54, BLKART=3890, BLKDES1=3890, BLKDES2=3890 NBSORTMEM=500, MAXNBSORTMEM=731, MAXNBDES=14, MRGORDER= 6 NBMONOPH1=11, NB EXPECTED=10, NBPHASE2= 0 **** END OF SORT REPORT ****

47 A2 08UF

B-1

Sort/Merge User's Guide

B.2

REPORT = AUDIT (DEFAULT)

Without INTINFO
******* SORT REPORT ******* **** SORT AUDIT INFORMATION **** INPUT FILE : TRID.ALEA150 OUTPUT FILE : ;102478.OUTALEA TOTAL NUMBER OF RECORDS READ : 10000 TOTAL NUMBER OF RECORDS WRITTEN : 10000 TOTAL NUMBER OF RECORDS OMITTED : 0 TOTAL NUMBER OF RECORDS DELETED : 0 TOTAL NUMBER OF INVALID RECORDS : 0 % OF WORK FILE SPACE USED : 62 INFILE: FILEFORM=BFAS, FILEORG=SEQUENTIAL, RECFORM=FB, BLKSZ=5000, RECSZ=50 OUTFILE: FILEFORM=BFAS, FILEORG=SEQUENTIAL, RECFORM=FB, BLKSZ=6000, RECSZ=50 **** END OF SORT REPORT ****

With INTINFO
******* SORT REPORT ******* **** SORT AUDIT INFORMATION **** INPUT FILE : TRID.ALEA150 OUTPUT FILE : ;102478.OUTALEA TOTAL NUMBER OF RECORDS READ : 10000 TOTAL NUMBER OF RECORDS WRITTEN : 10000 TOTAL NUMBER OF RECORDS OMITTED : 0 TOTAL NUMBER OF RECORDS DELETED : 0 TOTAL NUMBER OF INVALID RECORDS : 0 % OF WORK FILE SPACE USED : 62 INFILE : FILEFORM=BFAS, FILEORG=SEQUENTIAL, RECFORM=FB, BLKSZ=5000, RECSZ=50 OUTFILE : FILEFORM=BFAS, FILEORG=SEQUENTIAL, RECFORM=FB, BLKSZ=6000, RECSZ=50 **** SORT INTERNAL VALUES **** SORTALGO=SORTFRM=FO, ARTBSZ= 54, BLKART=3890, BLKDES1=3890, BLKDES2=3890 NBSORTMEM=500, MAXNBSORTMEM=731, MAXNBDES=14, MRGORDER=6 NBMONOPH1=11, NB EXPECTED=10, NBPHASE2=0 **** END OF SORT REPORT ****

With Variable Length Record Format


******* SORT REPORT ******* **** SORT AUDIT INFORMATION **** INPUT FILE : UFRELV OUTPUT FILE : ;208711.A TOTAL NUMBER OF RECORDS READ : 3740 TOTAL NUMBER OF RECORDS WRITTEN : 3740 TOTAL NUMBER OF RECORDS OMITTED : 0 TOTAL NUMBER OF RECORDS DELETED : 0 TOTAL NUMBER OF INVALID RECORDS : 0 AVERAGE INPUT RECORD SIZE : 50 SORT INTERNAL RECORD SIZE : 90 % OF WORK FILE SPACE USED : 3 WORK USED IN % OF INFILE : 174 INFILE : FILEFORM=UFAS, FILEORG=DIR./REL., RECFORM=V, BLKSZ=4096, RECSZ=129 OUTFILE : FILEFORM=UFAS, FILEORG=DIR./REL., RECFORM=V, BLKSZ=4096, RECSZ=129 **** END OF SORT REPORT ****

B-2

47 A2 08UF

Sort/Merge Report

B.3

REPORT = PARAM
In this case, only SORT PARAMETER LISTING is available (see above). ******* SORT REPORT ******* FUNCTION: DUPREC=FIFO INTINFO RECORD: KEY = 1 10 END:

B.4

REPORT = NONE
A Sort Report is not given unless there are errors, in which case the same listing as for REPORT = AUDIT with INTINFO will be given.

47 A2 08UF

B-3

Sort/Merge User's Guide

B-4

47 A2 08UF

C. Collating Sequences

The table below shows the collating sequences available with Sort. The table shows the characters in ascending order, from top to bottom, and left to right. They begin with the "low-value" and finish with the "high-value". Table C-1. EBCDIC (DPS 7000) PLW Character Set (1/4)

EBCDIC hexa 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F

Graphic low-val

H36 punch 12-0-1-8-9 12-1-9 12-2-9 12-3-9 12-4-9 12-5-9 12-6-9 12-7-9 12-8-9 12-1-8-9 12-2-8-9 13-3-8-9 12-4-8-9 12-5-8-9 12-6-8-9 12-7-8-9 12-11-8-9 11-1-9 11-2-9 11-3-9 11-4-9 11-5-9 11-6-9 11-7-9 11-8-9 11-1-8-9 11-2-8-9 11-3-8-9 11-4-8-9 11-5-8-9 11-6-8-9 11-7-8-9

EBCDIC decimal 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F

Graphic

H36 punch 11-0-1-8-9 0-1-9 0-2-9 0-3-9 0-4-9 0-5-9 0-6-9 0-7-9 0-8-9 0-1-8-9 0-2-8-9 0-3-8-9 0-4-8-9 0-5-8-9 0-6-8-9 0-7-8-9 12-11-0-8-9 1-9 2-9 3-9 4-9 5-9 6-9 7-9 8-9 1-8-9 2-8-9 3-8-9 4-8-9 5-8-9 6-8-9 7-8-9

47 A2 08UF

C-1

Sort/Merge User's Guide

Table C-1. EBCDIC (DPS 7000) PLW Character Set (2/4)

EBCDIC hexa 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F

Graphic space [ . < ( + ! & ] $ * ) ; ^

H36 punch no punches 12-0-19 12-0-2 12-0-3-9 12-0-4-9 12-0-5-9 12-0-6-9 12-0-7-9 12-0-8-9 12-1-8 12-2-8 12-3-8 12-4-8 12-5-8 12-6-8 12-7-8 12-11-1-9 12-11-2-9 12-11-3-9 12-11-4-9 12-11-5-9 12-11-6-9 12-11-7-9 12-11-8-9 11-1-8 11-2-8 11-3-8 11-4-8 11-5-8 11-6-8 11-7-8

EBCDIC decimal 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F

Graphic / 'A A N ' % > ? E I` ' ' : # @ ' = "

H36 punch 11 0-1 11-0-2-9 11-0-3-9 11-0-4-9 11-0-5-9 11-0-6-9 11-0-7-9 11-0-8-9 0-1-8 12-11 0-3-8 0-4-8 0-5-8 0-6-8 0-7-8 12-11-0 12-11-0-1-9 12-11-0-2-9 12-11-0-3-9 12-11-0-4-9 12-11-0-5-9 12-11-0-6-9 12-11-0-7-9 12-11-0-8-9 1-8 2-8 3-8 4-8 5-8 6-8 7-8

C-2

47 A2 08UF

Collating Sequences

Table C-1. EBCDIC (DPS 7000) PLW Character Set (3/4)

EBCDIC hexa 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F

Graphic a b c d e f g h i

H36 punch 12-0-1-8 12-0-1 12-0-2 12-0-3 12-0-4 12-0-5 12-0-6 12-0-7 12-0-8 12-0-9 12-0-2-8 12-0-3-8 12-0-4-8 12-0-5-8 12-0-6-8 12-0-7-8 12-11-1-8 12-11-1 12-11-2 12-11-3 12-11-4 12-11-5 12-11-6 12-11-7 12-11-8 12-11-9 12-11-2-8 12-11-3-8 12-11-4-8 12-11-5-8 12-11-6-8 12-11-7-8

EBCDIC decimal A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF

Graphic ~ s t u v w x y z i ?

H36 punch 11-0-1-8 11-0-1 11-0-2 11-0-3 11-0-4 11-0-5 11-0-6 11-0-7 11-0-8 11-0-9 11-0-2-8 11-0-3-8 11-0-4-8 11-0-5-8 11-0-6-8 11-0-7-8 12-11-0-1-8 12-11-0-1 12-11-0-2 12-11-0-3 12-11-0-4 12-11-0-5 12-11-0-6 12-11-0-7 12-11-0-8 12-11-0-9 12-11-0-2-8 12-11-0-3-8 12-11-0-4-8 12-11-0-5-8 12-11-0-6-8 12-11-0-7-8

j k l m n o p q r a o

47 A2 08UF

C-3

Sort/Merge User's Guide

Table C-1. EBCDIC (DPS 7000) PLW Character Set (4/4)

EBCDIC hexa C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF

Graphic { A B C D E F G H I } J K L M N O P Q R

H36 punch 12-0 12-1 12-2 12-3 12-4 12-5 12-6 12-7 12-8 12-9 12-0-2-8-9 12-0-3-8-9 12-0-4-8-9 12-0-5-8-9 12-0-6-8-9 12-0-7-8-9 11-0 11-1 11-2 11-3 11-4 11-5 11-6 11-7 11-8 11-9 12-11-2-8-9 12-11-3-8-9 12-11-4-8-9 12-11-5-8-9 12-11-7-8-9 12-11-2-8-9

EBCDIC decimal E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF

Graphic \ S T U V W X Y Z O 0 1 2 3 4 5 6 7 8 9 U

H36 punch 0-2-8 11-0-1-9 0-2 0-3 0-4 0-5 0-6 0-7 0-8 0-9 11-0-2-8-9 11-0-3-8-9 11-0-4-8-9 11-0-5-8-9 11-0-6-8-9 11-0-7-8-9 0 1 2 3 4 5 6 7 8 9 12-11-0-2-8-9 12-11-0-3-8-9 12-11-0-4-8-9 12-11-0-5-8-9 12-11-0-6-8-9 12-11-0-7-8-9

C-4

47 A2 08UF

Collating Sequences

Table C-2 below shows the collating sequence for the Series 100 character set. The left-most column gives the original internal value of the character in a Series 100 system. The right-most column shows the hexadecimal value which the character has after translation into the DPS 7000 environment. Table C-2. Series 100 Character Set (1/2)

Hexadecimal pre-translation 00 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F

Graphic low-val 0 1 2 3 4 5 6 7 8 9 [ # @ : > ? space A B C D E F G H I & . ] ( < \ 0 1 2 3 4 5 6 7 8 9 8-2 8-3 8-4 8-5 8-6 8-7

H14 punch

H36 punch

EBCDIC 00

0 1 2 3 4 5 6 7 8 9 12-8-2 8-3 8-4 8-5 8-6 8-7 no punches 12-1 12-2 12-3 12-4 12-5 12-6 12-7 12-8 12-9 12 12-8-3 12-8-2 12-8-5 12-8-4 0-8-2

F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 4A 7B 7C 7A 6E 6F 40 C1 C2 C3 C4 C5 C6 C7 C8 C9 50 4B 4F 4D 4C E0

no punches 12-1 12-2 12-3 12-4 12-5 12-6 12-7 12-8 12-9 12 12-8-3 12-8-4 12-8-5 12-8-6 12-8-7

47 A2 08UF

C-5

Sort/Merge User's Guide

Table C-2. Series 100 Character Set (2/2)

Hexadecimal pre-translation A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF FF

Graphic

H14 punch 11-0 11-1 11-2 11-3 11-4 11-5 11-6 11-7 11-8 11-9 11 11-8-3 11-8-4 11-8-5 11-8-6 11-8-7 12-0 0-1 0-2 0-3 0-4 0-5 0-6 0-7 0-8 0-9 0-8-2 0-8-3 0-8-4 0-8-5 0-8-6 0-8-7

H36 punch 11-8-7 11-1 11-2 11-3 11-4 11-5 11-6 11-7 11-8 11-9 11 11-8-3 11-8-4 11-8-5 11-8-6 8-5 12-8-6 0-1 0-2 0-3 0-4 0-5 0-6 0-7 0-8 0-9 0-8-5 0-8-3 0-8-4 8-6 8-7 11-8-2

EBCDIC 5F D1 D2 D3 D4 D5 D6 D7 D8 D9 60 5B 5C 5D 5E 7D 4E 61 E2 E3 E4 E5 E6 E7 E8 E9 6D 6B 7C 7E 7F 5A FF

J K L M N O P Q R $ * ) ; , + / S T U V W X Y Z
-

' % = " ! hi-val

NOTE:

When two entries appear in the graphic column in Table C-5, the first graphic is the original Series 100 character and the second is the graphic value after translation into EBCDIC.

C-6

47 A2 08UF

Collating Sequences

Table C-3 shows the effect of COLLATE = H200 on EBCDIC files. When two graphics are present (special characters), the first is the Series 200 value and the second is the equivalent in DPS 7000. Table C-3. H2000 Collating Sequence for EBCDIC Files

H200 graphic 0 1 2 3 4 5 6 7 8 9 \ = : space > & + {

EBCDIC hexa F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 7D 7E 7A 40 6E 50 4E C0

H200 graphic A B C D E F G H I ; . ) % ? } a b c d e f g h i

EBCDIC hexa C1 C2 C3 C4 C5 C6 C6 C8 C9 81 82 83 84 85 86 87 88 89

H200 graphic J K L M N O P Q R j k l m n o p q r

EBCDIC hexa D1 D2 D3 D4 D5 D6 D6 D8 D9 91 92 93 94 95 96 97 98 99

H200 graphic S T U V W X Y Z / s t u v w x y z

EBCDIC hexa 61 E2 E3 E4 E5 E6 E7 E8 E9 A2 A3 A4 A5 A6 A7 A8 A9

60

E5 4B 5D 6C 5F 6F

D0

# $ * " \ ! <

7B 5B 5C 7E E0 5A 4C

@ , ( | . c

7C 6B 4D 4F 6D 4A

NOTE:

All other hexadecimal values have the same collating sequence value as EBCDIC hexa 5F. Double entries in the table such as "A a C1 81" indicate that the values are equivalent for collating purposes.

47 A2 08UF

C-7

Sort/Merge User's Guide

Table C-4 shows the effect of COLLATE = ASCII for an EBCDIC file. Table C-4. ASCII Collating Sequence (1/2)

Graphic NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI DLE DC1 DC2 TM DC4 NAK SYN ETB CAN EM SUB ESC IFS IGS IRS IUS

EBCDIC hexa 00 01 02 03 37 2D 2E 2F 16 05 25 0B 0C 0D 0E 0F 10 11 12 13 3C 3D 32 26 18 19 3F 27 1C 1D 1E 1F

Graphic space " # $ % & \ ( ) * + ' . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ?

EBCDIC hexa 40 4F 7F 7B 5B 6C 50 7D 4D 5D 5C 4E 6E 60 4B 61 F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 7A 5E 4C 7E 6E 6F

Graphic

EBCDIC hexa 7C C1 C2 C3 C4 C5 C6 C7 C8 C9 D1 D2 D3 D4 D5 D6 D7 D8 D9 E2 E3 E4 E5 E6 E7 E8 E9 4A E0 5A 5F 6D

Graphic

EBCDIC hexa 79 81 82 83 84 85 86 87 88 89 91 92 93 94 95 96 97 98 99 A2 A3 A4 A5 A6 A7 A8 A9 C0 6A D0 A1 07

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z c \ ! -

a b c d e f g h i j k l m n o p q r s t u v w x y z { : } DEL

C-8

47 A2 08UF

Collating Sequences

Table C-4. ASCII Collating Sequence (2/2)

Graphic DS SOS FS BYP NL LC IL SM CU2 RLF SMM CU1

EBCDIC hexa 20 21 22 23 24 15 06 17 28 29 2A 2B 2C 09 0A 1B 30 31 1A 33 34 35 35 36 08 38 39 3A 3B 04 14 3E E1

Graphic

EBCDIC hexa 41 42 43 44 45 46 47 48 49 51 52 53 54 55 56 57 58 59 62 63 64 65 65 66 67 68 69 70 71 72 73 74 75

Graphic

EBCDIC hexa 76 77 78 80 8A 8B 8C 8D 8E 8F 90 9A 9B 9C 9D 9E 9F A0 AA AB AC AD AD AE AF B0 B1 B2 B3 B4 B5 B6 B7

Graphic L V M

EBCDIC hexa B8 B9 BA BB BC BD BE BF CA CB CC CD CE CF DA DB DC DD DE DF EA EB EB EC ED EE EF FA FB FC FD FE FF

CC PN RS UC

CU3 RF RES

47 A2 08UF

C-9

Sort/Merge User's Guide

C-10

47 A2 08UF

D. SORT_FILE Command (GCL)

D.1

EXECUTING SORT_FILE
You can execute a sort in interactive or in batch mode using the GCL command SORT_FILE (alias SRTF or SORT). The SORT_FILE command has a format similar to the format of the JCL statement SORT. The visibility is similar to Data Management Utility commands. The SORT_FILE command is described in the IOF Terminal User's Reference Manual. Note that the JCL statement GSORT (described in Chapter 4) can also be executed in interactive mode.

47 A2 08UF

D-1

Sort/Merge User's Guide

D.2

SORT_FILE (SRTF, SORT) COMMAND

Purpose: Sorts one or more files into a new file or into an existing one. Syntax: { SORT_FILE } { SRTF } { SORT } { FILE } { INFILE } { } = { } { OUTFILE } { ( output-file-description ) } { INFILE } { } = ( input-file-description ) { INFILE1 } { { [ DYNALC = { { { UNCAT TEMPRY } } } ] CAT } CAT{1|2|3|4|5} }

{ ALLOCATE } [ { } = ( file-allocation-parameters ) ] { OUTALC } { DEF } [ { } = ( file-define-parameters ) ] { OUTDEF } [ INDEF = ( file-define-parameters ) ] { DSLFILE } { } = { file78 | ::TN } { COMFILE } [ WRKSIZE = ( dec5 [ dec5 ] ) ] [ WRKVOL = { volume40 | RESIDENT | $RES } ] [ WRKFILE = lib78 ] [ WRKALC = ( file-allocation-parameters ) ]

D-2

47 A2 08UF

SORT_FILE Command (GCL)

- - - - - - - - - - - - - - - - - - - - [ START = { 1 | dec10 } ] [ HALT = dec10 ] [ REPORT = { AUDIT | PARAM | ALL | NONE } ] [ INVREC = { ABORT | CONTINUE } ] [ ERROPT = { PRINTID | PRINT | LOG | IGNORE } ] [ LOGFILE = file78 ] [ INFILE2 = ( input-file-description ) ] . . . [ INFILE9 = ( input-file-description ) ] [ PRTFILE = file78 ] [ REPEAT = { bool | 0 } ] [ SIZE = dec7 ] [ NBSORT = dec2 ] [ PADCHAR = { char1 | hexa2 } ] [ WMODALC = (file-allocation-parameters) ] [ WRKFILE1 = lib78 ] [ WRKALC1 = ( file-allocation-parameters ) ] . . . [ WRKFILE16 = lib78 ] [ WRKALC16 = ( file-allocation-parameters ) ]

47 A2 08UF

D-3

Sort/Merge User's Guide

Parameters: FILE the file resulting from the sort, expressed as an output-file description. If FILE=INFILE is specified, the resulting file overwrites the input file. the file to be sorted, expressed as an input-file-description. requests the dynamic allocation of the outfile and specifies its file status: CAT CATi UNCAT TEMPRY cataloged cataloged in one of the attached catalogs (i=1 to 5) uncataloged temporary

INFILE DYNALC

When DYNALC is not specified for a non-preallocated output file, you must supply consistent DEF/OUTDEF and ALC/OUTALC parameter values. DYNALC is not allowed if FILE = INFILE is specified. PADCHAR the character to be used for padding output records (the character itself or its hexadecimal equivalent are accepted). The default filler is the "blank" character. the number of "slave sorts" for a parallel sort (>= 2, if it is specified). For a non-memory sort with (WRKSIZE, WRKVOL), or with (WRKFILE, WRKALC): 2 <= NBSORT <= 32. In this case, the media list of the workfile assigned may limit NBSORT at execution time. For a non-memory sort with (WMODALC, WRKFILEi, WRKALCi), NBSORT must be equal to the number of assigned WRKFILEi (>=2). If no workfile is assigned at all, the implicit VOLSET or the RESIDENT disks will be used to dynamically assign NBSORT workfiles, except if the input file can be sorted in memory. If NBSORT is unspecified, the sort is mono-process and only one workfile may be assigned (WRKSIZE, WRKVOL), or (WRKFILE, WRKALC), or no workfile at all (implicit dynamic allocation if needed, or memory sort). ALLOCATE DEF/INDEF the resulting file-allocation parameters expressed as a file-allocation parameter group. additional processing parameters for the output and input files, expressed as file-define parameter groups.

NBSORT

D-4

47 A2 08UF

SORT_FILE Command (GCL)

DSLFILE

the file containing the Data Services Language (DSL) commands that define the Sort options. The DSL for Sort is described in Chapter 6. The DSL description of the file may also be entered directly from the terminal by setting the parameter DSLFILE=::TN. The terminal file is closed by typing the character "/". (to be used in conjunction with WRKVOL) the number of cylinders to be used as auxiliary space for sorting, optionally followed by the increment by which it is extended when exhausted. When WRKSIZE=0 is specified, the auxiliary space is in main memory (memory sort). the volume on which auxiliary space for sorting is to be allocated. Default allocation is on a resident disk volume if the VOLSET facility is not active, and on the default volset if the VOLSET facility is active. If the full VOLSET facility is active, a non-default volset can be specified using the syntax $VOLSET:volset-name. the identification of the sort workfile. introduces the file-allocation parameter group for the sort workfile.

WRKSIZE

WRKVOL

WRKFILE WRKALC

- - - - - - - - - - - - - - - - - - - - - - - - - - - START the rank of the record at which the sort is to begin. Values from 1 to 2147483647 are acceptable. The default value is 1. the rank of the record at which the sort is to end. Acceptable values are the same as for START. The default value is end of file. the type of report required, as follows: AUDIT causes diagnostic and process error information to be printed as well as a statistical summary of record processing (default in batch mode). causes a list of parameters to be printed, in addition to diagnostic and process error information. combines AUDIT and PARAM. limits the report to process error information (default in interactive mode).

HALT

REPORT

PARAM ALL NONE INVREC

the action to be taken if an invalid record is encountered in the input file, as follows: ABORT Sort terminates (default value), CONTINUE Sort continues.

47 A2 08UF

D-5

Sort/Merge User's Guide

ERROPT

the action to be taken with invalid record, as follows: PRINTID PRINT LOG IGNORE print the rank of the record (default value), print the rank and the contents of the record, write the record in LOGFILE, print no message.

LOGFILE INFILEi

the file into which errors are logged. up to eight files to be concatenated to INFILE in order to define the input file to be sorted. Each file is expressed as an input-file-description parameter group. Restrictions applicable to these files are the same as those for concatenated files in the ASGi parameter group. the report file. if 1, checkpoints are to be taken during the sort; if 0 (default), no checkpoint is to be taken. A parallel sort never takes checkpoints except at the beginning of the step. the total memory in units of 1024 bytes to be allocated to Sort for the execution. This includes code, data, and buffers. For a mono-process sort, the SIZE is limited to 64 Mbytes. For a parallel sort, the limit is NBSORT*32 Mbytes. The maximum limit is therefore 32*32 Mbytes, though this will depend on the machine configuration. If SIZE is less than NBSORT*32 Mbytes, then each slave sort will use (approximately) SIZE/NBSORT Mbytes.

PRTFILE REPEAT

SIZE

WMODALC

(for parallel sort only) provides default SIZE, INCRSIZE, and UNIT values for the sort workfiles allocated by the WRKALCi parameters. If WRKALCi does not specify its own SIZE, INCRSIZE or UNIT, then the value specified for WMODALC applies. (for parallel sort only) the identification of workfile i. (for parallel sort only) introduces a file-allocation parameter group for workfile i.

WRKFILEi WRKALCi

D-6

47 A2 08UF

SORT_FILE Command (GCL)

Constraints: START may not exceed HALT. If ERROPT is LOG, LOGFILE must be specified. WRKFILEi and WRKALCi are exclusive of WRKSIZE, WRKVOL, WRKFILE, WRKALC. WMODALC, WRKALCi, and WRKFILEi are meaningful only if NBSORT is greater than 1 (or unspecified). Examples: SORT MYDIR.SORTEDFILE MYDIR.SOURCE DSLFILE=MYDIR.SRTCMDS {sort a file into a new one}

SORT INFILE MYDIR.SOURCE DSLFILE=MYDIR.SRTCMDS {sort a file overwriting it with the result}

SORT MYDIR.RES ALLOCATE=(SIZE=10) INFILE1=MYDIR.S1 INFILE2=MYDIR.S2 INFILE3=MYDIR.S3 DSLFILE=MYDIR.SRTCMDS {sort three concatenated files into a new one}

47 A2 08UF

D-7

Sort/Merge User's Guide

D-8

47 A2 08UF

E. MERGE_FILE Command (GCL)

E.1

EXECUTING MERGE_FILE
You can execute a merge in interactive or batch mode using the GCL command MERGE_FILE (alias MRGF). The MERGE_FILE command has a format similar to the format of the JCL statement MERGE. The visibility is similar to Data Management Utility commands. The MERGE_FILE command is described in the IOF Terminal User's Reference Manual. You can also execute the JCL statement GMERGE (described in Chapter 4) in interactive mode.

47 A2 08UF

E-1

Sort/Merge User's Guide

E.2

MERGE_FILE (MRGF) COMMAND

Purpose: Activates the Merge utility which may be used to merge two to eight sorted files into a new one or into an existing one. Syntax: { MERGE_FILE } { } { MRGF } { INFILE1 } { } = ( input-file-description ) { IF1 } { INFILE2 } { } = ( input-file-description ) { IF2 } { FILE } { OUTFILE } = ( output-file-description ) { OF } { { [ DYNALC = { { { CAT } CAT{1|2|3|4|5} } } ] UNCAT } TEMPRY }

[ INDEF1 = ( file-define-parameters ) ] [ INDEF2 = ( file-define-parameters ) ] { DEF } [ { } = ( file-define-parameters ) ] { OUTDEF } { ALLOCATE } [ { } = ( file-allocation-parameters ) ] { OUTALC } { DSLFILE } { } = { file78 | ::TN } { COMFILE }

E-2

47 A2 08UF

MERGE_FILE Command (GCL)

- - - - - - - - - - - - - - - - - - - { INFILE3 } [ { } = ( input-file-description ) ] { IF3 } { INFILE4 } [ { } = ( input-file-description ) ] { IF4 } { INFILE5 } [ { } = ( input-file-description ) ] { IF5 } { INFILE6 } [ { } = ( input-file-description ) ] { IF6 } { INFILE7 } [ { } = ( input-file-description ) ] { IF7 } { INFILE8 } [ { } = ( input-file-description ) ] { IF8 } [ INDEF3 = ( file-define-parameters ) ] [ INDEF4 = ( file-define-parameters ) ] [ INDEF5 = ( file-define-parameters ) ] [ INDEF6 = ( file-define-parameters ) ] [ INDEF7 = ( file-define-parameters ) ] [ INDEF8 = ( file-define-parameters ) ] [ PRTFILE = file78 ] [ REPORT = { AUDIT | PARAM | ALL | NONE } ] [ BUFFER = dec3 ] [ PADCHAR = { char1 | hexa2 } ]

47 A2 08UF

E-3

Sort/Merge User's Guide

Parameters: INFILEi from two to eight file descriptions defining the files to be merged. These are expressed as input-file-description parameter groups. the file resulting from the merge, expressed as an output-file description. It must be different from all the input files to be merged. requests dynamic allocation of the output file by specifying its file status: CAT CATi UNCAT TEMPRY cataloged cataloged in one of the attached catalogs (i=1 to 5) uncataloged temporary

FILE/OUTFILE

DYNALC

When DYNALC is not specified for a non-preallocated output file, you must supply consistent DEF/OUTDEF and ALC/OUTALC parameter values. INDEFi/DEF ALLOCATE DSLFILE additional processing parameters for the input files and the output file, expressed as file-description parameter groups. the resulting file-allocation parameters expressed as a file-allocation parameter group. the file containing the Data Services Language (DSL) commands that define the Merge options. The DSL for Merge is described in Chapter 6. The DSL description of the file may also be entered directly from the terminal by setting the parameter DSLFILE=::TN. The terminal file is closed by typing the character "/". the report file. Interactive merge works exactly like batch merge, and the default merge PRTFILE is the public SYSOUT, never the user's terminal. the type of report required, as follows: AUDIT causes diagnostic and process error information to be printed as well as a statistical summary of record processing (default in batch mode). causes a list of parameters to be printed, in addition to diagnostic and process error information. combines AUDIT and PARAM. limits the report to process information (default in interactive mode).

PRTFILE

REPORT

PARAM ALL NONE

E-4

47 A2 08UF

MERGE_FILE Command (GCL)

BUFFER

the total input/output file buffer memory space to be used, expressed in units of 1024 bytes. The default value is 30, but any sufficient lower or higher value may be specified, provided that it is lower than 512. the character to be used for padding output records (the character itself or its hexadecimal equivalent are accepted). The default filler is the "blank" character.

PADCHAR

Constraints: None. Examples: MRGF MYDIR.MRG1 MYDIR.MRG2 MYDIR.MRGOUT DSLFILE=MYDIR.CMDS {merge two files into a third one}

MRGF OUTFILE=MYDIR.RES ALLOCATE=(SIZE=10) INFILE1=MYDIR.M1 INFILE2=MYDIR.M2 INFILE3=MYDIR.M3 DSLFILE=MYDIR.MRGCMDS {merge three files into a new one being allocated}

47 A2 08UF

E-5

Sort/Merge User's Guide

E-6

47 A2 08UF

F. UFAS Indexed Output File Loaded by Sort or Merge

This Appendix applies to the SORT, GSORT, MERGE, and GMERGE statements. A UFAS Indexed file is defined with a primary key field (see KEYLOC and KEYSIZE in the JCL statement DEFINE) and possibly with secondary key(s). This type of file must be pre-allocated or must pre-exist before being loaded by Sort or Merge. When such a file is to be loaded sequentially, as done by Sort and Merge, the primary key field values must appear in strictly ascending order with no duplicated key values (this is a general UFAS Indexed file loading specification). This requirement can be met if, in the KEY (or KEYS) entry of the RECORD paragraph (COMFILE), the Sort or Merge key is defined exactly as in the file definition, and the possible duplicate key values are eliminated (see DELETE and SUM commands, respectively in FUNCTION and RECORD paragraph of COMFILE). For example, if a file to be loaded by Sort or Merge is defined with: KEYLOC = 5 and KEYSIZE = 8 in a $DEFINE basic JCL statement, or in equivalent JCL/GCL objects KEYLOC = 6 and KEYSIZE = 8 in a PREALLOC or equivalent JCL/GCL statement the RECORD paragraph for Sort or Merge would be RECORD: KEY = (6,8) If the Sort or Merge input records are also submitted to ARRANGE commands, remember that the key specifications describe the key positions and key lengths before ARRANGE processing. Any other Sort or Merge key definition having the same effect (known by the user) as the simple example above is possible. If UFAS secondary keys also exist, a SORTIDX step (or a SORT_INDEX GCL command) is necessary after loading the Indexed file using Sort or Merge, before the file can be used through secondary keys.

47 A2 08UF

F-1

Sort/Merge User's Guide

F-2

47 A2 08UF

G. Use of DATAFORM = {SARF/SSF} and of [TRUNCSSF/NTRNCSSF] by SORT and MERGE

Unless TRUNCSSF is explicitly specified in the INFILE parameter group, the read of the SORT input file is implicitly submitted to TRUNCSSF processing when it resides on tape or cartridge or when its FILEFORM is BFAS disk or LINKQD. This processing is common to any concatenated sort input files. Sort or Merge output files are implicitly created in SARF format (no SSF control records nor SSF prefixes are added) unless DATAFORM = SSF is specified inside the OUTFILE parameter group concerning a tape or cartridge file, or a LINKQD file. When DATAFORM = SSF is so validated for a SORT or MERGE output file, its first record will be an "SSF control record 101" and the data part of each data record will be SSF-prefixed by the value "008400404040E240" X. When the SORT or MERGE output file is the public SYSOUT, it may be created either in SARF format (default) or in SSF format by SORT.

47 A2 08UF

G-1

Sort/Merge User's Guide

G-2

47 A2 08UF

H. Restrictions to Checkpoint/Restart with Cartridge Files for Sort/Merge

This Appendix applies only to a mono-process sort. The low level cartridge volumes (DVC = CT/M6) do not allow checkpoint/restart processing when they are opened in output or append mode, and not positioned at file beginning, file end or volume end. When this type of media supports Sort/Merge PRTFILE, Sort/Merge OUTFILE or Sort LOGFILE, a REPEAT specification in Sort/Merge JCL statement will cause a Sort/Merge abnormal termination with appropriate message and return-code. No improvement of Sort/Merge checkpoints is possible with such a device because all that could be done is to avoid taking checkpoints when the device context is not suitable, and this would not be a real improvement compared to what exists already.

47 A2 08UF

H-1

Sort/Merge User's Guide

H-2

47 A2 08UF

I. Sort/Merge and the UFAS Access Method

I.1

SORT
The conditions under which Sort calls the UFAS Access Method are given below. This Appendix gives detailed technical information. It is not essential for reading for users. Mono-Process Sort For files of UFAS Indexed Organization, Sort always calls the UFAS access method (but the UFAS BPB does not apply in this case). For Input UFAS Sequential or UFAS Relative files, Sort calls the UFAS access method in the following cases: SHARE = FREE, DIR, ONEWRITE, or (SHARE=MONITOR and READLOCK=STAT) or "all volumes are not mounted for the file", or TRUNCSSF, or concatenation, or REPEAT and CKPTLIM, or the DSL contains: KEYADDR or ADDATA or ADDROUT. For Output UFAS Sequential or UFAS Relative files, Sort calls the UFAS access method in the following cases: SHARE not = NORMAL, or "all volumes are not mounted for the file", or REPEAT and CKPTLIM. NOTE: For SHARE = MONITOR, (READLOCK = STAT) or (ACCESS = SPREAD or SPWRITE) are mandatory for INFILE. For OUTFILE, ACCESS = SPWRITE is mandatory when SHARE = MONITOR.

47 A2 08UF

I-1

Sort/Merge User's Guide

Multi-Process Sort For files of UFAS Indexed Organization, Sort always calls the UFAS access method (but the UFAS BPB does not apply in this case). For Input UFAS Sequential or UFAS Relative files, Sort calls the UFAS access method in the following cases: SHARE = FREE, DIR, ONEWRITE, or (SHARE=MONITOR and READLOCK=STAT) or "all volumes are not mounted for the file", or TRUNCSSF, or concatenation, or the DSL contains: (KEYADDR or ADDATA or ADDROUT) For Output UFAS Sequential or UFAS Relative files, Sort calls the UFAS access method in the following cases: SHARE not = NORMAL, or "all volumes are not mounted for the file". NOTE: For SHARE = MONITOR, (READLOCK = STAT) or (ACCESS = SPREAD or SPWRITE) are mandatory for INFILE. For OUTFILE, ACCESS = SPWRITE is mandatory when SHARE = MONITOR.

I.2

MERGE
Merge calls the UFAS access method under the same conditions as Sort (except that the DSL conditions do not apply).

I-2

47 A2 08UF

Index

A
ABORT sort/merge define-parameter 3-15 ADDATA DSL parameter 5-5, 5-6 ADDRFORM sort/merge define-parameter 3-17 ADDROUT DSL parameter 5-5, 5-6, 5-20 ALLOCATE JCL statement 7-4 ALLOCATE parameter MERGE_FILE command E-4 SORT_FILE command D-4 ARRANGE DSL command5-20, 5-22, 5-23, 66, 7-2 ASCII collating sequence 5-3, C-8, C-9 ASSIGN JCL statement 3-2, 3-4, 3-13 ATTACH JCL statement 3-6 AVERAGE DSL command 5-8, 7-1

C
cartridge files checkpoint/restart COBOL merge COBOL sort COLLATE DSL command collating sequences ASCII EBCDIC H200 'hexa512' Series 100 Collating sequences ASCII EBCDIC H200 Series 100 COMFILE parameter MERGE statement SORT statement comparison operations Comparison operations condition elements Condition elements H-1 7-11, H-1 1-10 1-10 5-3, 5-4, 6-2 5-3 5-3 5-3, 5-4 5-3, 5-4 5-3

C-8, C-9
C-1, C-4 C-7 C-5, C-6 3-13 3-5 5-15 5-17 5-15, 5-16, 5-17 5-16

B
Basic Sort/Merge 1-6 Batch Booster 1-8 batch merge E-1 batch sort D-1 BFAS files 3-15, 3-16, 3-20 BLKOFF sort/merge define-parameter 3-15 BLKSIZE sort/merge define-parameter 3-16 BPB 3-17 sort/merge define-parameter 3-17 usage with sort 1-8 BUFFER parameter GMERGE statement 4-12 MERGE statement 3-13 MERGE_FILE command E-5

D
DATA DSL parameter 5-5 Data Services Language (DSL) 1-5 DATAFORM G-1 sort/merge define-parameter 3-17 DATAFORM parameter SORT statement 3-5 DEBUG DSL command 5-9, 6-3 DEF parameter MERGE_FILE command E-4 SORT_FILE command D-4 DEFINE JCL statement 3-4, 3-13, 3-15

47 A2 08UF

i-1

Sort/Merge User's Guide

DELETE DSL command 5-20, 6-2 DELETE DSL Command 5-6 DELETE DSL parameter 6-4 DESCEND DSL command 5-2, 6-2 Disk capacities 7-7 disk work file size 7-4, 7-5 DSL commands ARRANGE 5-20, 5-22, 5-23, 6-6, 7-2 AVERAGE 5-8, 7-1 COLLATE 5-3, 5-4, 6-2 DEBUG 5-9, 6-3 DELETE 5-6, 5-20, 6-2 DESCEND 5-2, 6-2 DUPREC 5-6, 5-20 INCLUDE 5-15, 5-19, 6-4, 6-6 INTINFO 5-7, B-2 KEY(S) 5-12, 5-14, 6-4, 6-6, 7-1 MIN 5-8, 7-1 NBSORT 5-9 OMIT 5-15, 5-19 OUTPUT 5-5, 5-6, 5-20, 6-4, 6-6, 7-2 SORTSIZE 2-2, 3-5, 5-8 SUM 5-20, 6-4, 6-6, 7-1 WRDISK 5-9 DSL Merge paragraphs END 6-1, 6-7 FUNCTION 6-1, 6-2 RECORD 6-1, 6-4, 6-6 DSL parameters ADDATA 5-5, 5-6 ADDROUT 5-5, 5-6, 5-20 DATA 5-5 DELETE 6-4 KEYADDR 5-5, 5-6, 5-20 DSL sort paragraphs RECORD 5-11 DSL Sort paragraphs END 5-1, 5-26 FUNCTION 5-1, 5-10 RECORD 5-1 DSLFILE parameter MERGE_FILE command E-4 SORT_FILE command D-5 DUMMYREC sort/merge define-parameter 3-17 dumps 1-10 DUPREC DSL command 5-6, 5-20 DYNALC parameter MERGE_FILE command E-4 SORT_FILE command D-4

ERROPT parameter GSORT statement sort/merge define-parameter SORT_FILE command Error messages Merge Sort Extended Sort/Merge

4-8 3-15 D-6 1-5 1-5 1-6

F
FBO (Fixed Block Organization) 3-15 FILE parameter GSORT statement 4-3 MERGE_FILE command E-4 SORT_FILE command D-4 File specification examples 3-21 parameters 3-18 FILEFORM sort/merge define-parameter 3-15 FILLER parameter GSORT statement 4-10 FSA (Fixed Sector Architecture) 7-7 FUNCTION (DSL paragraph)5-1, 5-10, 6-1, 62

G
GAC (General Access Control) GSORT explanation of parameters syntax 7-12 4-3 4-2

H
H200 collating sequence HALT parameter GSORT statement SORT statement SORT_FILE command 5-3, 5-4, C-7 4-8 3-9 D-5

I
IGNORE sort/merge define-parameter 3-15 INCLUDE DSL command 5-15, 5-19, 6-4, 6-6 INDEF parameter SORT_FILE command D-4 INDEFi parameter

E
EBCDIC collating sequence 5-3, C-1, C-4 END (DSL paragraph) 5-1, 5-26, 6-1, 6-7

i-2

47 A2 08UF

Index

MERGE_FILE command INFILE parameter SORT statement SORT_FILE command INFILEi parameter GMERGE statement MERGE_FILE command SORT_FILE command INFILEn parameter MERGE statement SORT statement INFILES parameter GSORT statement interactive merge interactive sort INTINFO DSL command INVREC parameter GSORT statement SORT statement SORT_FILE command

E-4 3-4 D-4 4-12 E-4 D-6 3-13 3-4 4-3 E-1 D-1 5-7, B-2 4-8 3-8 D-5

M
maximum record size MEM parameter GSORT statement Merge definition error messages examples features rules using MERGE syntax MERGE_FILE command MIN DSL command MODALC parameter GSORT statement mono-process sort MRGF command multi-process sort 7-3 4-9 1-1 1-5 3-22, 3-23 1-2 2-3 1-3 3-11 E-2 5-8, 7-1 4-6 1-6 E-2 1-7

J
JCL statements ALLOCATE ASSIGN ATTACH DEFINE PREALLOC SIZE STEP

N
7-4 3-4, 3-13 3-6 3-4, 3-13, 3-15 7-4 3-13 3-9, 3-13 NBBUF sort/merge define-parameter NBSORT DSL command NBSORT parameter GSORT statement SORT_FILE command NPOOL parameter SORT statement NTRNCSSF sort/merge define-parameter numeric condition 3-17 5-9 4-9 D-4 3-6 3-18 5-18

K
KEY(S) DSL command5-12, 5-14, 6-4, 6-6, 7-1 KEYADDR DSL parameter 5-5, 5-6, 5-20

O L
large memory sort dumps overview LOGALC parameter GSORT statement LOGDEF parameter GSORT statement LOGFILE parameter SORT statement SORT_FILE command LOGOUT parameter GSORT statement 1-10 1-7 4-4 4-4 3-9 D-6 4-4 OMIT DSL command 5-15, 5-19 OUTALC parameter GSORT statement 4-3 OUTDEF parameter GSORT statement 4-3 OUTFILE parameter GSORT statement 4-3 MERGE statement 3-13 MERGE_FILE command E-4 SORT statement 3-4 OUTPUT DSL command5-5, 5-6, 5-20, 6-4, 66, 7-2

47 A2 08UF

i-3

Sort/Merge User's Guide

P
PADCHAR parameter MERGE_FILE command SORT_FILE command parallel sort POOL parameter SORT statement PREALLOC JCL statement PRTALC parameter GSORT statement PRTDEF parameter GSORT statement PRTFILE parameter MERGE statement MERGE_FILE command SORT statement SORT_FILE command PRTOUT parameter GSORT statement E-5 D-4 1-7 3-6 7-4 4-4 4-4 3-13 E-4 3-8 D-6 4-4

Q
Queued files 2-2

R
read ahead 1-8 RECFORM sort/merge define-parameter 3-16 RECORD (DSL paragraph)5-1, 5-11, 6-1, 6-4, 6-6 RECSIZE sort/merge define-parameter 3-16 REPEAT parameter GSORT statement 4-8 SORT statement 3-9 SORT_FILE command D-6 REPORT parameter GMERGE statement 4-12 GSORT statement 4-8 MERGE statement 3-13 MERGE_FILE command E-4 SORT statement 3-8 SORT_FILE command D-5 RETCODE sort/merge define-parameter 3-15

S
SARF format G-1

Series 100 collating sequence 5-3, C-5, C-6 SIZE JCL statement 3-9, 3-13 size of disk work file 7-4 size of sorted records 7-2 SIZE parameter GSORT statement 4-8 SORT statement 3-6, 3-8 SORT_FILE command D-6 SIZEOPT parameter GSORT statement 4-10 MERGE statement 3-13 SORT statement 3-9 SKIP sort/merge define-parameter 3-15 sort dumps 1-10 large memory 1-7 mono-process 1-6 multi-process 1-7 parallel 1-7 using 1-3 with BPB 1-8 with volset 1-9 Sort definition 1-1 error messages 1-5 examples 3-22 features 1-2 rules 2-2 work file space 1-5 SORT examples 3-23 performance 7-9 sort record size 7-2 sort/merge define-parameters 3-14 ABORT 3-15 ADDRFORM 3-17 BLKOFF 3-15 BLKSIZE 3-16 BPB 3-17 DATAFORM 3-17 DUMMYREC 3-17 ERROPT 3-15 FILEFORM 3-15 IGNORE 3-15 NBBUF 3-17 NTRNCSSF 3-18 RECFORM 3-16 RECSIZE 3-16 RETCODE 3-15 SKIP 3-15 TRUNCSSF 3-18 WRCHECK 3-17 Sort/Merge report 7-4, B-1, B-3 Sort/Merge Report 7-6 SORT_FILE GCL command D-1, D-2

i-4

47 A2 08UF

Index

sorting variable length records 7-1 SORTSIZE DSL command 2-2, 3-5, 5-8 SRTF GCL command D-2 SSF format G-1 START parameter GSORT statement 4-8 SORT statement 3-9 SORT_FILE command D-5 STEP JCL statement 3-9, 3-13 STEPOPT parameter GSORT statement 4-10 MERGE statement 3-13 SORT statement 3-9 SUM DSL command 5-20, 6-4, 6-6, 7-1 SYSOUT parameter GSORT statement 4-4

W
WKALC parameter GSORT statement WKALCi parameter GSORT statement WKASGi parameter GSORT statement WKDISK parameter SORT statement WKFILE parameter GSORT statement WMODALC parameter SORT_FILE command WRCHECK sort/merge define-parameter WRDISK DSL command write behind WRKALC parameter SORT_FILE command WRKALCi parameter SORT_FILE command WRKFILE parameter SORT_FILE command WRKFILEi parameter SORT_FILE command WRKSIZE parameter SORT_FILE command WRKVOL parameter SORT_FILE command 4-4 4-7 4-7 3-5 4-4 D-6 3-17 5-9 1-8 D-5 D-6 D-5 D-6 D-5 D-5

T
TRUNCSSF sort/merge define-parameter G-1 3-18

U
UFAS files using merge using sort 2-2, 2-3, 3-15, 3-20, F-1 1-3 1-3

V
variable length records VBO (Variable Block Organization) volset 7-1 3-15 1-9

47 A2 08UF

i-5

Sort/Merge User's Guide

i-6

47 A2 08UF

Technical publication remarks form


Title :

DPS7000/XTA NOVASCALE 7000 SORT/MERGE Utilities User's Guide File and Volume Management

Reference N :

47 A2 08UF 07

Date:

February 2005

ERRORS IN PUBLICATION

SUGGESTIONS FOR IMPROVEMENT TO PUBLICATION

Your comments will be promptly investigated by qualified technical personnel and action will be taken as required. If you require a written reply, please include your complete mailing address below.

NAME :

Date :

COMPANY :

ADDRESS :

Please give this technical publication remarks form to your BULL representative or mail to:

Bull - Documentation Dept. 1 Rue de Provence BP 208 38432 ECHIROLLES CEDEX FRANCE [email protected]

Technical publications ordering form


To order additional publications, please fill in a copy of this form and send it via mail to:

BULL CEDOC 357 AVENUE PATTON B.P.20845 49008 ANGERS CEDEX 01 FRANCE

Phone: FAX: E-Mail:

+33 (0) 2 41 73 72 66 +33 (0) 2 41 73 70 66 [email protected]

CEDOC Reference #
_ _ _ _ _ _ _ _ _ [ _ _ ]

Designation

Qty

_ _

_ _

_ _ _ _

[ _ _ ]

_ _

_ _

_ _ _ _

[ _ _ ]

_ _

_ _

_ _ _ _

[ _ _ ]

_ _

_ _

_ _ _ _

[ _ _ ]

_ _

_ _

_ _ _ _

[ _ _ ]

_ _

_ _

_ _ _ _

[ _ _ ]

_ _

_ _

_ _ _ _

[ _ _ ]

_ _

_ _

_ _ _ _

[ _ _ ]

_ _

_ _

_ _ _ _

[ _ _ ]

_ _

_ _

_ _ _ _

[ _ _ ]

_ _

_ _

_ _ _ _

[ _ _ ]

[ _ _ ]

: The latest revision will be provided if no revision number is given.

NAME:

Date:

COMPANY:

ADDRESS:

PHONE:

FAX:

E-MAIL:

For Bull Subsidiaries: Identification:

For Bull Affiliated Customers: Customer Code:

For Bull Internal Customers: Budgetary Section:

For Others: Please ask your Bull representative.

BULL CEDOC 357 AVENUE PATTON B.P.20845 49008 ANGERS CEDEX 01 FRANCE

REFERENCE 47 A2 08UF 07

You might also like