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] Include with variables

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Include with variables
 Login/Join
 
Member
posted
According to this link, it appears to send variables to another FEX using include, you just set the variables with the normal -SET syntax.

For example:

-SET &PARAM1 = 'Val1'
-SET &PARAM2 = 'Val2'

-INCLUDE fextoinclude.fex


I'm having a problem of not getting any data inside my other fex unless I assign defaults in the fextoinclude file.

Is this normal, or am I missing something?

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


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 18 | Registered: September 13, 2012Report This Post
Guru
posted Hide Post
Something is not right. Are your two fex files in the same folder? An -INCLUDE basically appends the code into the calling fex.
Below are two fex files. If you run fex1.fex you can see that you do not need a DEFAULT for &COUNTRY. Although having a DEFAULT does not hurt anything. The SET will takes precedent over the DEFAULT.

  
-* File fex1.fex
-SET &COUNTRY = 'ENGLAND';
-INCLUDE fex2.fex


-* File fex2.fex
TABLE FILE CAR
PRINT
   COUNTRY
WHERE COUNTRY EQ '&COUNTRY';
END


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
Member
posted Hide Post
Thanks Max!

Your code does work. In fact, expanding your code to replicate what I'm trying to do appears to be working too.

Something must be wrong in my other code that I'm going to have to figure out.

Just in case it helps anyone else, here is the expanded version of the code similar to what I'm attempting to do.

  
-* File fex1.fex
-SET &COUNTRY = 'ENGLAND';
-INCLUDE fex2.fex

TABLE FILE TEMP1
PRINT *
END

-* File fex2.fex
TABLE FILE CAR
PRINT
   COUNTRY
WHERE COUNTRY EQ '&COUNTRY';
ON TABLE HOLD AS TEMP1
END


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 18 | Registered: September 13, 2012Report This Post
Virtuoso
posted Hide Post
The sequence is wrong

The part that does the reporting from the temp file should be at the end




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Gold member
posted Hide Post
I am not sure if this is the reason why your first code wasn't working but WebFOCUS sometimes gets upset when you do not end a -SET with a ;

-SET &PARAM1 = 'Val1';
-SET &PARAM2 = 'Val2';

-INCLUDE fextoinclude.fex


Also, I am not sure if you run reports without saving much but includes use the last saved version.


WF: 8201, OS: Windows, Output: HTML, PDF, Excel
 
Posts: 78 | Registered: November 08, 2010Report This Post
Member
posted Hide Post
Frank,

So you're saying that fex2.fex should do the reporting and not do a table hold with fex1.fex printing information about what is in the table hold? It is a fluke that this works as written?

Crymsyn,

Sorry my first post was wrong, I meant to type a semicolon at the end of my set statements. My code does have a semicolon, and it's not bringing back any results unless I have defaults in fex2.fex.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 18 | Registered: September 13, 2012Report This Post
Member
posted Hide Post
Sorry everyone, I figured it out. The database changed on me, so the variables were being passed to the other fex correctly. My table query in fex2 was executing correctly and getting no data. Since there was no data to print, it was correctly saying there were no rows returned. ;-)


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 18 | Registered: September 13, 2012Report 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] Include with variables

Copyright © 1996-2020 Information Builders