Need Help on job design.

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
sridinesh2009
Participant
Posts: 14
Joined: Wed Nov 11, 2009 4:52 am
Location: New York

Need Help on job design.

Post by sridinesh2009 »

Experts,

Please help me to design a parallel job for the below scenario.

Source:
-------------------------------------------
H|file1.txt|20130526
D|123|456|789|012
D|345|678|901|234
.
.
T|0987
H|file2.txt|20130526
D|000|56W|789|Q12
D|000|67E|9E1|W34
.
.
T|1234
-------------------------------------------

Target file1:
H|file1.txt|20130526
D|123|456|789|012
D|345|678|901|234
.
.
T|0987

Target file2:
H|file2.txt|20130526
D|000|56W|789|Q12
D|000|67E|9E1|W34
.
.
T|1234

The source file can contain set of, any no of Header/Detail/Trailer records.
we need separate it into a individual files and load into a table.

Thanks
Dinesh
prasson_ibm
Premium Member
Premium Member
Posts: 536
Joined: Thu Oct 11, 2007 1:48 am
Location: Bangalore

Post by prasson_ibm »

Hi,
I dont think parallel job is correct and efficient approach to split the files like this.You can better do in unix level,write a script to split the files the do the processing.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Read each line as a single VarChar and parse in a Transformer stage. Use a stage variable to conserve the file name from the header row.

Get version 9.1 in which the target Sequential File stage can distribute data as you specify, based on the second field value in the header row.

Otherwise, and provided there is a small and finite number of output files, create an output link for each file and use a constraint expession based on the value of the stage variable.
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 »

Or a Server job writing to a Folder stage...
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply