Typographic/proportionally spaced fonts

140 pts.
Tags:
iSeries
iSeries administration
V5R4
I would like to use a proptionally spaced font for a column report, my first go was a mess, is there someting that I should be doing to ease the tidying up process?  Or is it a case of trial and error?

Software/Hardware used:
V5R4 AS 400
ASKED: October 4, 2011  4:14 PM
UPDATED: March 31, 2012  12:41 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

In the DDS why not use the position keyword. I have serveral electronic forms that I have coded (like statements, PO’s, invoices, acknowledgement, etc.) that work and align up just fine.

Example:

JNAMEX 9A POSITION( 9.05 1.2)
FNTCHRSET(C0H40090 T1V10037)

-OR-

JNAMEX 9A POSITION( 9.05 1.2)
FONT(46)

If you use the POSITION keyword, then there will never be an alignment issue.

Discuss This Question: 16  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • philpl1jb
    Generally AS/400 print files have spaces between columns .. not tabs. Alignment of proporational print will be impossible. Phil
    48,545 pointsBadges:
    report
  • TomLiotta
    ...my first go was a mess... Meaning...? Errors? Poor appearance? Unexpected appearance? Inability to print on a printer? Getting good alignment for proportional fonts can indeed take some trial and error. It might be helpful if you could show us what you're looking at and tell us why it's wrong. If necessary, post an image. Tom
    125,585 pointsBadges:
    report
  • ITDavid
    Tom Basically, the print positions I had previously set (ie. start position) are out of alignment. That is the column headings do not match the data "below". To make things simple (so I thought) I used the same font & pitch throughout. Philpljb, says that the print "will be impossible". Seems to me it must be possible with as I said a bit of trial & error. I shall persevere, and hopefully someone may offer some advice.
    140 pointsBadges:
    report
  • philpl1jb
    Have fun. If you have any variable data it won't align 11111sssssX X 22222mmmX X Won't align because 2's are wider than 1s and m's are wider than s's Phil
    48,545 pointsBadges:
    report
  • philpl1jb
    The print file adds spaces after each field to padd it to the next column, that works fine for fixed fonts but adding spaces to the end of fields on proportional print won't start at the same location since the field printed used more/less space and adding spaces from that point won't be aligned. Unless every lline prints the same data. Phil
    48,545 pointsBadges:
    report
  • WoodEngineer
    An AFPDS print file allows print positions to be defined relative to the margins. This is from the DDS manual: "The position-across parameter is required and defines the horizontal starting point of the field relative to the margins specified on the FRONTMGN or BACKMGN parameter on the CRTPRTF command. Valid values are 0 to 57.790 cm (0 to 22.750 in.)." Absolute positioning which may solve the alignment issue. It also sounds like a good bit of work.
    6,045 pointsBadges:
    report
  • TomLiotta
    (ie. start position) How are you specifying "start position" and how are columns positioned relative to a "start position"? You can't use anything relating to number of characters because, as Phil is saying, different characters have different widths in proportional fonts. So, as WoodEngineer mentions, you have to use some fixed unit of measurement such as *INCH or *CM to say how far across a line a column should be. That's just how proportional fonts work in any columnar print formatting. It's very difficult to determine how wide a given column will be. All you can be sure of is where a column ought to begin across a line. Then you let the printer put the value on the line beginning at that point. Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    Great, you guys sure taught me something. it sounds like this is the way to go - use POSITION - compile as an AFPDS type file does this require IPDS printer? What about a numeric columns with decimal points? Say one has value of 555,555.55 and the next 11.11 The column is aligned but the value doesn't look aligned. Phil
    48,545 pointsBadges:
    report
  • Yorkshireman
    Phil syas.. does this require IPDS printer? IPDS is a protocol that you can write to directly from a print program - inserting the escape characters followed by whatever data. Been there - you don't want ot do that. HPGL - the printer driver language from HP seems to be pretty much the largest standard now, and on the device configuration you would need to specify the printer type or emulation (forget the precise bit of the command) to say that its a *HPxx - depends on the particular printer and which dialect / superset it will understand. Getting hold of the real manual for the printer, and the IBM *DEV CFG details is a start point. Ha - I like printers - many happy (!) hours sorting print issues. Or - you use a product which does a post print passto create, say, a PDF, or otherwise manipulate the data ready for a printer. By adding images and rules (lines) you can print on demand for invoices, statements, or whatever. remeber the adage 'Dragons be here'
    5,520 pointsBadges:
    report
  • ITDavid
    Thanks all, I've finally completed the report. This site is excellent, well done to you all.
    140 pointsBadges:
    report
  • WoodEngineer
    Hello ITDavid, I would be interested to hear if you were able to align the decimal numbers using proportional fonts. We gave this a serious try a few years ago but could never achieve decimal alignment.
    6,045 pointsBadges:
    report
  • philpl1jb
    Yes, WoodE I thought that would be the case. That's why word provides left, right, and decimal alignment. With the suggestions on this page you can do left alignment of proportional print but decimal columns will only look good in fixed format. Phil
    48,545 pointsBadges:
    report
  • ITDavid
    Hello WoodEngineer I am afraid it had to be a best fit solution, not aligned exactly, very readable.
    140 pointsBadges:
    report
  • WoodEngineer
    Thanks for the response, ITDavid. Too bad IBM does not provide an "align right" feature on print files.
    6,045 pointsBadges:
    report
  • Koohiisan
    Too bad IBM does not provide an “align right” feature on print files. You could define the actual width of each number and potential symbol as constants, then evaluate each character in the field to determine that field's actual print width. You would then use that value as a bias to adjust the horizontal part of the POSITION coding so as to make it psuedo-right-aligned. That's how it worked just now in my mind anyway... ;) It'd be an interesting exercise, for sure. It also wouldn't likely carry over very well between printers, due to subtle typographic differences.
    5,020 pointsBadges:
    report
  • Koohiisan
    does this require IPDS printer? Just for future reference, the direct answer to this is 'no.' I've done AFPDS functions on a half-dozen different printer models, and only one of them had IPDS. The others were all off-the-shelf Brother, HP, and Lexmark printers.
    5,020 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following