Please enable JavaScript to view this site.

CopiaFacts™ Reference Manual

Copy Variable Definitions to FS file

$var_def_copy [PR|OC]

This command is only valid in a $type fsfile infobox. It provides a shortcut method of copying the complete current list of user variables into the generated FS file as $var_def commands.  The variables copied comprise:

•Variables defined using $var_def in the active user profile.

•Variables defined using $var_def in the active FS file, if any.  This is the FS file that contained the $worker_box, $fax_pre-process, or $fax_post_process command that initiated the infobox sequence of which this IIF is a part.

•Variable values assigned using $set_var commands in the current infobox sequence which precede this $var_def_copy command in the current IIF.  Note that the $var_def_copy command will not include user variables defined with $set_var commands that follow it in the same infobox file.  You can use $set_var to assign system variables that are available only at the time of the fax (for example @DNIS) to a user variable (for example MYDNIS) that will then be copied and available in the generated FS file.

The parameter on this command is used as follows:

PRA keyword indicating that values of all the non-empty PR_... system variables are to be copied instead of the user variables.  This is for use in a post-receive infobox to allow the results of a receive operation to be copied for processing in a later infobox called by the generated worker-box FS file.
OCA keyword indicating that all the non-empty OC... system variables are to be copied instead of the user variables.  This is for use in a post-process infobox to allow the results of a transmit operation to be copied for processing in a later infobox called by the generated worker-box FS file.
In the copies, the underscore is replaced by a percent sign.  So for example PR_FAXPATH becomes PR%FAXPATH.  Do not reference the % variables in the same $type fsfile infobox because they will expand to empty.

You can use all the three types of $var_def_copy command (OC, PR and without a parameter) in the same infobox.  You should avoid duplicating any one type, which would merely repeat the same lists of commands into the generated FS file.

Example:

$set_var MYDNIS @DNIS ; if DNIS value is needed in the generated FS

$var_def_copy         ; copy all USER variables (including MYDNIS)

$var_def_copy PR      ; copy all PR_... system variables as PR%...

$var_def_copy OC      ; copy all OC_... system variables as OC%...

$var_def MYVAR "new"  ; override copied variable