How to add an header and trailer to a file through datastage

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
adityavarma
Premium Member
Premium Member
Posts: 104
Joined: Thu Jul 12, 2007 11:32 pm
Location: Canada

How to add an header and trailer to a file through datastage

Post by adityavarma »

Hi,

I have an requirement where i need to add an header record and a trailer record to an existing data csv file through datastage.

Can anyone please help me on this?


Regards,
Aditya
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What a strange requirement (to do this with DataStage)! You should really do this with operating system commands and redirection operators. To embed those in DataStage is really a waste of resources.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
adityavarma
Premium Member
Premium Member
Posts: 104
Joined: Thu Jul 12, 2007 11:32 pm
Location: Canada

Post by adityavarma »

What is the best way to achieve this?

Can we write an unix script and call through the execute command activity? or is there any otehr way.


Thanks
Aditya
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

There are loads of options
1.) Funnel the rows
2.) Before/after calls from job properties
3.) Sequencer calling header and trailer using execute command stage

Ultimately, all will be prepared separately and then combined together.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

adityavarma wrote:Can we write an unix script and call through the execute command activity?
Sure, but you don't even "need" a script for this - just do the cat work directly there.
-craig

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