How to make AUTO EDIT VARIABLE as GLOBAL VARIABLE

Post Reply
User avatar
MaheshDude
Nouveau
Nouveau
Posts: 28
Joined: 12 Dec 2011 12:00

How to make AUTO EDIT VARIABLE as GLOBAL VARIABLE

Post by MaheshDude » 17 Aug 2012 4:31

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

User avatar
siipryasa
Nouveau
Nouveau
Posts: 11
Joined: 18 May 2008 12:00
Location: Mexico, D. F.

How to do the variable global

Post by siipryasa » 20 Aug 2012 6:00

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

User avatar
mauriziog
Nouveau
Nouveau
Posts: 807
Joined: 08 Jun 2007 12:00
Location: Varese - Italy
Contact:

Post by mauriziog » 19 Oct 2012 11:49

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.

User avatar
handicrafthome
Nouveau
Nouveau
Posts: 1
Joined: 12 Nov 2013 12:00
Location: No. 440, Gali Sheesh Mahal, Bazar Sita Ram
Contact:

Post by handicrafthome » 12 Nov 2013 8:24

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

Post Reply