USE/GIVE instructions

The USE and GIVE instructions specify the name and characteristics of the input file and output file, respectively, of a sort or merge process. Note that you must specify all USE instructions before any GIVE instructions. The input and output file descriptions include ORG, RECORD, and KEY phrases, which define the file's characteristics. The syntax for these instructions is as follows:

use input-file
   org file-type  
   record format, record-length [, max-length]
   key(key-structure) 

give output-file
   org file-type
   record format, record-length [, max-length]
   key(key-structure) 

where

input-file is the pathname of the input file. For file names containing spaces, surround the filename with double quotes (" "). If the filename contains double-quote characters, specify these by doubling the double-quote characters ("" "".

Examples:

  • filename: Work File
  • notation: "Work File"
  • filename: Embedded"Quote
  • notation: "Embedded""Quote"
output-file is the pathname of the output file. the same rules regarding input-file names with spaces applies to output-file names.
file-type specifies the type of input or output file: indexed (IX), relative (RL), line sequential (LS), or binary sequential (SQ).
format indicates that the file contains fixed length records (F) or variable length records (V).
record-length specifies the record length for a fixed length record or the minimum record length for a variable length record.
max-length specifies the maximum record length for a variable length record.
key-structure specifies the key structure for an indexed file.
Note: If the input and output files have the same organization and/or record information, you need not specify these options for each file. The AcuSort utility applies the most recent RECORD and ORG options to subsequent files when these options are not specified for the files.