Hi ,
I have requirement that I need to concate 3 files in the job.
I have written a copy command in after job routine to do the below task.
copy header.txt+detail.txt+trailer.txt Newfile.txt this works out sucessfully .
But I have other requirement when the user sends the empty file and I need t generate only header and trailer .
So I thought of creating a dummy trailer file and execute a batch job to check if the detail.txt is empty then it should pick template_trailer.txt.
Need help on how to write the batch code to do above task.
Please suggest
concatenate of three inut files
Moderators: chulett, rschirm, roy
concatenate of three inut files
Last edited by monaz on Tue Nov 09, 2010 4:27 am, edited 1 time in total.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
if [ -z detail.txt ] then
copy header.txt+trailer.txt > newfile.txt
else
copy header.txt+detail.txt+trailer.txt > newfile.txt
fi
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.