Basic Output to File Question

This should be a simple question but I haven’t found it.

I’m writing out a XML file, and want to keep some of the tags together on the same lines.

I’m using

Print #fileNum%, “

Call SomeRoutine(may have print statements)

Print #fileNum%, “

How could I get all the output on one line???

I know it should NOT matter but I find DXL importer seems to like on the same line.

I am seeing other strange things and want to see if that is also the problem.

Subject: Basic Output to File Question

Stephen, if you have a semicolon at the end of the Print # statement, then that suppresses the inclusion of a Carriage Return/Line Feed (CrLf) sequence for that Print # statement. Any Print statement that does not have the semicolon at the end will put the CrLf sequence into the file output.

For example, if you have

Open “outputfile.txt” for Output as #FileNum

Print #FileNum%, “AAA”

Print #FileNum%, “BBB”

Close

then your output file will look like this:

AAA

BBB

But if you have this

Open “outputfile.txt” for Output as #FileNum

Print #FileNum%, “AAA”;

Print #FileNum%, “BBB”

Close

then your output file will look like this:

AAABBB

Subject: RE: Basic Output to File Question

Perfect, thanks.