cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6825
Views
0
Helpful
23
Replies

Group Variable Issue

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

2 Accepted Solutions

Accepted Solutions

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

View solution in original post

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 ?

View solution in original post

23 Replies 23

Can you provide bit more details ?

How are you referencing the job group variable within the job ?

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

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 ?

thanks.

yes i am selecting the variable from the variable button. i did not type it to enter it on the group variable item. i uploaded a screen shot.

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

thanks derrick.

when i click on the variable button i don't see any "local variables" from the list. i see only system variables, job variables, application development, and public variables.

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

Thanks derrick. I added the variable in the top most parent group and I was able to see the local variable in the child group. When I run I am still not getting the correct output. I think I am missing something. Please advise and thank you for bearing with me.

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

thanks dinesh. i add the group variable into the job and i was getting this illegal characters in path. i tried to wrap it on double quotes and still gets the error illegal characters in path. please advise.

Can you also share what is there on the Override tab of the job output ?

hi yes i included it on the attached screen shot file. thanks.

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 :)

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.

Review Cisco Networking for a $25 gift card