global variable

Description

Define a global variable and (optionally) assign a value to it, or assign a value to an existing global variable.

Arguments

name
Name of the global variable.
value
(Optional) Value to assign to the variable.

Valid contexts

This action may be used within the following project items: test modules and user-defined actions.

Notes

  • A global variable, subsequent to its declaration, is visible throughout all test modules and invoked actions within one execution run.
  • For a given execution of global variable, if name specifies a global variable that already exists, the action merely assigns a new value (in the value argument) to the existing variable.
  • Restrictions on usage:
    • A variable may not be declared within a use data set block if it has the same name as any of the data set headers.
    • Same-named local and global variables may not be declared within the same local variable scope level.
  • Use variables within pound sign (#) expressions to access their contained values.

Applicable Built-In Settings

The following settings are applicable to this action: remove double quotes from cellsnone.

Example

Action Lines

Result