Join Header and Tralier
Moderators: chulett, rschirm, roy
Join Header and Tralier
Hi All,
I need to join the headers and traliers of the file.
I dont have any key coloumn on header or tralier. I need to to seperate header , detail records and tralier seperately . And for validating header and tralier records , I need to join them.
Please Advise.
Thanks & Regards,
Kumar.R
I need to join the headers and traliers of the file.
I dont have any key coloumn on header or tralier. I need to to seperate header , detail records and tralier seperately . And for validating header and tralier records , I need to join them.
Please Advise.
Thanks & Regards,
Kumar.R
-
- Participant
- Posts: 26
- Joined: Tue Oct 23, 2007 4:07 am
- Location: Blore,India
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Hi All,
Thanks for your replies . I need to validate all the fileds in the header and tralier.
Bascially I need to merge the header and tralier record .
For example. my header has 18 fields and tralier has 3 fields. My output should have 21 fields as one row.
Please Advise.
Thanks & Regards,
Kumar66.
Thanks for your replies . I need to validate all the fileds in the header and tralier.
Bascially I need to merge the header and tralier record .
For example. my header has 18 fields and tralier has 3 fields. My output should have 21 fields as one row.
Please Advise.
Thanks & Regards,
Kumar66.
-
- Charter Member
- Posts: 166
- Joined: Wed Mar 16, 2005 6:52 am
- Location: Mumbai, India
In an External Command Stage, use the following Source program:
replace <FilePath+Name> and <Delimiter> with the appropriate text.
HTH.
Code: Select all
echo "`head -1 <FilePath+Name>`<Delimiter>`tail -1 <FilePath+Name>`"
HTH.
Amey Vaidya<i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Charter Member
- Posts: 166
- Joined: Wed Mar 16, 2005 6:52 am
- Location: Mumbai, India
Whoops!!!ray.wurlod wrote:Or, indeed, in an External Source stage. ...
![Embarassed :oops:](./images/smilies/icon_redface.gif)
Thanks Ray.. thats what I meant to say!!!
Amey Vaidya<i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
for header and trailer records
use Column export stage for this to get 21 fields
header and trailer records
and use funnel stage before column export