Guys,
I am having little problem with getting a daily report!
The daily process that I do is as follows
1. Unload Header for the report from the systables to one unl file, say Header.unl
2. Unload the data from the required table/tables to another unl file, say Data.unl
3. Send a mail consolidating these unl files as a report
What I have done for automating this is, written a script that unloads these files from the server. Here is where the trouble came
I used,
cat Header.unl ##All the header data will be in a single line(used perl for this)
echo ""
cat Data.unl
But this is turning out to be ugly. No formatting, proper spacing etc.
Please suggest any ideas that would transform the script to do as below,
1. Convert the Header.unl(with mulitple lines) to a single line file
2. Merge the new Header.unl and Data.unl to another file so that, all the columns are properly spaced, like one tabspace b/w every column
Header.unl
Head1|
Head2|
Head3|
Data.unl
1231|txt|this|
345|blah|that|
56741|awesome|plam|
Output expected
Head1 Head2 Head3
1231 txt this
345 blah that
56741 awesome plam