[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

18.0. "Multi-joins? FIDEL noecho?" by DPDMAI::BEATTIE (But, Is BLISS ignorance?) Fri Dec 04 1987 09:11

    We're in an evaluation, and are having trouble resolving a couple
    of issues...
    
    Q1:  Has anyone had any luck with multiple joins?  We are using
         FOCUS 5.0 VX1.3.1, and have been unable to do more than two
         files (one join) at a time  (Documentation says up to 16).
    
    Q2:  Has anyone tried to use FIDEL (CRTFORM) on a terminal that
         is set up for half duplex (local echo)?  We've tried a number
         of things, but are unable to cause FIDEL to inhibit echo
    	 (except, of course the .N. attribute, but that doesn't apply
         to T. fields...)
    
    Thanks in advance for any responses...
    
    				-- Brian
    
T.RTitleUserPersonal
Name
DateLines
18.1More info pleaseSTOPIT::LINNELLMon Dec 07 1987 04:469
    
    Please supply an example of our join command.
    
    Syntax =
    
    JOIN field1 in file1 to {ALL} field2 IN file2 {AS join-name}
    
    {} = optional
    
18.2A Join failure exampleDPDMAI::BEATTIEBut, Is BLISS ignorance?Mon Dec 07 1987 11:0220
    Re: .1 (and sorry for the omission)
    
    as I understand it, the problem is that, given three files A, B,
    and C, with a field AB common to A and B, and a field BC common
    to files B and C:
    
    JOIN AB in B to AB in A as JOIN_1
    JOIN BC in C to BC in B as JOIN_2
    
    Each of these joins "works" in that no error is generated, but when
    we attempt to table file C to print fields from C, and corresponding
    fields from A (which should be joined via B?), we get errors (the
    fields in A are "unrecognised words").
    
    Please note that A,B, and C are RMS files.  Their concurrent use
    in a live FORTRAN application precludes conversion to multi-segment
    FOCUS DB file (*sigh*).
    				- Brian Beattie
    
18.3Ready to be confused?STOPIT::LINNELLTue Dec 08 1987 05:4064
    
    When you perform a join on multi (ie more than 2) files, you must
    build them as if you were putting together one large file from building
    blocks. When you make the first join, it is advisable to start with
    the file that you wish to TABLE later. After that join all the fields
    from the second file in the join are now considered to be in the
    first file when it is referenced. So to join another file in to
    the list you must refer to the first file again.
    
    A bit confusing so let me use your example. 
    
    You wish to table file C, so lets start there.
    
    JOIN BC IN C TO ALL BC IN B AS JOIN_1
    
    That will join all records in B that have a matching key in C to
    C. ie.
    
                        ---------
    			|   C	|
    			---------
    			    |
    			   /|\
    			---------
    			|   B	|
    			---------        
    
    FOCUS now considers that all the fields in B are now in file C and
    can be refered to by Tabling C. So to add in file A you must join
    it to file C. ie.
    
    JOIN AB IN C TO ALL AB IN A AS JOIN_2
    
    This now connects all records in A that have a matching record in
    C to C (B)
                  	_________
    			|   C	|
    			---------
    			    |
    			   /|\
    			_________
    			|   B   |
    			_________	
                            |
                           /|\ 
    			_________
    			|   A   |
    			--------- 
    
    Now Table file C and you will get all fields from A B C in you report.
    
    An easy way to check you joins is to do a
    CHECK FILE C PICTURE
    command from the Focus prompt, after you have done the join, this
    will draw a structure diag for the top file with all relations hanging
    off it.
    
    This works for RMS files and focus files.
    
    Any problems with this explanation give me a ring on 7830-4972,
    but remember I am in the UK so get the timing right!
    
    All the best               
    Adam Linnell
18.4thanks for multi-join help!DPDMAI::BEATTIEBut, Is BLISS ignorance?Wed Dec 09 1987 10:477
    RE: .3
    
    	Thanks very much.  Your explanation was clear,made sense, and
    worked beautifully.  I wonder why the IBI tech that pops up here from 
    time to time wasn't able to tell us that?
    
    					-- Brian