I need to crerate header and trailer record in output file.
i.e HDR2009040210PM CST
Pavan,23,45,67,78
Kiran,34,56,78,9
Kim,45,67,89,08
TRL00003
Please let me know how we can implement above logic.
How to create header and trailer record in output file
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 457
- Joined: Tue Sep 25, 2007 4:05 pm
Code: Select all
Row Gen --- XFM ---
|
File ----------------- Funnel (Sequence) ----Output
|
Row Gen --- XFM ---
Vivek Gadwal
Experience is what you get when you didn't get what you wanted
Experience is what you get when you didn't get what you wanted
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
In a before-job subroutine you could (for example) echo the header record into the file using the > redirection operator. The job appends detail records to the file. An after-job subroutine appends the trailer to the file, perhaps using echo again, this time with the >> redirection operator.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.