Routine Testing in Manager
Posted: Sat Jun 20, 2009 3:47 am
I am using this routine provided by Ray
I have used this code and created a routine, when i call that routine from a server job , i am getting the correct Value, and if the same routine is tested using Datastage Manger's "Test.." Button, I am not getting the desired output.
Why is it so? Is it because the datastage environment variables will be loaded into memory, only when it is called from a job?
Code: Select all
FUNCTION GetEnvironmentVariable(EnvVarName)
If UnAssigned(EnvVarName) Or IsNull(EnvVarName)
Then
Ans = @NULL
End
Else
Call DSExecute("UV", "ENV", Output, ExitStatus)
FindStr EnvVarName In Output Setting FMC,VMC,SMC
Then
Ans = Field(Output<FMC,VMC,SMC>, "=", 2, 99)
End
Else
Ans = ""
End
End
RETURN(Ans)
Why is it so? Is it because the datastage environment variables will be loaded into memory, only when it is called from a job?