COGNOiSe.com - The IBM Cognos Community

ETL, App Development and other tools => COGNOS DecisionStream/Data Manager => Topic started by: Northern_Monkey on 04 Feb 2014 02:18:43 AM

Title: Data Manager: Server Name in Job Variable
Post by: Northern_Monkey on 04 Feb 2014 02:18:43 AM
I have a Variable in my DM jobs that is used to specify the Database schema. At present i just changed this manually in each environement..

However i wondered if there is a function that can pick up the server name so i can put in a nice case statement..

Is there one? I have searched the function and scripting guide and found nothing....

Any help would be appreciated..
Title: Re: Data Manager: Server Name in Job Variable
Post by: MFGF on 06 Feb 2014 05:05:05 AM
Hi,

You can pass values into a variable used in build/jobstream etc from the command line used to run the build/jobstream. You need to use the -V switch, eg

"c:\program files\ibm\cognos\c10_64\bin\rundsjob.exe" "OLEDB" "User Id=sa;Password=~29AE4FC16FCD198920A84E73B466DA60A7;Database=C10DataManagerCatalog;Data Source=(local);Provider=sqlncli11 (SQL Server 2012 native client);Integrated Security=FALSE" "JobStream1" -VYourVariableName=ValueToPassIn

Cheers!

MF.
Title: Re: Data Manager: Server Name in Job Variable
Post by: Northern_Monkey on 10 Feb 2014 09:15:37 AM
Thanks! I'll have a play!