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     Passing Amper variables via EXEC

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Passing Amper variables via EXEC
 Login/Join
 
Master
posted
Hello!

The subject of this post explains it pretty well.

Is there a way to call a FEX and supply it with variable values?
Like so...
EXEC someprocedure.fex (value1, value2)

The IBI docs only show
EXEC someprocedure.fex
and fail to mention anything at all about passing values to a fex.

Thanks!


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
Virtuoso
posted Hide Post
There are 3 ways (that I know of) to pass variables through to an exec.

EX procName var1=value1,var2=value2
refer to &var1 and &var2 in procName.

EX procName value1,value2
refer to &1 and &2 in procName

-SET &&var1 = 'value1';
-SET &&var2 = 'value2';
EX procName
refer to &&var1 and &&var2 in procName


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Master
posted Hide Post
This is Great!

Thank you for your patience.


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
Master
posted Hide Post
Is there any difference between EXEC and -INCLUDE?

I get a FOC not found error when I do
EXEC app/wcqrgj18.fex

but it runs fine when I do a
-INCLUDE app/wcqrgj18.fex

Thanks again!


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
Virtuoso
posted Hide Post
Jason

There are only a few differences between EXEC and -INCLUDE, really only to do with the &vars. An -INCLUDE is part of the host focexec, the EXEC is a seperate entity, but basic environmental things will be carried through. When you say you get a FOC not found error, that means nothing without further information I'm afraid.

You will have to do some debugging to find out what is missing/different.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
Code the fex name as (do not include the "app/"):

-INCLUDE FEXNAME
EXEC FEXNAME
EX FEXNAME


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
If you want to refer to a focexec in a different application, then the syntax appName/focexecName is valid and is fine.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
HUGE differences between EXEC and -INCLUDE
EXEC VAR1=VAL1, VAR2=VAL2, VAR3 = VAL3
is self contained.
it doesn't communicate with the surrounding fex at all. So, that means you can have loops inside that EXEC fex and not worry about having them branch to statement labels inside your surrounding fex, your &vars don't escape your EXEC'd fex.

-INCLUDE does become part of the surrounding fex..so if it were to contain loops and goto labels, they had better be unique.

To repeat an operation inside a surrounding fex, use EXEC
EXEC MYCAR COUNTRY = 'FRANCE'
-RUN
EXEC MYCAR COUNTRY = 'SPAIN'
-RUN
EXEC MYCAR ...you get the idea.
But...
The EXEC command contains an inherent MRNOEDIT
so you canNOT use EXEC in a surrounding fex when that EXEC fex issues a REMOTE call to a REMOTE server. To me, this is a big mess. its a change from 5 to 7, and for me, this killed an entire application in my site...

There's something about the EX command..from 5 to 7, but i can't quite remember. i think its going away. its different from EXEC..

Another way to answer your question is via an http call...
<A HREF="
http://servrname/cgi-bin/ibi_cgi/webapi.dll?IBIF_ex=fex...&VAR2=VAL2&VAR3=VAL3">

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




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
I stand corrected.

You can code the EXEC statement in one of several ways (though I couldn't find this in the documentation anywhere). e.g.:

EXEC fexname
EXEC fexname.fex
EXEC appname/fexname
EXEC appname/fexname.fex

-INCLUDE fexname
-INCLUDE fexname.fex
-INCLUDE appname/fexname
-INCLUDE appname/fexname.fex

The folder appname does not have to be in the APPPATH, as long as it's in the IBI Apps folder. You could also run a APP MAP command to enable an application folder that's outside the IBI Apps folder.


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
This is probably a little different for MRE.


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
Susannah

Never come across the MRNOEDIT command. Suppose that what comes from only using self-service on one server!

Is there anything I (and others) should know about it?


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
crossing domains (but that's only if you're using mre)




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Master
posted Hide Post
quote:
Originally posted by susannah:
The EXEC command contains an inherent MRNOEDIT
so you canNOT use EXEC in a surrounding fex when that EXEC fex issues a REMOTE call to a REMOTE server. To me, this is a big mess. its a change from 5 to 7, and for me, this killed an entire application in my site...

There's something about the EX command..from 5 to 7, but i can't quite remember. i think its going away. its different from EXEC..

Another way to answer your question is via an http call...
<A HREF="
http://servrname/cgi-bin/ibi_cgi/webapi.dll?IBIF_ex=fex...&VAR2=VAL2&VAR3=VAL3">


Thank you!

Since this is all within MRE, should I abandon the EXEC command all together? We're on 7.1.3

Thanks again.


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report 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     Passing Amper variables via EXEC

Copyright © 1996-2020 Information Builders