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] ERROR using –INCLUDE in a TABLE REQUEST.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] ERROR using –INCLUDE in a TABLE REQUEST.
 Login/Join
 
Master
posted
I put together an example of using –INCLUDE in a TABLE REQUEST.

I have been getting errors with this and I am not seeing what I may have missed.

I would really appreciate any feedback.
Here is my code...

  
-SET &ECHO = ALL;
SET ASNAMES=ON

-SET &OPT = 1;

-TYPE OPT = &OPT

-SET &WHCHFEX = IF &OPT EQ 1 
-THEN 'IBFS:/WFC/Repository/Puppies/~thomas.fxxx/Fxxx/EURORC.fex' 
-ELSE 'IBFS:/WFC/Repository/Puppies/~thomas.fxxx/Fxxx/ASIARC.fex';

-TYPE WHCHFEX = &WHCHFEX
-EXIT 

TABLE FILE CAR
PRINT CAR MODEL RETAIL AS 'RETAIL' DEALER AS 'DEALER'
  AND COMPUTE PROFIT/D7 = RETAIL - DEALER;
BY COUNTRY

-INCLUDE &WHCHFEX.EVAL

END
-RUN
-EXIT



Here is the error message.

" Error
Names cannot contain any of the following characters: Space&*()|\:;",?/ "

Double quotes are mine...

This message has been edited. Last edited by: FP Mod Chuck,


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Expert
posted Hide Post
Try
-MRNOEDIT -INCLUDE &WHCHFEX.EVAL


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
Tom Flynn's code will work, and that's NOEDIT.

You cannot use a variable in a -INCLUDE.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Master
posted Hide Post
I changed "-INCLUDE &WHCHFEX.EVAL" to "-MRNOEDIT -INCLUDE &WHCHFEX.EVAL"

It ran successfully and displayed report output.
However when it runs the ASIARC.fex it contains this "WHERE COUNTRY EQ 'JAPAN';"

However I get the error below...


