I have a requirement from a vendor who wants record terminator characters on the header line as well as the detail data rows. They vendor requires the string "!##!" at the end of each record including the header. So the sample output should resemble:
Name|Address|Phone|!##!
Mary|1 Elm St.|000-0000|!##!
Bob|2 Front St|000-0000|!##!
Jack|1 2nd Ave|000-0000|!##!
I can create the record terminator for each detal row by appending their terminator string to the last field of data. Is there a way to accomplish this for the header row as well. I realize that I can save a header template files and then append the data by itself on each run. That isn't very flexible for adding/removing columns from the file. Any other ideas would be greatly appreciated.
Thanks,
Joe
Sequential File Header with Record Terminator
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 8
- Joined: Fri May 16, 2008 12:13 pm
-
- Participant
- Posts: 20
- Joined: Tue Feb 02, 2010 4:49 am
- Location: United Kingdom
If you wish to auto-generate the header row then the simplest solution would be to not add this terminator in the DataStage flow, but subsequently in an after-job command or from a job-sequence, simply use something like
Code: Select all
sed -i 's/$/\!\#\#\!/' {yourfile}
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>