Underline extends beyond text when printing from AS/400
I defined a 24-character field in DDS using fgid 4919 (goudy) with the underline keyword.  When I print the field from my RPG program the underline extends beyond the characters contained in the field.  The length of the underline varies depending on the number and width of the characters in the field.

 

How can I control the underline?



Software/Hardware used:
AS/400, RPG
ASKED: March 31, 2010  7:51 PM
UPDATED: April 2, 2010  8:34 PM

Answer Wiki:
Underline on the old printers was a character and to print it the printer did a carrage return without a line feed and then printed the underlines. That's what's happening to you. The underlines are a certain width, each of your characters are their particular width, not likely to match up. Phil
Last Wiki Answer Submitted:  April 2, 2010  1:22 am  by  philpl1jb   44,190 pts.
All Answer Wiki Contributors:  philpl1jb   44,190 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

It sounds as if values in the field may have trailing blanks, but you only want underlines for non-blank characters. Is that correct?

Tom

 108,175 pts.

 

The printer can do it.
You could pack into the character string output variable
the escape code to turn on underline +
%trim(actual value) +
the escape code to turn off underline
Phil

 44,190 pts.

 

The implication of Phil’s comment is that the DDS UNDERLINE keyword causes a “field” to be underlined in printed output, but his code would cause the “value in a field” to be underlined. DDS has no knowledge of where a value might have trailing spaces.

Underlining spaces is a perfectly valid printer operation. A field doesn’t have to have any non-blank characters at all in order for it to be underlined. In order to customize underlining, it can require additional programming.

Tom

 108,175 pts.