:PRINT

Use the :PRINT script statement to write text to the activation report or to the Requests view. The context in which you use :PRINT determines the result:

  • Used on its own, :PRINT writes text to the activation report. This is useful for displaying processing results and verifying that script variables are replaced correctly.

    Note: Your system may be configured to write :PRINT output to the Automation Engine log in addition to the activation report.

  • Used inside :BEGINREAD...:ENDREAD statements, :PRINT displays text in the Requests view, letting you provide information or define an input mask for the user. The request is displayed in AWI when the object is activated or generated.

More information:

Syntax

: P[RINT] Text1 [,Text2]

Parameters

Parameter Description Format
Text1 Text to display in the activation report or Requests view Script literal or script variable
Text2
(Optional)

Additional text.

In the activation report, Text1 and Text2 are written on separate lines.

In the Requests view, Text2 is appended to Text1, or placed before the text field if a :READ statement follows.

Script literal or script variable

Important Considerations

  • Blanks at the end of the text are truncated. Script variables in Text1 and Text2 are replaced with their values.

  • The maximum length for Text1 and Text2 combined is 1024 single-byte characters (fewer if multi-byte characters are used). In a dialog context — for example between :BEGINREAD... :ENDREAD — the maximum is 256 single-byte characters.

For activation reports, note the following:

  • Specify Text1 in single or double quotation marks to write the text on its own line in the report.

  • Text2 does not require quotation marks.

  • If both Text1 and Text2 are specified, they are written on separate lines.

For the Requests view, note the following:

  • Text2 is appended to Text1.

  • If a :READ statement follows, Text1 is placed before the input request and Text2 is placed before the text field.

Examples

The following example writes a phrase containing the current date to the activation report.

: SET &DATE# = SYS_DATE (DD.MM.YY)

: PRINT "The daily evaluation of &DATE# is activated."

The following example displays an instruction above the input field in the Requests view.

: BEGINREAD

: PRINT "", "Enter here:"

: READ &ANR# ,, "Account number"

: ENDREAD

See also: