×
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.
 
I have a input field called NAME and this field can be up to 30 characters.  I want to get rid of preceding blanks and post blanks.  If the name BROTHERS is entered I only want 'BROTHERS'  not 'BROTHERS                      '
Then I want to scan a field name in a field CMNAME for 'BROTHERS'  in a value that could be 'JONES BROTHERS                  '
C     *IN54         DOWEQ     '0'
C     CUSKEY        READE     CUSMST                                 54
 *
C     *IN54         IFEQ      '0'
C                   MOVE      *BLANKS       NEWORD1
C                   EVAL      NEWORD1 = %Trim(NEWORD)
    /FREE
     pos = %scan (NEWORD1 : CMNAME);
     substring=%subst (CMNAME:1:pos);
     DSPLY  substring;
    /END-FREE
C     POS           IFNE      0
C                   WRITE     ITM
C                   ENDIF
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.