|
or how about . . .
DFIELDA S 10A INZ('12345 ')
DRightJustField S 10A '
If the field lengths are the same . . .
EVALR
RightJustField = FIELDA
If the field lengths differ (obviously not more than RightJustField). . .
EVALR
RightJustField = %Trim(FIELDA)
Regards
John.
fkolmann@revlon.com.au on 29/02/2000 06:32:53
Please respond to RPG400-L@midrange.com
To: RPG400-L@midrange.com
cc: (bcc: John Finney/ITS/Omnia Group)
Subject: Re: Right-justify field in RPG
Try this,
0001.00 D data S 10A INZ('12345 ')
0002.00 D datav S 12A VARYING
0003.00 *
0004.00 C EVAL DATAV = %trimr(DATA)
0005.00 C MOVE(P) DATAV DATA
0016.00 *
Ken Slaugh wrote:
> How about something like:dow %subst(somefield: %len(somefield): 1)
> = ' 'eval somefield = ' ' + somefieldenddoMaybe someone else has a
> better method.Ken Slaugh (707) 795-1512 x118
> Chouinard & Myhre, Inc.
> AS/400 Network Administrator / MSE
> Client Access/400 Specialist
> http://www.cm-inc.com/
>
> -----Original Message-----
> From: Stone, Joel [mailto:StoneJ@GourmetAward.com]
> Sent: Monday, February 28, 2000 5:15 PM
> To: 'RPG400-L@midrange.com'
> Subject: Right-justify field in ROG
> What is the new method of right-justifying a field in RPG/4
> ??
>
> Thanks!
>
Ken Slaugh wrote:
How about something like:dow %subst(somefield: %len(somefield): 1) = ' 'eval somefield = ' ' + somefieldenddoMaybe someone else has a better method.Ken Slaugh (707) 795-1512 x118
Chouinard & Myhre, Inc.
AS/400 Network Administrator / MSE
Client Access/400 Specialist
http://www.cm-inc.com/-----Original Message-----What is the new method of right-justifying a field in RPG/4 ??
From: Stone, Joel [mailto:StoneJ@GourmetAward.com]
Sent: Monday, February 28, 2000 5:15 PM
To: 'RPG400-L@midrange.com'
Subject: Right-justify field in ROGThanks!
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.