Improper data type
Posted: Thu Mar 01, 2007 2:44 am
Hi all,
I imported succesfully an external function in Datastage. This created the following transform function:
*****************************************
$INCLUDE DSINCLUDE DSOLETYPES.H
str1 = Arg1
* Automation Class name and OLE function name
SNAME = 'UltraDLL.UltraDLLObject'
MNAME = 'ultradll_splitsadres'
* Initialise return variable and it's type
Ans = 0
RETTYPE = DSOLE.RTYPE.LONG
ARGTYPES = DSOLE.ATYPE.STRING
CALL $DSOLE.Dispatch.Method.1Args(SNAME, MNAME, RETTYPE, Ans, ARGTYPES, Arg1)
********************************
When I compile this routine I get the following warning:
WARNING: Assignment to variable str1 on line 4 will modify an input argument. If input link column variables are used as arguments to this routine then DataStage runtime may fail.
Compiled with no errors
I then removed the assignment str1 = Arg1 after which the routine compiled without errors. Why is this assignment inserted in the first place?
Furthermore, when I test this routine I get the following error:
TEST #1
*******
Arg1 = test
Test failed.
Program "DSD.WriteLog": Line 265, Improper data type.
Any idea what can be the problem?
Peter
I imported succesfully an external function in Datastage. This created the following transform function:
*****************************************
$INCLUDE DSINCLUDE DSOLETYPES.H
str1 = Arg1
* Automation Class name and OLE function name
SNAME = 'UltraDLL.UltraDLLObject'
MNAME = 'ultradll_splitsadres'
* Initialise return variable and it's type
Ans = 0
RETTYPE = DSOLE.RTYPE.LONG
ARGTYPES = DSOLE.ATYPE.STRING
CALL $DSOLE.Dispatch.Method.1Args(SNAME, MNAME, RETTYPE, Ans, ARGTYPES, Arg1)
********************************
When I compile this routine I get the following warning:
WARNING: Assignment to variable str1 on line 4 will modify an input argument. If input link column variables are used as arguments to this routine then DataStage runtime may fail.
Compiled with no errors
I then removed the assignment str1 = Arg1 after which the routine compiled without errors. Why is this assignment inserted in the first place?
Furthermore, when I test this routine I get the following error:
TEST #1
*******
Arg1 = test
Test failed.
Program "DSD.WriteLog": Line 265, Improper data type.
Any idea what can be the problem?
Peter