Improper data type

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
PeterPol
Premium Member
Premium Member
Posts: 73
Joined: Wed Mar 08, 2006 8:59 am

Improper data type

Post by PeterPol »

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
PeterPol
Premium Member
Premium Member
Posts: 73
Joined: Wed Mar 08, 2006 8:59 am

Post by PeterPol »

hi,

Is there someone who can help me with this problem?

Peter
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

What if you comment that assignment line and compile?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
PeterPol
Premium Member
Premium Member
Posts: 73
Joined: Wed Mar 08, 2006 8:59 am

Post by PeterPol »

Hello,

In that case the routine compiles without warnings. However, when I test the routine I still get the same error.

Peter
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Could you locate "Line 265" in what? Was there any job no given in at any place?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
PeterPol
Premium Member
Premium Member
Posts: 73
Joined: Wed Mar 08, 2006 8:59 am

Post by PeterPol »

- I don't know where to find DSD.WriteLog?
- As far as I can see/understand, the routine that was generated during the import, only contains a call to the activex function

Peter
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Where did you find the "$" syntax for a CALL statement? This normally means a GCI call, which means that a reference to the function must exist within the General Call Interface mechanism.

How are you invoking your server routine in a parallel job? Is it within a server shared container, or within a BASIC Transformer stage?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
PeterPol
Premium Member
Premium Member
Posts: 73
Joined: Wed Mar 08, 2006 8:59 am

Post by PeterPol »

Hi,

The routine with the call statement was automatically created by Datastage as a result of importing an activex dll function (External Function Definition in DSManager).

I tested the routine within the routine itself (button Test...). I haven't tried to call the routine from a transformer

Peter
ds_developer
Premium Member
Premium Member
Posts: 224
Joined: Tue Sep 24, 2002 7:32 am
Location: Denver, CO USA

Post by ds_developer »

Please clarify if Arg1 is an input, input/output or output parameter. Way back on v6.01 the code generated by an import function incorrectly identifed the parameters. I doubt it has changed.

If Arg1 is an output parameter, change to
ARGTYPES = DSOLE.ATYPE.REFSTRING

I'm not sure what to set it to if it is a input/output parameter, but you might try.

John
PeterPol
Premium Member
Premium Member
Posts: 73
Joined: Wed Mar 08, 2006 8:59 am

Post by PeterPol »

Hi,

Arg1 is an input-only parameter.

I already tried your suggestion but that didnt work too. :(

Peter
Latha1919
Premium Member
Premium Member
Posts: 178
Joined: Mon May 22, 2006 2:32 pm

Post by Latha1919 »

Could any one suggest the root cause for this issue. I am encountering this issue when the function has to return some speacial characters. However, if there are no special characters in the data, routine is working fine.

Any ideas?

Thanks,
Latha
Post Reply