Utilitaire ctmvar en ligne de commande via CTM.

Tools and several solutions to manage Control-M products
Post Reply
Yves31

Utilitaire ctmvar en ligne de commande via CTM.

Post by Yves31 » 16 Apr 2007 2:43

Bonjour,
Je voudrai mettre ? jour une variable globale avec l'utilitaire CTMVAR en ligne de commande envoy? par Ctm, avez-vous deja effectu? cette action et comment faut-il parametrer l'utilitaire?
Je ne veux pas utiliser un .bat.

La commande que j'ai test?e est la suivante mais cela ne marche pas :
ctmvar -action SET -var "%%#\DPBC" -varexpr OK.

resultat de la sysout :
ctmvar -action SET -var "%DPBC" -varexpr OK
Var name '%DPBC' in -VAR invalid: it must begin with %%
usage: ctmvar
-ACTION <LOAD>
[ -VAR <Variable> ]
[ -VAREXPR <Variable> ]
[ -FILENAME <Filename> ]
[ -QUIET ]
[ -DEBUG <debug> ]

Merci d'avance.
Yves31.

*****************************************************************
Hello,

I would like to update variable with utility CTMVAR in line of order sent by Ctm, did you have already done that command, how you must configure the utility? I do not want to use a .bat.

The command that I tested is as follows but that does not works :

ctmvar -action SET -var "%%#\DPBC" -varexpr OK.

result of the sysout :
ctmvar -action SET -var "%DPBC" -varexpr OK
Var name '%DPBC' in -VAR invalid: it must begin with %%
usage: ctmvar

-ACTION <LOAD>
[ -VAR <Variable> ]
[ -VAREXPR <Variable> ]
[ -FILENAME <Filename> ]
[ -QUIET ]
[ -DEBUG <debug> ]

Thanks in advance
Yves31.

User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 16 Apr 2007 10:38

Hi,

Try to test your comand without "%%" characters :

ctmvar -action SET -var DPBC -varexpr OK

Yves31

Post by Yves31 » 17 Apr 2007 10:00

Bonjour,

Pour information la commande que je donne marche sur un agent UNIX par contre pour un agent windows cela ne marche pas.

J'ai essaye ce que tu me donnes mais le resultat n'est pas bon, voici le resultat de la sysout.

ctmvar -action set -var 'DPBC' -varexpr toto
Var name ''DPBC'' in -VAR invalid: it must begin with %% ........

par contre si je mets les %% la variable est resolue par CTM et le resultat est :
ctmvar -action set -var 'KO' -varexpr toto
Var name ''KO'' in -VAR invalid: it must begin with %%

Merci quand m?me.
Yves31

*******************************************************************

Hello,

For information the command that I on the other hand give walk on an agent UNIX for an agent Windows that does not go.

I have test what you give me but the result is not good, here the result of the sysout.

ctmvar -action set -var 'DPBC' -varexpr toto
Var name ''DPBC'' in -VAR invalid: it must begin with %% ........

on the other hand if I put the %% the variable is solved by CTM and the result is:
ctmvar -action set -var 'KO' -varexpr toto
Var name ''KO'' in -VAR invalid: it must begin with %%

Thank you nevertheless.
Yves31

User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 17 Apr 2007 10:14

Hi,

Ok, I understood.
Under windows you must double special characters to use it.

Try again the folowing command.
ctmvar -action SET -var %%%%DPBC -varexpr OK

Yves31

Post by Yves31 » 18 Apr 2007 8:08

Bonjour,

Suite ? ton message voila le resultat:
commande : ctmvar -action SET -var %%%%DPBC -varexpr OK
ctmvar -action SET -var CTMERRKO -varexpr OK
Var name 'CTMERRKO' in -VAR invalid: it must begin with %%

D?sol?.

*************************************************************************

Hello,

Following your message here is the result:
command: ctmvar -action SET -var %%%%DPBC -varexpr OK
ctmvar -action SET -var CTMERRKO -varexpr OK
Var name 'CTMERRKO' in -VAR invalid: it must begin with %%

Sorry.

User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 18 Apr 2007 10:35

Hi,

Could you try again using quote and "\"
ctmvar -action SET -var "%%%%\DPBC" -varexpr OK
I tested successfully.

Be carefull if you are working on a multi-services agent you must sepcify -Agent [AgentName] parameter.

example :

ctmvar -Agent AgentName -action SET -var "%%%%\DPBC" -varexpr OK

Yves31

Post by Yves31 » 19 Apr 2007 8:35

Bonjour et merci encore de passer du temps a resoudre mon probl?me.

J'ai essay? ta commande mais helas cela ne marche toujours pas.

ctmvar -action SET -var "%%%%\DPBC" -varexpr OK

resultat de la sysout :

ctmvar -action SET -var "CTMERRCTMERR\DPBC" -varexpr OK
Var name 'CTMERRCTMERR\DPBC' in -VAR invalid: it must begin with %%

A bientot.

************************************************************************

Hello and thank you still to spend time has to solve my problem.

I tested your order but alas that still does not go.

ctmvar -action SET -var "%%%%\DPBC" -varexpr OK

result of the sysout:

ctmvar -action SET -var "CTMERRCTMERR\DPBC" -varexpr OK
Var name 'CTMERRCTMERR\DPBC' in -VAR invalid: it must begin with %%

So long.

User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 20 Apr 2007 10:18

Hi,

How did you launch this command ?
By job or by command line on prompt ?

Yves31

Post by Yves31 » 20 Apr 2007 11:20

Bonjour,

Cette commande est envoy? par ligne de commande (Task Type parameter est Command).

Si cette commande etait envoy?e dans un job comme un .bat il n'y aurait pas de probl?me.

Pour l'instant sur l'agent Unix cela marche bien mais j'ai toujours des probl?mes sur l'agent Windows.

A bient?t.

***********************************************************************

Hello,

This command is sent by command line (Task type parameter is Command).

If this command were sent in a job as a .bat it would not have there problem.
For the moment on the Unix agent that goes well but I always have problems on the Windows agent.

So long.

User avatar
matom
Nouveau
Nouveau
Posts: 37
Joined: 29 Nov 2006 12:00
Location: Ile de France

Post by matom » 23 Apr 2007 5:00

Bonjour,

Essayez:

ctmvar -action set -var "%%#%%#%%#%%#\VarName" -varexpr "Value"

Yves31

Post by Yves31 » 24 Apr 2007 8:55

Bonjour,

Super ca marche bien.
je n'aurai pas os? mettre autant de %%# pour trouver la solution.

Merci beaucoup.

Post Reply