[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference ilbbak::ibi_focus

Title:FOCUS, from INFORMATION BUILDERS
Moderator:ZAYIUS::BROUILLETTE
Created:Thu Feb 19 1987
Last Modified:Mon May 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:615
Total number of notes:1779

30.0. "SUBSTR function" by PRSIS4::ALETON () Wed Feb 03 1988 07:00

    
    
    Hello,
    
    
    How to use the SUBSTR function in the DEFINE context ?
    
    The documentation says :
    SUSTR(inlength,infield,start,end,xxxxxxx,outfield)
    
    I have tried to use this but without success .
    
    Regards
    
    Philippe
    
T.RTitleUserPersonal
Name
DateLines
30.1Check out AUTORDB.FEXMIDCIM::LINDQUISTWed Feb 03 1988 11:533
    You will find an example of SUBSTR in the program AUTORDB.FEX
    which comes with FOCUS (assuming you have the RDB interface)
    	and it works.
30.2MEMV01::VOSSThu Apr 14 1988 15:212
    The xxxxxx in your example needs to be the length of the substring:
    normally END - START + 1.
30.3Is this what you want ?PEKING::MCSHANEGAlas poor Yorik..I knew him wellTue Apr 04 1989 10:2612
     >  How to use the SUBSTR function in the DEFINE context ?

     DEFINE FILE DATAFILE
     NEWFIELD/A10 = SUBSTR(80, ADDRESS, 1, 10, 10, NEWFIELD);
     END
 
     Where ADDRESS is an 80 char alpha field, the above will let NEWFIELD
     eq the first 10 chars of the ADDRESS field.
                                               
    
	     Gary @ RDL