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.
After searching, I still have a question. IS it possible to do something like the following: IF '&SPECIALTY' EQ 'ART THEN -INCLUDE Ed_ART_PreK_thru_12_Rev_Sep_2010.fex ELSE IF '&SPECIALTY' EQ 'BIO' THEN -INCLUDE Ed_BIO_6_thru_12_Rev_Sep_2010.fex ELSE -INCLUDE Dummy.fex END
The includes contain Defines of the same fields but have different values depending on the value of &SPECIALTY. The defines are rather large and I would really like to include just the one needed. The rest of the fex is the same for all reports (not dependant on &SPECIALTY)
Thank you in advance. The forum has been a wealth of tips and techniques. PaulThis message has been edited. Last edited by: paulI,
Prod: WF 7.7.05, BID, MRE, 7.7.06M Server, Windows 2008, RedHat, Oracle 11gR1, MS Office 2010 Test: I wish we had one!
Atturhari is correct. You can't use -INCLUDE as part of the IF statement. Also, Dialogue Manager statements need DASHES at the start of each line. And you don't need an END statment. It looks like you've not had too much experience with Dialogue Manager. Read up on it. DM is your friend.
Atturhari's code will work, though the END is not needed and each -INCLUDE will need to have -MRNOEDIT in front if run from MRE.
Another more streamlined method uses DECODE. It's easier to insert a define fex by just adding a new decode pair line. Note, you will need the -MRNOEDIT for the -INCLUDE if running from MRE.
Thank you all for your replies. I tried both and and could not fet either to work (yet). -SET &RUNIT=DECODE &SPECIALTY(ART 'fcqy7de6.fex' BIO 'Ed_BIO_6_thru_12_Rev_Sep2010.fex' EED 'Ed_EED_K_thru_6_Rev_Sep2010.fex' ELSE ''); -MRNOEDIT -INCLUDE app/&RUNIT.EVAL
gives (FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND: app/&RUNIT.EVAL.
If I take out the 'app/' I get a (FOC2905) &VARIABLE IS NOT ALLOWED AS A FILENAME IN THIS CONTEXT: &RUNIT.EVAL. The suggestion from a 2008 post was to add app/.
The members to include are in the 'Other' folder in DevStudio. Does this make a differance? I am using the actual file name in the decode.
Obviously I am missing something very small. Please advise. Thanks. Paul
PS: I like the Dm method but feel I have more to learn before playing with it.
Prod: WF 7.7.05, BID, MRE, 7.7.06M Server, Windows 2008, RedHat, Oracle 11gR1, MS Office 2010 Test: I wish we had one!
Well, I got the decode to work. Now it can not find the include.
END -SET &RUNIT=DECODE BIO(ART '-INCLUDE fcqy7de6.fex' - BIO '-INCLUDE Ed_BIO_6_thru_12_Rev_Sep2010.fex' - EED '-INCLUDE Ed_EED_K_thru_6_Rev_Sep2010.fex' - ELSE ''); -INCLUDE Ed_BIO_6_thru_12_Rev_Sep2010.fex (FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND: Ed_BIO_6_thru_12_Rev_Sep2010.fex TABLE FILE HOLDDATA
(BIO after decode is the value of the parameter &SPECIALTY) When in DevStudio, I have the includes in the 'Other' folder. Does that make a differance? I have tried putting 'app/' in front of the include name (-INCLUDE app/....). Is there a path setting somewhere that I have missed? If I just include 1 item (without the decode and eval) it works fine.
Sorry to be a bother, but I have 13 of these includes and all of them are rather large.
Thanks again Paul
Prod: WF 7.7.05, BID, MRE, 7.7.06M Server, Windows 2008, RedHat, Oracle 11gR1, MS Office 2010 Test: I wish we had one!
After actually creating some test fexes and storing in the same domain as the main fex and getting the same error as you, I did some research and found this will not work, at least not easily. See post http://forums.informationbuild...71057331/m/350103914 for more info.
From an IBI tech post from 2004: "... Unfortunately, you can't do it. The issue is, the MRE Dialogue Manager processing is NOT the FULL D.M., but only provides variable substitution. It doesn't really support the '.EVAL' qualifier, which would cause a second 'interpretation' of the line. As a result, the -INCLUDE doesn't see the value as a filename, and can't locate it. That's why you get that error."
Follow the links and see some suggestions.
My suggestions:
1) Follow Francis Mariani's from the post link given above and hard code the fex names and use GOTO
or
2) Store the program fexes in a folder on the data server and call them from the MRE domain folder. Let's say the report fexes are stored in "baseapp". The main fex in the MRE domain folder should look like this:
Sorry for being slow in replying. We have been closed for a couple of days due to snow and bitter cold. Let me look at the suggestions and I will let the forum know what I find. Thank you all VERY much for your suggestions. This is what makes the forum valuable.
Prod: WF 7.7.05, BID, MRE, 7.7.06M Server, Windows 2008, RedHat, Oracle 11gR1, MS Office 2010 Test: I wish we had one!
-* use one of the following two lines for testing:
-SET &SPECIALTY = 'ART' ;
-SET &SPECIALTY = 'BIO' ;
-SET &USE_ART = IF &SPECIALTY EQ 'ART' THEN '' ELSE '-* DO NOT USE ART' ;
-SET &USE_BIO = IF &SPECIALTY EQ 'BIO' THEN '' ELSE '-* DO NOT USE BIO' ;
&USE_ART.EVAL-TYPE -INCLUDE Ed_ART_PreK_thru_12_Rev_Sep_2010.fex
&USE_BIO.EVAL-TYPE -INCLUDE Ed_BIO_6_thru_12_Rev_Sep_2010.fex
Remove the "-TYPE " for reality. Try it, you just might like it...
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
OK. Here is what I have. The following works like a champ: -IF &SPECIALTY EQ 'ART' THEN GOTO LBLART ELSE GOTO LBLBIO; -LBLART -INCLUDE app/fcqy7de6.fex -GOTO CONT_RPT; -LBLBIO -IF &SPECIALTY EQ 'BIO' THEN GOTO LBLINBIO ELSE GOTO LBLEED; -LBLINBIO -INCLUDE app/r4yv1qfx.fex -GOTO CONT_RPT; -LBLEED -IF &SPECIALTY EQ 'EED' THEN GOTO LBLINEED ELSE GOTO CONT_RPT; -LBLINEED -INCLUDE app/dfcoz1x9.fex -CONT_RPT
Doug's idea is great except there appears to be a problem with eval and includes:
-SET &USE_ART = IF BIO EQ 'ART' THEN '' ELSE '-* Do not use art'; -SET &USE_BIO = IF BIO EQ 'BIO' THEN '' ELSE '-* Do not use bio'; -* Do not use art-INCLUDE app/fcqy7de6.fex -INCLUDE app/r4yv1qfx.fex (FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND: app/r4yv1qfx.fex
I had the same trouble using DECODE and EVAL. I am just a novice so I will leave this to better minds than mine. Thanks to everyone for their input and assistance. Paul
Prod: WF 7.7.05, BID, MRE, 7.7.06M Server, Windows 2008, RedHat, Oracle 11gR1, MS Office 2010 Test: I wish we had one!
Here's the working solution, program and results: ART Program (INCLUDE_ART_CODE.fex), used as a -INCLUDE in LABEL_BRANCHING.fex:
-* File INCLUDE_ART_CODE.fex
-TYPE *** This is being executed in INCLUDE_ART_CODE.fex at &DATEMtDYY @ &TOD ***
BIO Program (INCLUDE_BIO_CODE.fex), used as a -INCLUDE in LABEL_BRANCHING.fex:
-* File INCLUDE_BIO_CODE.fex
-TYPE *** This is being executed in INCLUDE_BIO_CODE.fex at &DATEMtDYY @ &TOD ***
Test Program (LABEL_BRANCHING.fex):
[code]-* File LABEL_BRANCHING.fex
-SET &SPECIALTY = 'ART' ;
-SET &USE_ART = IF &SPECIALTY EQ 'ART' THEN '' ELSE '-* DO NOT USE ART' ;
-SET &USE_BIO = IF &SPECIALTY EQ 'BIO' THEN '' ELSE '-* DO NOT USE BIO' ;
&USE_ART.EVAL-INCLUDE INCLUDE_ART_CODE.fex
&USE_BIO.EVAL-INCLUDE INCLUDE_BIO_CODE.fex
-TYPE *** LABEL_BRANCHING : TEST COMPLETE
Results:
*** This is being executed in INCLUDE_ART_CODE.fex at Feb 4, 2011 @ 21.39.36 ***
*** LABEL_BRANCHING : TEST COMPLETE
Test Program (LABEL_BRANCHING.fex):
-* File LABEL_BRANCHING.fex
-SET &SPECIALTY = 'BIO' ;
-SET &USE_ART = IF &SPECIALTY EQ 'ART' THEN '' ELSE '-* DO NOT USE ART' ;
-SET &USE_BIO = IF &SPECIALTY EQ 'BIO' THEN '' ELSE '-* DO NOT USE BIO' ;
&USE_ART.EVAL-INCLUDE INCLUDE_ART_CODE.fex
&USE_BIO.EVAL-INCLUDE INCLUDE_BIO_CODE.fex
-TYPE *** LABEL_BRANCHING : TEST COMPLETE
Results:
*** This is being executed in INCLUDE_BIO_CODE.fex at Feb 4, 2011 @ 21.39.36 ***
*** LABEL_BRANCHING : TEST COMPLETE
DougThis message has been edited. Last edited by: Doug,
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005