receive_lpd_jobtype.cfg

The sample receive_lpd_jobtype.cfg file sets the workflow and job properties for AFP jobs received through the LPD protocol.

Ricoh ProcessDirector can use this control file to interpret an LPD control file that accompanies an AFP print job received through the LPD print protocol. The format of the LPD control file depends on the operating system of the sending host. For example, an LPD control file received from Windows might contain this information:

orighost=mywindowshost
origuser=annsmith
origname=TestPDF.pdf

To use a control file, set the value of the Child workflow initialization step property for the input device to SetJobTypeFromRules or SetJobTypeFromFileName, and then set the value of the Child workflow parsing rules property to the path and file name of the control file. The SetJobTypeFromRules step uses the control file to set the workflow for the job, convert an optional overrides file submitted with a job to a file in Ricoh ProcessDirector property name=value format for setting job properties, or both; the SetJobTypeFromFileName step uses the control file for setting job properties. All the information in the control file is case-sensitive.

Note: You cannot use a control file to set job properties that are read-only in the Job Properties notebook.

The control file contains these sections:

CONFIGURATION section
This is a global settings section consisting of keywords that define how Ricoh ProcessDirector interprets the LPD control file parameters.
FILE_MODE
This keyword controls how Ricoh ProcessDirector processes the LPD control file. A value of "FILE" instructs Ricoh ProcessDirector to treat all the information in the file as a single record. In this mode, Ricoh ProcessDirector can do search and replace actions. The double quotation marks in the value are required.

A value of "RECORD" for the file mode causes Ricoh ProcessDirector to read the information in the file on a record-by-record basis. The double quotation marks in the value are required.

ATTRIBUTE_PATTERN
This keyword specifies a regular expression that defines how Ricoh ProcessDirector recognizes the names of properties. As supplied by Ricoh ProcessDirector, the value is "\$\{Job.*\}". The double quotation marks delimit the expression and the backslash characters are escape characters that precede the special characters in the expression.

The "\$\{Job.*\}" value instructs Ricoh ProcessDirector to recognize property names as strings that begin with Job. and that are followed by zero or more characters. Ricoh ProcessDirector job property names match this convention, such as Job.Duplex and Job.Print.CumulativeSheetsStacked.

KEYWORD_CASE
This keyword defines the case of the characters in the LPD control file parameter names. Depending on settings on the sending system, parameters might be passed as all uppercase or all lowercase characters. Use a value of "UPPER" or "LOWER" based on the requirements of the installation.

Delimit the beginning and ending of the CONFIGURATION section with CONFIGURATION and ENDCONFIGURATION.

REPLACE section
This section uses sed commands to replace strings in the LPD control file. It is commented out in the sample file. You will probably not need to use it.

Delimit the beginning and ending of the REPLACE section with REPLACE and ENDREPLACE.

PATTERN KEY_VALUE section
This section describes how Ricoh ProcessDirector finds keywords and values, and converts them into tokens by using regular expression groups. As supplied by Ricoh ProcessDirector, the section looks like this:
PATTERN KEY_VALUE
"(.*?)=(.*?),"
ENDPATTERN
The pattern is delimited by double quotation marks and the pattern to the left of the equals sign represents the keyword. The pattern to the right represents the value. This pattern creates a comma-delimited list of keyword and value pairs.
DEFINE statements section
This section uses symbol formulas to set the Ricoh ProcessDirector workflow and job properties from the values in the LPD control file that was passed with the job. Some examples of the types of DEFINE statements that the section can contain are:

Example for AIX:

DEFINE ${Job.JobType} AS "PDF" WHEN (${ORIGHOST} == "mywindowshost")
DEFINE ${Job.Name} AS "${TITLETEXT}" 
DEFINE ${Job.Host.UserID} AS "${ORIGUSER}"
DEFINE ${Job.InputDatastream} AS "PDF" WHEN 
(${ORIGHOST} == "mywindowshost")
DEFINE ${Job.Customer} AS "XYZ" WHEN 
(${ORIGUSER} == "xyzadmin") FINALLY QUIT

Example for Linux:

DEFINE ${Job.JobType} AS "PDF" WHEN (${ORIGHOST} == "mywindowshost")
DEFINE ${Job.Name} AS "${ORIGNAME}"
DEFINE ${Job.Host.UserID} AS "${ORIGUSER}"
DEFINE ${Job.InputDatastream} AS "PDF" WHEN 
(${ORIGHOST} == "mywindowshost")
DEFINE ${Job.Customer} AS "XYZ" WHEN 
(${ORIGUSER} == "xyzadmin") FINALLY QUIT

The DEFINE ${Job.JobType} statement is a conditional statement. In the example, Ricoh ProcessDirector sets the value of the Job.JobType property to PDF when the value of the ORIGHOST parameter from the LPD control file is mywindowshost. If the ORIGHOST parameter has any other value, Ricoh ProcessDirector does not set the workflow from the control file. It sets it using another method, such as by using the workflow that is assigned to the LPD input device.

The DEFINE ${Job.Name} statement sets the value of the Job.Name property to the name of the original input file.

The DEFINE ${Job.Host.UserID} statement is a non-conditional statement. In this example, Ricoh ProcessDirector sets the value of the Job.Host.UserID job property to the value of the ORIGUSER parameter in the LPD control file. Therefore, if the original LPD control file that Ricoh ProcessDirector receives contains origuser=annsmith, Ricoh ProcessDirector sets the value of the Job.Host.UserID property to annsmith.

The DEFINE ${Job.InputDatastream} statement is a conditional statement. In the example, Ricoh ProcessDirector sets the value of the Job.InputDataStream job property to PDF when the value of the ORIGHOST parameter from the LPD control file is mywindowshost. If the ORIGHOST parameter has any other value, Ricoh ProcessDirector does not set the value of the Job.InputDataStream property.

The DEFINE ${Job.Customer} statement is a conditional statement that can cause Ricoh ProcessDirector to stop reading any more DEFINE statements in the control file. If the condition that the statement defines is true, Ricoh ProcessDirector stops reading the control file. If the condition is false, Ricoh ProcessDirector continues to evaluate any other DEFINE statements that follow the FINALLY QUIT statement.