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



If speed is not a big concern, below should work (will need to test it).

   COLUMN1 = rmvNonAlpha(COLUMN1);
   COLUMN2 = rmvNonAlpha(COLUMN2);

P rmvNonAlpha     B                                                    
D                 pi          1024                                     
D  piIn                       1024    Varying value                    
                                                                       
D ALPHA           c
const('abcdefghijklmnopqrstuvwxyzABC-
D                                     DEFGHIJKLMNOPQRSTUVWXYZ')        
D myIx            s              5i 0                                  
                                                                       
 /free                                                                 
                                                                       
   piIn = %trimr(piIn);                                                
   myIx = %check(ALPHA :piIn);                                         
   dow myIx <> 0;                                                      
     piIn = %replace('' :piIn :myIx :1);                               
     myIx = %check(ALPHA :piIn);                                       
   enddo;                                                              
                                                                       
   return piIn;                                                        
                                                                       
 /end-free          
                                                    
P rmvNonAlpha     E 


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of donna lester
Sent: Tuesday, October 31, 2006 3:02 PM
To: RPG programming on the AS400 / iSeries
Subject: looking for sample code

Iam looking for sample code in free format style RPG or normal one.
I have a non keyed PF, I have to read two particular columns of it and I
ve to make sure that only characters from A to Z are allowed(case doesnt
matter) and any unwanted stuff need to be removed from those two
columns.
  If possible please help with your posts.
   
  Donna


Thanks,

Donna.
 
---------------------------------
 Check out the New Yahoo! Mail - Fire up a more powerful email and get
things done faster. 
--
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 ...

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.