× 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.



Bruce,

Actually, the resulting character string needs to have at least 4 digits
because all of our items in our item master are coded that way (not my
decision obviously).
Now that I think about it though, I could have probably used
%trim(%editw(numItem : 'b0bbbb')) {b=blank} instead of %editc, right?

Ben Pforsich
Programmer Analyst
Bob Evans Farms, Inc.
I/S Department
Columbus, Ohio
Ben_Pforsich@xxxxxxxxxxxx



                                                                           
             "Bruce Guetzkow"                                              
             <bruceg@unitedcre                                             
             ditservice.com>                                            To 
             Sent by:                  <rpg400-l@xxxxxxxxxxxx>             
             rpg400-l-bounces@                                          cc 
             midrange.com                                                  
                                                                   Subject 
                                       RE: SQL UDF not found               
             10/14/2005 12:02                                              
             PM                                                            
                                                                           
                                                                           
             Please respond to                                             
              RPG programming                                              
              on the AS400 /                                               
                  iSeries                                                  
             <rpg400-l@midrang                                             
                  e.com>                                                   
                                                                           
                                                                           




Ben:

Although this wasn't your question, you can simplify the following
code...
       select;
         when numItem < 10;
           Result = '000' + %char(numItem);
         when numItem < 100;
           Result = '00' + %char(numItem);
         when numItem < 1000;
           Result = '0' + %char(numItem);
         other;
           Result = %char(numItem);
       endsl;

To this...
             Result = %editc(numItem:'X');

The 'X' edit code leaves in all leading zeros.  Just food for thought,
--Bruce Guetzkow



--
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/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 thread ...

Replies:

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.