Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [NFR] -INCLUDE &VariableFexName
Page 1 2 

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[NFR] -INCLUDE &VariableFexName
 Login/Join
 
Expert
posted
I changed this from a post to a NFR, IB case to follow.

The NFR is as follows: Enhance the functionality of -INCLUDE to be able to handle variables, in such a was that the following code would execute "ReportFRANCE.fex".

The Code:
APP PATH WEBDEVEL
WHENCE ReportFRANCE.fex
-RUN
-DEFAULTH &FexToRun = 'ReportFRANCE.fex'
-SET &MYINCLUDE= 'IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/&FexToRun.EVAL ';
-SET &ECHO = ALL ;
-INCLUDE &MYINCLUDE.EVAL


The Error: Note, in particular, the returndesc="Cannot include resource specified &MYINCLUDE.EVAL" line in the following error.
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> 
- <ibfsrpc _jt="IBFSResponseObject" language="EN" localizeddesc="Cannot include resource specified &MYINCLUDE.EVAL" name="runAdHocFex" returncode="1020" returndesc="Cannot include resource specified &MYINCLUDE.EVAL" subreturncode="0" subsystem="SSYS" type="simple">
- <ibfsparams size="7">
  <entry key="fexContent" value="APP PATH WEBDEVEL WHENCE ReportFRANCE.fex -RUN -DEFAULTH &FexToRun = 'ReportFRANCE.fex' -SET &MYINCLUDE= 'IBFS:/WFC/Repository/wedevel/Doug/BaseFolder/&FexToRun.EVAL '; -SET &ECHO = ALL ; -INCLUDE &MYINCLUDE.EVAL -*-INCLUDE &MYINCLUDE.EVAL -*APP PATH WEBDEVEL -*WHENCE ReportFRANCE.fex -*-RUN -*-SET &MYINCLUDE= 'IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/ReportFRANCE.fex '; -*-SET &ECHO = ALL ; -*-INCLUDE &MYINCLUDE.EVAL -*-*APP PATH WEBDEVEL -*-*-DEFAULTH &Country = 'FRANCE' -*-*-SET &WhatToInclude2 = &Country || '.fex' ; -*-*-SET &MYINCLUDE= 'IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/Report' || &WhatToInclude2; -*-*-TYPE -INCLUDE &MYINCLUDE.EVAL -*-*-INCLUDE &MYINCLUDE.EVAL -*-*-*-* This will brach to a report for the incoming &Country -*-*-*-*-DEFAULTH &Country = 'FRANCE' -*-*-*-*-SET &WhatToInclude = '-INCLUDE IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/Report' || '&Country.EVAL' || '.fex' ; -*-*-*-*-SET &WhatToInclude = &Country.EVAL || '.fex' ; -*-*-*-* -*-*-*-*-TYPE *** &WhatToInclude.EVAL -*-*-*-*-*&WhatToInclude.EVAL -*-*-*-*-*-TYPE *** -*-*-*-*-*-INCLUDE IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/Report&WhatToInclude.EVAL -*-*-*-*-INCLUDE IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/ReportFRANCE.fex -*-*-*-* -*-*-*-DEFAULTH &Country = 'FRANCE' -*-*-*-SET &WhatToInclude2 = &Country || '.fex' ; -*-*-*-SET &MYINCLUDE= 'IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/Report' || &WhatToInclude2; -*-*-*-INCLUDE &MYINCLUDE.EVAL" /> 
  <entry key="comp_pass" value="****" /> 
  <entry key="args" value="__null" /> 
  <entry key="nodeName" value="__null" /> 
  <entry key="path" value="IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/CarReports.fex" /> 
  <entry key="applications" /> 
  <entry key="comp_user" value="__null" /> 
  </ibfsparams>
- <ibfserrorvalues size="2">
  <entry key="FUNCTION" value="IBFSService.runAdHocFex" /> 
  <entry key="FEX_PATH" value="&MYINCLUDE.EVAL" /> 
  </ibfserrorvalues>
  </ibfsrpc>


The following is the original post:
How's this doable?
I want to do something like the following, use a variable in a -INCLUDE statement?

This supposes that I have a fex named ReportFRANCE.fex (which I do, anlong with the other CAR countries)
-DEFAULTH &Country = 'FRANCE'
-SET &WhatToInclude1 = '-INCLUDE IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/Report' || '&Country.EVAL' || '.fex' ;
-TYPE *** &WhatToInclude1.EVAL
&WhatToInclude1.EVAL

