Top
NetCOBOL V11.0 CBL Subroutines User's Guide
FUJITSU Software

4.5 CBL_COPY_FILE

This routine copies a file.

Specification

Parameter data definition
01  file-name-1  PIC X(n).
01  file-name-2  PIC X(n).
01  status-code  PIC S9(4) COMP-5.
Calling format
CALL "CBL_COPY_FILE"
    USING file-name-1
          file-name-2
    RETURNING status-code.

Interface

file-name-1

Specifies the name of the file to be copied. If no path name is specified, the current directory is assumed. The end of the file the name is indicated by a blank or null character. The maximum size of the file name is 255.

file-name-2

Specifies the name of the new file. If no path name is specified, the current directory is assumed. It must be terminated by a blank or null character. The maximum size of the file name is 255.

Return code

The return code is set in the status-code specified in the RETURNING clause.

status-code
  • 0: Successful

  • Other than 0: Failure