ctmvar global var with both %%@var AND character string
- Nightwatchrenband
- Nouveau
- Posts: 28
- Joined: 24 Jul 2012 12:00
- Location: Long Beach, CA
ctmvar global var with both %%@var AND character string
When the %%@var is BEFORE the char string it WORKS
When the Char string is before the %%@var it FAILS
Anyone know how to get around this?
Example:
ctmvar -action set -var "%%\eMailMsg07" -varexpr "This is jobname: %%@JOBNAME."
ctmvar -action set -var "%%\eMailMsg08" -varexpr "%%@JOBNAME. This is jobname"
VAR VAREXPR
---------------------------------------- ------------------------
%%CyclicTime 092100
%%eMailMsg07 This is jobname:
%%eMailMsg08 %%@JOBNAME. This is jobname
When the Char string is before the %%@var it FAILS
Anyone know how to get around this?
Example:
ctmvar -action set -var "%%\eMailMsg07" -varexpr "This is jobname: %%@JOBNAME."
ctmvar -action set -var "%%\eMailMsg08" -varexpr "%%@JOBNAME. This is jobname"
VAR VAREXPR
---------------------------------------- ------------------------
%%CyclicTime 092100
%%eMailMsg07 This is jobname:
%%eMailMsg08 %%@JOBNAME. This is jobname
HI
dot character is used to concatenate.
So if Control-M considers the dot as necessary in the command, you just need to double it.
In that case Control-m will consider that you want to concatenate " with JOBNAME. So if you want to terminate with the dot, try this.
ctmvar -action set -var "%%\eMailMsg07" -varexpr "This is jobname: %%@JOBNAME.."
dot character is used to concatenate.
So if Control-M considers the dot as necessary in the command, you just need to double it.
In that case Control-m will consider that you want to concatenate " with JOBNAME. So if you want to terminate with the dot, try this.
ctmvar -action set -var "%%\eMailMsg07" -varexpr "This is jobname: %%@JOBNAME.."
- Nightwatchrenband
- Nouveau
- Posts: 28
- Joined: 24 Jul 2012 12:00
- Location: Long Beach, CA
No go on the "."
Tried your suggestion. Here is the result
%%eMailMsgXX This is jobname: .
It just added a "." to the end
What I should get is
%%eMailMsgXX This is jobname: %%@Jobname
Many folks seem to think of the "." as a concatenation char. I think this leads to problems. It will work better if they think of is as a "terminator" for a symbolic variable. The "." says $UnixVarEnds. ends where the "." is. This prevents the confusion when you wish to concatenate $UnixVarEnds.someotherstring. Anyhow, in my case above the "." or no "." makes no difference.
%%eMailMsgXX This is jobname: .
It just added a "." to the end
What I should get is
%%eMailMsgXX This is jobname: %%@Jobname
Many folks seem to think of the "." as a concatenation char. I think this leads to problems. It will work better if they think of is as a "terminator" for a symbolic variable. The "." says $UnixVarEnds. ends where the "." is. This prevents the confusion when you wish to concatenate $UnixVarEnds.someotherstring. Anyhow, in my case above the "." or no "." makes no difference.
- Nightwatchrenband
- Nouveau
- Posts: 28
- Joined: 24 Jul 2012 12:00
- Location: Long Beach, CA
Same results.
epspubmdv-bmdadm [31] ctmvar -action set -var "%%\eMailMsgXX" -varexpr "This is jobname:.%%@JOBNAME.."
Gets
%%eMailMsgXX This is jobname:..
I just got a reply back from BMC, they say that when using %%@ vars they MUST be at the beginning of the varexpr string. I do not "like" the answer, but that appears to be the way they wrote their command interpreter and I doubt they are interested in fixing it.
Gets
%%eMailMsgXX This is jobname:..
I just got a reply back from BMC, they say that when using %%@ vars they MUST be at the beginning of the varexpr string. I do not "like" the answer, but that appears to be the way they wrote their command interpreter and I doubt they are interested in fixing it.
Hi Just tested
If Jobname is defined you will have correct result using following syntax:
JOBNAME value is Job1023
-varexpr "This is jobname: %%@JOBNAME."
result : This is jobname: Job1023
-varexpr "This is jobname: .%%@JOBNAME."
result : This is jobname: .Job1023
-varexpr "This is jobname: %%@JOBNAME.."
result : This is jobname: Job1023.
-varexpr "This is jobname: .%%@JOBNAME.."
result : This is jobname: .Job1023.
If Jobname is defined you will have correct result using following syntax:
JOBNAME value is Job1023
-varexpr "This is jobname: %%@JOBNAME."
result : This is jobname: Job1023
-varexpr "This is jobname: .%%@JOBNAME."
result : This is jobname: .Job1023
-varexpr "This is jobname: %%@JOBNAME.."
result : This is jobname: Job1023.
-varexpr "This is jobname: .%%@JOBNAME.."
result : This is jobname: .Job1023.
- Nightwatchrenband
- Nouveau
- Posts: 28
- Joined: 24 Jul 2012 12:00
- Location: Long Beach, CA
Here is what I get when I try it
Below is the log from my unix system. Note that eMailMsg03 is defined to be what I am trying for because I start the Varexpr with another %%@ var. But eMailMsgXX is not. By the way, Jobname is a standard Control-M variable set by every running job. I do not want that var set until an actual job is running. That is why the "@" sign
epspubmdv-bmdadm [33] ctmvar -action set -var "%%\eMailMsgXX" -varexpr "This is jobname: %%@JOBNAME."
Action SET performed successfully.
epspubmdv-bmdadm [34] ctmvar -action list
<<<GLOBAL>>>
VAR VAREXPR
---------------------------------------- ---------------------------------
%%CyclicTime 092100
%%CyclicDate 130213
%%eMailMsg03 %%@PDQ. Application : %%@APPLIC.
%%eMailMsgXX This is jobname:
epspubmdv-bmdadm [33] ctmvar -action set -var "%%\eMailMsgXX" -varexpr "This is jobname: %%@JOBNAME."
Action SET performed successfully.
epspubmdv-bmdadm [34] ctmvar -action list
<<<GLOBAL>>>
VAR VAREXPR
---------------------------------------- ---------------------------------
%%CyclicTime 092100
%%CyclicDate 130213
%%eMailMsg03 %%@PDQ. Application : %%@APPLIC.
%%eMailMsgXX This is jobname:
- Nightwatchrenband
- Nouveau
- Posts: 28
- Joined: 24 Jul 2012 12:00
- Location: Long Beach, CA
Well, yes
Yes, that is true.
But the whole point of assigning Global variables server-wide means that I can define variables at the global level which may then be used by every job any yet have unique values because of the %%@. In this case %%\eMailMsgXX is going to be used in a DOMAIL to show the jobname. But rather than putting Jobname: %%Jobname in the DOMAIL I place %%eMailMsgXX which will interpret the value of %%Jobname at job run time. This allows me to change the eMail message for every job just by changing the Global variable. It also simplifies my Job templates. This makes things easier to manage for several thousand jobs. Of course %%eMailMsgXX may be overridden at Smart Table or Job level as matters dictate.
But the whole point of assigning Global variables server-wide means that I can define variables at the global level which may then be used by every job any yet have unique values because of the %%@. In this case %%\eMailMsgXX is going to be used in a DOMAIL to show the jobname. But rather than putting Jobname: %%Jobname in the DOMAIL I place %%eMailMsgXX which will interpret the value of %%Jobname at job run time. This allows me to change the eMail message for every job just by changing the Global variable. It also simplifies my Job templates. This makes things easier to manage for several thousand jobs. Of course %%eMailMsgXX may be overridden at Smart Table or Job level as matters dictate.
Hi
It's a good idea !!!
So be care full about global variable usage.
Considering every jobs submitted will try to resolve variable, even if job is not defined to use that variable.
You will multiply number of SQL request in the database.
That case could create a very important latency.
You can verify it taking time between two jobs linked thru a condition, without any sleep.
Time between them must be less than the minute.
If not, you have latency, and Global variable could be responsible.
It's a good idea !!!
So be care full about global variable usage.
Considering every jobs submitted will try to resolve variable, even if job is not defined to use that variable.
You will multiply number of SQL request in the database.
That case could create a very important latency.
You can verify it taking time between two jobs linked thru a condition, without any sleep.
Time between them must be less than the minute.
If not, you have latency, and Global variable could be responsible.
- Nightwatchrenband
- Nouveau
- Posts: 28
- Joined: 24 Jul 2012 12:00
- Location: Long Beach, CA
Thanks
FYOT! Thanks for the tip on the latency. I'll check
Danny! That indeed works and I set up a symbol which resolves to a blank for the first %%@. Seems to me that if BMC had written their software a little better, it would not be a problem, but I doubt they will ever get around to fixing it. "Working as designed", indeed.
I am about to post another brain teaser on globals. stay tuned.
Danny! That indeed works and I set up a symbol which resolves to a blank for the first %%@. Seems to me that if BMC had written their software a little better, it would not be a problem, but I doubt they will ever get around to fixing it. "Working as designed", indeed.
I am about to post another brain teaser on globals. stay tuned.
- livcyxingfoe
- Nouveau
- Posts: 3
- Joined: 08 Apr 2013 12:00
- Contact:
I just got a reply back from BMC, they say that when using %%@ vars they MUST be at the beginning of the varexpr string.
_________________
Runescape Gold|cheap runescape gold|Diablo 3 Gold
_________________
Runescape Gold|cheap runescape gold|Diablo 3 Gold
- jaysismyson
- Nouveau
- Posts: 2
- Joined: 03 Aug 2013 12:00
the whole point of assigning Global variables server-wide means that I can define variables at the global
Buy lineage2 adena
level which may then be used by every job any yet have unique values because of the %%@. In this case %%\eMailMsgXX is going to be used in a DOMAIL to show the jobname. But rather than putting Jobname
Buy lineage2 adena
level which may then be used by every job any yet have unique values because of the %%@. In this case %%\eMailMsgXX is going to be used in a DOMAIL to show the jobname. But rather than putting Jobname
- chrisjacob
- Nouveau
- Posts: 1
- Joined: 21 Jan 2014 12:00
Can someone share here the whole character string here? I am newbie here, and trying to learn the language. I had done a basic course before some which gave me a vague idea what it is. Waiting to read more about the codes and strings.
CHRIS
microsoftsupportnow.com
CHRIS
microsoftsupportnow.com