OR
-DEFAULTH &Country = 'FRANCE'
-SET &WhatToInclude2 = &Country.EVAL || '.fex' ;
-TYPE *** -INCLUDE IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/Report&WhatToInclude2.EVAL
&WhatToInclude2.EVAL

The bottom line is that I want a single -INCLUDE based on an incoming variable.

Thanks in advance, Doug

This message has been edited. Last edited by: Doug,




   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, 2005Report This Post
Member
posted Hide Post
Hi Doug,

I tried this before and never got the fex name as variable to work quite right, to work around it I used -goto and labeled the different options.
so that if I wanted to go to the GROUP level I put a label above that section of the style and if I wanted to go to the DIV level I went to that part of the sytle sheet.
I could get all my other variables to pass but the fex name just wouldn't work. Anyhow here is some code I did to get around it.

This is the code I used to do something like what your trying:
-GROUP_LVL
TYPE=DATA, ACROSSCOLUMN=N1, TARGET='_blank', FOCEXEC=IBFS:/WFC/Repository/Payroll/PR_GRAPH_LVL_GROUP.fex(DIV=SQLOUT.SQLOUT.DIVISION_IDMARKET='&MARKET.EVAL' LOC ='&LOC.EVAL' SAMESTORE='&SAMESTORE.EVAL' CONSOLIDATED='&CONSOLIDATED.EVAL' LEVEL='&LEVEL.EVAL' REGN='®N.EVAL' OPSCTR='&OPSCTR.EVAL' WOY='&WOY.EVAL'), $

-GROUP_DIV
TYPE=DATA, ACROSSCOLUMN=N1, TARGET='_blank', FOCEXEC=IBFS:/WFC/Repository/Payroll/PR_GRAPH_LVLDIV.fex(DIV=SQLOUT.SQLOUT.DIVISION_IDMARKET='&MARKET.EVAL' LOC ='&LOC.EVAL' SAMESTORE='&SAMESTORE.EVAL' CONSOLIDATED='&CONSOLIDATED.EVAL' LEVEL='&LEVEL.EVAL' REGN='®N.EVAL' OPSCTR='&OPSCTR.EVAL' GROUP='&GROUP.EVAL' WOY='&WOY.EVAL'), $


I was including it in a graph as a drill........
Here is the code with a few other lines so that you can see where it goes in a graph.



*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT='WebFOCUS Report', $
-GROUP_LVL
TYPE=DATA, ACROSSCOLUMN=N1, TARGET='_blank', FOCEXEC=IBFS:/WFC/Repository/Payroll/PR_GRAPH_LVL_GROUP.fex(DIV=SQLOUT.SQLOUT.DIVISION_IDMARKET='&MARKET.EVAL' LOC ='&LOC.EVAL' SAMESTORE='&SAMESTORE.EVAL' CONSOLIDATED='&CONSOLIDATED.EVAL' LEVEL='&LEVEL.EVAL' REGN='®N.EVAL' OPSCTR='&OPSCTR.EVAL' WOY='&WOY.EVAL'), $
*GRAPH_SCRIPT


Hope this Helps,

Marisa

This message has been edited. Last edited by: MG,


WebFOCUS 8.05
Windows , Excel, PDf, HTML
 
Posts: 27 | Location: Nashville Tn | Registered: January 12, 2010Report This Post
Virtuoso
posted Hide Post
quote:
-DEFAULTH &Country = 'FRANCE'
-SET &WhatToInclude2 = &Country.EVAL || '.fex' ;
-TYPE *** -INCLUDE IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/Report&WhatToInclude2.EVAL
&WhatToInclude2.EVAL


One uses the EVAL suffix in a DM command when you want to have an &variable evaluated before the execution of the DM command.
So, to -INCLUDE your ReportFRANCE.fex
  
-DEFAULTH &Country = 'FRANCE'
-SET &WhatToInclude2 = &Country || '.fex' ;
-SET &MYINCLUDE= 'IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/Report'  || &WhatToInclude2;
-INCLUDE &MYINCLUDE.EVAL


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
MG: That's great for a drilldown in the stylesheet of a fex. But, I need it in a single fex so that the fex being executed is totally dynamic, as long as the fex exists.

