Automation Engine Script Guide > Ordered by Function > Activate Objects > :PRINT

:PRINT

Script Statement: It can be used to write a text to a dialog for user queries or to the activation report of an object.

Syntax

:P[RINT] Text
:P[RINT] Text1, Text2

Syntax

Description/Format

Text, Text1, Text2

Text that should be written to the dialog box or activation protocol, maximum 1024 characters for Text or Text1 + Text2.
Format: script literal or script variable.

Comments

This script statement can be used in two areas:

Display in the Activation Protocol

:PRINT writes the indicated text in the activation protocol. This can be useful to have processing results displayed. It can also be used to check whether the script variables have been replaced correctly. The activation protocol is part of the report.

Syntax

Description

:PRINT Text

The text is displayed in a separate line.

:PRINT Text1, Text2

Extra lines are created for Text1 and for Text2.

An extra line is only created if Text1 is specified either with single or double quotation marks. This does not apply for Text2.

Display in the Dialog Box

:PRINT writes the indicated text in dialog boxes (:BEGINREAD... :ENDREAD) for user queries. It can be used to structure input masks and add explanations.  

Syntax

Description

:PRINT Text

The text is displayed in a separate line.

:PRINT Text1, Text2

If a :READ statement follows a script statement, Text1 is placed before the input request and Text2 before the text field. Otherwise, Text2 is appended to Text1.

It applies to both areas that the script variables included in the texts are replaced by their values.

TThe administrator can define whether this script statement's output should only be written to the activation log or also to the the Automation Engine's report / log file in the SERVER_OPTIONSof the variable UC_SYSTEM_SETTINGS.

Important note :PRINT truncates blanks at the end of the text that should be output. 

Examples

In this example, the output of text in the activation protocol is shown whereby the current date is used in a script variable.

:SET &DATE# = SYS_DATE(DD.MM.YY)  
:
PRINT "The daily evaluation of &DATE# is activated."

In the example, the text "Enter here:" is displayed in the dialog box for user queries above the input box.

:BEGINREAD
:
PRINT "", "Enter here:"
:
READ &ANR#,,"Account number"
:
ENDREAD

 

See also:

Script element Description

:BEGINREAD... :ENDREAD

They are used to define the beginning and end of a dialog box for user queries.
:READ Queries the user in a dialog.

Script Elements - Activating Objects

Sample Collection:
Database Maintenance with Options

Setting End States depending on Report Contents

Retrieving Error Message and Number

Reaction to external Events

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by function