|
And edit code 'X' has the edge, because it works independent of field length. Joep Beckeringh ----- Original Message ----- From: "Bob Cozzi (RPGIV)" <cozzi@rpgiv.com> To: <rpg400-l@midrange.com> Cc: <rpgiv@yahoogroups.com> Sent: Friday, August 17, 2001 10:47 PM Subject: RE: Editing leading zeroes > Run this code and look at the results. Edit Code X and the good old MOVE > operation produce identical results, in this situation. The EditW to a > 9-position field truncates on byte due to the inclusion of the negative > sign (so you'll need 10 bytes if you prefer EDITW). > D SSN S 9P 0 Inz(023456789) > D SSNAlpha1 S 9A > D SSNAlpha2 S 9A > D SSNAlpha3 S 9A > C eval ssnAlpha1 = %EditW(ssn : '0 > ') > C eval ssnAlpha2 = %editc(ssn : 'X') > C MOVE SSN ssnAlpha3 > C EVAL *INLR = *ON > > Bob Cozzi
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.