The following describes the contents of the $_JOB array. This array is used for Batch Wizard jobs and allows for user customization of Batch Wizard jobs.

$_JOB.report - an array containing report variables

$_JOB.report.filename - a string containing the full report filename and path

$_JOB.report.filenames - an array of strings that can be set to override the default report filenames for report pages 1 and above; contains only the base names (no paths and no extensions); see onGetReportFilename()

$_JOB.report.filenameext - a string containing the report filename extension (like "html" or "xml")

$_JOB.report.folder - the folder that contains the report files (does not end in a slash); for reading only

$_JOB.report.footer - contains the report footer that is appended to the end of reports; if set it will override the default footer; change in onReportFooterLoaded()

$_JOB.report.footer2 - if set then the value is appended to the report immediately before the </body> tag; can be used to insert script elements (New v16.0200)

$_JOB.report.xmlmessageformat_WCAG2 - (tick_16Enterprise only) change the format of the message element for WCAG 2.0 message when outputting XML; change in or before onBeforeMainStart() (New v16.0102)

$_JOB.report.xmlmessageformat - (tick_16Enterprise only) change the format of the message element when outputting XML; change in or before onBeforeMainStart() (New v16.0102)

$_JOB.linkcheck - true if the link checker is enabled, else false; can be set (but not read) to override the default in onFunctionsLoad() or onBeforeMainStart(), afterward it should be read only (New v12.0013)

$_JOB.openineditor - an array of strings with each string being a document to open in the editor after the job is complete (New v14.02)

$_JOB.startdate - a string representing the date the job was started; used as the generated date for reports; change in onFunctionsLoad()

$_JOB.starttime - a string representing the time the job was started; used as the generated time for reports; change in onFunctionsLoad()

$_JOB.veofile - a string with the full pathname to a VEO (validator engine options) file to use; change in onFunctionsLoad() or onBeforeMainStart(), afterward it should be read only (New v15.9901)

$_JOB.xmlstartdate - (tick_16Enterprise only) a string representing the date the job was started in yyyy-mm-dd format and in the local time zone; used as the generated date for XML reports; change in onFunctionsLoad() (New v16.0204)

$_JOB.xmlstarttime - (tick_16Enterprise only) a string representing the time the job was started in hh:mm:ss format and in the local time zone; used as the generated time for XML reports; change in onFunctionsLoad() (New v16.0204)

NOTE: Changing certain variables or changing them at the wrong time or in the wrong event function could have no effect, unintended side-effects, and/or cause unexpected problems. If changing a variable, then make sure it is not a read-only variable and that it is changed in an appropriate event.

$_JOB.report.xmlmessageformat_WCAG2 and $_JOB.report.xmlmessageformat

Use these case-sensitive variables in the format:

%category% - the message category string

%category2% - a string similar to one of the following example strings (with parenthesis and ending in a space character) or an empty string:  "(Grouped->Mobile) ", "(Accessibility->WCAG 2.0) ", "(Grouped->Tips) ", "(Styles->General) " (New v16.0205)

%charlength% - the length of the section of text that caused the message to be generated (starting at the line and character location of the message)

%charnum% - the character location of the message if available or -1 if not available

%docsource% - the document source line that caused the message to be generated if available, else an empty string; the "highlight" element may be used to surround the specific part of the source that caused the message to be generated

%file% - the source filename (with full path) or URL (with full path) if available, else an empty string (New v16.0205)

%linenum% - the line number of the message if available (1 or greater) or -1 if not available

%linenum2% - the line number of the message if available (1 or greater) or en empty string if not available (New v16.0205)

%msgid% - the message ID

%msgtext% - the message text

%repeatcount% - the number of times the message is repeated (if the option to combine similar messages into one is enabled)

%Type% - the message type (starting with a capital letter) like "Error", "Warning", "Message", or "Comment" (New v16.0206)

%type% - the message type (in all lowercase) like "error", "warning", "message", or "comment"

%sp% - a space character (New v16.0305)

%subtype% - the subtype of the message like "CSS", "Accessibility", "HTML Tidy", "JSLint", etc.

%var|(varname)% - the value of varname as set in the $oma_message.msgvars array in onMessageAdded(); don't include the parenthesis; example: %var|role% to output the value of $oma_message.msgvars.role that was set in onMessageAdded()

%wcag2conflevel1%, %wcag2conflevel2%, and %wcag2conflevel3% - the first, second, and third WCAG 2.0 conformance level for the message if available, else an empty string

%wcag2criterion1%, %wcag2criterion2%, and %wcag2criterion3% - the first, second, and third WCAG 2.0 success criterion for the message if available, else an empty string

%wcag2technique1%, %wcag2technique2%, and %wcag2technique3% - the first, second, and third WCAG 2.0 technique for the message if available, else an empty string

%where% - a string of where the message occurred (if available) or an empty string (if no line number is available); examples: " in line 5 at character 8", " in line 10" (New v16.0206)

Note that unrecognized variables are replaced with an empty string and variables are case-sensitive.

Example:

function onBeforeMainStart() {
 $_JOB.report.xmlmessageformat_WCAG2='<message repeatcount="%repeatcount%" linenum="%linenum%" '+
  'charnum="%charnum%" charlength="%charlength%" type="%type%" subtype="%subtype%" '+
  'category="%category%" msgid="%msgid%"><wcag2><result><level>%wcag2conflevel1%</level>'+
  '<sc>%wcag2criterion1%</sc><tech>%wcag2technique1%</tech></result><result>'+
  '<level>%wcag2conflevel2%</level><sc>%wcag2criterion2%</sc><tech>%wcag2technique2%</tech>'+
  '</result></wcag2><messagetext>%msgtext%</messagetext>'+
  '<docsource>%docsource%</docsource></message>';
}