Input Files [ HP RPG/XL Utilities-Part 1 XSORT ] MPE/iX 5.0 Documentation
HP RPG/XL Utilities-Part 1 XSORT
Input Files
XSORT can input sequential MPE files, including files on non-disk devices
such as tape. (Please see Section 7 for the commands required.)
KSAM files may be input. Caution should be taken, however, because XSORT
will skip deleted records. A deleted record has its first two bytes set
to -1 (to hex "FFFF"). For Address-out sorts (SORTA), XSORT reads KSAM
files in chronological sequence and determines record numbers
accordingly.
XSORT will normally assure that the first record for a KSAM file is
record number 0. If you wish to start the Address-out numbering at 1,
then you must supply the S Option spec with a "1" in column 7 or build
the KSAM file with the Firstrec=1 option. (See Section 4 for further
information regarding S Option specification.)
NOTE XSORT will not process IMAGE data base files.
The formal designator for a single-file sort is XSORTIN. For
multiple-file sorts, formal file designators are XSORTIN1 through
XSORTIN9. The multiple-file designators do not have to be continuous.
You can skip file numbers, selecting XSORTIN1, XSORTIN7, and XSORTIN3,
for example. However, you must start with XSORTIN1.
When you use more than one input file:
* You cannot do an Address-out (SORTA) sort.
* You cannot do an in place sort, in which output file overlays input
file.
* XSORT bases its operations on the characteristics of the first file
opened. All the other files are assumed to have the same, or
compatible, characteristics (file type and record length).
* You must be sure that all your specifications apply to all the
records in all the files you wish to use in a multifile sort.
* You can ensure that you do not accidentally do a single-file sort
(instead of a multiple-file sort) by issuing the following MPE
command prior to running your XSORT program:
RESET XSORTIN
(See "Use of the MPE RESET Command.")
If single file input is from $STDIN, the specification records cannot be
from $STDIN. They must be from a file referenced by the formal designator
XSORTEXT.
MPE/iX 5.0 Documentation