Page 1 of 1

Need Help on job design.

Posted: Mon May 27, 2013 8:15 am
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

Posted: Mon May 27, 2013 9:55 am
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.

Posted: Mon May 27, 2013 4:34 pm
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.

Posted: Mon May 27, 2013 5:11 pm
by chulett
Or a Server job writing to a Folder stage...