HP 3000 Manuals

Operation [ MPE/iX System Utilities Reference Manual ] MPE/iX 5.0 Documentation


MPE/iX System Utilities Reference Manual

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.

The example below describes an output file name outfile for an FCOPY
command.

     ;TO=outfile 

FCOPY Functions 

In addition to specifying input and output files in an FCOPY command, you
also describe the FCOPY functions that you want to perform.  Each
function has its own syntax and guidelines for its use.  The NEW
function, for example, lets you create a new disk file.  An example of an
FCOPY command using the NEW function is:

     FCOPY 
     >FROM=oldfile;TO=newfile;NEW 

The table below lists FCOPY functions and their descriptions in
alphabetical order.

          Table 8-1.  FCOPY Functions 

     Function                                  Description 

BCDICIN             Translates from BCDIC to ASCII.

BCDICOUT            Translates from ASCII to BCDIC.

CCTL                Designates the first character of each record as a carriage
                    control character in the "to" file.

CHAR                Displays the contents of a file as ASCII characters.

CLEAR               Displays the contents of a file as character codes.

COMPARE             Compares two files.

DEBLOCK             Deblocks blocked records.

EBCDICIN            Translates from EBCDIC to ASCII.

EBCDICOUT           Translates from ASCII to EBCDIC.

EBCDIKIN            Translates from ECDIC to JIS.

EBCDIKOUT           Translates from JIS to EBCDIK.

FILES               Copies multiple file from tape.

HEX                 Displays the contents of a file in hexadecimal form.

HEXO                Displays the contents of a file in hexadecimal form, and the
                    sequential record number in octal form.

IGNERR              Bypasses and reports magnetic tape errors.

KANA                Displays the contents of a file as JIS character symbols.

KEY                 Specifies a key sequence in which to copy a KSAM file.

NEW                 Creates a new permanent disk file.

NOCCTL              Specifies that the first character of each record in the "from"
                    file will not be a carriage control character.

NOKSAM              Copies a compatibility mode KSAM data file to a non-KSAM file.

NOUSERLABELS        Omits user labels when copying between disk and tape.

OCTAL               Displays the contents of a file in octal form.

SKIPEOF             Positions a serial storage device at a desired file.

SUBSET              Copies a subset of a file.

UPSHIFT             Converts lowercase characters to uppercase.

VERIFY              Compares files after copying.

Defining Files 

If you are copying files from or to devices other than disk, you must
define the files and their associated devices with the FILE command
before issuing an FCOPY command.  For example, to copy a file from
magnetic tape to a line printer, define two device files as follows:

     FILE TAPEFILE;DEV=TAPE;REC=-80,25,F,ASCII 
     FILE PRINTER;DEV=LP 

TAPEFILE and PRINTER are the formal file designators you use in the FCOPY
command.  TAPE and LP are device class names for a magnetic tape unit and
a line printer respectively.  Device class names are defined when the
system is configured and may vary from one installation to another.

You may use the two formal file designators as the "from" and "to" files
in an FCOPY command.  Type an asterisk (*) before each file name to tell
FCOPY to refer to the previous FILE command for the file's description.
The FROM and TO parameters below reference the two files defined above: 

     FROM=*TAPEFILE;TO=*PRINTER 

FCOPY assumes files to have default characteristics unless you define the
files with other characteristics.  For more information on the FILE
command, refer to the MPE/iX Commands Reference Manual (32650-90003). 

General Guidelines for FCOPY Commands 

An FCOPY command must follow these general guidelines: 

   *   Semicolons always separate the different components of a command.
       You can leave spaces between components.  However, there can be no
       more than 70 characters between two semicolons.  For example, all
       three FCOPY commands below are valid.

            FROM=A;   TO=B; NEW
            FROM=C;TO=D;NEW
            FROM=E; TO=F; NEW

   *   To continue an FCOPY command onto more than one line, use an
       ampersand (&) at the end of each line except the last.  An FCOPY
       command has no maximum length.  However, a single line of an FCOPY
       command cannot be more than 72 characters long.  For example:

            FROM=A; &
            TO=B; &
            NEW

Using FCOPY with KSAM Files 

To FCOPY from an old compatibility mode KSAM file to a new compatibilty 
mode KSAM file enter:

     FCOPY FROM=OLDFILE;TO=(DATAFILE,KEYFILE) 

OLDFILE is the old compatibility mode KSAM data file.  DATAFILE is the
new compatibility mode data file and KEYFILE is the new compatibilty mode
key file.  The new key and data files are constructed for you with
exactly the same structure as the old key and data files.  The ;NEW
option need not be used.

To FCOPY from an MPE/iX file (a flat file) to an old KSAM file
(compatibility or native mode) enter:

     FCOPY FROM=FLATFILE;TO=KSAMFILE 

To FCOPY from a KSAM file to an old flat file enter:

     FCOPY FROM=KSAMFILE;TO=ANYFILE 

KSAMFILE is either a native mode KSAM file or compatibility mode KSAM
data file.  ANYFILE is an old MPE/iX file.

To FCOPY from a compatibility mode KSAM file, but to treat the file as if
it were an MPE/iX flat file, enter:

     FCOPY FROM=KSAMFILE;TO=ANYFILE;NOKSAM 

You may use the NOKSAM parameter with only compatibility mode KSAM files.

To FCOPY from any old KSAM file (compatibility or native mode) to a new 
native mode KSAM file enter:

     FCOPY FROM=OLDFILE;TO=(NEWFILE) 

OLDFILE is the old KSAM file.  NEWFILE is the new native mode KSAM file.

Additional Discussion 

For more information refer to FCOPY Reference Manual (32212-90003).



MPE/iX 5.0 Documentation