SET KEEPDEFINES = ON
DEFINE FILE GEACA09
FUNDAREAORG/A7 WITH FUND = FUND | AREA |ORG;
END
-RUN
JOIN FUNDAREAORG WITH FUND IN GEACA09 TO FUND AND ORG IN SECURITY AS JSEC23
END
-RUN
0 ERROR AT OR NEAR LINE 8 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC376) SYNTAX ERROR OR MISSING ELEMENT IN JOIN/COMBINE COMMAND:
banging head against wall. What am i missing? if i JOIN A AND B IN host TO A AND B IN guest AS JSEC23 I don't get the error, of course the join won't work because the B's aren't the same elements So i define A|B|C TO A AND B get error i tried defining on both host and guest JOIN A|B|C ... TO A|B of course it didn't work. get same error. What am i missing??This message has been edited. Last edited by: susannah,
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
December 15, 2008, 10:41 AM
GinnyJakes
The join has to come before the define in a define-based join. Totally backwards, I know.
i thought that, too, Ginny so i have SET KEEPDEFINES = ON and i tried it the normal way, as well, with the defines after... and nada... same error.
JOIN FUNDAREAORG WITH FUND IN GEACA09 TO FUND AND ORG IN COMPILED_SECURITY_UFOS AS JSEC23
END
DEFINE FILE GEACA09
FUNDAREAORG/A7 WITH FUND = FUND | AREA |ORG;
END
-RUN
0 ERROR AT OR NEAR LINE 6 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC376) SYNTAX ERROR OR MISSING ELEMENT IN JOIN/COMBINE COMMAND:
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
December 15, 2008, 10:47 AM
GinnyJakes
Can you have one field on the 'from' side and two on the 'to' side?
well, in focus files, sure join bigkeyfield in A to key1 and key2 and key3 in B ...
i tried JOIN FUND AND AREAORG WITH FUND IN A (where the defined field was AREAORG) and died. you can't it seems have a multifield join where one of them is defined... sigh.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
December 15, 2008, 11:31 AM
j.gross
a. I believe your original "(FOC376) SYNTAX ERROR OR MISSING ELEMENT IN JOIN/COMBINE COMMAND" message was because of the mismatch in number of from and to fields: If you specify multiple fields on the Join To side, you must list same number on the Join From side.
b. In the 7.1.3 features document, the JOIN syntax states that WITH can be omitted if the defined field is predefined (using KEEPDEFINE=ON); so try dropping the WITH phrase altogether. -- But then again, the syntax given for define-based join does not provide for a multiple-component join key.
c. If that doesn't work, try a "conditional"* join, listing the equijoin conditions as WHERE's. Then you may not need a define at all.
- - -
* A misnomer -- there's nothing conditional (as in, if such-and-such don't try to find a matching TO instance) about such a join. I would prefer calling it a condition-based join.This message has been edited. Last edited by: j.gross,
- Jack Gross WF through 8.1.05
December 15, 2008, 12:30 PM
susannah
thanks jack i tried it w/o the WITH and it just said 'NO SUCH FIELD'... .. I just talked to BJ and we think that w/76 you can make volatile oracle files... (while we wait for DBA's to create a view) so i'll define the 3 fields on the guest table... DEFINE FILE guest B/A1=SUBSTR(..); C/A1=SUBSTR(...); NO EDIT! END TABLE FILE guest SUM USER_ID BY A BY B BY C ON TABLE HOLD AS myguest FORMAT SQLORA END ... and now JOIN INNER A AND B AND C IN host TO the same 3 in myguest... BJ is going to research the exactly settings for volatility with that oracle extract... and i'll re-edit this post... and this might be the way to go for us.. ... yet another reason to have the whole world in focus files!
... well, volatile isn't supported w/ Oracle. it seems...back to the drawing board.This message has been edited. Last edited by: susannah,
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
December 15, 2008, 12:33 PM
GinnyJakes
BJ might have been referring to the SAME-DB syntax.
i tried it w/o the WITH and it just said 'NO SUCH FIELD'...
sounds like a bug (assuming the KEEPDEFINE and DEFINE FILE were in place)
Did you try c.?
- Jack Gross WF through 8.1.05
December 15, 2008, 12:49 PM
susannah
yes, Ginny. that was it. but w/ oracle, there's no persistence=volatile option. it seems that the global-temp is the only option and that will be harder to manage ... so, we're back to DBA views... i've learned a lot today! thanks everyone.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
December 15, 2008, 08:36 PM
susannah
JOIN CLEAR *
JOIN FILE GEACA&FYR AT FUND TAG FH TO UNIQUE
FILE COMPILED_SECURITY_UFOS AT FUND TAG FX AS J1
WHERE FH.FUND EQ FX.FUND ;
WHERE FH.AREA | FH.ORG EQ FX.ORG ;
WHERE FX.USER_ID EQ '&USER_ID.EVAL' ;
END
Lo and behold! a little wizardy from the queen of rdbms (you know who i mean), and success. Its this new conditional join feature.. you can put a 'sort of' define in the where condition; This is great. works like a charm.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
December 15, 2008, 09:38 PM
j.gross
what did i tell ya! glad it worked out.
- Jack Gross WF through 8.1.05
December 15, 2008, 10:26 PM
susannah
yup, you're right jack. it never occured to me that the WHERE condition could be field|field... never! zut alors!
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
December 16, 2008, 02:50 AM
Tony A
Not an NFR but an NMR eh?
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
December 16, 2008, 05:37 AM
j.gross
check the sql stmt trace to see whether the condition involving catenation is passed thru.
if that part of the join is "focus-managed", sql would be pushing "cartesian product" batches of rows across the wire for wf to weed through.