× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Just for kicks I did some digging.  Check out the
triml mbr in qsysinc/mih.  I don't have any
performance numbers but if you want to trim off a
trailing character X you could use this and then
%substr.

Example code down & dirty... but it works.

H   DFTACTGRP(*NO) ACTGRP('QILE')

H   BNDDIR('QC2LE' : 'QUSAPIBD')

FQPRINT    O    F   80        PRINTER

F                                     OFLIND(*IN99)

 *

D triml           PR            10i 0 ExtProc('triml')

D                                 *   Value
options(*string)
D                                1    value
                    char to trim
 *

D STR1            C                   'A test string
w/blanks         '
D STR2            C                   'String with
lots of punctuation!!!!-
D                                     !!!!!!!'

 *

D TrimLen         S             10i 0

 *

C                   EVAL      TrimLen = triml(str1 : '
')
C                   EXCEPT    EX0010

 *

C                   EVAL      TrimLen = triml(str2 :
'!')
C                   EXCEPT    EX0010

 *

C                   EVAL      *INLR = *ON

 *

OQPRINT    E            EX0010         1

O                       TrimLen



Output:
File  . . . . . :   QPRINT
Control . . . . .
Find  . . . . . .
*...+....1....+....2....+....3....
0000000022
0000000031

 |  -----Original Message-----
 |  From: Bob Cozzi [mailto:cozzi@rpgiv.com]
 |  Subject: RE: %trim
 |
 |  Also, when will you add the second parameter to
%TRIM/R/L
 |  that supports
 |  a character string value, so we can trim off more
than just blanks?



 |  So does that mean %trim() should be a candidate to
be moved
 |  to the MI
 |  level (or whatever that means in today's world)?


__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.