Header and Trailer

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
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Header and Trailer

Post by us1aslam1us »

Hi all,

Can we have header and trailer records in the sequential file through datastage?

Thanks in advance
sam
rasi
Participant
Posts: 464
Joined: Fri Oct 25, 2002 1:33 am
Location: Australia, Sydney

Post by rasi »

Sam

The answer is 'Yes'.

You can have header and trailer records in your sequential file. You may have to filter header and trailer records during the process if you don't want these to be processed inside your job
Regards
Siva

Listening to the Learned

"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
s_r_chandru
Charter Member
Charter Member
Posts: 13
Joined: Tue Apr 08, 2003 9:51 pm
Location: Australia

Post by s_r_chandru »

Hi Sam,

The Best way to accomplish Header and Trailer in Seq File is to Create Header,Trailer and Detail record in a Three Different Seq file and Concatenate all the three Seq file into One.In which you have Header,Detail and Trailer Record.

-Chandru
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You've gotten two different answers, Sam, because you haven't said if you are trying to read a file with header and trailer records or are trying to create one.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You might investigate the Complex Flat File stage. It can deal with multiple record types.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

This can also be accomplished by appending the DSJobStartDate and DSJobStarTime in After job subroutine.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

kumar_s wrote:This can also be accomplished by appending the DSJobStartDate and DSJobStarTime in After job subroutine.
Hi kumar

can you elaborate this a little.

Thanks
Sam
sendmk
Charter Member
Charter Member
Posts: 136
Joined: Mon Oct 03, 2005 5:02 am

Post by sendmk »

kumar_s wrote:This can also be accomplished by appending the DSJobStartDate and DSJobStarTime in After job subroutine.
how to do that
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

I need to check the way to use it in after job subroutine.
But you can use the UserVariableActivity to pass these variable to a ExecuteCommandActivity. Which inturns will append the the file with these information.
By giving 'echo' in the command and Parameters (DSJobStartDate and DSJobStarTime) passed from the previous stage (UserVariableActivity) and >> filename.txt in the Parameters.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply