Skip to main content

Variables

A Variable contains a single slice of data that can be globally defined for all JAMS Jobs. Variables are a powerful tool that can make batch processing easier and more effective. You can use them to easily change references in multiple places, such as server names or file path names.

Variables are also useful when working in multiple environments. For example, any environment-specific information can be put into Variables. The Jobs that use these Variables will then use the correct value based on the current environment.

Using Variables

Once a Variable is defined, it can be used in a variety of ways, including:

  • As a default value for a Job parameter - When working with multiple Jobs that require the same parameter value, creating a default value within a Variable can greatly increase efficiencies, allowing you to modify a value in one place to make changes to all Jobs that use the Variable.

    note

    An encrypted Variable must be referenced by a Job Parameter. Job Parameter values can be linked to Variable values within the Parameter properties. Ensure the encrypted Variable is set as the Variable for the Parameter.

  • Directly within the Job Source - Variables can be specified in the Job Source using <<VariableName>>. When the Job runs, it replaces <<VariableName>> with the value of the Variable. If you have Variables with the same names in different folders, use the fully qualified path to the appropriate Variable. It is recommended to map the Variable to a Parameter on the Job and reference the Parameter value in Job Source. This allows you to select the References tab on the Variable and see all the Jobs/Folders that use it.

    %JDEDRIVE%
    cd %JDEBIN32PATH%
    runube <<UBEUSERNAME>> <<UBEPASSWORD>> <<UBEENV>> <<ROLE>>
    note

    When using a Parameter and a Variable that have the same name, the Parameter takes precedence. To use the Variable rather than the Parameter, enter the fully qualified path to the Variable within the <<>>.

  • As an undefined parameter in a parsed Job - Parsed Jobs can use the value of a Variable. In fact, the Variable does not need to be associated with the Job, other than to include the Variable within the command file (source) where you need the Variable's value to appear.

  • In Job Dependencies - One type of Dependency relies on the value of a Variable. You can quickly define Dependencies that require a specific Variable condition to execute a Job.

  • In Triggers - Triggers support both event and calendar scheduling simultaneously. You can design a Trigger to use the value of a Variable to fire Trigger actions.

  • In your application programs and/or DCL command procedures - You can retrieve or set the value of Variables using command procedures. This can be useful for Jobs that do not use a parsed execution method, but still need to use the value of the Variable for their process. Whether parsed or not, Jobs that have access to the JAMS command-line interface can set the value of Variables.

Variables Screen

The Variable screen lets you view, create, modify, and delete Variables. Each Variable displays the following:

  • Variable Name – This field displays the name of Variable.
  • Description – This field displays an optional description of the Variable to provide more information.
  • Data Type – This field displays the type of data the Variable will store.
  • Encrypted – This field displays Yes or No to indicate if the Variable has been encrypted.
  • Last Change UTC – This field displays the date and time the Variable was last modified.

Creating a Variable

When you create a Variable, ensure it has the correct security options set. Variables do not inherit security settings from other JAMS objects, such as Folders. If you do not add other groups or users, only the JAMS administrators and the account that created the Variable will have access.

  1. Click Execution from the main menu.
  2. Click Variables.
  3. Under the Folder Navigator, click a Folder where the Variable will be saved.
  4. Click Add.
  5. In the Variable Name field, enter a unique Name for the new Variable. Note that this name will be used when referencing the Variable elsewhere in JAMS.
  6. In the Data Type field, select a data type for the Variable.
  7. In the Value field, enter a default value for the Variable.
  8. In the Description field, enter a short summary to describe the Variable.
  9. Click Save and Continue to Edit.
  10. Click the Value tab.
  11. If needed, select the Encrypt Value checkbox to encrypt the Variable. See the section below for more information.
  12. Click the Security tab.
  13. Click ADD to add additional Active Directory groups or users to have access to the Variable.
  14. Click Save.

Modifying a Variable

  1. Click Execution from the main menu.
  2. Click Variables.
  3. Under the Folder Navigator, click a Folder.
  4. Click a Variable and select Properties.
  5. On the Summary tab, you can change the name and the description.
  6. On the Value tab, you can change the date type or value. You can also encrypt the value.
  7. On the Security tab, you can change the users/groups that have access to the Variable.
  8. Click Save.

Encrypting a Variable Value

You can encrypt a Variable value. You can see and change the value of an encrypted Variable if you have the Decrypt permission on that Variable. To view the value, use the Display Value option on the Value tab in the Variable definition.

note

The Encrypt Value checkbox cannot be cleared after you select it.

See the Using Variables section for details on using an encrypted Variable in the Job source.

  1. Click Execution from the main menu.
  2. Click Variables.
  3. Under the Folder Navigator, click a Folder.
  4. Click a Variable and select Properties.
  5. Click the Value tab.
  6. Select the Encrypt Value checkbox.
  7. Click Save.

Deleting a Variable

Before deleting a Variable, ensure all Jobs or Folders that currently use it have been updated to remove references to it. To view where it is referenced, click the Variable, select Properties, and then view the References tab.

  1. Click Execution from the main menu.
  2. Click Variables.
  3. Under the Folder Navigator, click a Folder.
  4. Click a Variable and select Delete.
  5. When prompted to confirm the deletion, click Delete.

Copying a Variable

You can copy a Variable from one Folder to another.

  1. Click Execution from the main menu.
  2. Click Variables.
  3. Under the Folder Navigator, click a Folder.
  4. Click a Variable and select Copy.
  5. Under Folder Name, click BROWSE and select the Folder where the Variable will be saved.
  6. Click Select.
  7. In the New Variable Name field, you can rename the Variable, if needed.
  8. Click OK.

Variable Data Types

  • Text
  • Integer
  • Date
  • Time
  • DateTime (a date and time of day, MM/DD/YYYY 2:00:00 PM)
  • Float (a floating-point number, 3.0, -122.5)
  • Unknown (any data type)
  • Boolean

Variable Tabs

You can modify an existing Variable by opening it and modifying the options on the tabs. Click the name of the Variable to open its properties. The following tabs are available:

Summary TabDescription
Folder NameThis property lists the Folder where the Variable is saved.
Variable NameThis property is the unique name for the Variable.
DescriptionThis optional property can provide a more complete explanation of the Variable.
Last Change UTCThis property displays the date and time when this Variable was last modified.
Value TabDescription
Display ValueThis option lets you view the value of an encrypted Variable. This option is available only if the user has the Decrypt and Inquire ACEs.
Data TypeEach Variable must be assigned a Data Type as described in the previous section. Use the dropdown list to make a selection.
ValueEnter the value of the Variable that corresponds with the selected Data Type.
EncryptThis checkbox lets you encrypt the Variable value. After a value has been encrypted, it cannot be decrypted. If the Variable is currently encrypted, an Encrypt Value property is shown and it displays “Encrypted.” .
Last Change UTCThis property displays the date and time when this Variable was last modified.
Security TabDescription
Security RightsThis tab displays the users/groups that have access to this Variable as Access Control Entries (ACE). Each ACE is configured with a set of rights, specified below.
  • Change: This option allows you to modify the Variable if you also have Change access to Variables.
  • Inquire: This option allows you to inquire into the Variables if you have Inquire access to Variables.
  • Decrypt: This option allows you to view the value of an encrypted Variable. If this option is selected, you can use the Display Value checkbox on the Variable. It also enables you to use an encrypted Variable as a parameter value.
  • Delete: This option allows you to delete the Variables if you also have Delete access to Variable definitions.
  • Control: This option allows you to modify the Variable’s Access Control List.
References TabDescription
ReferencesThe References tab lets you view where the Variable is referenced within JAMS.