Job Action Codes for DLL calls
This section includes additional notes on job action code and validation requirements. In almost all cases the parm1 parameter should contain the pathname of the job instance.
The return code from the Job Action function is negative on error and normally 0 on success. However actions 8, 16 and 18 return the number of failed items which have been resubmitted.
ACTION 1 - Report
Performs defined reporting tasks. This action may be requested at any time and will cause a standard report to be produced and faxed or emailed to the specified destination. This action does not run the defined EOJ tasks.
ACTION 2 - Cancel Delayed Launch
The job must be in state 22, waiting for delayed launch. If not, and if the job is currently active, it is suspended (see action code 15).
ACTION 3 - Launch
This action is equivalent to the Launch function. The job status must be less than 30 (active) and not equal to 25 (launch in progress).
ACTION 4 - Launch Proof
This action is equivalent to the Launch function with parm2 set to 'PROOF'. A proof may be launched at any time.
ACTION 5 - Resume
Resume a suspended job. The job status must be 32, 42 or 52.
ACTION 6 - Extract Job Data into TAB-delimited field file
This action runs JOBXDATA on the job. The status must be 80 or higher (completed), or 32 (suspended).
ACTION 7 - Archive the Job
This action runs JOBZIP on the job. The status must be 80 or higher (completed). See also Action 107.
ACTION 8 - Resubmit failed faxes
Any FS files belonging to the job that are in FAIL are resubmitted, and the job status is reset to active. If the job status was previously 80 or higher (completed) then EOJ tasks are set to repeat when the job next completes. Resubmitting failed items will result in multiple entries for the job item in the standard job report (see also action 16). If parm2 contains the string 'outcome' followed by a comma-separated list of outcome class letters (preceded by 'E' for e-mail outcome classes) and outcome codes, only failures with those outcomes will be resubmitted. If parm2 contains the string '|TOSEND' followed by a valid TOSEND number from 1 to 15, the specified TOSEND folder will override the normal retry-tosend specification: you may also add 100 to the specified number to cause any $retry_tosend command in the FS file to be set to the specified value, thus causing the override to become permanent. Finally parm2 may contain a single FS filename (optionally followed by '|TOSENDx') which will caused only one file to be resubmitted.
ACTION 9 - Extract Job Data into DBF file
This action runs JOBDDATA on the job. The status must be 80 or higher, or 32 (suspended).
ACTION 12 - Re-do EOJ tasks
This action fixes the $end_job_tasks command in the UJP to allow it to be repeated, and then sets the job status back to 80 to cause the EOJ tasks to be repeated. The status must be higher than 80 before performing this action.
ACTION 14 - Extract Job Data into XLSX file
This action runs JOBXLDATA on the job. The status must be 80 or higher (completed), or 32 (suspended).
ACTION 15 - Suspend job
If the job status is active, it is suspended.
ACTION 16 - Resubmit failed items
Any FS files belonging to the job that are in FAIL are resubmitted, and the job status is reset to active. If the job status was previously 80 or higher (completed) then EOJ tasks are set to repeat when the job next completes. The standard job list is cleared so that the list produced at the next job completion point will only show the resubmitted items (see also action 8).
ACTION 17 - Get SMS Delivery Outcomes
Any FS files belonging to the job that are in SENT and relate to SMS operations, and for which the value of the variable SMS_DELIVERY_OUTCOME is other than SUCCESS are resubmitted with this variable set to the value 'PENDING'. This causes a status request to be sent to the SMS provider.
ACTION 18 - Resubmit individual failed item
An individual failed item (for which the FS file pathname is in parm2) is resubmitted for the job. This action is intended only for use from JOBADMIN. It does not affect the job status, so may not have expected results if called from elsewhere.
ACTION 19 - Reset EOJ Tasks
This action resets the EOJ tasks. It is intended only for use from JOBADMIN.
ACTION 21 - Launch after delay
This action is similar to action 2 (launch) but checks that the job status is 22 (waiting for delayed launch) and fails if it is not.
ACTION 30 - Restart Bulk WordMerge
This action will re-start a Bulk WordMerge. If the merge is already running the action will be ignored.
ACTION 40 - Enable Continuous Launch
This action on a new job (status 10) will initiate an open launch and set the job status to 40. Parm2 should contain a string representation of the number of FS files to reserve for the job. The result code is the initial FS number which will be used, or a negative value to indicate an error.
ACTION 101 - Delete Job
This action deletes all files associated with the job. If you call this function while the job is active, unpredictable results will occur: job items in progress may complete, fail, or remain undeleted. From JOBADMIN this action can only be selected for active jobs by using 'shift-control-rightclick' on the job instance button. The following files are deleted:
All FS files associated with the job in SENT, FAIL, TOSENDx, PREPROC and POSTPROC
For WordMerge jobs, all files containing fsnum_WM in the job's TEMP folder and fsnum.DFS files in PREPROC
All files in the job's TEMP folder with fsnum._TMP.TIF and fsnum._F*.TIF
All job document files which have TEMP in their pathname
All files in the folder of the UJP with filenames which start with the filename part of the UJP.
ACTION 102 - Delete Unsent Job items
This action deletes all the FS files for a job that are still unprocessed. Items being sent will not be interrupted. No indication of the deleted items will appear in the standard job report, and no data will be available for them in the extracted files from JOBDDATA and JOBXDATA, although an empty record will be included.
ACTION 103 - Launch Unconditional
Do not call the function with this action code. There is very seldom a situation when it is right to do so and you will usually make matters worse by taking this action.
ACTION 104 - Cancel / Fail Unsent Items
The processing depends on the current job state:
|< 20||If the job has had no launch action (conversion, proof or launch) then it is deleted (as for action 101).|
|22||For jobs awaiting delayed launch, the status is first set to 27 (canceled in launch). Then the launching worker box FS file is found and deleted (it will be the FS file named in the JCX file which has .fs in lower case). Finally the job status is set back to 10 (created).|
|25||If the launch is in progress the status is set to 27 (canceled in launch) which will cause any launched FS files to fail. If there is a launching worker box FS it is also found and deleted.|
|30/32||An active or suspended job is set to state 33 (canceled), and all FS files are found and 'touched' so that they are picked up and failed even if set for future action.|
|35/37||An active or suspended MSMQ job is set to state 36 (canceled from queue), and all FS files are found and 'touched' so that they are picked up and failed even if set for future action.|
The action is rejected in other states.
ACTION 105 - Resubmit Canceled VSP items
This action should follow action 104 for a VSP job, and moves pending items from SENT back to a TOSEND folder to be canceled.
ACTION 106 - Archive without deletion
This action will unconditionally run JOBZIP to archive the job, but will not delete files. Use this action code with great caution. This action can also be selected from JOBADMIN after using 'shift-control-rightclick' on the job instance button.
ACTION 107 - Archive Unconditional
This action will unconditionally run JOBZIP to archive the job. Note that if the job is active, FS files may continue to be written back to any of the folders under CALLBACK, after the JOBZIP has been completed. So use this action code with great caution.
ACTION 1001 - Change Owner Password
Supply the owner.ujp pathname in parm1 and the new numeric password in parm2.
ACTION 10001..19999 - Set Priority
Changes the job priority of an active job. First 10000 is subtracted from the value: then the value divided by 100 is used as the source TOSEND queue number (0 means 'select all items) and the remainder after division by 100 is used as the destination TOSEND queue. The value is checked against the job TOSEND set if the job is active. A destination queue which accepts multiple content types is always valid. Otherwise, to change all FS files requires broadcast type of FB, VB, SB, or EB and a matching destination queue and to change from a specific queue requires a destination queue with the same content type as the source TOSEND queue.
Changing the priority of a job before launch is a deprecated use of this function. Only the main $priority value is changed and the 'source' TOSEND queue number is ignored. See also system variable JI_TOSEND.
ACTION 20000 - Schedule job
Delays the job start to the time and date specified in parm2 in one of the formats yyyymmddhhmm, yyyymmdd or hhmm. This action is ineffective if the job has already been launched. See system variable JI_DELAY.
ACTION 20001..20999 - Schedule job
Delays the job start by a number of hours specified by the action code less 20000. This action is ineffective if the job has already been launched. See system variable JI_DELAY.
ACTION 30001..30009 - Update DATAx $var_def field
Changes or adds the value of a job instance properties $var_def line for DATAx, where x is the action code less 30000. The value to be assigned to the DATAx variable is passed in parm2. This action is ineffective if the job has already been launched. These action codes are now deprecated, see 30010 below.
ACTION 30010 - Update $var_def field
The value passed in parm2 should have the form varname=value. This action changes or adds the value of a job instance properties $var_def line for variable varname. This action is ineffective if the job has already been launched. See system variable JI_VARDEF.
ACTION 30101..30108, 30110-30115 - Update Retry Delays NOT YET IMPLEMENTED
The value passed in parm2 should be a string of delay values in the usual format for $retry_delays. The eight action codes apply to retry classes A to H and J to O respectively. Double-quotes around the whole string are optional.
ACTION 40000..40003 - Update Phone and Notify settings
|40000:||Changes the job instance properties $proof and $notify_fax phone numbers to the value passed in parm2. Double-quotes will be added around the value.|
|40001:||Changes the job instance property $proof to the value passed in parm2. Double-quotes will be added around the value.|
|40002:||Changes the job instance property $notify_fax to the value passed in parm2. Double-quotes will be added around the value.|
|40003:||Changes the job instance property $notify_email to the value passed in parm2. Double-quotes will not be added around the value.|
In all 40000..40003 cases an empty parm2 value will delete the corresponding command(s).