Trying to filter a JOIN based on a DEFINE field created earlier.
Is there an Order of precedence in which FOCUS commands are executed by WFRS?
Below code throughs Error message. Can anybody suggest what's wrong with below code?
DEFINE FILE CAR
profit/D12.2=CAR.BODY.RETAIL_COST - CAR.BODY.DEALER_COST;
END
JOIN
FILE CAR AT CAR.ORIGIN.COUNTRY
TO MULTIPLE
FILE CAR AT CAR.ORIGIN.COUNTRY TAG J0 AS J0
-*
WHERE J0.ORIGIN.COUNTRY EQ J0.ORIGIN.COUNTRY;
WHERE J0.BODY.profit GT 5000;
END
Thanks TryFocusThis message has been edited. Last edited by: Kerry,
Prod: WF 7.6.10 windows. -- MRE/Dashboard/Self Service/ReportCaster - Windows XP
April 07, 2011, 05:52 PM
Waz
Basics...
You should always issue your join prior to your define.
Also, I am not sure you can reference a defined field in a conditional join.
What is the error message ?
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
April 08, 2011, 05:10 PM
TryFocus
Thanks Waz. I was trying to implement this sort of logic using InfoAssist GUI. Can you suggest any work around to implement this as we are trying to achieve MATCH functionality.
Thanks TryFocus.
Prod: WF 7.6.10 windows. -- MRE/Dashboard/Self Service/ReportCaster - Windows XP
April 10, 2011, 05:50 PM
Waz
MATCH functionality is quite broad, what were you after exactly ?
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
April 10, 2011, 11:38 PM
TryFocus
Was trying to implement Above Posted code using InfoAssist GUI (No Editor).
(OR)
This Scenario in InfoAssist: 1. Couple of Defines on Table_1 2. Joining Table_1 to Table_2 on Real fields. 3. Join Filter condition on DEFINES based on Table_1.
Thanks
Prod: WF 7.6.10 windows. -- MRE/Dashboard/Self Service/ReportCaster - Windows XP
April 11, 2011, 05:59 AM
<FreSte>
Below you'll find The-12-Steps-Of-Table:
1. WHERE's
2. DEFINE's
3. WHERE on DEFINE's
4. SORT
5. VERB (=PRINT or SUM)
6. PREFIX OPERATORS (FST. LST. MAX. etc)
… internal matrix is ready at this point …
7. COMPUTES
8. WHERE TOTAL
9. BY TOTAL
10. GENERATE TOTALS / SUBTOTALS etc.
11. RECAP's (based on subtotals)
12. STYLING + OUTPUT
In general:
WebFOCUS will offload as much as possible to the RDBMS
If 1 step cannot be offloaded to the RDBMS
that step will be solved by WebFOCUS
all following steps from that point will be solved by WebFOCUS
All steps after generating the Internal Matrix are always solved by WebFOCUS
April 11, 2011, 09:03 AM
Waz
quote:
The-12-Steps-Of-Table
Isn't this part of the training ?
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
April 11, 2011, 10:30 AM
GaryB
I think you could fix the original join with the KEEPDEFINES = ON setting
Gary
quote:
KEEPDEFINES = ON DEFINE FILE CAR profit/D12.2=CAR.BODY.RETAIL_COST - CAR.BODY.DEALER_COST; END JOIN FILE CAR AT CAR.ORIGIN.COUNTRY TO MULTIPLE FILE CAR AT CAR.ORIGIN.COUNTRY TAG J0 AS J0 -* WHERE J0.ORIGIN.COUNTRY EQ J0.ORIGIN.COUNTRY; WHERE J0.BODY.profit GT 5000; END
April 11, 2011, 11:18 AM
ABT
quote:
Originally posted by Waz:
quote:
The-12-Steps-Of-Table
Isn't this part of the training ?
I knew Focus was associated with a 12 step program.... That actually explains a lot.