Remove multiples of records with duplicate sort keys.
Leaves only the 1st record found with a unique sort key.
This program will take a sorted input file and copy records to the output for which it finds a unique occurrence of the sort key.
The program passes the input file, and when it finds a new/unique sort key in a record it copies that record to the output, and disregards all subsequent records that contain that same sort key. Thereby only putting to the output file a single record per sort key.
This program is good if you want to use the compare program. It eliminates duplication of the ‘A’ file and speed up the comparison. It is also helpful if you just want to see examples of the individual items in the file.
C:> unique input output -options
Item 1: Program name [unique] “not to be confused with UNIX UNIQ.
Item 2: Input file name.
Item 3: Output file name.
Item 4: Required options [-rpl + #]:
c:>unique infile outfile -r 80 -p 21 -L 9
(This is a file of 80 character records sorted on the 21st displacement for 9 characters )
c:>unique infile outfile -r 80 -p 21 -L 9 -e
(Same as above, except the input is assumed to be EBCDIC)
c:>unique infile outfile -r 80 -p 21 -L 9 -eh 80
(Same as above except this file has one 80 character header)
c:>unique infile outfile -r 80 -p 21 -L9 -eh 80 80
(Same as above, except this has two 80 character headers)
-A: Creates/appends accounting information to acct-ing file. If environment variable ACCT=ON is set, this option is automatically set.
/A: Turns off -A option if set in environment.
-c: Converts all unprintable characters in input file to (~)(tilde)
-e Converts EBCDIC input to ASCII.
-h: With tape input, allows you to pass up to 5 header records of a length you specify with disk input, allows you to pass any number of characters at the beginning of the file. The program will think they are headers after all the options have been listed, then list the header lengths as separate arguments. (separated by spaces naturally)
-n: If used, must be used with the -c option. The [-n] option causes newline characters to be bypassed in the conversion process. This is for you informix fanatics.