Line print data duplicate line to simulate bold

Encountered data file that is ASCII, but the line termination is such that the line is duplicated to simulate bold text on an impact printer. In Workflow the Standard Filter with ASCII Emulation successfully removes the duplicate lines, however I need a method to retain knowledge which lines need to be bolded. Plan on using a large sweep data selection and using PRE with a fixed width font in the template. Any Ideas?

Simulating boldtext by duplicate lines in linedata is done by using only a CR (carriage return) command in stead of the CR and NL (NEWLINE command) so if you can replace the single CR command by <b> tag before the dupplicate is removed in the workflow it should work.

Thanks, I wrote a simple script that appears to do the trick. Haven’t started on the data mapper yet. I’m hoping that the HTML bold tags will carry through in the large sweep data selection.

Do While objInputFile.AtEndOfStream <> True
strLine = objInputFile.Readline
If InStr(strLine, chr(12)) then
    ' Exclude Form Feeds
    objOutputFile.WriteLine(strLine)
Else
    If InStr(strLine, chr(13)) then
        ' Split on Carriage Returns, split and add html bold tag
        strArray = Split(strLine, chr(13))
        objOutputFile.WriteLine("<b>" & strArray(0) & "</b>")
    Else
        objOutputFile.WriteLine(strLine)
    End If
End If

Loop

You do need to be careful using that technique. It’ll work very well if only entire lines are bolded. AS/400 programmers commonly used carriage returns to fill in data as well as for the bolding. Kind of like bouncing back and forth across a spreadsheet. I ended up having to load each line containing CR into an array, comparing each character, then tagging the data for bolding. That was more than a few years ago, way before we could output HTML.

Luckily (at least at this point) the bolding has been entire lines so far. Thanks, Good advice, though and I’ll be watching out for it.