Combine trailer record to output file

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Marley777
Premium Member
Premium Member
Posts: 316
Joined: Tue Jan 27, 2004 3:26 pm

Combine trailer record to output file

Post by Marley777 »

:?

Hi, I have a transformer stage that has 2 output links. Each link has different metadata because one link is a trailer record containing various counts derived in the transformer during processing. I only right the trailer record once at the end of processing. How can I bring the 2 links together in one output file? I tried a funnel stage, but the links don't have the same columns.

Thanks for your time!!!
lfong
Premium Member
Premium Member
Posts: 42
Joined: Fri Sep 09, 2005 7:48 am

Post by lfong »

Create a generic layout with the length of the longest record.
Use the column export stage for both records. This will export all columns from your header and detail records to the generic file layout you created.
Then you can use your funnel stage.
Make sure you specify the link order to get your header record first on the funnel stage.

Cheers!
Marley777
Premium Member
Premium Member
Posts: 316
Joined: Tue Jan 27, 2004 3:26 pm

Post by Marley777 »

Hi Ifong, thanks for reading. At the end of the day I still should have a file with detial records and a trailer record containing counts. The record formats for the two will never be the same. I'm not sure how the funnel stage will work in your example? Could you please elaborate. Thank you!!!!
lfong
Premium Member
Premium Member
Posts: 42
Joined: Fri Sep 09, 2005 7:48 am

Post by lfong »

The column export stage allows you to take multiple colums and export them into one larger column.
Example:
If you define a generic layout of char(200), the column export stage will concatenate all the columns you select into the generic layout you have created. If you do this for both your detail and trailer records you will have two identical records to go into your funnel stage.

Go into the help real quick and do a search on column export stage. It will explain it in more detail how to set it up. I'm giving you a readers digest version on how the stage works and setting it up.
jdmiceli
Premium Member
Premium Member
Posts: 309
Joined: Wed Feb 22, 2006 10:03 am
Location: Urbandale, IA

Post by jdmiceli »

ADMINISTRATOR: please move this topic to the Parallel forum!
Bestest!

John Miceli
System Specialist, MCP, MCDBA
Berkley Technology Services


"Good Morning. This is God. I will be handling all your problems today. I will not need your help. So have a great day!"
Post Reply