Page 1 of 1

How to make AUTO EDIT VARIABLE as GLOBAL VARIABLE

Posted: 17 Aug 2012 4:31
by MaheshDude
Hi Friend,

Please let me know how to make an "AUTO EDIT VARIABLE" in the SET tab of Control-M as " GLOBAL VARIABLE", so i can use the same VARIABLE for any Control-M job i run in a production/Test environment.

Here is an example;

I use a unix script " sh /abc/def/ghi/unixscript.sh %%SCRIPT_ENV " in the general tab of Control-M.

[ NOTE : %%SCRIPT_ENV is a auto edit variable]

Now i need to set a value for %%SCRIPT_ENV in the SET tab of control-M in such a way if this job runs in production then value should be "PRD" and when it runs in TEST environment value should be "TST'.

Thanks,
Mahesh

How to do the variable global

Posted: 20 Aug 2012 6:00
by siipryasa
Hello,
The prefix of the variables has what is defined into the GCS (Global Condition Server), and the variable is GLOBAL

For example:

Defined into GCS ABC

All variables begin with ABC are variables globales.

Best Regards

Posted: 19 Oct 2012 11:49
by mauriziog
to define a global varaible in the set panel:

%%\GlobalVarName="value"

Put the "\" sign before the Variable Name.

The global var once defined remain always, so be carefull and put unique variable names.

Posted: 12 Nov 2013 8:24
by handicrafthome
well you can use
$GLOBALS — References all variables available in global scope
description:-
An associative array containing references to all variables which are currently defined in the global scope of the script. The variable names are the keys of the array.


chafing dish