The Group Variable operation is
related to a feature in SLIK called User Defined Variables. When defining various operations rather than using a literal
value, you can use a symbolic name or variable (i.e., $division_code).
At runtime SLIK substitutes the variable value based on the current group
variable name. Typically a group variable name is specified at the batch
level.
However this operation type allows you
to install a different group variable as part of the processing steps. This
makes it is possible to set up different groups for each division within a
company. As each job runs it uses
the currently installed group variable collection to perform variable
substitution.
For example, an SQL Statement
operation may be specified as “DELETE from Orders where DIVCODE =
$division_code”. At runtime SLIK will change the $division_code to be the
value specified in the User Defined Variable for the currently selected Group
Variable.
|
Group
Variable Name |
Variable |
Value |
|
Admin |
division_code |
123 |
|
Sales |
division_code |
456 |
|
Manuf |
division_code |
789 |
|
Systems |
division_code |
234 |
By attaching Group Variables to
Operation Types you do not need to create duplicate operation type records
within the system for each division.
Group Variables are a user-defined
collection of name/value pairs associated with a group name. They are mainly
useful in companies that may have different divisions or you want to minimize
maintenance by using variables during the process of defining interface
operations. By using variables (e.g., $division_id) in operations you only need
to change the variable value in one place rather than having to locate and edit
each operation that references the variable.
Each batch can have a particular Group
Variable associated with it. In addition you can install a new set of group
variables by using the “Group Variable” operation as a job.
It is important to note that
group/user variables are only initially loaded once during startup of the SLIK
Server. If you add or change a group variable and want SLIK to start using the
definition immediately at runtime you can have SLIK reload the variable
definitions by checking on the Reload
User Variables button.
To maintain Group Variable select Maintain ® Group Variables… from
the main menu.
This displays the following form:
|
The Group Variable ID field
holds the system generated unique identifier for the Group. The Group Variable ID field automatically populates on
creation of the Group Variable record.
|
|
|
The Group Name field details the
name of the group the record relates to. |
|
|
The User Variable ID field holds
the system generated unique identifier for the system defined user.
The User Variable ID field automatically populates on creation of
the Group Variable record. |
|
|
The User Variable Name field
details the name of the variable user. |
|
|
The Value field indicates the
variable value to be used. |