Focal Point
-INCLUDE ISSUE

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5501097331

July 16, 2004, 07:58 PM
<Vipul>
-INCLUDE ISSUE
I have an issue with the -include files. The included file code does not recoganize any labels in the program including it. Is this a bug or a scoping issue?

I am pasting a very simple example below:

file testinc1.fex
-* File testinc1.fex<br />-INCLUDE TESTINC2.FEX<br />-GOEXIT<br />-EXIT
file testinc2.fex
-* File TESTINC2.fex<br />-GOTO GOEXIT
if you run testinc1.fex you get the error:
0 ERROR AT OR NEAR LINE 13 IN PROCEDURE _ADHOCRQFOCEXEC *
(FOC305) SPECIFIED LABEL NOT FOUND: GOEXIT


Vipul
July 16, 2004, 08:31 PM
<monte2000>
Vipul:

Here are some previous discussions on -INCLUDE that may help?

MRE AND -INCLUDES

Problems with MRE after upgrade from 5.2.3 to 5.2.4

Not sure but thought it could possibly shed some light?
Monica

This message has been edited. Last edited by: <Mabel>,
July 16, 2004, 08:42 PM
<Vipul>
Thanks Monica but I am not using MRE my webfocus ver is 5.2. Is this a bug which needs to be reported to IBI?

I coded around it but then you know the code becomes messy.

Vipul
July 16, 2004, 08:50 PM
Leah
Have you tried?

-mrnoedit begin
....
-endmrnnoedit

I've never tried the go up aspect of the goto.

When you say 5.2, are you using the desk top dev studio or whatever the current name is. 5.2 to has managed reporting as well.

Don't you just love the acronyms.
July 16, 2004, 09:09 PM
<Vipul>
Hey Leah, I remember you from old focus-l days.

mrnoedit is for mre. I am using desktop for development.

Vipul
July 16, 2004, 09:19 PM
Leah
Vipul, Hello to you. I'm on the IT Toolbox list now as well.

I copied this from the developing applications manual PDF (I have 5.2, but no server to go to yet)

A calling procedure cannot branch to a label in a called procedure, and vice versa. When a
procedure is included using the -INCLUDE command, the procedure being included (called)
has full access to variables defined in the calling procedure.
Procedures called using -INCLUDE must be in the WebFOCUS Reporting Server�s search
path. For details, see Storing and Searching for Application Files in Chapter 2, WebFOCUS.....

I guess you can't get there from here.
July 16, 2004, 09:53 PM
susannah
vipul,
first maks sure your GOTO GOEXIT has a ; following it; i don't see it in your code.
(and you might want to get out of the habit of using -EXIT .. in case you have ReportCaster. The java version(version 5) really hates -EXITs in fexes)
second; just take the .fex off
If both your fexes are located in the same directory, then

-INCLUDE fename
works like a charm.

If your fexname gets set as an & var (more than you wanted to know, but it seems a popular question these days)
-SET &INCK = '-INCLUDE fexname';
&INCK.EVAL

works like a charm, but note:
-INCLUDE &SOMEOTHERFEXNAME
does not work at all.
July 20, 2004, 04:32 PM
<Vipul>
Thanks Leah for the information.
Thanks Susannah for the good webfocus coding tips.

Vipul