Hi,
I got a file which has only one column and one row. It has 10 lines of data. If I want to add one line at the top and one line at the bottom to the data file. How can I achieve this.
For example
Input:
clo1
I am a very good boy
Output should be like this
Output:
col1
Suresh
I am a very good boy
Bye
Thanks,
Rajesh
Flat File
Moderators: chulett, rschirm, roy
What do you mean by
- one line at the top and one line at the bottom to the data file
Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.
By William A.Foster
By William A.Foster
-
- Participant
- Posts: 27
- Joined: Thu Mar 20, 2008 11:55 am
Or simply:
So as to not destroy the original "file2" file and allow it to rerun without much in the way of shenanigans.
Code: Select all
cat file1 file2 file3 > file4
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
These statements are mutually inconsistent.I got a file which has only one column and one row. It has 10 lines of data.
If you are adding hard-coded text to the beginning and end, you could set up a Filter command in your Sequential File stage. Something like:
Code: Select all
echo Suresh && cat #MyDir#/#MyFile# && echo Bye
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.