10-29-2015 07:17 AM - edited 03-01-2019 09:18 AM
i defined a variable TierWinDir with a constant value of tst. on the group job i use dev. when the job runs it is not using the value on the job group.
please advise. thanks,
warren
Solved! Go to Solution.
10-30-2015 01:51 PM
Hi Warren,
That sounds like a pretty good idea, and then to treat the one-offs with a different value. So, I just wanted to expand on your findings a little bit with a job group variable not based on a global variable.
The variables defined within Definitions are known to be global variables (public), whereas variables defined within a job group are local variables. Here at the job group level, you are trying to access TierWinDir.132 which is a global variable and change its value. So, instead you would create a local variable at the job group level and call it local_variable. Then the local variable can be assigned to the value of TierWinDir.132 (but not directly to the variable itself), and have local variable passed down to the children jobs. And for the one-offs, the local_variable values can be specified differently at the job group level.
BR,
Derrick Au
10-30-2015 04:41 PM
Hi Warren
Thanks for trying out the suggestion. This time, looks like you are doing everything correct.
I happened to notice that someone else had reported same issue in 2014, but don't seen any response.
https://supportforums.cisco.com/discussion/12341976/local-variables-not-expanded-ftp-jobs
Based on what you said above, have you tried using the public variable(set to the respective environment name) directly in the job ? Do we really need both public and local variables, if there is only one job in the jobgroup using the variable ?
10-29-2015 08:08 AM
Can you provide bit more details ?
How are you referencing the job group variable within the job ?
10-29-2015 08:44 AM
the variable is defined as TierWinDir with a value of tst.
on the group job the variable TierWinDir is used on the variable tab <TierWinDir.132> with a value of dev.
the same variable TierWinDir is used in a child job (FTP job) as local path e:\Apps\SFS<TierWinDir.132>\data\in.
when the job group run the child job output shows that the value of the TierWinDir is tst. should have been dev as the variable is set locally on the job group.
output of the job:
Multiple Get sfs-shared/9500*_D_*102815 from ftp-test.osc.state.ny.us to e:\Apps\SFStst\data\in
should have been:
Multiple Get sfs-shared/9500*_D_*102815 from ftp-test.osc.state.ny.us to e:\Apps\SFSdev\data\in
10-29-2015 09:57 AM
Thanks for the details
You are still referring to the public variable TierWinDir in your job. If you were referring to the Job Group variable, it would have referenced it as <Group.blah blah>
Are you selecting the job group level variable from the CM UI or typing it in ?
10-29-2015 10:20 AM
10-29-2015 10:50 AM
Hi Warren,
As Dinesh pointed out earlier, if referenced correctly the job group variable should have read, <Group.<TierWinDir.132>>
Clicking on the variable button, make sure you select TierWinDir0132 from "Local Variables"
BR,
Derrick Au
10-29-2015 12:16 PM
10-29-2015 01:30 PM
Hi Warren,
You're getting warm. Drop down one more level into your child job, 100.02 - SFTP All EE1 - OSC to DOT, when you click on the variable button, then you should be able to select from Local Variables.
BR,
Derrick Au
10-30-2015 06:31 AM
10-30-2015 06:31 AM
Looking at the screenshot of the child job, it seems the local path is still not referencing the job group variable. Local path should be something like e:\Apps\SFS<Group.<TierWinDir.132>>\data\in
10-30-2015 06:40 AM
10-30-2015 08:48 AM
Can you also share what is there on the Override tab of the job output ?
10-30-2015 09:10 AM
10-30-2015 09:40 AM
Thanks Warren. Can we start with something basic ?
1. Can you please create a new job group variable called TierWindowsDirectory ? Please do not use any special character such as '<' or numbers like 132 within the name.
2. Use the new variable in the job
I suspect you have created local variable with the same name as the public variable and special characters within in. That may be the issue. I could be wrong :)
10-30-2015 11:01 AM
hi dinesh thank you for looking into the issue. i make sure there was no same name of the same variable. i create the group variable TierWindowsDirectory and gave it a value of dev. i use it on the job by selecting the local variable from the variable button. i did not type it. when i run it still giving me the same illegal characters in path. i am missing something that i can't figure out. please advise and thank you for bearing with me.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide