If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
In the distant past when I wrote RPG400 I would use a DO loop searching one character at a time from the end of the string until I found the last non blank character in the string. With that result in hand I would move the string to a result string utilizing SUBST.
Which just goes to show you how much productivity goes down when your tool set is hampered.
For trailing blank characters, you can use the CHEKR op-code to find the position within the string of the last non-blank character. For leading blanks, a do loop reading each character in the string from the front is the only way I know.
"Time passes, but sometimes it beats the <crap> out of you as it goes."
OK thank you but maybe I have not explained properly my problem. Sorry
The real thing I want to do is to transfert a String 8 char into a string 6 char.
But the entry string can be " 123456 " so when I move it in the string 6 char, I might Have " 12345" or "23456 " (With MOVE or MOVEL)
With a trim function, If I put the result in a String 6 char, I would have no problems, I would always have the 6 digit (in any case in other languages )