C$COPY creates an exact duplicate of SOURCE-FILE in DEST-FILE. The usage of C$COPY is:
CALL "C$COPY" USING SOURCE-FILE, DEST-FILE, FILE-TYPE GIVING COPY-STATUS
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:
If acuserve was started on condor in the /acucobol directory, and SOURCE-FILE is:
@condor:index.dat
AcuServer expects to find index.dat in directory /acucobol (note the absence of a "/" after "condor").
If SOURCE-FILE is:
@condor:/usr2/sales_records/index.dat
AcuServer expects to find index.dat in the absolute path /usr2/sales_records.
These pathing rules hold for both SOURCE-FILE and DESTFILE.
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.