AddComment

Use this procedure to add a comment to the print stream. Products like Oracle Insurance’s Docusave and IBM’s OnDemand use comments in the print stream as an archive key.

In addition, you can also use this procedure to add comments in these situations:

You call the AddComment procedure from an external script loaded using an INI option in the printer group. Here are some examples:

< PrtType:PCL >
PJLCommentScript = name of the external DAL script
< PrtType:AFP >
OnDemandScript   = name of the external DAL script
DocusaveScript	 = name of the external DAL script
BPGScript        = name of the external DAL script
< PrtType:XER >
DocusaveScript   = name of the external DAL script

If you call AddComment from the GenData program, you will receive an error. For more examples, see DAL Script Examples.

Syntax

AddComment (Comment, Convert)

Parameter

Description

Comment

Enter the string you want used as a comment in the print stream or the name of a section variable field that contains the comment.

Convert

Enter one of these options:

0 - (zero) convert the string to EBCDIC

1 - convert the string to ASCII

2 - do not convert the string

For OnDemand, you will always want EBCDIC comments.

The default is zero (0).

Example

Here are some examples:

Procedure

Result

Explanation

AddComment (‘This is an example’)

1 or 0

Adds the comment, "This is an example", to the print stream.

* Add a comment to PCL print stream

Comment = AppIdxRec( );

AddComment (comment, 1);

1 or 0

Adds a comment containing the archive record ID. The second parameter (1) indicates that the string is to be added as an ASCII string.

* Add form name to the AFP BPG and EPG records (when in BPGScript DAL script)

form_name = FormName() ADDCOMMENT(form_name)

1 or 0 This lets you write the form name into the BPG (Begin Page) and EPG (End Page) records. This DAL script is similar to other functionality for adding comments to AFP print streams, such as DocusaveScript, OnDemandScript, and TLEScript. You can use any combination of these script INI options.

See also