|
Bob Cozzi wrote:
You know, my first inclination was to use the CAT opcode, but I thought maybe SUBST would work. Darn! You win. :) -Bob Cozzi www.i5PodCast.com Ask your manager to watch i5 TV -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of jstevens@xxxxxxxxxxxxxx Sent: Thursday, February 08, 2007 3:20 PM To: RPG programming on the AS400 / iSeries Subject: RE: RPG III Doug,I don't think the SUBST will work as it's still going into a 10a field (COPITM). I think you'll have to use the array and loop method, or the call to an RPGIV program method. I use to have this issue quite a bit.Jeff Stevens Mize, Houser & Co. P.A. 913 451 1882 JStevens@xxxxxxxxxxxxxx"Doug Palme" <dpalme@xxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx02/08/2007 03:09 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To "'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx> cc Subject RE: RPG IIIBob, I tried this and I ended up getting the following value: 7690000Here is the code exactly as it was entered:1440 C *LIKE DEFN OOPINO COPITM 1441 C ' ' CHEKROOPINO LEN 70 1442 C LEN SUBSTOOPINO:1 COPITM 1443 C MOVE COPITM XOPITM 70OOPINO is the existing 10 character text field and XOPITM is the defined numeric. -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Bob Cozzi Sent: Thursday, February 08, 2007 2:40 PM To: 'RPG programming on the AS400 / iSeries'Subject: RE: RPG IIIHow about this: ** Right justify a value in a field in RPGIII C *LIKE DEFN TEXTA TEXTB C ' ' CHEKRTEXTA LEN 70 C LEN SUBSTTEXTA:1 TEXTB C MOVE TEXTB NUMFLD -Bob Cozzi www.i5PodCast.com Ask your manager to watch i5 TV -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Douglas Palme Sent: Thursday, February 08, 2007 2:12 PM To: 'RPG programming on the AS400 / iSeries'Subject: RPG III I am in the process of modifying an RPG III program that I am not permittedto convert to ILE.One of the fields is a 10 character field that only contains numeric numbers and will never have more than seven digits..I know I could change the fieldlength to 7 but I was told no to that as well as it might blow up other programs.Here is the delimna, I need to move the value to a 7 digit numeric. It is possible that it can have anywhere from 1 to seven digits.Example:'116769 ' - Charcter valueI have a new field defined as 7,0When I do a move on it it shows up as 1167690 and a movel gives me 7690000.Suggestions? Hints? Converting it is not an option.Douglas**************************************************************************** This transmission may contain information that is privileged, Confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. ****************************************************************************
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.