Sunday, March 11, 2012

DTS Advice - Appending to a Text File

Hi all,

I am having a problem with a DTS package I am writing. The package is getting text from a table and putting it out to a text file. I have most of it sorted, and contains text like this:
PN,GEN,T_KI-3,2006-01-24 00:30,480,2006-01-24 01:00,480
PN,GEN,T_KI-2,2006-01-24 00:40,484,2006-01-24 02:00,482
PN,GEN,T_KI-3,2006-01-24 00:50,490,2006-01-24 05:00,486
What I need is a line at the end of the text which is:
<EOF>

So the output from this will look like:
PN,GEN,T_KI-3,2006-01-24 00:30,480,2006-01-24 01:00,480
PN,GEN,T_KI-2,2006-01-24 00:40,484,2006-01-24 02:00,482
PN,GEN,T_KI-3,2006-01-24 00:50,490,2006-01-24 05:00,486
<EOF>

I am having problems adding the line at the end of the text file. Can anyone advice me of a good solution or show me where I amn going wrong?

TAI,
GeeI'm confused...you want the valeu "<EOF>" in the table?

Is it in the file.

Oh, and read my sig|||Sorry, I am sending the result of a query to a text file, and i want to end the text file with a final line that has <EOF> on it.|||Does anyone have an idea how I can add the text <EOF> to the bottom of a text file? I am sure this is simple but I just can't figure it out and it is making me go nuts! :(|||There are a number of ways to get there from here. I'd suggest that you re-read Brett's response and follow his suggestion if you want more detailed help.

If this is a "one off" kind of solution, you might consider using an Active-X script at the end of the DTS package that outputs the string for you. It is easy to add, and means no convoluted logic, just a "tag along" bit of trailer code.

-PatP

No comments:

Post a Comment