i-effect Manual

CPYEFFUNIQ, copy or move IFS file with unique name

Use

With the command CPYEFFUNIQ IFS files can be copied or moved to another IFS directory. This action generates a unique file name if the file with the same name already exists in the target directory. The command can be used in the i-effect server as *IFS SINGLE, *SCHEDULE or *MONITOR.

Parameters and their meaning

The command has the following parameters


Parameter

Value

Description

FRMIFSFILE


Qualified name of the input file in the IFS file system.  

TODIR


Name of the target directory in IFS to which the object should be copied.

TOFILE


The name of the destination file.


*FRMFILE

The name of the target file corresponds to the name of the input file

DELETE


Determines whether the source file is deleted


*YES

The input file in parameter FRMIFSFILE is deleted after the operation.


*NO

The input file in parameter FRMIFSFILE is not deleted.

CRTDIR


Defines whether the target directory is created if it does not exist.


*YES

The target directory is created if it does not exist.


*NO

No directory is created.

Application example

Description

Command Parameters

Move the data /tmp/mydir/myfile to the target directory /tmp/myotherdir

CPYEFFUNIQ FRMIFSFILE('/tmp/mydir/myfile') TODIR ('/tmp/myotherdir') TOFILE(*FRMFILE) DELETE(*YES) CRTDIR(*YES)