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     [SOLVED] FOC2905 Trying to -INCLUDE &&IBI_IF_FILE

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] FOC2905 Trying to -INCLUDE &&IBI_IF_FILE
 Login/Join
 
Guru
posted
Hi,

I'm trying to run a procedure that looks like this...
TABLE FILE SYSTABLE
SUM FST.NAME
BY NAME
-INCLUDE &&IBI_IF_FILE
ON TABLE PCHOLD FORMAT XML
END


In the users profile there is a line
 -SET &&IBI_IF_FILE = e:\[path]\includefiles.fex 


The contents of includefiles.fex is
 WHERE NAME EQ 'CAR' OR 'GGSALES'  


I've found two docs regarding this. One suggested using MRNOEDIT and the other suggested using a -DEFAULT. I've tried both but I keep getting "(FOC2905) &VARIABLE IS NOT ALLOWED AS A FILENAME IN THIS CONTEXT:"

Anyone have any suggestions on this?

Oh yeah, If I go to https://SERVER:PORT/ibi_html/homepage/adhoc.htm and paste the procedure shown above it works! Confused

Thanks,

Dan

This message has been edited. Last edited by: Dan Pinault,


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Virtuoso
posted Hide Post
When executing the procedure, is the value of the variable correct? You can show all variables with the command '-? &' in the fex.

Other question is: have you tried it as '-INCLUDE &&IBI_IF_FILE.EVAL'?


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
"(FOC2905) &VARIABLE IS NOT ALLOWED AS A FILENAME IN THIS CONTEXT:
When operating under WFDESCRIBE, there are restrictions on where
an &VAR or &&VAR may be used. -INCLUDE is one of those cases."

I believe this means the following:

When Autoprompt is active (IBIF_wfdescribe = XMLRUN or XMLPROMPT), the server will pre-scan the fex, along with any files referenced therein by (server-side) -INCLUDE, to prompt for undefined amper vars referenced in the fex code. That pre-scan does not perform amper var substitution in the -INCLUDE directive line to determine the identify of the included child fex -- instead it issues FOC2905 and stops dead.

To achieve a server-side -INCLUDE for the module whose name is contained in a global var, I suggest you hide the entire -include in a local amper var:
-SET &where='-INCLUDE ' | &&IBI_IF_FILE ;

TABLE FILE ...
...
&where.EVAL
...
END


The Autoprompt pre-sccan will note that &where is defined by a -SET so not in need of Autoprompting, and will restrict itself to undefined vars it finds in the parent fex (plus any visible -INCLUDEs). Once the autoprompting is completed, the server's second-round execution on encountering

&where.EVAL

will evaluate and rescan the line, and find and process

-INCLUDE drive:\path\fexname

But any fex that you -INCLUDE in this manner had better not have amper variables that need Autoprompt!

This message has been edited. Last edited by: j.gross,


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Guru
posted Hide Post
Jack,

Way to outsmart the compiler! Good One Your technique of 'hiding' one variable inside another worked perfectly.

Thanks!

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Member
posted Hide Post
The problem is your amper variable only contains the path you set it to not the contents of the file. This should solve your problem:
Step 1: filedef a file using your amper variable
ex: FILEDEF XYZ DISK &&IBI_IF_FILE.EVAL
Step 2: Prior to your table request insert lines
-READ XYZ &WHERE_STMT.A80
-RUN
Step3 : In your table request insert the line
&WHERE_STMT.EVAL
 
Posts: 14 | Registered: December 30, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] FOC2905 Trying to -INCLUDE &&IBI_IF_FILE

Copyright © 1996-2020 Information Builders