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.

New TIBCO Community Coming Soon
In early summer, TIBCO plans to launch a new community—with a new user experience, enhanced search, and expanded capabilities for member engagement with answers and discussions! In advance of that, the current myibi community will be retired on April 30. We will continue to provide updates here on both the retirement of myibi and the new community launch.

What You Need to Know about Our New Community
We value the wealth of knowledge and engagement shared by community members and hope the new community will continue cultivating networking, knowledge sharing, and discussion.

During the transition period, from April 20th until the new community is launched this summer, myibi users should access the TIBCO WebFOCUS page to engage.


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