PAUSE command

Pauses a script, and displays information in a dialog box for users.

Syntax

PAUSE message <IF test>

Parameters

Name Description
message

A message to display in the dialog box. The maximum length is 199 characters.

message must be enclosed in quotation marks. If the message contains double quotation marks, enclose it in single quotation marks.

IF test

optional

A conditional expression that must be true in order to process each record. The command is executed on only those records that satisfy the condition.

Note

The IF parameter is evaluated against only the records remaining in a table after any scope parameters have been applied (WHILE, FIRST, NEXT).

Examples

Displaying an error message

You require user input to meet specific requirements. When you detect that the input does not meet those requirements, you use the PAUSE command and display an error message in a dialog box:

PAUSE "The product class must be a 2-digit value."

Remarks

When to use PAUSE

Use PAUSE to display read-only messages on screen in the course of running a script. You can display error messages or information such as the result of an analytic operation.

How it works

While the message dialog box is displayed, execution of the script is halted and only resumes once the user clicks OK to close the message dialog box. For this reason, you cannot use PAUSE in scripts or analytics that must run unattended.

Limitations

PAUSE has the following limitations:

  • cannot be included inside the GROUP command
  • cannot be used in analytics run in Robots, or on AX Server