JOIN LEFT_OUTER field1 IN FILE1 TO MULTIPLE field2 IN FILE2 TAG J0 AS J0 WHERE field3 NE -1 ; END
stop working when I try them on WF 8007M. Is it normal?
Instead of that, Developer studio creates something like
JOIN LEFT_OUTER FILE FILE1 AT field1 TO MULTIPLE FILE FILE2 AT field2 TAG J0 AS J0 WHERE (field1 EQ field2) AND (field3 NE -1) ; END
Is it normal? Is there any parameter which can help to use already developed code?
Thank you for your help.
p.s. total nonsence... Installed 7704 back and all works again...This message has been edited. Last edited by: <Kathryn Henning>,
Wf7704/WF8,Win64/32
April 15, 2014, 01:27 PM
Francis Mariani
The syntax for a conditional join has used the AT parameter since it was introduced:
JOIN [LEFT_OUTER|INNER] FILE hostfile AT hfld1 [WITH hfld2] [TAG tag1]
TO {UNIQUE|MULTIPLE}
FILE crfile AT crfld [TAG tag2] [AS joinname]
[WHERE expression1;
[WHERE expression2;
...]
END
You just might be lucky that the conditional joins worked without the AT parameter... Code tightening in v8 perhaps?
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
April 15, 2014, 01:34 PM
Piter
ha-ha how to say lucky It is over 100 of procedures where it was fine before v8...
thanks you Francis, anyway. p.s. I am not sure if my original syntax without AT was created outside older Developer studio...
Wf7704/WF8,Win64/32
April 15, 2014, 01:57 PM
Francis Mariani
I just created a JOIN in Dev Studio v7.7.05:
JOIN
FILE TEST_FACT_ONE
AT TEST_FACT_ONE.TEST_FACT_ONE.BUS_DTE TO MULTIPLE
FILE TEST_DIM_CALENDAR AT TEST_DIM_CALENDAR.TEST_DIM_CALENDAR.BUS_DTE
TAG J0 AS J0
WHERE TEST_FACT_ONE.TEST_FACT_ONE.BUS_DTE EQ J0.TEST_DIM_CALENDAR.BUS_DTE;
END
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
April 16, 2014, 03:33 AM
Danny-SRL
Piter,
quote:
JOIN LEFT_OUTER field1 IN FILE1 TO MULTIPLE field2 IN FILE2 TAG J0 AS J0 WHERE field3 NE -1 ; END
It seems to me that you combined 2 different syntaxes: "JOIN field IN file" does NOT support WHERE clauses. "JOIN FILE file AT field" allows WHERE clauses. See wf77crlang.pdf pages 827 - 847. Probably WF 7.7 was lenient...
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
April 16, 2014, 03:45 AM
Wep5622
...and that's what you get for introducing two different syntaxes for the same thing...
I never understood why conditional joins had to have a different syntax. The only thing it seems to add is confusion.
I say: get rid of the conditional join syntax and add WHERE-clause syntax to regular joins. That cleans up the generated SQL too (why use implicit join syntax at all?).
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
April 16, 2014, 03:49 AM
Danny-SRL
It was probably easier for the developers...
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF