HCL Workload Automation, Version 9.4

Prompt definition

A prompt identifies a textual message that is displayed to the operator and halts processing of the job or job stream until an affirmative answer is replied (either manually by the operator or automatically by an event rule action). After the prompt is replied to, processing continues. You can use prompts as dependencies in jobs and job streams. You can use variables in prompts.

There are two types of prompts:
local or unnamed prompts
An unnamed prompt is a prompt defined within a job or job stream definition using the keyword prompt, it has no name assigned and is not defined as a scheduling object in the database therefore it cannot be used by other jobs or job streams.
global or named prompts
A global prompt is defined in the database as a scheduling object, it is identified by a unique name and it can be used by any job or job stream. Variables in global prompts are resolved always using the default variable table. This is because global prompt are used by all jobs and job streams so just one value must be used for variable resolution.

This section describes global prompts. For more information on local prompts refer to Job and Job stream definition.

Note: Predefined or global prompt definitions are reset each time the JnextPlan job is run.

Syntax

$prompt
promptname “[: | !]text

[promptname ...]

Arguments

promptname
Specifies the name of the prompt. The name can contain up to 8 alphanumeric characters, including dashes (-) and underscores (_), and must start with a letter.
text
Provides the text of the prompt. The text of the prompt can contain up to two hundred alphanumeric characters. Based on the character preceding the text, the prompt can behave differently:
  • If the text begins with a colon (:), the prompt is displayed, but no reply is required to continue processing.
  • If the text begins with an exclamation mark (!), the prompt is displayed, but it is not recorded in the log file.
You can use one or more parameters as part or all of the text string for a prompt. If you use a parameter, the parameter string must be enclosed in carets (^). See Variable and parameter definition for an example.
Note: Within local prompts, carets (^) not identifying a parameter, must be preceded by a backslash (\) to prevent them from causing errors in the prompt. Within global prompts, carets do not have to be preceded by a backslash.
You can include backslash n (\n) within the text to create a new line.

Examples

The following example defines three prompts:
$prompt
     prmt1 "ready for job4? (y/n)"
     prmt2 ":job4 launched" 
     prmt3 "!continue?"

See also

For more information about how to perform the same task from the Dynamic Workload Console, see:

Designing your Workload.