The SORT statement is the first argument to PLISRTx. The syntax of the SORT statement must be a character string
expression that takes the form:
'bSORTbFIELDS=(start1,length1,form1,seq1,
...startn,lengthn,formn,seqn)[,other options]b'
For example:
' SORT FIELDS=(1,10,CH,A) '
- b
- represents one or more blanks. Blanks shown are mandatory.
No other blanks are allowed.
- start,length,form,seq
- defines a sorting field. You can specify any number of sorting
fields, but there is a limit on the total length of the fields.
If more than one field is to be sorted on, the records are sorted
first according to the first field, and then those that are of equal value
are sorted according to the second field, and so on. If all the
sorting values are equal, the order of equal records will be arbitrary
unless you use the EQUALS option. (See later in this definition
list.) Fields can overlay each other.
For DFSORT (5740-SM1), the maximum total length of the sorting
fields is restricted to 4092 bytes and all sorting fields must be
within 4092 bytes of the start of the record. Other sort products
might have different restrictions.
- start
- is the starting position within the record. Give the value
in bytes except for binary data where you can use a "byte.bit" notation.
The first byte in a string is considered to be byte 1, the first
bit is bit 0. (Thus the second bit in byte 2 is referred to as 2.1.)
For varying length records you must include the 4-byte length prefix,
making 5 the first byte of data.
- length
- is the length of the sorting field. Give the value in bytes
except for binary where you can use "byte.bit" notation. The
length of sorting fields is restricted according to their data type.
- form
- is the format of the data. This is the format assumed for
the purpose of sorting. All data passed between PL/I routines and
Sort must be in the form of character strings. The main data types
and the restrictions on their length are shown below. Additional
data types are available for special-purpose sorts. See the DFSORT Application Programming Guide,
or the equivalent publication for your sort product.
- Code
- Data type and length
- CH
- character 1–4096
- ZD
- zoned decimal, signed 1–32
- PD
- packed decimal, signed 1–32
- FI
- fixed point, signed 1–256
- BI
- binary, unsigned 1 bit to 4092 bytes
- FL
- floating-point, signed 1–256
The sum of the lengths of all fields must not exceed 4092 bytes.
- seq
- is the sequence in which the data will be sorted as follows:
- A
- ascending (that is, 1,2,3,...)
- D
- descending (that is, ...,3,2,1)
Note:
You cannot specify E, because PL/I does not provide
a method of passing a user-supplied sequence.
- other options
- You can specify a number of other options, depending on your
Sort program. You must separate them from the FIELDS operand and
from each other by commas. Do not place blanks between operands.
- FILSZ=y
- specifies the number of records in the sort and allows for
optimization by Sort. If y is only approximate, E should precede y.
- SKIPREC=y
- specifies that y records at the start of the input file are to be ignored
before sorting the remaining records.
- CKPT or CHKPT
- specifies that checkpoints are to be taken. If you use this
option, you must provide a SORTCKPT data set and DFSORT's 16NCKPT=NO
installation option must be specified.
- EQUALS|NOEQUALS
- specifies whether the order of equal records will be preserved
as it was in the input (EQUALS) or will be arbitrary (NOEQUALS).
You could improve sort performance by using the NOEQUALS. The default
option is chosen when Sort is installed. The IBM-supplied default
is NOEQUALS.
- DYNALLOC=(d,n)
- (OS/VS Sort only) specifies that the program dynamically allocates intermediate
storage.
- d
- is the device type (3380, etc.).
- n
- is the number of work areas.
|
This information center is powered by Eclipse technology. (http://www.eclipse.org)