-INCLUDE IBFS:/WFC/Repository/Puppies/~thomas.fxxx/Fxxx/ASIARC.fex
(FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND: ASIARC.fex

END
-RUN
0 NUMBER OF RECORDS IN TABLE= 18 LINES= 18
0 HOLDING HTML FILE ON PC DISK ...

-EXIT

Here is the code in the ASIARC.fex, which is only 1 line:

WHERE COUNTRY EQ 'JAPAN';

How can I get the focexec to pick up the icluded file ?


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Expert
posted Hide Post
Published?


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Master
posted Hide Post
 
-SET &ECHO = ALL;
SET ASNAMES=ON

-SET &OPT = 1;

-TYPE OPT = &OPT

-SET &WHCHFEX = IF &OPT EQ 2
-THEN 'IBFS:/WFC/Repository/Puppies/~thomas.fxxx/Fxxx/EURORC.fex' 
-ELSE 'IBFS:/WFC/Repository/Puppies/~thomas.fxxx/Fxxx/ASIARC.fex';

-TYPE WHCHFEX = &WHCHFEX

TABLE FILE CAR
PRINT CAR MODEL RETAIL AS 'RETAIL' DEALER AS 'DEALER'
  AND COMPUTE PROFIT/D7 = RETAIL - DEALER;
BY COUNTRY

-MRNOEDIT -INCLUDE &WHCHFEX.EVAL

END
-RUN
-EXIT 

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


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Expert
posted Hide Post
quote:
You cannot use a variable in a -INCLUDE.

Actually Doug, you can, but you need the .EVAL

quote:
Published?

Don't think so Tom as the syntax implies a User folder (the tilde character).

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Are "Puppies" and "~thomas.fxxx" really part of the fully qualified path (FQP)?
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
Thanks Tony,
quote:
Actually Doug, you can, but you need the .EVAL
I like it Smiler

You probably covered this in your "We Can Do That In WebFOCUS" presentation at Summit, right? Smiler
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
@Tomsweb,

The usual suggestion, which I am sure you've already done, is to right click the fex in question and look at the properties to get Dougs "FQP". Wink

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
I was pretty sure -MRNOEDIT is when you want to include a fex from the server app directory not from the repository. I think based on the name in this example the included focexec (IBFS:/WFC/Repository/Puppies/~thomas.fxxx/Fxxx/EURORC.fex) is in the repository.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Virtuoso
posted Hide Post
It used to be the case that an -INCLUDE directive for a repository fex file cannot contain amper variables. As far as I know, that is still the case.

The reason involves the interplay of Client and Server:

The lookup of the fex in repository occurs within Cient; the -INCLUDE is never seen in that form by the Server. And Client has no clue what to do with "&WHCHFEX.EVAL"; at that point it probably leaves it to be passed to Server as is, and of course Server (after the amper substitution) cannot find the fex (since it has no access to repositiry).

You need to have separate -INCLUDE directives for each of the fex files, each explicitly naming the fex file and its location within Repository -- and provide -GOTO logic to send control to the -INCLUDE that matches the amper variable, when executed on Server. (By the time Server sees the request, each of the fex files will have been uploaded to Server as a temporary file, and each of the -INCLUDE lines will have been rewritten to refer to the corresponding temp file on the server).


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Master
posted Hide Post
Hi guys, thank you for your help.

I made some changes to the fex, and it is posted below:


  
-SET &ECHO = ALL;

-SET &OPT = 1;

-TYPE OPT = &OPT

-SET &WHCHFEX = IF &OPT EQ 1 
-  THEN '-INCLUDE EURORC.fex' 
-  ELSE '-INCLUDE JAPANRC.fex'; 

TABLE FILE CAR
PRINT CAR MODEL RETAIL AS 'RETAIL' DEALER AS 'DEALER'
  AND COMPUTE PROFIT/D7 = RETAIL - DEALER;
BY COUNTRY

&WHCHFEX.EVAL

END


It runs now but I get a report with every country not the select few
that I would expect to see if the –INCLUDE(D) Where statement were recognized and executed.

Yes, BabakNYC, thank you for pointing out that the EURORC.fex and
ASIARC.fex are resting cozy and warm in the repository.

But as you say Jack Gross, it appears that the –INCLUDE is never seen
by the server. Per your reference to having “separate –INCLUDE
directives for each fex file (w/ –GOTO logic, could you provide
a basic example?

It is very interesting that –INCLUDE functionality in FOCUS has been
around since at least the 1980’s, but client server technology serves
as the albatross.


Thank you


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Master
posted Hide Post
quote:
...Per your reference to having “separate –INCLUDE
directives for each fex file (w/ –GOTO logic, could you provide
a basic example?...

Each of the following has examples:
http://forums.informationbuild...1057331/m/6787093686
http://forums.informationbuild...017011386#7017011386

This message has been edited. Last edited by: David Briars,
 
Posts: 822 | Registered: April 23, 2003Report This Post
Expert
posted Hide Post
quote:
Per your reference to having “separate –INCLUDE directives for each fex file (w/ –GOTO logic, could you provide a basic example?
That also makes if very manageable for those who come behind us... Or, for us when we come back to it years later Smiler

My suggestion exactly Smiler

-IF A EQ B THEN GOTO AEQB ELSE GOTO ANEB;

-AEQB 
-INCLUDE AEQB.fex 
-GOTO TheEnd ;

-* More code

-ANEB
-INCLUDE ANEB.fex
-GOTO TheEnd ;

-* More code
-TheEnd
-RUN
-TYPE Good Bye.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Master
posted Hide Post
-SET &ECHO=ALL;

-SET &OPT = 1;

TABLE FILE CAR

PRINT
CAR MODEL RETAIL DEALER SALES
COMPUTE PROFIT/D7 = RETAIL - DEALER;
BY COUNTRY

-IF &OPT EQ 1
- THEN AEQB
- ELSE ANEB ;

-AEQB
-INCLUDE EURORC.fex
-GOTO THE_END

-*

-ANEB
-INCLUDE JAPANRC.fex

-THE_END

END
-RUN

EURORC.fex contains the line:
WHERE COUNTRY EQ 'ENGLAND' OR 'FRANCE' OR 'ITALY' OR 'W GERMANY';


JAPANRC.fex contains the line:
WHERE COUNTRY EQ 'JAPAN';


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Virtuoso
posted Hide Post
An obvious caveat: The GUI's editor will totally choke on a TABLE request that encompasses dialog manager (-GOTO or -INCLUDE) directives, or even labels. So if policy requires GUI-editor compatibility, you cannot go there.

In the case of simple WHERE phrases, you can achieve the effect (within the bounds of GUI-accepted syntax) using &vars that evaluate to a target value-list or _FOC_NULL.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 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] ERROR using –INCLUDE in a TABLE REQUEST.

Copyright © 1996-2020 Information Builders