Parallel Routine Datatypes

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
dougcl
Premium Member
Premium Member
Posts: 137
Joined: Thu Jun 24, 2010 4:28 pm

Parallel Routine Datatypes

Post by dougcl »

Hi folks, when building an external routine to run in a transformer, the transformer is dealing with these datatypes:
VarChar
Double
Timestamp
Date
Time
Decimal
etc.

And the routine is dealing with these:
char*
float
long
short
etc.

How do I know what to map to what? What works and what doesn't? Is there anything out there that covers this?

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

Post by ray.wurlod »

From memory the Programmer's Guide shows mapping between C-style and SQL-style data types. In general they're pretty obvious, though the latter form a subset of the former.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dougcl
Premium Member
Premium Member
Posts: 137
Joined: Thu Jun 24, 2010 4:28 pm

Post by dougcl »

Thanks Ray. I discovered today, for example, that I can return a char* from my routine into a Double in the transformer. No idea if this is a problem. Also, I am sending a Timestamp into a char*. I think this one is actually correct. So maybe some are obvious :?
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post by zulfi123786 »

dates, numbers, strings, timestamps can be passed to and fro using char* .
Numeric values of datastage can be handled using appropriate data types like int----int, decimal-----float etc.

The only issue i faced was with char(datastage)------char(routine) mapping where the data receive from the routine output was not as expected.
Post Reply