COGNOiSe.com - The IBM Cognos Community

ETL, App Development and other tools => COGNOS DecisionStream/Data Manager => Topic started by: mwilliams on 07 May 2012 02:50:17 PM

Title: Runtime Variable Pass Through
Post by: mwilliams on 07 May 2012 02:50:17 PM
Within a JobStream, I have a Fact Build Node, then a Condition Node, then a Email Failure Node.  The Fact Build runs, the Condition checks for True/False, and the Email runs if the condition is False. 

Within the email node, I have a few variables.  However, I cannot seem to use, or figure out how to use, any Runtime Variables from the Fact Build Node.  Specifically, I want to use the DS_BUILD_NAME variable from the Fact Build Node within the Email Node, as I don't want to hard code the Fact Build Node for 50+ Jobs.

Any insight will be greatly appreciated.
Title: Re: Runtime Variable Pass Through
Post by: MFGF on 11 May 2012 04:09:19 AM
Hi,

The DS_BUILD_NAME variable is only valid while the build is running. Once it finishes, you will not be able to use that variable, because it is out of scope. If I were you, I would define a variable in the Jobstream, and have your build populate the jobstream variable with the contents of DS_BUILD_NAME. The jobstream variable stays in scope for the duration of your jobstream, so you will be able to interrogate it from your email node.

Regards,

MF.
Title: Re: Runtime Variable Pass Through
Post by: mwilliams on 17 May 2012 11:43:36 PM
MFGF, thanks for your insight.  Sorry for not responding sooner, but work can get in the way. 

I have to setup a couple variables manually when creating a new job, so I simply added one more, and manually put the job name in.  Your suggestion worked perfectly. 

Thank you.