[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

102.0. "error (FOC030) with rdb" by TUNER::CARNEY () Mon Aug 01 1988 12:47

	I have an RDB/VMS database and am getting this error when
	trying to execute x.fex.  

	(FOC030) SORT KEYS NOT IN PATH OF ALL VERB OBJECTS IN VERB SET
        

        I'm joining three relations, REVHDR, REVDTL,and GEOTBL.  
        Their cardinality is like this.
	REVHDR has one dec_order_no to many dec_order_no's in REVDTL.
	REVHDR has many bkng_ctr_id's to one bkng_ctr_id in GEOTBL.
        
	US_SLS_DSTRC is defined as an index in rdb.


	Can anyone shed some light on what I may be doing wrong?

	Following are my .fex, .mas and .acx files.             

thanks!
mike


(x.fex)

FILEDEF X DISK GIC$RDB:SNAPSHOT.RDB
TABLE FILE X
SUM LNITM_NET 
BY US_SLS_DSTRC
IF INVCE_DT GT 870627       
IF RECORDLIMIT IS 20
END


(x.mas)
FILE=REVGEO  , SUFFIX=RDB                                 
SEGNAME=REVHDR  , SEGTYPE=S0
 FIELD=INDEX_FLD2  ,                  ,USAGE=A4      ,A4      ,$
 FIELD=DEC_ORDER_NO,ALIAS=DEC_ORDER_NO,USAGE=A09     ,A09     ,$
SEGNAME=REVDTL  , SEGTYPE=S0          ,PARENT=REVHDR,$
 FIELD=INDEX_FLD1  ,                  ,USAGE=A09     ,A09     ,$
 FIELD=INVCE_DT    ,ALIAS=INVCE_DT    ,USAGE=I9      ,I4,$
 FIELD=LNITM_NET   ,ALIAS=LNITM_NET   ,USAGE=D12.2   ,F4      ,$
SEGNAME=GEOTBL  , SEGTYPE=S0          ,PARENT=REVHDR,$
 FIELD=BKNG_CTR_ID ,ALIAS=BKNG_CTR_ID ,USAGE=A4      ,A4,$
 FIELD=US_SLS_DSTRC,ALIAS=US_SLS_DSTRC,USAGE=A4      ,A4,$
 FIELD=US_SLS_RGN  ,ALIAS=US_SLS_RGN  ,USAGE=A4      ,A4,$
                                                        

(x.acx)

SEGNAME = REVHDR,TABLENAME=REVHDR,$ 
 FIELD = INDEX_FLD2, ALIAS = BKNG_CTR_ID,$                              
SEGNAME = REVDTL,TABLENAME=REVDTL,KEYFLD=DEC_ORDER_NO,IXFLD=INDEX_FLD1,$
 FIELD = INDEX_FLD1, ALIAS = DEC_ORDER_NO,$
SEGNAME = GEOTBL,TABLENAME=GEOTBL,KEYFLD=INDEX_FLD2,IXFLD=BKNG_CTR_ID,$ 

                     
    
T.RTitleUserPersonal
Name
DateLines
102.1This is how I soved itTUNER::CARNEYMon Aug 01 1988 16:335
    I was able to solve my problem.  What was wrong with the first master
    file was that the cardinality between revhdr and geotbl was a many
    to one.  My solution was to make the geotbl the parent of the revhdr
    segment and kept revhdr as the parent of revdtl.  It works fine
    now.
102.2Another approach!NRMLZE::ESTESWed Aug 24 1988 10:3219
    Another solution That I have used is to make the child segment a
    "U"nique segment.  The Focus RDB interface book doesn't mention
    this but it does work. The book says that all relations have a one
    to many cardinality but that ins't necceasrily true.
      I LOVE FOCUS (ARGHHHHHHHHH!!!!)
        
       from your example, you could have set it up like this...
    
    		SEGNAME=REVHDR, SEGTYPE=SO
    		....
    		SEGNAME=REVDTL, SEGTYPE=S0, PARENT=REVHDR
    		....
    		SEGNAME=GEOTBL, SEGTYPE=U, PARENT=REVHDR
    
    THIS MAKES GEOTBL A UNIQUE OCCURANCE OF THE PARENT AND THEN YOU
    CAN SORT ON ANY OF ITS FIELDS.
    
       
    REGARDS, STU