Page 1 of 1

Retrieving the value of a Stage Variable

Posted: Wed Apr 12, 2006 6:26 am
by wwalker
Hi, all,

I am trying to figure out how to retrieve the value/formula contained in a Stage Variable.

I am using Stage Variables for Reject logic, and I would like to use the logic I have entered to populate a table for supplementary information for error reporting.

I would like to end up with a file like:

VariableName Value
--------------- ------
V1Name If not(isnull(<field1>)) then....
V2Name fieldx <=50
V3Name ....etc

DSGetJobInfo returns the List of Stage Variables...but how can I get the VALUE of the SV?

Posted: Wed Apr 12, 2006 7:16 am
by sjhouse
All you would need to do is create a output link to a sequential file, set up the constraints appropriately and put the stage variables in the derivation for the appropriate columns in your file.

Also, the formulas can be stored in columns as varchars.

Posted: Thu Apr 13, 2006 3:35 am
by wwalker
sjhouse wrote:All you would need to do is create a output link to a sequential file, set up the constraints appropriately and put the stage variables in the derivation for the appropriate columns in your file.

Also, the formulas can be stored in columns as varchars.

I have tried that solution already, but when I put the Stage Variable name into the transformer, it only results in the VALUE of the formula (0 or 1), not the formula itself.

Any other ideas would be welcome...

thanks

W

Posted: Thu Apr 13, 2006 4:35 am
by ArndW
The DSGetStageInfo() call will only give you the stage variable names but not the formula/derivations thereof. This metadata is not exposed via any of the APIs. The values are stored in the DS_JOBOBJECTS table but are not meant to be accessed.

Posted: Thu Apr 13, 2006 4:40 am
by jhmckeever
Hi Wade,

See <a href="viewtopic.php?t=97949"><b>this post</b></a> on the same topic.