|
Rob, You are right. If the field changes the edit word must be changed. Of course, this isn't an issue with edit codes. I don't have them all memorized but I don't remember an edit code that allows leading zeros though. The question was how to create an edit word that allows for a leading zero in the first position. This is accomplished with an edit word one byte longer than the field. If the field changes the edit word must also change. If the edit word size isn't changed you might receive a compile error on the edit word size not matching the field size but I'm not sure. I haven't used edit words for output in a long time. Rick -----Original Message----- From: rob@xxxxxxxxx [mailto:rob@xxxxxxxxx] Sent: Monday, April 21, 2003 3:50 PM To: RPG programming on the AS400 / iSeries Subject: RE: %char in /free The problem with that Rick, is how do you change the edit word without editing the source if the field you are editing changes in length? I don't think you can just recompile the program. Maybe you can store an edit word into a variable, and you can define that variable like this other variable plus one character. But that makes figuring the commas and stuff start to get a little tricky. Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin "Chevalier, Rick" <Rick.Chevalier@xxxxxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 04/21/2003 02:17 PM Please respond to RPG programming on the AS400 / iSeries To: "'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx> cc: Fax to: Subject: RE: %char in /free -----Original Message----- Along this line of inquiry I've found a problem I don't know how to resolve. It has to do with the leading zeros. One places the 0 in the edit word in the column to the left of where the leading zeros are to start as I understand it. How does one get a leading zero in the very first column, as there is no position to the left of it. %EditW allows for an edit word 1 byte longer than the field length. Specify the edit word as 1 longer than your field length and place the 0 in the leftmost positon. Rick _______________________________________________ This is the RPG programming on the AS400 / iSeries (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.cgi/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 AS400 / iSeries (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.cgi/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.
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.