Job Create and Launch

JOBCL listfile templatefile [test]
JOBCL [owner=ownername] [jobtype=jobtypename] [list=listname ...]
  [document=docname ...] [template=templatename] [instance=instno]
  [priority=prior] [line=lineno] [file=filename] [replace|proof|launch]

The JOBCL program performs much the same function as FFBC's command-line mode, but in the context of the Job Administration subsystem. It creates a job instance (.UJP and associated files) for the specified owner/jobtype, adds job parameters such as documents, lists and template items if these are not already specified in the owner or jobtype properties, and then launches the broadcast of the job.

The program is also designed so that (in 'mode 1') it can be a drop-in replacement for the command-line version of FFBC to launch jobs which can then be managed, monitored and controlled in the JobAdmin environment.

Command-Line Arguments:

Mode 1: FFBC compatibility:

listfile The full pathname of a single broadcast list file, with extension LST, TLS, TXT, TAB, XLS, XLSX or .DBF
templatefile The full pathname of an FFBC template file with extension .FST. This file will be processed to extract template items as follows:
$fax_cover Will be converted to $cover_sheet in the instance UJP.
$fax_filename Will be converted to $job_document in the instance UJP.
$fax_user Will be discarded.
$job_id Although this value corresponds approximately to job type in the JobAdmin environment, it will be used instead to force a job instance number instno and must therefore be guaranteed unique if supplied. If this instance has been created earlier (for a proof) but not launched, it will just be launched by this command and no processing of the template data will be done; if the job instance has already been launched, this command will fail.
$job_owner Will be used as the ownername for the new job instance. No job type will be generated. If no owner name is present in the template file, an owner name of 'DEFAULT' will be used.
(other commands)$custom_report, $end_job_tasks, $initial_quota, $job_notes, $job_options, $notify_.., $proof_cover, $report_.., $set_state, $status_list will be transferred unchanged to the generated job instance UJP. Note that these commands are UJP commands and not valid in an FS file. All other template file commands will be copied as appropriate directly to $fs_template values in the generated instance UJP.
test A keyword to indicate that only a test transmission is to be launched, using data from the first list item and the phone number from $proof, if supplied.

Mode 2: All features:

Values with embedded spaces may be entered either as "keyword=two words" or keyword="two words"

ownername the name of the job owner (which will be a folder name under FAXFACTS\USERJOBS). If the value is all-numeric, leading zeros are added if the value has fewer than 8 digits.
jobtypename the name of the job type (which will be a folder name under the specified owner name). If omitted, the default NO_JTYPE will be used. If the value is all-numeric, leading zeros are added if the value has fewer than 8 digits.
listname the full pathname of broadcast list to be used if not already specified in the job properties. Alternatively you may specify a single numeric value to indicate the a number in the job properties that is to be selected, or 0 for all lists. Multiple list= parameters may be specified.
docname the full pathname of a document to be broadcast, if not already specified in the job properties. Multiple document= parameters may be specified.
templatename the full pathname of a file containing additional template items which will be used to generate each FS file.
filenamethe full pathname of a document or list.  Extensions TXT TAB LST CSV TLS and DBF are processed as lists; extensions DOC, DOCX, PPT, PPTX, PDF, HTM and HTML are processed as documents; extensions XLS and XLSX are processed as lists only if the filename contains LIST as a substring, otherwise they are processed as documents.  This parameter can be used when launching JOBCL for example from a worker box initiated from the E-Mail Gateway, when the number and sequence of (attachment) parameters is not known in advance.
instno this value will be used to force a job instance number and must therefore be guaranteed unique if supplied. If this instance has been created earlier (for a proof) but not launched, and if no replace keyword is given, it will simply be launched by this command and no processing of the command-line data will be done; if the job instance has already been launched, this command will fail.
prior a value from 1 to 9 to select the priority for the created job
linenothe CopiaFacts line number and nodename, separated by an underscore (as @LNUM_@NODEID) if JOBCL is spawned from an infobox.  This will cause the RUN_VALUE system variable to be set, either with the created instance number or with a negative error code.
replace a keyword to indicate that an instance numbered instno is to be replaced, provided that it has not already been launched.
proof a keyword to indicate that only a proof will be launched. The job properties may specify that the job will be launched automatically unless cancelled; or the job may be launched by a further execution of JOBCL, in which case the launch keyword and instno are required.
launch a keyword to specify that a previously created job is to be launched. Only ownername, jobtype and instno are allowed in this case. If the job instance has already been launched, this command will fail.

Note that if broadcast lists ($listfile) are included in the owner and/or jobtype UJP files which are used to create a new job, the default is that they are NOT selected when a new job is created. In this case a list=0 parameter is needed to select all lists, or one or more list= parameters to select individual list numbers.

Empty or black (double-quoted) parameters are ignored.  This makes it easier to launch JOBCL from an infobox or batch file when the number of lists or documents is not known in advance.

The JOBCL program may return an errorlevel. The codes are given in JOBCL Errors.

Examples:

Mode 1:

JOBCL FFBCTEST.LST SAMPLE.FST

Mode 2:

JOBCL OWNER="My Name" LIST=@FFBASE\TEST.LST DOCUMENT=doc.tif TEMPLATE=TEST.fst