FCOPY Reference Manual (32212-90008)

100 Chapter5
FCOPY Functions
SUBSET
Using SUBSET with DEBLOCK
If you use SUBSET with DEBLOCK, FCOPY copies subsets from the deblocked records.
Examples
The example below copies all records in the disk file AUTOS that contain the character
string "BLUE" starting in character position 17, to the disk file COMPANY:
>FROM=AUTOS;TO=COMPANY;SUBSET="BLUE",17
The following example copies all records in the file AUTOS that do not contain the character
string "BLUE" in position 17, to the disk file RENTAL:
>FROM=AUTOS;TO=RENTAL;SUBSET="BLUE",17,EXCLUDE
You can also use the SUBSET function to specify lowercase alphabetic characters from a
terminal that has only uppercase characters. For example, the command below copies all
records in the disk file DATA that contain the lowercase alphabetic characters "data" (octal
codes 144, 141, 164, and 141) in character positions 77 through 80 to the disk file
SUBFILE3:
>FROM=DATA;TO=SUBFILE3;SUBSET=#%144,%141,%164,%141#,77
You might use decimal codes to specify subsets containing nonprinting characters. For
example, the command below copies all records in the disk file DATA1 that contain the
nonprinting control characters CR and LF (decimal codes 13 and 10) in character positions
71 and 72 to the disk file SUB1:
>FROM=DATA1;TO=SUB1;SUBSET=#13,10#,71
The example below copies 500 records, beginning with record 0 (the first), from the disk file
MAIN to the disk file SUB1:
>FROM=MAIN;TO=SUB1;SUBSET=,500
The next example copies records 500 through 1499 of the disk file MAIN into the disk file
SUB2:
>FROM=MAIN;TO=SUB2;SUBSET=500:1499
The following example copies all records from 1500 through the end of the file from the
disk file MAIN to the disk file SUB3:
>FROM=MAIN;TO=SUB3;SUBSET=1500
You can copy several ranges of records as long as the ranges are sequentially ordered and
do not overlap. For example, the command below copies records 0 through 11 and 30
through 74 from TAPEA to FILEONE:
>FROM=*TAPEA;TO=FILEONE; SUBSET=(0,12;30,45)