All the Job Administration functions in CF9JOBADM.DLL can be accessed from CopiaFacts scripts. The parameters are set by assignment to system variables J_PARM1, J_PARM2 and J_PARM3. The function is called by assigning the function name to system variable JOB_DLL_CALL, with the result returned in the DLL_RESULT variable. Some functions will return string values which can be read in variables J_PARM1 and J_PARM2 after the function returns.
![]() | The detailed function documentation is written for programmers who are calling functions in a DLL from a custom application. You need to apply a programming mentality to the task, not a scripting mentality, when invoking the functions in a script. |
![]() | Always check the return value of every function you call. The possible error codes are listed or linked from the reference documentation for each function. |
To enable the Job Admin Scripting interface, you must first specify the maximum size of all the above string parameters using a $environment command in FAXFACTS.CFG. Returned values longer than the size you specify will be silently truncated. Do not attempt to use the 'Maxbuf' Job Admin function to change the maximum size dynamically.
The scripting feature should be used for administrative operations only, in scripts normally called from $worker-box FS files: do not attempt to call any job functions while the channel is processing a job item to send a fax, voice, e-mail or SMS transmission for the same job.
The details of the usage of the scripting variables are as follows:
| JA_MAXBUF | Set this variable on a $environment command in FAXFACTS.CFG to the size of the parameters you require. If this variable is not specified none of the other variable assignments in this topic will have any effect. |
| J_PARM1 | Set this variable to the value to be passed as parm1, which is often the pathname of a job instance UJP file. If the DLL function changes the value, it will be available in this variable after the DLL call returns. |
| J_PARM2 | Set this variable to the value to be passed as parm2. If the DLL function changes the value, it will be available in this variable after the DLL call returns. |
| J_PARM3 | Set this variable to the numeric value to be passed as parm3. If the value you set is not a valid decimal number, the value passed to the DLL is undefined. The DLL function will not change this value. |
| JOB_DLL_CALL | Assigning the job function name to this variable will make the function call and return the result to the DLL_RESULT variable. |
Example FAXFACTS.CFG command:
$environment * JA_MAXBUF 4096
Example scripting commands:
$set_var J_PARM1 "@ownerpathname"
$set_var J_PARM2 "@jobtypepathname"
$set_var J_PARM3 0
$set_var JOB_DLL_CALL CreateInstance
$if @DLL_RESULT > 0
$set_var instancepathname @J_PARM1
$else
; handle error ...
$endif