As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
In WF8, includes to a fex in MR must contain a full path.
eg
-INCLUDE /WFC/Repository/DOMAIN_NAME/whatever.fex
if you omit the /WFC/Repository/DOMAIN_NAME/ part you will get fex not found. This was not the case in WF7. -include x.fex would find x as long as it was in the same domain.
Imagine you have a dev domain and a prod domain and you have includes all over the place. I was hoping to build a string with the path and then do something like
-*in a global inc -set &path='/WFC/Repository/DOMAIN_NAME/';
so whether dev or prod, the same code will work everywhere. But unfortunately it is impossible to inlcude a file with a string in an amper. I never tried this in WF7 since there was no need. But it definitely does not work in wf8.
I don't know much about the way the new "path" works in WebFOCUS 8 or what to do so relative path references work.
what I know for sure is that using &variables to make dynamic -INCLUDE's has never been supported on the MRE side because of the way the Dialogue Manager parser operates there.
-INCLUDE &whatever is only supported at the Reporting Server side.
The issue is that now that we need the fully qualified path it makes for REALLY ugly gotos everywhere since we need to use a different path depending on where we are.
consider this as a basic example. You have a dev domain and a prod domain with identical code except for one amper that is hard coded to dev or prod. Then you have an include to get some titles in french or english. This is how it looks
-*lang could be 'en' or 'fr' -*SITE COULD BE DEV OR PROD
Hi Jodye, In the architecture we are building, all the Main Focexec's are in the Domain that the user is running the program from. -INCLUDE files, within the main calling focexec, are in an Application folder that is part of the APP PATH. This way, multiple Domains can use them. We use -MRNOEDIT BEGIN and END for every fex to bypass the MRE parser for the program's on the server. Our HTML fex's that populate the Forms are in MRE, and, there are no issues there. FYI... Tom
I want to keep all of the files in MR in one place and not use fexes in the app path. Otherwise we will have half of our code in MR and half in the app path. So for our purposes it looks like there is no way to build a string and include a file from the string in MR.
IMHO the fully qualified path should not be necessary. Or at least, wf should be smart enough to check the current domain where the include is coming from if the fully qualified path is not specified.
What WF does is first "replace" the code "-INCLUDE app/this_fex_doesnt_exist.fex" with the contents of that .fex and then run the code.
Bases on this ( to my best knowledge ) you can not do dynamic includes.
( Other focalpointer, please add info here ).
There is just a little bit of evidence that counters my statement. If a fex is included and within this fex the same label names are use, they're are not mixed up with the 'parent' fex. ( but there are several possible technical solutions IBI could have implemented to prevent this. e.g. prefixing all labels with unique fex-id or name ).
G'luck.
_____________________ WF: 8.0.0.9 > going 8.2.0.5
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010
i remember having gotten around icky -INCLUDE issues in times past by making the &var include the -INCLUDE so its the whole shootin' match. -SET &thing = '-INCLUDE /WFC/Repository/' || &SITE || '/TITLES_' || &LANG || '.fex'; &thing.EVAL
try that.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Tom: That does not seem to work. when I specify the entire path including "IBFS:.." I get
<entry key="REASON" value="invalid character found in path element;
{INVALID_CHARACTER}={':'}; {AT_INDEX}={11}" />
So it does not like the colon.
Susanah: I tried that already. It does not work unfortunately.
I think there is no getting around this. I will just need a bunch of gotos to decide which include to use. I wish that we did not need the fully qualified path. This issue will for sure come up again as more people start going to wf8. I know many places that have dev and prod domains and assume that INCLUDE X.fex will find the correct file.
OK, it won't help with the variable named fex -- don't think you can get around that. I was thinking the variable named fex was suggested as a way of resolving the issue in the original post. I should have said I was referencing the original post, not "all situations under discussion."
I hope this can address jodye's issue.
Thanks for helping clarify that.
Dave
WF 8.2.03 Win10 / IE11 / Chrome HTML EXL2K PDF et. al.
I'm not 100% sure if this will help. As we are all more or less aware - WF does not really support a variable named fex. ~ Reason: it does not get sent from MRE to RepServ. as the fex was not yet parsed. And RepServ. does not request (included) fexes from MRE afterwards, right?!
But in jodye's case - it is not completely necessary to have a "complete dynamic" include function - a semi dynamic would suffice, right. "Semi dynamic" as in - we previously know the list of fexes we possibly include, but we do not want to choose via ugly -IF GOTO statements.
I don't have access to a WF8 env but the following code works for me in WF7.7:
-* include all pre-known fexes here that might be used later.
-* see it as a "pre-declaration" of fexes (like variables in pascal)
-GOTO L_DONT_INCLUDE;
-INCLUDE app/test_semi_dynamic0.fex
-INCLUDE app/test_semi_dynamic1.fex
-INCLUDE app/test_semi_dynamic100.fex
-L_DONT_INCLUDE
-DEFAULT &INCLUDE_SELECTOR = 0;
-SET &INCLUDE_FEX_NO = DECODE &INCLUDE_SELECTOR(0 0 1 1 2 2 ELSE 100);
-SET &INCLUDE_FEX_NAME = '-INCLUDE test_semi_dynamic' || &INCLUDE_FEX_NO || '.fex';
-TYPE &INCLUDE_FEX_NAME|.EVAL
&INCLUDE_FEX_NAME.EVAL
Please note: the a.m. code works for all &INCLUDE_SELECTOR but &INCLUDE_SELECTOR == 2 (to really show that you have to fake include all fexes correctly).
Also note: the include statement does not contain the app/ path. That did not work for me.