Develop > Programming > System Language reference > List: rtecalls > rtecall("filecopy") function

rtecall("filecopy") function

A RAD function that copies all of the data in a collection to another file variable. The database dictionary record for both the source and target files must exist. Records are only added.

Function

rtecall("filecopy")

Format

$L.success.flg=rtecall($L.fnc.name, $L.return.code, $L.dbdict.source.name,
$L.dbdict.target.name, $L.count, $L.bad)

Parameters

The following parameters are valid for the rtecall("filecopy") function:

Parameter Data type Description
$L.success.flg Logical Indicates if the function was successful.
$L.fnc.name String Name of the sub-function to call, in this case "filecopy".
$L.return.code Number Provides a more detailed return code.
$L.dbdict.source.name String The name of the source database dictionary record.
$L.dbdict.target.name String The name of the target database dictionary record.
$L.count Number A count of the number of records successfully moved.
$L.bad Number A count of the number of errors encountered.

Factors

If the $L.success.flg is false, the function failed. If it is true, the function succeeded.

Example

$L.dbdict.source.name="location"
$L.dbdict.target.name="locationbak"
$L.success.flg=rtecall("filecopy", $L.return.code, $L.dbdict.source.name,
$L.dbdict.target.name, $L.count, $L.bad)

Returns the locationbak file as an exact copy of the location file.