You are here: Job and Form Set Rules Reference > JDT Rules Reference > InstallCommentLineCallback

InstallCommentLineCallback

Use this job level rule during the AFP printing process to write transactional information into each page of the print stream. The information is written using AFP comment records and contains the recipient batch record information — the same information written into recipient batch files for each transaction.

Before adding the recipient batch record information as a comment record on each page, this rule also calculates and updates several GVM variables and structures that can be used by other rules which are executed during the print process. The values updated include the number of pages in each batch and the current page within the print stream.

The CurPage and TotPage GVM variables must be declared within the recipient batch record definition. Here is an example:

< FIELD:CurPage >

INT_TYPE = LONG

EXT_TYPE = CHAR_ARRAY_NO_NULL_TERM

EXT_LENGTH = 10

< FIELD:TotPage >

INT_TYPE = LONG

EXT_TYPE = CHAR_ARRAY_NO_NULL_TERM

EXT_LENGTH = 10

Normally, the CurPage variable reflects the current page number within the print stream. This is not necessarily the same as the page number that might actually print on the document. The TotPage variable reflects the total number of pages within a given transaction. Depending the other rules in use during the process, the value or meaning of these GVM variables can vary.

The comment information written into the print stream can serve multiple purposes, such as to later facilitate 2-up printing. During a 2-up printing process, you sometimes need to know whether the page on the left and the page on the right are from the same or different transactions. By having the recipient batch record information written into each page, it is possible to query that information and make the appropriate determination. You can use the ParseComment rule during the 2-up printing process to reconstruct the associated GVM variables in memory from the recipient batch record information stored in these comment records.

Syntax

; InstallCommentLineCallback;1; ;

This rule has no parameters.

Example

; InstallCommentLineCallback;1; ;

See also