This is what I ended up doing.
Like I said, it seems to work, it was just so much code, I was wondering
if I'm missing something.
I'm just glad I don't have to do this very often.
C NXF,Z WHEQ 'AHCKN'
* STRIP LEADING ZEROS OFF OF CHECK #
C MOVE AHCKN @CKA 6
C MOVEA@CKA @CK
C DO 6 C
C @CK,C IFEQ '0'
C MOVE ' ' @CK,C
C ELSE
C LEAVE
C ENDIF
C ENDDO
C MOVEA@CK T6 6 P
C ' ' CHECKT6 START
C ' ' CHEKRT6 END
C END SUB START LEN
C ADD 1 LEN
C LEN SUBSTT6:START @CKN 6
C MOVEL@CKN NXVAL P
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Bob P. Roche
Sent: Monday, September 20, 2010 9:08 AM
To: RPG programming on the IBM i / System i
Subject: Re: Old rpg Left Justify ?
What did you come up with?
From:
"Smith, Mike" <Mike_Smith@xxxxxxxxxxxxxxxx>
To:
"RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
Date:
09/20/2010 08:06 AM
Subject:
Old rpg Left Justify ?
Sent by:
<rpg400-l-bounces@xxxxxxxxxxxx>
I have a old rpg program that I need to make a change to.
I need to left justify a right justified field.
For instance. FLDA is 6.0 contains 000123 I need to put it in FLDB
which is 6 alpha. I need the result to be '123 '
This is not a program I can convert to ile.
As a side note, I have this working, but it seems like so much code to
do this.
I'm just wondering if there is a simpler method than what I came up
with.
Thanks
Mike
NOTICE: This message, including any attachment, is intended as a
confidential and privileged communication. If you have received this
message in error, or are not the named recipient(s), please immediately
notify the sender and delete this message.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
NOTICE: This message, including any attachment, is intended as a confidential and privileged communication. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this message.