Asanti Help : System Variables : Generic Variables
Generic Variables
You can use variables in a number of different areas to replace parameter and resource settings. These variables are automatically replaced by a text string, or are assigned a text string.
Variable
Description
$COMMENTS
The “Remarks” field in the Administration tab.
$COMMENTS_1-10
The “n”-th paragraph of text in the Remarks field of the Administration tab. A paragraph is a single line of text, delimited by paragraph marks or by the start or end of the text.
$COMPANY
The “Company” field in the Customer Contact information.
$COMPUTER
The name of the Hardware System on which the current Task Processor (or service) is running.
$CONTACTFIRST
The “First” field of the customer’s contact person.
$CONTACTLAST
The “Last” field of the customer’s contact person.
$COPYCOUNT
The Requested Copy Count of an Image (S&D jobs only, sets number of copies of the part that is associated with that image).
$CPM
The Calibrated Printing Mode used for the job.
$CUTTER
The name of the cutting device set for the job.
$DATE
The current date (i.e. the date when the variable is resolved). Insert a space when combining this variable with other variables, e.g. \\$SYSTEMCOMPUTER\ArchiveRoot\$DATE:%Y%m \$JOB\
$DEVICE
The name of the output device.
$DOCUMENTPRODUCER
The producer of the (PDF) document.
$JOB
The “Job name” field in the Administration tab.
$JOBDATE
The date when the job was submitted.
$JOBID
A unique job identifier (intended mainly for internal use).
$JOBNR
A unique job sequence number.
$JOBTIME
The time when the job was submitted.
$MEDIANAME
The name of the media.
$MEDIATHICKNESS
The thickness of the media used.
$OPERATOR
The “Operator” field in the Administration tab.
$ORDER
The “Order number” field in the Administration tab. This is the “Name” field in the Hot Ticket Editor.
$OUTPUTSIZE
The size of the rendered image for a sheet/plate. For DQS, the size of the bounding box of all rendered elements on that sheet.
$PRESS
The name of the press.
$PRINTDATE
The date the job was printed.
$PRINTMODE
The date the job is printed (yyyymmdd) This format is best suited for creating pathnames that sort properly by name. It also follows the ISO guidelines for date and time formats.
$PRINTTIME
The time the job was printed.
$QUALITY
The output quality as specified in the Layout Editor
$RESOLUTION
The resolution of the image.
$RULINGMAP
Name of the RulingMap in case of Application screening, otherwise empty.
$RUNLENGTH
The run length of the job.
$SEPARATION
The color name of the separation.
$SEPARATIONSHORT
The color name of the separation, but the primary colors are 'C', 'M', 'Y' and 'K'. Other names are abbreviated in the same way they are abbreviated by the custom color bar mark.
$SHEET
Evaluates to $SIGNATURE for single or no web impositions. Evaluates to $SIGNATURE $WEB for multi-web impositions.
$SHEET_GRAIN
The grain of the sheet.
$SHEETVERSION
The `SV<n>' version number of a sheet version, with <n> being the $SHEETVERSIONINDEX. When used on a result that has the default single-version set-up, <n> is the same as the $VERSIONINDEX.
$SHEETVERSIONINDEX
The index <n> of the sheet version in the sheet version table, starting at 1, per sheet. When used on a result that has the default single-version set-up, <n> is the same as the $VERSIONINDEX.
$SYSTEM
The name of the Asanti System.
$SYSTEMCOMPUTER
The name of the Hardware System.
$TICKET_TEMPLATENAME
The name of the ticket template that is to be used for a job created by the collecting hot ticket.
$TIME
The current time (i.e. the time when the variable is resolved).
$WHITEMODE
The white application mode (pre-white, post-white or sandwich-white) used to print the white on the sheet/layout. Empty if no white.
NOTE: You can use a drop-down menu in the various contexts to see which variables are supported in which context.
You can also use system variables to automatically print information about a job, a template, or the part of a job that is being printed, since the information that prints varies from one sheet of media to the next.
Variable Syntax
This section explains the variable syntax, and describes how variables are interpreted and replaced by Asanti. Any variable that cannot be appropriately interpreted in a given context will be replaced by an empty string.
NOTE: Variables are case sensitive! For example, $system will not be recognized as the $SYSTEM variable: Instead, it will be interpreted as literal text.
Start and End
Variables always start with a dollar sign ($), immediately followed by the variable name. Any non-alphanumerical character (including space or tab) marks the end of the name.
NOTE: The RLPAGE variables that are used in the Run List settings for automatic page placement do not use the dollar sign. They are delimited using the less than/greater than symbols. For example, <RLPAGE:n>. This is also the case when they are used in an input filename template (Open Connect, Hot Folder).
Braces
The variable name should be enclosed between braces { } when other alphabetical text immediately follows the variable name.
Square Brackets
Square brackets should be used to prevent unwanted gaps when variables cannot be resolved because the value is nil, out of context, or only one value is possible.
For example:
$JOB[-$PART][-$BOOKSIGNATURE][-$RLPAGE][-v$VERSION][-$FLOWNAME]
Width Modifier
Variables can have a width modifier (a colon followed by a number, such as :3). This causes the variable to be substituted with exactly the specified number of characters. If the content is longer than the specified width, Asanti truncates it: If the content is shorter than the specified width, Asanti pads the remainder with blanks. You can customize the padding by inserting a plus (+) or minus (-) sign before the width modifier:
Inserting a “+” before the width modifier specifies that the padding or truncation will be at the end of the variable. Any character you enter after the + will be used as the padding character for the specified number of spaces. For example, +Y12 will result in a 12-character name, padded out at the end with Ys where necessary (e.g. ECO3YYYYYYYY).
Inserting a “-” before the width modifier specifies that the padding or truncation will be at the beginning of the variable. Any character you enter after the + will be used as the padding character for the specified number of spaces. For example, -X12 will result in a 12-character name, padded out at the beginning with Xs where necessary (e.g XXXXXXXXECO3).
When omitted, Asanti assumes "+ " (plus, followed by a space), in which case the padding is done with the “?” wildcard character.
When the string following a $ is not recognized as a variable, it is printed as a literal (e.g. $SITE becomes "$SITE"). To overrule the meaning of the $ character when followed by a legal variable name, you need to prefix the $ with another $: For example, $$SIDE then becomes "$SIDE".
In the following examples, we assume that the job has the following attributes:
Order number ($ORDER) = 0106G0001
Customer contact ($CUSTOMER) = ECO3
Variable Example
Substitution Result
$CUSTOMER$ORDER
ECO30106G001
$CUSTOMER
ECO3
$CUSTOMER:3
ECO
$CUSTOMER:6
ECO3
$CUSTOMER:+ 6
ECO3??.
$CUSTOMER:+_6
ECO3__
$CUSTOMER:-_6
__ECO3
$RLPAGE:-03
001, 002, 003,... 010, ... (3 character nos, padded up front with 0s)
$CUSTOMERX
$CUSTOMERX
${CUSTOMER }P
ECO3P
$CUSTOMER|NO NAME|
ECO3
$CUSTOMER|NO NAME|
NO NAME (when Customer contact is empty)
$ORDER-P
0106G0001-P
$ORDER:>4
0001
$ORDER[:4]
0106 (takes first 4 characters)
$ORDER[5:]
G0001 (takes characters starting from the 5th character)
$ORDER[-2:]
01 (takes last 2 characters)
$ORDER[:-2]
0106G000 (takes all characters that precede the last 2 and includes the last but two character)
Use NONE without the $ sign and between pipe characters to override the default behavior of generating no text if the specified variable is not used. Example: $COMPANY|NONE| generates NONE if the specified company variable is not used.
Date and Time Variable Formats
The date and time variables by default print the date and time according to the regional settings of the computer that evaluates the variable. However, in some cases you may want to have it printed differently.
NOTE: When you use format strings, the date and time variables (DATE/TIME and PRINTDATE/PRINTTIME) produce the same result: Asanti only uses the format to see what has to be printed.
You can modify the behavior of some format codes by prefixing them with #.
Format Code
Description
%#a, %#A, %#b, %#B, %#p,%#X, %#z, %#Z, %#%
# flag is ignored.
%#c
Long date and time representation, appropriate for current locale. For example: Tuesday, August 05, 2008, 12:41:29.
%#x
Long date representation, appropriate to current locale. For example: Tuesday, August 05, 2008.
%#d, %#H, %#I, %#j, %#m, %#M, %#S, %#U, %#w, %#W, %#y, %#Y
Remove leading zeros (if any).
When you specify no format string, $DATE and $TIME default to $DATE:%x and $TIME:%X.
You need to enclose the variable name and format string in braces if you want to print spaces (see examples below).
When you specify an unknown format string, Asanti prints it as a literal (without the %). A width modifier is therefore also printed literally.
Date and Time formatting options
%a
Abbreviated weekday name (first 3 chars).
%A
Full weekday name.
%b
Abbreviated month name (first 3 chars).
%B
Full month name.
%c
Date and time representation appropriate for locale.
%d
Day of month as decimal number (01 - 31).
%j
Day of year as decimal number (001 - 366).
%m
Month as decimal number (01 - 12).
%U
Week of year as decimal number, with Sunday as first day of week (00 - 53).
%w
Weekday as decimal number (0 - 6; Sunday is 0).
%W
Week of year as decimal number, with Monday as first day of week (00 - 53).
%x
Date representation for current locale.
%y
Year without century, as decimal number (00 - 99).
%Y
Year with century, as decimal number.
%z, %Z
Time-zone name or abbreviation; no characters if time zone is unknown.
%c
Date and time representation appropriate for locale.
%H
Hour in 24-hour format (00 - 23).
%I
Hour in 12-hour format (01 - 12).
%M
Minute as decimal number (00 - 59).
%p
Current locales A.M./P.M. indicator for 12-hour clock.
%S
Second as decimal number (00 - 59).
%X
Time representation for current locale.
%z, %Z
Time-zone name or abbreviation; no characters if time zone is unknown.
%%
Percent sign.
Other characters not prefixed with % are printed as literals.
NOTE: You can control the width of the replacement string by using the appropriate format codes. Most of them have a fixed width. Use %a and %b to retrieve the abbreviated day and month names, fixed to 3 characters wide.
Combinations with $DATE
Insert a space when combining this variable with other variables, e.g. \\$SYSTEMCOMPUTER\ArchiveRoot\$DATE:%Y%m \$JOB\
Examples
Format String
Result
Remarks
$DATE
07/09/03
Depends on locale. Equivalent to %x.
$TIME
11:14:45
Depends on locale. Equivalent to %X.
$DATE:%
A Wednesday
 
$DATE:%c
Wed Jul 9 11:16:49 2003
Depends on locale.
${DATE:Week %j}
Week 190
 
$DATE:%A%f
Wednesdayf
%f printed as literal.
${DATE:Hello World}
Hello World
Printed as literal.
$DATE:+ 5
+ 5
Width modifier printed as literal.
$DATE:%y%m%d
030709
 
$DATE:%Y%m%d
20030709
Case matters!
doc. version 6.1.1