Contents - Index


 

Use FileCopy to create a copy of an existing file.

 

FileCopy may also be entered as CopyFile or Copy.

 

Required Operands

 

SRC is an already existing BIM, workstation, PDS, or VSE file.

 

DEST is the BIM, workstation, PDS, or VSE file to be created.  A file of this name must not already exist.

 

Optional Operands

 

AUDIT specifes whether the audit trail is to be copied also.  Specify "On" or "Y[es]" to copy the audit trail.  Specify "Of[f]" or "N[o]" otherwise.

 

 Currently, this operand is impemented for workstation files only.  Audit trails are always copied for BIM files.

 

 Default: Yes.

 

STAMP specifes whether stamps are to be copied also.  Specify "On" or "Y[es]" to copy the stamps.  Specify "Of[f]" or "N[o]" otherwise.

 

 Currently, this operand is impemented for workstation files only.  Stamps are always copied for BIM files.

 

 Default: Yes.

 

ORIGDATE specifies whether the SRC creation and update dates are to be used for the DEST file.  Specify "On" or "Y[es]" to maintain original dates.  Specify "Of[f]" or "N[o]" otherwise.

 

 Currently, this operand is impemented for workstation files only.  Original dates are never used for BIM files.

 

 Default: No.

 

DATA If DEST is a PROC type VSE file, specifies whether it contains SYSIPT data. Can be "YES" or "NO".

 

 Default: NO.

 

FMT specifies the format of the file being copied.  This is relevant only when a a workstation file is being copied to a host BIM-EDIT system, or when a BIM file is being copied to the workstation.  Specify "Text" if the file is simple text. Specify "Sysin" if the format is 80-character binary data (usually JCL mixed with assembler/compiler output).  Otherwise, specify "Binary".  (Note that a file that contains text and markup, e.g., a word processing file, would not be considered simple text.  Hence, such a file should be specified as "Binary".)  Text data will be translated between ASCII and EBCDIC.  Sysin and binary data will never be translated.

 

 Default: Text.

 

A copy of the source file will be created under the destination file name. Both the text and the file attributes are copied.  The source file and its file attributes are unaffected by the operation.

 

If an asterisk (*) is entered as part of DEST, the asterisk is replaced with the SRC file name.  This facilitates copying a file from one directory to another or making a copy of a file to a suffixed or prefixed name without keying the file name twice (see Examples).

 

FileCopy can be used to copy a file from one type of directory to another type of directory.  For example, a BIM file can be copied to a VSE directory.  However, please note that workstation files have certain attributes that are not stored with BIM files and no attributes at all are stored with PDS and VSE files. Therefore, certain attributes may be lost during such copies.

 

FileCopy can be used to copy a Host file to a workstation directory and to copy an workstation file to a Host directory.

 

FileCopy cannot be used to directly copy a file from one host system to another host system.  However, the file can be copied indirectly.  First, the file is copied from the source host to a workstation directory.  Then, the file is copied from the workstation directory to the destination host.

 

To move a file from one directory to another, see the FileRename command.

 

FileCopy sets last referenced file to the DEST file.

 

When Valid

 

For Host files, the user must have LIST access level for the SRC directory and DEF access level for the DEST directory.

 

Return Codes

 

OK Successful.

DP DEST file already exists.

NF One of the following:

 

SRC file not found.

DEST directory not found.

 

SC Inadequate access level.

 

Procedure Notes

 

FileCopy sets the TXM variables to the attributes of DEST.

 

Examples

 

Create a backup copy of BIM-EDIT file SYREXIO:

 

   => copy syrexio,syrexio-back

 

             -or-

 

   => copy syrexio,*-back

 

Create a BIM file SYCREN using SYCLIST as a skeleton:

 

   => copy syclist,sycren

 

Copy the workstation file OMRPWR3 to directory OM11C:

 

   => copy omrpwr3,\om11c\omrpwr3

 

             -or-

 

   => copy omrpwr3,\om11c\*

 

The Local system is current.  Copy BIM file ED00A.BIREXIO from the BI host system to the current workstation directory:

 

   => copy (bi)ed00a.birexio,*

 

Copy the BIM file ED00A.BI$ASM to the VSE directory BIMLIB.T under the name of BI$ASM.A:

 

   => copy ed00a.bi$asm,(\vs)bimlib.t.bi$asm.a