Page 1 of 1

Header and Trailer

Posted: Tue Mar 21, 2006 4:30 pm
by us1aslam1us
Hi all,

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

Thanks in advance
sam

Posted: Tue Mar 21, 2006 5:46 pm
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

Posted: Tue Mar 21, 2006 6:21 pm
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

Posted: Tue Mar 21, 2006 8:31 pm
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.

Posted: Wed Mar 22, 2006 3:38 pm
by ray.wurlod
You might investigate the Complex Flat File stage. It can deal with multiple record types.

Posted: Wed Mar 22, 2006 11:53 pm
by kumar_s
This can also be accomplished by appending the DSJobStartDate and DSJobStarTime in After job subroutine.

Posted: Thu Mar 23, 2006 12:17 pm
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

Posted: Fri Mar 24, 2006 2:46 am
by sendmk
kumar_s wrote:This can also be accomplished by appending the DSJobStartDate and DSJobStarTime in After job subroutine.
how to do that

Posted: Fri Mar 24, 2006 3:52 am
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.