Danny: I tried
-DEFAULTH &Country = 'FRANCE'
-SET &WhatToInclude2 = &Country || '.fex' ;
-SET &MYINCLUDE= 'IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/Report'  || &WhatToInclude2;
-INCLUDE &MYINCLUDE.EVAL
as well and get the following, note the returndesc="Cannot include resource specified &MYINCLUDE.EVAL":
  <?xml version="1.0" encoding="UTF-8" standalone="no" ?> 
- <ibfsrpc _jt="IBFSResponseObject" language="EN" localizeddesc="Cannot include resource specified &MYINCLUDE.EVAL" name="runAdHocFex" returncode="1020" returndesc="Cannot include resource specified &MYINCLUDE.EVAL" subreturncode="0" subsystem="SSYS" type="simple">
- <ibfsparams size="7">
  <entry key="fexContent" value="-* This will brach to a report for the incoming &Country -*-DEFAULTH &Country = 'FRANCE' -*-SET &WhatToInclude = '-INCLUDE IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/Report' || '&Country.EVAL' || '.fex' ; -*-SET &WhatToInclude = &Country.EVAL || '.fex' ; -* -*-TYPE *** &WhatToInclude.EVAL -*-*&WhatToInclude.EVAL -*-*-TYPE *** -*-*-INCLUDE IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/Report&WhatToInclude.EVAL -*-INCLUDE IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/ReportFRANCE.fex -* -DEFAULTH &Country = 'FRANCE' -SET &WhatToInclude2 = &Country || '.fex' ; -SET &MYINCLUDE= 'IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/Report' || &WhatToInclude2; -INCLUDE &MYINCLUDE.EVAL" /> 
  <entry key="comp_pass" value="****" /> 
  <entry key="args" value="__null" /> 
  <entry key="nodeName" value="__null" /> 
  <entry key="path" value="IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/CarReports.fex" /> 
  <entry key="applications" /> 
  <entry key="comp_user" value="__null" /> 
  </ibfsparams>
- <ibfserrorvalues size="2">
  <entry key="FUNCTION" value="IBFSService.runAdHocFex" /> 
  <entry key="FEX_PATH" value="&MYINCLUDE.EVAL" /> 
  </ibfserrorvalues>
  </ibfsrpc>
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
Confused I'm thinking that the -INCLUDE line is not interpreted before execution as is the -TYPE line or other lines of code which include variables in dev studio, but is in the command prompt.

Perhaps it's time for a NFR?

