C$COPY creates an exact duplicate of SOURCE-FILE in DEST-FILE. The usage of C$COPY is:


Remote name notation is permitted on both the SOURCE-FILE and the DESTFILE parameter.

If either the SOURCE-FILE or DEST-FILE parameter specifies a remote file:

FILE-PREFIX is not used to search for file names held in any of the function's parameters. Name aliases are not substituted for names held in the function's parameters. Full path names to the files, including remote name notation on the SOURCE-FILE and DEST-FILE, must be hard coded in the function call. A more portable solution is to use the ACCEPT FROM ENVIRONMENT statement to get pathnames during program execution. See ACCEPT Statement in the ACUCOBOL-GT Reference Manual for more information.

C$COPY returns a zero (0) if successful, a one (1) if the file does not exist or is not a regular disk file, or a two (2) if there is a network error (for example, AcuServer is not running). This value is returned to COPY-STATUS.

For a complete description of C$COPY, excluding the above restrictions, see Appendix I of the ACUCOBOL-GT documentation.