COPY_FILE

LANSA Composer

COPY_FILE

This Activity will copy a file from one directory to another.

When executed on a Windows platform a system copy command is executed.

When executed on an IBM i platform an i5/OS CPY command is executed. Note that files in the integrated file system are copied – if you want to copy objects in the QSYS file system, 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).

INPUT Parameters:

FROMFULLNAME : Required

This parameter should contain the full path and name of the file to be copied

For example:   Windows   C:\dir1\myfile.txt

IBM i   /indir/myfile.txt

TODIRECTORY : Optional (*)

This parameter may contain the full directory path of the destination directory.  If specified, the file will be copied to this new location using the same name and extension as the original file.  If not specified, you must provide a value for the TOFULLNAME parameter.

TOFULLNAME : Optional (*)

This parameter may specify 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.

FROMCCSID : Optional, IBM i servers only

This parameter may specify 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 may specify 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 may specify 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 may specify 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.

OUTPUT Parameters:

FULLNAMEOUT

Upon successful completion, this parameter will contain the full path and file name of the resulting destination file.