|
Look at the XLATE op-code: http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/QBKAQV00/11.20.93 Scott Mildenberger > -----Original Message----- > From: Jim Langston [mailto:jlangston@celsinc.com] > Sent: Tuesday, October 16, 2001 3:20 PM > To: 'rpg400-l@midrange.com' > Subject: RPG III, SCAN and replacing sub string > > > My project: in an existing RPG III program, that must remain RPG III > (bummer) scan in input field from the display file, and > replace any slashes > '/' with dashes '-' before storing, because slashes mess up our EDI > transmission. > > Relatively easy to find the location of slashes in RPG III, > code snippet > follows (do while loop not shown). > > C MOVE '12/34/56'RESULT 8 > C RESULT DSPLY > C '/' SCAN RESULT POS 20 > C POS IFNE *ZERO > C ??? <--- here I > need to change > '/' to '-' > C ENDIF > > How do I, in RPG III, change a character in the middle of a > string? Easy to > do in RPG IV with any number > of BIFs. But I can't remember how to do this in RPG III. > > Any ideas? > > Thanks in advance, > > Jim Langston > _______________________________________________ > This is the RPG programming on the AS400 / iSeries (RPG400-L) > mailing list > To post a message email: RPG400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > or email: RPG400-L-request@midrange.com > 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.