Help in building a simple parallel routine

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
vskr72
Premium Member
Premium Member
Posts: 128
Joined: Wed Apr 28, 2004 9:36 pm

Help in building a simple parallel routine

Post by vskr72 »

I need to build a simple routine to handle a logic like this. I went thru the option of creating a enw parallel routine. But, I am lost as to where I need to put this logic. There doesnt seem to be a place to add this code.

Code: Select all

If IsValid('date', ToTfm.AS_OF_DATE,"%yyyy%mm%dd") then StringTODate(ToTfm.AS_OF_DATE,"%yyyy%mm%dd") else SetNull()
Am I missing anything here. Can any one send me some instructions for it? Thank y ou.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You create and compile the routine external to DataStage. Preferably you also create and compile a main program with which to test it.

The "parallel routine" that you create within DataStage is not actually a routine - it is an interlude - a record of the existence, location and arguments of the actual routine executable.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Also understand that a parallel routine must be written in C++.
-craig

"You can never have too many knives" -- Logan Nine Fingers
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Re: Help in building a simple parallel routine

Post by zulfi123786 »

Code: Select all

If IsValid('date', ToTfm.AS_OF_DATE,"%yyyy%mm%dd") then StringTODate(ToTfm.AS_OF_DATE,"%yyyy%mm%dd") else SetNull()
1. IsValid() in parallel doesnt take third argument !
2. Date is not a native data type for C
3. SetNull() which is an outband Null cant be passed to and from a parallel routine
4. The very simple single line statement of datastage would become bulky when you involve pointers for storing the arguments.
- Zulfi
Post Reply