Print Function

Action

Prints additional information to the output that displays on the Virtual User tab in the Output pane. Additionally, the data is written to the log file.

Include file

Kernel.bdh

Syntax

Print( in sMsg         : string,
       in nDisplayType : number optional,
       in nColor       : number optional);
Parameter Description
sMsg The information (message) that is printed in the Text column of the Virtual User tab in the Output pane.
nDisplayType

Specifies which option(s) must be set in the upper part of the Monitor window so that the information is generated (optional). If the message does not display on the Virtual User tab in the Output pane, make sure to enable all respective filters.

  • OPT_DISPLAY_ERRORS

  • OPT_DISPLAY_TRANSACTIONS

  • OPT_DISPLAY_TIMERS

  • OPT_DISPLAY_FUNCTIONS

  • OPT_DISPLAY_INFO

  • OPT_DISPLAY_DATA

  • OPT_DISPLAY_ALL. Generates the message independent of the Monitor window settings (default).

nColor

Color used to print the information (optional). Defined colors are:

  • TEXT_BLUE

  • TEXT_RED

  • TEXT_BLACK

  • TEXT_MAGENTA (default)

  • TEXT_GREEN

  • TEXT_GRAY

Example

dcltrans
  transaction TPrint
  begin
    ...
    // display the message in red
    Print("Error executing SQL command", OPT_DISPLAY_ALL, TEXT_RED);
  end TPrint;

Output

Error executing SQL command

Sample scripts

Trans.bdf, MutexLogin.bdf