NOTE: Interesting enough, from the command prompt in dev studio, the "-INCLUDE &MYINCLUDE.EVAL" lines IS interpreted but shows "(FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND:", as follows:
 (FOC1892) FILE NOT FOUND : ReportFRANCE.fex
 -INCLUDE IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/ReportFRANCE.fex
 (FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND:
 IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/ReportFRANCE.fex
from the following code:
APP PATH WEBDEVEL
WHENCE ReportFRANCE.fex
-RUN
-SET &MYINCLUDE= 'IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/ReportFRANCE.fex ';
-SET &ECHO = ALL ;
-INCLUDE &MYINCLUDE.EVAL


Thanks, Doug
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
I'm turning this into a NFR !!!




   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, 2005Report This Post
Expert
posted Hide Post
Doug,
Since you are GRABBING the fex from Content/MRE, did you try:
  
-SET &GET_FEX = 'IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/ReportFRANCE.fex';
-MRNOEDIT -INCLUDE &GET_FEX.EVAL


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
I'll try that now Tom...
quote:
-SET &GET_FEX = 'IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/ReportFRANCE.fex';
-MRNOEDIT -INCLUDE &GET_FEX.EVAL
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
That, unfortunately, did not work, resulting in the following error:
 (FOC2905)  &VARIABLE IS NOT ALLOWED AS A FILENAME IN THIS CONTEXT:
 &GET_FEX.EVAL
 (FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND:
 IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/ReportFRANCE.fex
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
Take off the .EVAL


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
Still didn't do the trick... I added "-SET &ECHO=ALL;":
 (FOC2905)  &VARIABLE IS NOT ALLOWED AS A FILENAME IN THIS CONTEXT: &GET_FEX
 -SET &GET_FEX = 'IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/ReportFRANCE.fex';
 -INCLUDE IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/ReportFRANCE.fex
 (FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND:
 IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/ReportFRANCE.fex
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
Are you sure that fex is in that folder??? Music


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
What perplexes me is that it sees the fex and the full path to it, "IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/ReportFRANCE.fex", yet still can't handle it in the -INCLUDE, thus the "(FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND:" error...

I'm sure there's a reason for this, albeit an excuse which, imho, needs to be remedied...
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
Can't think of 1, and, Yes, should be able to since we can do it with verbs and columns...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Master
posted Hide Post
It sounds like there is some kind of preprocessing/scanning occurring.

The scan/preprocessing seems to be validating the file attempting to be -INCLUDEd, e.g. literally '&FEXTORUN' in this case, if scan is before the amper variable resolution.

Amper variable resolution probably comes in a subsequent step (Dialogue Manager processing step).

Our site requested a NFR for this, as well, although it will be interesting to see if it is possible for IB to do.

(For anyone new to WF, you should know that there are many ways of getting the same type of results, e.g., -IF in the calling fex, or making the called fex do different things based on variables set in the caller...)
 
Posts: 822 | Registered: April 23, 2003Report This Post
Expert
posted Hide Post
Since sometime after WF 7.* you cannot have a Dialogue Manager variable in an INCLUDE.

You have to do something like this pseudo-code (you *may* need a .EVAL in the GOTO):

-DEFAULT &COUNTRY = 'SCOTLAND';

-GOTO &COUNTRY

-IRELAND
-INCLUDE IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/ReportIreland.fex
-GOTO ENDREPORT


-SCOTLAND
-INCLUDE IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/ReportScotland.fex
-GOTO ENDREPORT

-CANADA
-INCLUDE IBFS:/WFC/Repository/webdevel/Doug/BaseFolder/ReportCanada.fex
-GOTO ENDREPORT

-ENDREPORT


There appears to be no other way.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Thanks David... Please post your NFR number so that I can reference it in my NFR.

Francis, I did that, and it works,... However, I need something that is totally dynamic, a single -INCLUDE based on an incoming variable.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
Sure, open an NFR - we'll all benefit, but **** (censored - can't type the word h e l l for some reason, though it's mentioned in the world's most popular book) might freeze over...


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Doug,

I gather you are running from the Portal, hence your prefix "IBFS:/WFC/Repository".

Notice that when I run the following from the DS, where FOCALPOINT is the app where my fexes are:
  
-SET &ECHO=ALL;
-* File doug01.fex
-SET &FN=DOUG01_INC;
-SET &INC='-INCLUDE FOCALPOINT/' || &FN;
&INC.EVAL


and

  
-* File DOUG01_INC.fex
TABLE FILE CAR
SUM SALES
BY CAR
END


this works and this is what appears in the view source:
  
-* File doug01.fex
-SET &FN=DOUG01_INC;
-SET &INC='-INCLUDE FOCALPOINT/' || DOUG01_INC;
-INCLUDE FOCALPOINT/DOUG01_INC
-* File DOUG01_INC.fex
TABLE FILE CAR
SUM SALES
BY CAR
END


This also works when you run from the Portal.
I suppose that when you use the prefix, WF is looking for the -INCLUDEd fex in the Content. Was it there?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
Danny, I can confirm that your technique works when the fexes are on the reporting server, but not when in the Content Repository.

Have you tried a similar test in the Content Repository?

fex 1
-* IBFS:/WFC/Repository/Test/FrancisMariani/focalpoint/fm_incl0a.fex

-SET &ECHO=ALL;

-TYPE INSIDE IBFS:/WFC/Repository/Test/FrancisMariani/focalpoint/fm_incl0a.fex

-SET &INCL1A = '-INCLUDE IBFS:/WFC/Repository/Test/FrancisMariani/focalpoint/fm_incl1a.fex';

&INCL1A.EVAL

fex 2
-* IBFS:/WFC/Repository/Test/FrancisMariani/focalpoint/fm_incl1a.fex

-TYPE INSIDE IBFS:/WFC/Repository/Test/FrancisMariani/focalpoint/fm_incl1a.fex

result
-TYPE INSIDE IBFS:/WFC/Repository/Test/FrancisMariani/focalpoint/fm_incl0a.fex
 INSIDE IBFS:/WFC/Repository/Test/FrancisMariani/focalpoint/fm_incl0a.fex
 -SET &INCL1A = '-INCLUDE IBFS:/WFC/Repository/Test/FrancisMariani/focalpoint/fm_incl1a.fex';
 -INCLUDE IBFS:/WFC/Repository/Test/FrancisMariani/focalpoint/fm_incl1a.fex
 (FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND:
 IBFS:/WFC/Repository/Test/FrancisMariani/focalpoint/fm_incl1a.fex


This, of course, works:
-* IBFS:/WFC/Repository/Test/FrancisMariani/focalpoint/fm_incl0.fex

-SET &ECHO=ALL;

-TYPE INSIDE IBFS:/WFC/Repository/Test/FrancisMariani/focalpoint/fm_incl0.fex

-INCLUDE IBFS:/WFC/Repository/Test/FrancisMariani/focalpoint/fm_incl1a.fex


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Francis,

You are right.
Neither -INCLUDE nor EX will work with a variable when the fex is in the content.
Why oh why???


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
Tom,
Yes, that fully qualified path (fqp) is where it is and works when the complete fqp and fex are coded directly, without any variables.
quote:
Are you sure that fex is in that folder???




   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, 2005Report This Post
Expert
posted Hide Post
Danny,
quote:
I gather you are running from the Portal, hence your prefix "IBFS:/WFC/Repository".

I am running this from Dev Studio. That's the fully qualified path (fqp) which works when the complete fqp and fex are coded directly, without any variables.




   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, 2005Report This Post
Expert
posted Hide Post
"Posts: 1968 | Location: Goodlettsville, TN [DG WF8007) ~ In FOCUS since 1983 | Registered: February 23, 2005"

1968 was a very good year... Smiler
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
And 1969?


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
quote:
1969?

August 15-17, 1969, to be precise? Bethel, Sullivan County, New York?
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
quote:
Neither -INCLUDE nor EX will work with a variable when the fex is in the content.
Why oh why???


Danny -- Here's why. It's a natural limitation based on how -INCLUDE and EX are handled when they occur in a referenced fex stored in Content.

The key is that Client cannot execute Focus code.

When you invoke a fex stored in content, "Client" has to modify it to a form that can be presented to the Reporting Server for execution. Client performs a static analysis, top to bottom, and transforms code as needed for execution on the Reporting Server. If it encounters an unadorned "-INCLUDE" or "EX", it is understood to refer to a fex file in Content. The transformation entails prepending to the ("adhoc.fex") script a section of code to create (using EX -LINES syntax) a (transformed) copy of the referenced fex on the Server; and changing the -INCLUDE or EX line to a form that the Server can process (referring to the dynamically created local copy of the file), and appending that to the script.

Client cannot execute Dialog Manager code such as -SET and -GOTO. I don't think it even understands that there is anything special about the "&" character. So if the include or ex line contains the name of an amper variable, it is taken literally, resulting in a message to the effect that the &yourvar.fex was not found in content.


If, as Francis suggests, you spell out all the possibilities, and use DM -IF ... GOTO logic to select which one to execute, that works -- but note that all the INCLUDE or EX statements will be preprocessed: all the referenced fex files will be retrieved from Content, and modified copies will be prepended to the script and instantiated on the Reporting Server (and so too for any fex files that those reference...).

Note, in particular, that if two different referenced fex files have the same filename but different locations in Content, one will overlay the other (since they get loaded in the working directory under the bare filename) -- so at run time the wrong one may get invoked (whichever is loaded last in the script).


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
Jack,
The English would say: "egad"!
Or in something closer to us: "Oy Vey"!


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
OK Jack,

So, with all that in mind (which makes sense) Then my request, in this NFR would be change that to eliminate those short-comings. Perhaps IB can add a preprocess, as David Briars suggested so that a "-INCLUDE &filename" would work seamlessly. I'm just thinking out loud here...

Your thoughts, other than egad or Oy Vey?
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
If there were a way for the Reporting Server to dynamically call-back to Client to serve up a file in Content referenced in an -INCLUDE appearing in its script (while enforcing security rules ...), that would do it.

The reason for IBI moving to store executable code in Content seems to be
(a) to use its security model, and
(b) to support augmenting (or "enriching") the plain stored text with arbitrary file-level attributes, as in an XML object.

For (a), perhaps IBI can come up with a means for Client to pass a token that would enable Client to apply the same security rules to a callback from Server as it applies up-front at present. I don't see any issue with (b).
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
  Powered by Social Strata Page 1 2  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [NFR] -INCLUDE &VariableFexName

Copyright © 1996-2020 Information Builders