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] How do you call a procedure using a variable?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] How do you call a procedure using a variable?
 Login/Join
 
Member
posted
I'm new to WebFOCUS 8. In 7.76 it was easy to dynamically execute FOCEXECS. I can't seem to do it in WF8.

Here is my Code:

-DEFAULT &FEXNAME='pdash_list_events.fex'
-SET &FEXNAMEX=IF &FEXNAME EQ 'FOC_NONE' THEN 'pdash_list_events.fex' ELSE &FEXNAME;
-SET &FEXNAME=&FEXNAMEX;
-SET &EX_NAME = 'EX IBFS:/WFC/Repository/PD2_HANA_RNA4/&FEXNAME.EVAL PDASH_HOT_ALERT=''&PDASH_HOT_ALERT'', PDASH_ASSIGNED=''&PDASH_ASSIGNED'', PDASH_GROUPING=''&PDASH_GROUPING'', PDASH_MANAGER=''&PDASH_MANAGER'', PDASH_USER=''&PDASH_USER'', PDASH_REDONLY=''&PDASH_REDONLY'', PDASH_DATE=''&PDASH_DATE'', PDASH_FMT=''&PDASH_FMT'' ' ;
&EX_NAME.EVAL
END

When I run ti I get:
-SET &EX_NAME = 'EX IBFS:/WFC/Repository/PD2_HANA_RNA4/pdash_list_events.fex PDASH_HOT_ALERT=''REG'', PDASH_ASSIGNED=''ALL'', PDASH_GROUPING=''ALL'', PDASH_MANAGER=''ALL'', PDASH_USER=''UNKNOWN'', PDASH_REDONLY='' '', PDASH_DATE=''ALL'', PDASH_FMT=''HTML'' ' ;
EX IBFS:/WFC/Repository/PD2_HANA_RNA4/pdash_list_events.fex PDASH_HOT_ALERT='REG', PDASH_ASSIGNED='ALL', PDASH_GROUPING='ALL', PDASH_MANAGER='ALL', PDASH_USER='UNKNOWN', PDASH_REDONLY=' ', PDASH_DATE='ALL', PDASH_FMT='HTML'
END
(FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND: pdash_list_events.fex


How can I use a variable to execute a procedure?

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


WebFOCUS 7.7.4
Windows
HTML, EXCEL, PDF Outputs
 
Posts: 8 | Registered: October 30, 2009Report This Post
Expert
posted Hide Post
No, you cant have parameterised fex names in WF8, unless you have your code in the app directories.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
quote:
HOT



Hi Computernerd1957,

You can try as per below code-
If your report have such parameter, It will automatically pass to the report.

-DEFAULT &FEXNAME='pdash_list_events.fex'
-SET &FEXNAMEX=IF &FEXNAME EQ 'FOC_NONE' THEN 'pdash_list_events.fex' ELSE &FEXNAME;
-SET &FEXNAME=&FEXNAMEX;

-TYPE &PDASH_HOT_ALERT;
-TYPE &PDASH_ASSIGNED
-TYPE &PDASH_GROUPING
-TYPE &PDASH_MANAGER
-TYPE &PDASH_USER
-TYPE &PDASH_REDONLY
-TYPE &PDASH_DATE
-TYPE &PDASH_FMT

-INCLUDE IBFS:/WFC/Repository/PD2_HANA_RNA4/&FEXNAME.EVAL


Thanks!
@vi

WebFOCUS 8105, Dev Studio 8105, Windows 7, ALL Outputs
 
Posts: 103 | Registered: July 08, 2013Report This Post
Expert
posted Hide Post
Regretfully, Avinash, your example does not work.

In the following simplified code, line two does not work, while line three does.

-SET &FEXNAME = 'fm_dummy100.fex';
-INCLUDE IBFS:/WFC/Repository/_fm_test_folder_main/folder200/&FEXNAME.EVAL
-*-INCLUDE IBFS:/WFC/Repository/_fm_test_folder_main/folder200/fm_dummy100.fex


I don't think this behaviour changed for WF 8.1.05, but if it did, Hallelujah!


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
Member
posted Hide Post
Using a variable on -INCLUDE does not work at all, it fails trying to get started saying symbols are not allowed.

I need a way to dynamically call a procedure based on a value in a variable.

This was so easy in WF7.


WebFOCUS 7.7.4
Windows
HTML, EXCEL, PDF Outputs
 
Posts: 8 | Registered: October 30, 2009Report This Post
Expert
posted Hide Post
Francis,
Please try your example again with -MRNOEDIT:
 
-SET &FEXNAME = 'fm_dummy100.fex';
-MRNOEDIT -INCLUDE IBFS:/WFC/Repository/_fm_test_folder_main/folder200/&FEXNAME.EVAL
 


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Member
posted Hide Post
If I use the -MRNOEDIT the Include has the correct FEX name but it doesn't execute and gives no errors.

If I use -MRNOEDIT with an "EX" Command it says (FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND: pdash_list_events.fex

The Path is fully qualified and the procedure does exist.


WebFOCUS 7.7.4
Windows
HTML, EXCEL, PDF Outputs
 
Posts: 8 | Registered: October 30, 2009Report This Post
Master
posted Hide Post
From my understanding, even in 7.x, you never could parameterize the execution of a Fex in the procedure using EX / INCLUDE. From what I understand about how this works is that the EX / INCLUDE gets evaluated before any variables get evaluated. Because of this, .EVAL doesn't work and MRNOEDIT won't work either. What I've always done is to use GOTO's to jump to the fex I need to execute instead of using a variable for the Fex name in the procedure.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Expert
posted Hide Post
-GOTO is the only way. I tried -WRITE to create a fex with one line to -INCLUDE the appropriate fex - that doesn't work either.


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
Master
posted Hide Post
ya, EX / INCLUDE are one of the first things to get processed. And from my understanding, there is no way to push the processing of a variable above the processing of the EX / INCLUDE in the order of operations.

As they taught us in grade school... its a "Please Excuse My Dear Aunt Sally" issue (Parentheses/Exponents Multiply/Divide Add/Subtract)


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Expert
posted Hide Post
what you have to understand is that the WebFOCUS client (items stored in the repository) has a parser to work out what files to send to the reporting server.

If the file has an amper variable in or part of the name, it will not get evalualated, because the code is only at the client , and not reached the WebFOCUS server.

This is why, when you trace (ECHO=ALL) the output of a run, you will find that the original code will change.

-INCLUDE IBFS:/WFC/Repository/_fm_test_folder_main/folder200/fm_dummy100.fex

to

-INCLUDE fm_dummy100.fex


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
The above is true using the Content folder - repository ( WebFOCUS Client). &variables are parsed on the Reporting Server after WebFOCUS Client process identifies the files, fexes, sty, css etc.

Francis's GOTO label is a good easy solution

Just FYI ...
In the Application Folder (EDASERVE) on reporting server the following seems to work: ( as Waz indicated)

-SET &ECHO=ALL;
-SET &RUNFEX = 'CAR_report_1';
-SET &INCLUDE = '-INCLUDE'; <--- or EX
&INCLUDE.EVAL &RUNFEX.EVAL
-EXIT

As Eric says - its all about the order of operations


Thank you for participating in the Focal Point Forum!
Tamra Colangelo
Focal Point Moderator
Information Builders


WebFOCUS 8x - BI Portal, Developer Studio, App Studio, Excel, PDF, Active Formats and HTML5
 
Posts: 487 | Location: Toronto | Registered: June 23, 2009Report This Post
Master
posted Hide Post
That's an interesting trick Tamra. I'll have to try using that to call a fex in the content area and see what happens. Thanks for that!


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Member
posted Hide Post
I changed one of my procedures to use the goto method, but I have another dynamic procedure that will not work for.

Thanks everyone for the information.


WebFOCUS 7.7.4
Windows
HTML, EXCEL, PDF Outputs
 
Posts: 8 | Registered: October 30, 2009Report This Post
Expert
posted Hide Post
quote:
SET &RUNFEX = 'CAR_report_1';
-SET &INCLUDE = '-INCLUDE'; <--- or EX
&INCLUDE.EVAL &RUNFEX.EVAL


You only need the INCLUIDE or EX set as an amper variable.

The rest does not need to be set as a variable.

In fact, what I like to do is similar.

-SET &Include = 'INCLUDE' ;
.
.
.
-&INCLUDE.EVAL myfex


But keep in mind that this is for fexes that are stored on the reporting server, not in the repository.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report 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] How do you call a procedure using a variable?

Copyright © 1996-2020 Information Builders