Is there anyway to build/process arrays with using C++ ?

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
gup
Premium Member
Premium Member
Posts: 44
Joined: Tue Sep 21, 2004 1:15 pm

Is there anyway to build/process arrays with using C++ ?

Post by gup »

Hello, I have a process that goes to a RDBMS SQL and brings back the data from many tables by date in the following structure.

Input data structure: (all the children mentioned below can occur n number of times within a parent)
Parent1,child1, child2, child3 (child1 is child of parent1, child2 is child of child1, child3 is child of child2)
Parent2,child1, child2
Parent3,child1
Parent4,child1, child2, child3,child4
etc..

We are trying to migrate it to DataStage 7.5.2. I would like to use the Parallel server to process the data. What I would like to be able to do is build an internal structure array list of the data so that it can be traversed multiple times to process the data.

Intermediate data array:
Parent[1].child1[1].child2[1].child3
Parent[1].child1[1].child2[2].child3
Parent[1].child1[2].child2[1].child3
Parent[1].child1[2].child2[1]
Parent[1].child1[3]
Parent[2].child1
Parent[2].child2
Parent[3].child1
Parent[4].child1
Parent[4].child2
Parent[4].child3
Parent[4].child4

I can't find a way other than writing C++ routine to do this.

Has anyone come across this type of problem and solved it by using a combination of parallel stages and would like to share their finding? Or is there ways to do this in version DataStage 8?
gup
Premium Member
Premium Member
Posts: 44
Joined: Tue Sep 21, 2004 1:15 pm

Sorry but I mean to say without C++

Post by gup »

missed the spell..posted to quickly
I mean to said with using C++
gup
Premium Member
Premium Member
Posts: 44
Joined: Tue Sep 21, 2004 1:15 pm

Sorry but I mean to say without C++

Post by gup »

missed the spell..posted to quickly
I mean to said without using C++
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Nothing with in DataStage allows for indexed array processing of this kind.

You could fabricate a "dynamic array" as a delimited string, but there's still no convenient way to "traverse it multiple times".

Therefore, yes, you are going to need to create some code.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

Post by bcarlson »

Can you elaborate on what you want to do with the data? How do you want it to look after you process it?

Bra.d
It is not that I am addicted to coffee, it's just that I need it to survive.
Post Reply