|
On Tue, 21 May 2002, Wills, Mike N. (TC) wrote:
>
> I am creating a PO and need the users would like me to scrunch the address
> together. I am not sure how to best do this. There is to 7 lines for the
> address most of the time it will only be 4.
>
I generally do it like this:
H DFTACTGRP(*NO)
D AddText PR
D AddrLine 50A const
D dsAddr DS
D Addr 50A dim(7) overlay(dsAddr:1)
D PrtLine1 50A overlay(dsAddr:1)
D PrtLine2 50A overlay(dsAddr:51)
D PrtLine3 50A overlay(dsAddr:101)
D PrtLine4 50A overlay(dsAddr:151)
D PrtLine5 50A overlay(dsAddr:201)
D PrtLine6 50A overlay(dsAddr:251)
D PrtLine7 50A overlay(dsAddr:301)
D CustName S 50A
D CustName2 S 50A
D CustAddr S 50A
D CustAddr2 S 50A
D CustAddr3 S 50A
D CustCity S 50A
D CustCountry S 50A
D pause S 1A
c eval CustName = 'Mike Wills'
c eval CustName2 = *blanks
c eval CustAddr = '123 Wills St'
c eval CustAddr2 = *blanks
c eval CustAddr3 = *blanks
c eval CustCity = 'Somewhere, MN 56000'
c eval CustCountry = *blanks
c callp AddText(CustName)
c callp AddText(CustName2)
c callp AddText(CustAddr)
c callp AddText(CustAddr2)
c callp AddText(CustAddr3)
c callp AddText(CustCity)
c callp AddText(CustCountry)
c PrtLine1 dsply
c PrtLine2 dsply
c PrtLine3 dsply
c PrtLine4 dsply
c PrtLine5 dsply
c PrtLine6 dsply
c PrtLine7 dsply pause
c eval *inlr = *on
P AddText B
D AddText PI
D AddrLine 50A const
D NumLines S 10I 0 static
c if AddrLine <> *blanks
c eval NumLines = NumLines + 1
c eval Addr(NumLines) = AddrLine
c endif
P E
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.