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

ParseComment

Use this form set level rule when merging two AFP print streams in a 2-up printing process. This rule parses the recipient batch record information written as an AFP comment into each printed page back into the GVM variables associated with the recipient batch DFD. You would do this, for example, if you need to know whether the page on the left and right side (as accomplished through 2-up printing) are from the same transaction.

For this rule to be useful, the appropriate comment records, matching the recipient batch record DFD, must have been added to the print streams that are being merged in the 2-up printing process. A rule such as InstallCommentLineCallback is used during the original print step is an example.

Syntax

ParseComment; ;Side;

Parameter

Description

   

Side

You can enter Left or Right or omit this parameter.

Including Left or Right specifies that you want the system to parse the comment record from either the left or right side. The system parses the data from the comment record into the first (primary) instance of the associated GVM variables.

If you omit this parameter, the associated variables from both sides are parsed and stored. The left side comment data is parsed into the first (primary) instance of the associated GVM variables. The right side comment data is parsed into the second instance of the associated GVM variables.

Example

This example shows how to use this rule to access the specific occurrences of RCB comment records retrieved from AFP files.

;ParseComment;;Left;

;PreTransDal;;MyScript;

;ParseComment;;Right;

;PreTransDAL;;MyScript;

If you include the Side parameter, be sure to finish using the values from one record before parsing the other record, because this method replaces the primary instance of the GVM variable data. This example also shows that you can use a DAL script to manipulate the parsed GVM variables.

If you want to use a DAL script and get data from both sides (omitting the Side parameter), you would specify two (2) as the optional second parameter to the GVM function to access the second (right side) set of data.

LeftData = GVM( name )

RightData = GVM( name, 2 )

See also