MPE/iX System Utilities Reference Manual (32650-90908)

Chapter 8
FCOPY
Operation
98
Operation
To invoke FCOPY enter:
FCOPY FROM=input file;TO=output file;functions
For example, to create a new disk file (in exactly the same format as another file) use the NEW parameter:
> FROM=OLDFILE;TO=NEWFILE;NEW
To copy a subset of one file to another enter:
> FCOPY FROM=FILEONE;TO=FILETWO;SUBSET=29:33
In this example FCOPY copies the 30th through 34th records. You specify ;SUBSET=29:33 because FCOPY
sees the first record in a file as record number 0.
To copy a tape created in EBCDIC format in an IBM environment with a label of VOL 000001,IBM you would
enter the following:
FILE T;DEV=TAPE;LABEL=000001,IBM;REC=-132,20,F,ASCII
FILE HPFILE;REC=-132,1,F,ASCII;DISC=12000
FCOPY FROM=*T;TO=*HPFILE;NEW;EBCDICIN
Be sure the parameters in the file equations (blocking factor, record size, etc.) are correct.
To copy a file to your terminal screen in hexadecimal format enter:
FCOPY FROM=FILEONE;TO=;HEX
If you specify ;TO= without anything after it the default is the $STDLIST device.
"From" and "To" Files
A from file is the input file for an FCOPY command; it contains the data you want to copy. A to file is the
output file to which you want to copy the data.
Identify a from file for an FCOPY command with the FROM parameter. FROM has the following format:
[={fromfile}]
FROM [={ * }]
[={<empty>}]
The value you assign to FROM can be either an input file name (fromfile), an asterisk (*), or nothing at all
(<empty>). An asterisk backreferences the fromfile named in a file equation. Leaving FROM empty lets you use
your terminal (or a spoolfile during a job) as the input file.
In the example below, the FROM parameter describes an input file named input for an FCOPY command.
FROM=input
Specify a to file with the TO parameter. TO has the following format:
[={tofile }]
;TO [={* }]
[={<empty >}]
The value that you assign to TO can be either the name of the output file (tofile), an asterisk (*), or nothing
at all (<empty >). An asterisk backreferences a file named in a file equation. Leaving TO empty lets you copy
files to the $STDLIST device.