This Activity will copy file(s) from one directory to another.
You can specify the full path and name of a particular file to be copied or you can specify a pattern in the file and extension portion to copy one or more files that match the pattern.
On IBM i servers, this activity operates on the integrated file system–you may be able to copy objects in the QSYS file system, but you must use IFS file system notation to do so.
When executed on an IBM i platform, this activity is capable of performing data conversion between different CCSIDs during the copy operation. For example, to convert the data in a text file from its original encoding to UTF-8 you could use the parameter values TOCCSID(1208) DTAFMT(*TEXT).
FROMFULLNAME: Required
This parameter specifies the path and name of the file(s) to be copied. You can specify the full path and name of a particular file to be copied or you can specify a pattern in the file and extension portion to copy one or more files that match the pattern.
Windows server examples:
c:\mydir\my*.*
c:\mydir\myfile.txt
IBM i server examples:
/mydir/my*.*
/mydir/myfile.txt
TODIRECTORY: Optional (*)
This parameter may contain the full directory path of the destination directory. If specified, the file(s) will be copied to this new location using the same name and extension as the original file(s). If not specified, you must provide a value for the TOFULLNAME parameter.
TOFULLNAME: Optional (*)
This parameter specifies the path of the directory the object is to be copied to AND the new name of the object. If specified, the file will be copied to this new location using the new file name and extension specified. If not specified, you must provide a value for the TODIRECTORY parameter.
| If you specified a pattern in the FROMFULLNAME parameter to copy one or more files matching the pattern, you should NOT use this parameter. You should specify a value for the TODIRECTORY parameter instead. |
REPLACE: Optional
This parameter specifies whether the target file(s) is replaced if it already exists.
*NO – the target file(s) is not replaced. If the target file already exists, the COPY_FILE activity will end in error.
*YES – If the target file(s) already exists, it is replaced.
FROMCCSID: Optional, IBM i servers only
This parameter specifies the method for obtaining the coded character set identifier (CCSID) for the source of the copy operation. This CCSID will be used for data conversion, if requested.
This parameter corresponds directly to the FROMCCSID parameter of the IBM i CPY command and you may use any values that are defined for the CPY command. At IBM i V7R1 the possible values include *OBJ, *PCASCII, *JOBCCSID or a CCSID value in the range 1-65533. Refer to the IBM documentation for the CPY command for more information.
The special (default) value *DEFAULT specifies that the FROMCCSID parameter will not be specified. Note that this parameter applies only when LANSA Composer is running on an IBM i server.
TOCCSID: Optional, IBM i servers only
This parameter specifies the data coded character set identifier (CCSID) for the target of the copy operation.
This parameter corresponds directly to the TOCCSID parameter of the IBM i CPY command and you may use any values that are defined for the CPY command. At IBM i V7R1 the possible values include *OBJ, *CALC, *PCASCII, *STDASCII, *JOBCCSID or a CCSID value in the range 1-65533. Refer to the IBM documentation for the CPY command for more information.
The special (default) value *DEFAULT specifies that the TOCCSID parameter will not be specified. Note that this parameter applies only when LANSA Composer is running on an IBM i server.
DTAFMT: Optional, IBM i servers only
This parameter specifies the format of the data in the file to be copied..
This parameter corresponds directly to the DTAFMT parameter of the IBM i CPY command and you may use any values that are defined for the CPY command. At IBM i V7R1 the possible values are *TEXT and *BINARY. Refer to the IBM documentation for the CPY command for more information.
The special (default) value *DEFAULT specifies that the DTAFMT parameter will not be specified. Note that this parameter applies only when LANSA Composer is running on an IBM i server.
AUT: Optional, IBM i servers only
This parameter specifies the method used to assign authority information to copied objects.
This parameter corresponds directly to the AUT parameter of the IBM i CPY command and you may use any values that are defined for the CPY command. At IBM i V7R1 the possible values are *OBJ, *INDIR and *INDIROBJ. Refer to the IBM documentation for the CPY command for more information.
The special (default) value *DEFAULT specifies that the AUT parameter will not be specified. Note that this parameter applies only when LANSA Composer is running on an IBM i server.
FULLNAMEOUT
Upon successful completion, this parameter will contain the full path and file name of the resulting destination file.
| If you specified a pattern in the FROMFULLNAME parameter to copy one or more files matching the pattern, then this output parameter will contain the pattern you specified qualified with the path to the target directory. This is usually not useful, and in particular you should note that it should NOT be assumed that the resulting string provides a pattern match for the exact set of files that were copied by the COPY_FILE activity. |