Launch a Single Item in an Open Job
Inputs: Parm1 = Job Instance UJP pathname
Parm2 = UJP commands for this item
Returns: FS Number or <0 if error
(for errors see Launch)
This Job function will be called by a customer application to launch a single FS file in the context of an Open Job. The second parameter is a vector of data for the job instance as the second parameter, and the job item number as the third parameter.
Before launch the function will verify that the job status is JS_OPEN (50) or JS_OPENSUSPENDED (52) and that the item number is within the specified batch size for the job, but will not check that the item numbers are sequential or unique. The function will return either the FS number allocated (calculated from the starting FS number and the passed item number), or a negative launch error code.
The format of the second parameter is a sequence of UJP commands specific to the job item. Two separate syntax conventions are supported for this parameter. The first will be assumed if the parameter contains a CRLF delimiter, and the second if it does not. These two options cannot be mixed.
•Commands sent to the DLL from a user application should normally be separated by CRLF.
•From scripting, where a CRLF delimiter is not available, the preferred syntax is simply to concatenate the commands, which will be split apart using the initial $ sign, whenever it occurs outside a double-quoted parameter.
These commands are used to create a temporary job instance UJP, based on the actual UJP, which is used to launch a single job item. The following UJP commands may be passed to be added to this temporary copy, and are processed as follows:
| $job_document | This command is used only when a document is to be sent, and will be used to generate either a $fax_filename or an $email_attach command. The logic used will be as current for the job document command, based on the file extension and content-type parameters. If there are any $job_document commands in the instance UJP (to be sent to every open item recipient) they will not be replaced by commands supplied in the parameter 2 string. |
| $var_def | Each $var_def command in the supplied string will be added, and would supersede any $var_def commands for the matching variable name in the temporary instance UJP. |
| $priority | A single priority value will override the priority specified for the job instance. The priority specified must be a member of the job TOSEND set for the job instance, and the destination must match the Queue Content of the selected queue, if used. |
Other passed commands are assumed to be $fs_template commands and the '$fs_template' prefix should NOT be used:
| (destination) | One of the commands $fax_phone, $voice_phone, $sms_phone or $email_address is required. |
| Other FS commands | Each added command other than those above will replace any commands with the same command name in the instance UJP. |
The presence of the destination command in the supplied command set temporarily causes the instance UJP to be processed as if it was a FB, VB, SB, or EB broadcast for the item. Using more than one of these three commands in a supplied command set is not supported.