HELP SORT — MicroVMS 4.6
Sorts a file or files into one ordered output file. Format SORT input-file-spec,... output-file-spec
Additional information available:
ParametersQualifiersQualifiers
Parameters
input-file-spec,... Specification(s) of file(s) whose records are to be sorted. All files must have the same record format and key description, but may have different file organizations. Wildcard characters are not allowed. The file type defaults to DAT. output-file-spec Specification of the file produced by the sort operation. Wildcard characters are not allowed. The file type defaults to the file type of the first input file.
Qualifiers
Additional information available:
/ALLOCATION/BUCKET_SIZE/COLLATING_SEQUENCE
/CONTIGUOUS/DUPLICATES/FORMAT/INDEXED_SEQUENTIAL
/KEY
/ALLOCATION=file-size
Qualifies output-file-spec. Required only to override relative and indexed-sequential input file characteristics. File-size is the number of 512-byte blocks to be allocated for the file and must be an integer in the range 1 - 4294967295. The /ALLOCATION qualifier is required if /CONTIGUOUS is specified.
/BUCKET_SIZE=bucket-size
Qualifies output-file-spec. Required only to override input file characteristics. For relative and indexed files, specifies the bucket size in blocks. For input and output files of the same organization, the default is the same as the bucket-size of the first input file; otherwise, the default is 1. Bucket-size must be an integer in the range 1 - 32.
/COLLATING_SEQUENCE=sequence
Names the collating sequence for character data. Specify sequence as ASCII, EBCDIC, or MULTINATIONAL. Note that when you specify EBCDIC, the characters remain in ASCII representation; only the order is changed. The /MULTINATIONAL qualifier specifies the collating sequence of the Multinational Character set. See Appendix CHAR for the ASCII and Multinational Character sets.
/CONTIGUOUS
Qualifies output-file-spec. Required only to override first input file's characteristics. Specifies that the allocation of blocks for the output file be contiguous. /ALLOCATION must also be specified.
/DUPLICATES (default)
/NODUPLICATES Deletes records with duplicate keys from the sort operation. The /NODUPLICATES qualifier is incompatible with the /STABLE qualifier.
/FORMAT=rec-format[n:]
Qualifies input-file-spec and output-file-spec. Specifies record format and size. Possible options for the input file are: +---------------+------------------------------------------+ | RECORD_SIZE=n | An integer in the range of: 1 through | | | 32767 for sequential files; 1 through | | | 16383 for relative files; 1 through | | | 16383 for indexed sequential files. | +---------------+------------------------------------------+ | FILE_SIZE=n | An integer in the range 1 through | | | 4294967295. | +---------------+------------------------------------------+ Possible options for the output file are: +--------------+-----------------------------------------------------+ | FIXED=n | A fixed size record whose maximum size is an | | | integer in the range of: 1 through 32767 for | | | sequential files; 1 through 16383 for relative | | | files; 1 through 16383 for indexed sequential | | | files. | +--------------+-----------------------------------------------------+ | VARIABLE=n | A variable size record whose maximum size is an | | | integer in the range of: 1 through 32767 for | | | sequential files; 1 through 16383 for relative | | | files; 1 through 16383 for indexed sequential | | | files. | +--------------+-----------------------------------------------------+ | CONTROLLED=n | A controlled record whose size is an integer in the | | | range of: 1 through 32767 for sequential files; 1 | | | through 16383 for relative files; 1 through 16383 | | | for indexed sequential files. | +--------------+-----------------------------------------------------+ | SIZE=n | An integer in the range 1 through 255. | +--------------+-----------------------------------------------------+ If /FORMAT is not specified for the output file, the format is based on the sort process selected: if RECORD or TAG sort is selected, the default is the format of the first input file; if ADDRESS or INDEX sort is selected, the default is FIXED.
/INDEXED_SEQUENTIAL
/RELATIVE /SEQUENTIAL Qualifies output-file-spec. Specifies the organization of the file. For a record or tag sort, the output file format defaults to the organization of the input file. For an indexed sort, the output file must exist and be empty and you must specify the /OVERLAY qualifier.
/KEY=(option,...)
Defines a sort key. You can specify /KEY up to 255 times to define 255 different key fields on which to sort. The default is a character data key, beginning in position 1 of the input record for a length of the LRL (longest record length) for the input file(s), up to a maximum length of 32767 bytes. The following keywords specify position, size, and data type of the key field within the record. +--------------------------+-----------------------------------------+ |POSITION=start-of-key |Starting byte of the key within the | | |record, where the first byte of the | | |record is position 1. The value must be | | |an integer in the range 1-32767. The | | |position option is required. | +--------------------------+-----------------------------------------+ |CHARACTER (default) |Data type of the key. | |BINARY | | |F_FLOATING | | |D_FLOATING | | |G_FLOATING | | |H_FLOATING | | |ZONED | | |DECIMAL | | |PACKED_DECIMAL | | +--------------------------+-----------------------------------------+ |SIZE=n |Size of the key as follows depending on | | |data type: | | | CHARACTER -- Number of characters | | | specified as an integer in the range | | | 1 - 32767 (default=32767) | | | BINARY -- The integer value 1 (byte), | | | 2 (word), 4 (longword), 8 (quadword),| | | or 16 | | | DECIMAL -- Number of digits, not | | | counting the sign, specified as an | | | integer in the range 1 - 31 | | | PACKED_DECIMAL -- Same as DECIMAL | | |Do not specify a size for floating-point | | |data types, whose sizes are fixed at 4 | | |(F FLOATING), 8 (D and G FLOATING), and | | |16 (H FLOATING) bytes. The total size of | | |all keys must not exceed 32767 bytes. | +--------------------------+-----------------------------------------+ |NUMBER=key-order |Priority of the key specified as an | | |integer in the range 1 - 255, where 1 | | |means the primary key. The default is the| | |order in which the keys are specified. | +--------------------------+-----------------------------------------+ |ASCENDING (default) |Order in which records are sorted for the| |DESCENDING |key. | +--------------------------+-----------------------------------------+ |SIGNED (default) |Whether or not a sign is stored (binary | |UNSIGNED |keys only). | +--------------------------+-----------------------------------------+ |TRAILING_SIGN (default) |Byte in which sign is stored -- first or | |LEADING_SIGN |last (decimal keys only). | +--------------------------+-----------------------------------------+ |OVERPUNCHED_SIGN (default)|Whether the sign is superimposed on the | |SEPARATE_SIGN |decimal value or is separated from the | | |decimal (decimal keys only). | +--------------------------+-----------------------------------------+
Qualifiers
Additional information available:
/OVERLAY/PROCESS/RELATIVE/SEQUENTIAL/SPECIFICATION
/STABLE/STATISTICS/WORK_FILES
/OVERLAY
/NOOVERLAY Qualifies output-file-spec. Writes the output to an existing file which must be empty. By default, a new output file is created for sequential and relative files. If the output file is INDEXED_SEQUENTIAL, /OVERLAY must be specified.
/PROCESS=keyword
Defines the type of sort with one of the following keywords: +---------+----------------------------------------------------------+ | ADDRESS | Sorts keys and produces an output file of pointers. | | | Multiple input files are not allowed. Terminal input is | | | not allowed. The output file is in binary format. | +---------+----------------------------------------------------------+ | INDEX | Sorts keys and produces an output file of pointers and | | | keys. Multiple input files are not allowed. Terminal | | | input is not allowed. The output file is in binary | | | format. | +---------+----------------------------------------------------------+ | RECORD | Sorts complete records and produces an output file of | | | complete records in sorted order. (default) | +---------+----------------------------------------------------------+ | TAG | Sorts keys, then reaccesses the input file to produce an | | | output file of complete records in sorted order (the | | | net result is the same as a record sort). Terminal | | | input is not allowed. | +---------+----------------------------------------------------------+
/RELATIVE
See /INDEXED_SEQUENTIAL.
/SEQUENTIAL
See /INDEXED_SEQUENTIAL.
/SPECIFICATION=file-spec
Identifies the specification file to be used in the SORT operation. File type defaults to SRT. Any qualifiers specified in the SORT command line override the qualifiers in the specification file. See Appendix DCL of the MicroVMS User's Manual for the qualifiers you can include in a specification file.
/STABLE
/NOSTABLE (default) Maintains the order of records with identical keys; otherwise, the order is unpredictable. The /STABLE qualifier is incompatible with the /NODUPLICATES qualifier.
/STATISTICS
/NOSTATISTICS (default) Displays a statistical summary at the end of the sort.
/WORK_FILES=number-of-files
Specifies the number of temporary work files. The value can be from 0 through 10, with a default of 2.