[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

149.0. "TABLE and masked fields" by TUNER::CARNEY () Fri Oct 28 1988 11:20

    When doing a table request and selecting records I have tried
    using masked fields.
    
    ex.
    	IF fieldname IS AA$$ OR BB$$ 
    
    This does not seem to be working correctly with more than
    one literal mask. The data in the reprot is incorrect.
    If I do not use the "OR" it works ok.
    
    ex. 
       IF fieldname IS AA$$
                      
    I am using an RDB/VMS database. Does this happen
    on a focus database. 
    
    
T.RTitleUserPersonal
Name
DateLines
149.1Using 'OR' in 'IF' statement of 'TABLE' request.NRPUR::CUSACKWed Nov 09 1988 10:3922
    I don't use Focus with Rdb, but I might be able to help with this
    question.  At least when using Focus' own database, you cannot use
    an 'OR' directly like that in an 'IF' statement of a 'TABLE' request.
    
    To do what you want, you must define a field, using the 'DEFINE'
    statement.  An example:
    
    	DEFINE FILE filename
    	FTEST/I1 = IF fieldname EQ 'AA$$' OR 'BB$$' THEN 1 ELSE 0;
    	END
    	TABLE FILE filename
    	PRINT fieldname
    	IF FTEST EQ 1
    	END
    
    It would be nice if you could do the 'OR' in the 'TABLE' request,
    but, you can't.  I am not sure if you can do a 'DEFINE' with Rdb,
    but I imagine that you should be able to.
    
    Regards,
    
    Mike
149.2THANK YOUTUNER::CARNEYMon Nov 14 1988 09:277
    Mike
    	
    	Thank you for your help.  I agree with you that it would be
    	nice to have that functionality.  Your assumption is correct
    	that you can use define with rdb. 
    
    MC