Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Go
New
Search
Notify
Tools
Reply
  
CONDITIONAL JOIN -
 Login/Join
 
Platinum Member
posted
Hi,
I am using a conditional join with variable and constructing a cluster masterfile.
JOIN WHERE CAR EQ &&CAR.
How can I pass FOC_NULL to this variable.If I use FOC_NULL it throws me error.
 
Posts: 116 | Registered: October 25, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Isn’t it _FOC_NULL? What’s the error?


WebFOCUS 8203, Unix, Windows
 
Posts: 1342 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Platinum Member
posted Hide Post
(FOC32516) AN ELEMENT IN JOIN_WHERE EXPRESSION IS NOT RECOGNIZED: _FOC_NULL
BYPASSING TO END OF COMMAND
 
Posts: 116 | Registered: October 25, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Can you share an example we could run? WF_Retail has FACTS and DIMENSIONS you can use to join SALES to PRODUCT.


WebFOCUS 8203, Unix, Windows
 
Posts: 1342 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Platinum Member
posted Hide Post
I don't have the WF_Retail sample in my Repository
 
Posts: 116 | Registered: October 25, 2017Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Hi,
Is there any way to do this.
How can we ignore the JOIN WHERE condition in run time.
 
Posts: 116 | Registered: October 25, 2017Reply With QuoteReport This Post
Master
posted Hide Post
It is really pretty simple. You have a conditional statement which implies sometimes you want it and other times you don't.

Just set the line to an & variable, sort of like this:

-SET &CJLINE=IF condition is true THEN 'YOUR LINE OF CODE' ELSE '-*';


then where your line of code is, just substitute it with &CJLINE like this:

... lines of code
&CJLINE
... more lines of code


When you want it, it will be there otherwise it will be a -* which the parse will ignore.

Also, why do you have 2 threads open for this question?


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 865 | Location: Oklahoma City | Registered: October 27, 2006Reply With QuoteReport This Post
Platinum Member
posted Hide Post
I can comment the line if I have it in the procedure.What I have is a cluster master file where I am joining two tables.In that one JOIN condition has &&Variable and the other is Table1_ID EQ Table2_ID.
The JOIN condition will be JOIN WHERE Enrollment Date GE &&VARIABLE.

If I pass a value to this variable it will work fine.
What if I need to ignore this condition and run it for only the join condition with the ID.
 
Posts: 116 | Registered: October 25, 2017Reply With QuoteReport This Post
Master
posted Hide Post
Have you looked into using a master file profile?


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 865 | Location: Oklahoma City | Registered: October 27, 2006Reply With QuoteReport This Post
Platinum Member
posted Hide Post
quote:
master file profile

I have not used MFD profiles much in my development.
It would be helpful if you can share how we can use MFD profiles to achieve this requirement.
 
Posts: 116 | Registered: October 25, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Siva

An MFD Profile is just another fex you register with the master file. When you open the synonym in the properties there is a place to reference the fex to be used under MFD_PROFILE. It can set && variables every time a user accesses the master file.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1209 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Hi Chuck,
I am setting my variable in the procedure.But if i set it as _FOC_NULL it throws error.
 
Posts: 116 | Registered: October 25, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Siva

Better open a case with techsupport I don't know why that would cause an error. Did you put it inside single quote marks?


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1209 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
The functionality of _FOC_NULL, to signal "ignore this line of code" only works in a fex (as the fex pre-processor is determining whether and in what form to push the line into Focstack for execution).

In code occurring in an MFD and referencing global (&&) variables, if the &&var's value is _FOC_NULL it will be taken literally -- if within quotes, as a text value; if unquoted, as a fieldname. Either way, the resolved line remains "active" and the Join will throw an error at run-time.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 


Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.