Focal Point
[CLOSED] -INCLUDE &FILENAME returns error on &FILENAME

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

December 13, 2004, 07:54 PM
<NorthNone>
[CLOSED] -INCLUDE &amp;FILENAME returns error on &amp;FILENAME
-INCLUDE &FILENAME
results in (FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND: &FILENAME
The file to be included can vary depending on other factors and is set as the fex executes. The file name is stored in &FILENAME. When the main FEX executes, it immediately says that it cannot find &FILENAME, then continues to execute.
I tried setting &FILENAME to ' ' or to an existing file name, but neither fixed it.
Assistance greatly appreciated. Thanks for taking time to read this...

This message has been edited. Last edited by: Kerry,
December 13, 2004, 08:27 PM
<Pietro De Santis>
This should work - I've got it in quite a few Fexes.

Are you in MRE?

What version of WebFOCUS?
December 13, 2004, 08:29 PM
N.Selph
I got the same results as you did, but only by accident. When the fex called with the
-INCLUDE &FILENAME, also had a variable called &FILENAME inside it, I got the same error message you got. When I changed the variable to &FILEN, the include worked.
December 14, 2004, 12:00 PM
<NorthNone>
Thanks for making suggestions. I appreciate your time. Unfortunately my problem persists.
-I checked the included fex represented by &FILENAME and it did not use the variable &FILENAME.
-We just installed, so we are on a recent version (5.2.6). It says "Managed Reporting Repository" at the top of the screen.
--------------------------------------
If I do a simple fex
(with or without the 'RUN's):
-SET &THISFILE = WINMISC;
-RUN
-INCLUDE &THISFILE
-RUN
I get a similar message:
(FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND: &THISFILE
Assistance, ideas, and brain-storming gratefully received :-)
If all else fails, I may just have to put in a comment not to worry about this since it runs correctly despite the message.
December 14, 2004, 04:51 PM
N.Selph
Have you tried -MRNOEDIT -INCLUDE &THISFILE
December 14, 2004, 05:44 PM
susannah
I got around this problem
-SET &FILENAME = 'TIMESTMP';
-SET &FILEPHRASE = '-INCLUDE ' | &FILENAME ;
&FILEPHRASE.EVAL
works like a charm
December 14, 2004, 06:13 PM
<NorthNone>
THANK YOU, SUSANNAH!
Indeed it worked like a charm!
March 08, 2013, 01:02 PM
Doug
quote:
works like a charm
Did something break in WebFOCUS in the past 9 years (lol)?

The following 3 lines don't work (anymore):
-SET &FILENAME = 'TIMESTMP';
-SET &FILEPHRASE = '-INCLUDE ' | &FILENAME ;
&FILEPHRASE.EVAL
Yes, I have a fully functional "TIMESTAMP" fex which is nothing more then a -TYPE statement. It even works well as "-INCLUDE TIMESTAMP" but not via the variable. What's up with that?

The Bottom Line: I want to execute a variable as "&IncludeThis.EVAL". Where '&IncludeThis" is the results of "-SET &IncludeThis = '-INCLUDE TIMESTAMP' ; ". But, it's not working... Thanks In Advance...




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
March 08, 2013, 02:25 PM
Tom Flynn
Doug,
Is the FEX in your path? If not, put the folder and / ahead of the fex...

This works fine:

  
-SET &FILENAME = '1_get_lrecl.fex';
-SET &FILEPHRASE = '-INCLUDE ' | '&FILENAME.EVAL' ;
&FILEPHRASE.EVAL
-EXIT



Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
March 08, 2013, 03:50 PM
Doug
Yep, everything is in the same MRE Domain / folder...
For simplicity of explanation, I changed it to the following:

The fex to be "-INCLUDEd" is "CALENDAR_TEST1.FEX".

The execution of "CALENDAR_TEST1" executes "CALENDAR_TEST1.FEX" correctly. Smiler

The "-INCLUDE CALENDAR_TEST1" command executes "CALENDAR_TEST1.FEX" correctly. Smiler

The following three lines of code produces the "(FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND: CALENDAR_TEST1" Error. Frowner
-SET &FILENAME = 'CALENDAR_TEST1';
-SET &FILEPHRASE = '-INCLUDE ' | &FILENAME ;
&FILEPHRASE.EVAL
Frowner
March 08, 2013, 03:54 PM
Tom Flynn
Well, guess something changed in MRE.
Did you try my example, with quotes and .EVAL?

-SET &FILEPHRASE = '-INCLUDE ' | '&FILENAME.EVAL' ;

AND, since you're in MRE, how about:

-MRNOEDIT &FILEPHRASE.EVAL


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
March 08, 2013, 04:46 PM
Doug
Tried 'em all... to no avail... NFR? WF8?
March 08, 2013, 04:48 PM
Doug
I broke it now... DS Just "CLOSED" on me...

What a way to end a week Frowner
March 08, 2013, 05:45 PM
Doug
Music I'll resort to using -GOTO REPORT&ReportID.EVAL for each report (based on an incoming Report ID) and generate my report between that label and a -GOTO EndOfReport / -EndOfReport label for now, with hopes of getting this to work as I'd like it.
March 09, 2013, 09:16 AM
icanfocus
Hey Doug, this is wayne, and what you need is quite often what I find in all these new versions, or flavors of WebFOCUS. It's called an OFR, "Old Feature Request"

Sure there are work arounds and probably 20 ways to do what you're trying to do, but I also find that there are things which simply don't work with 8.0 as we expect!

Please IBI, let's keep it simple for us old guys and if there is something that doesn't work as it used to, can we be handed the alternative rather than hacking away.

(I'm not just talking or complaining, these subtle issues will begin to grow in number, and having the "New Alternative" would simply help all developers and ultimately IBI sell more software as we are the soldiers in the field)

Example: Old School: Filedef
New School: Foccache

I'm just saying... Music


8.01m RedHat Linux HTML/PDF/EXCEL
March 09, 2013, 10:41 PM
j.gross
quote:
Originally posted by Doug:
Yep, everything is in the same MRE Domain / folder...


Hey, Doug.

If you mean both the fexes (that calling CALENDAR_TEST1, and CALENDAR_TEST1 itself) are stored in MR, not in an APP folder on the reporting server, then the FOC227 is entirely appropriate.


- Jack Gross
WF through 8.1.05
March 10, 2013, 01:36 PM
Tony A
Doug,

The syntax suggested by Tom works perfectly and (to my knowledge) hasn't "broken".

Just a few reminders :-

If the included fex is within an application folder it should be within the available APP PATH AND included with the -MRNOEDIT syntax. By "available APP PATH" I mean the path specified in the Domain properties (if there is one) or the current APP PATH setting.

If the included fex is within MR then it must exist in one of the folders under the main domain folder (normally [domain]/app) and must be referenced within that folder - e.g. -INCLUDE app/fex_file_name.fex.

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 
March 10, 2013, 02:42 PM
j.gross
quote:
Originally posted by Tony A:
Doug,

. . .

If the included fex is within MR then it must exist in one of the folders under the main domain folder (normally [domain]/app) and must be referenced within that folder - e.g. -INCLUDE app/fex_file_name.fex.

T


And the -INCLUDE must be hard-coded.

Managed Reporting's "client" piece does not execute -SET commands, and does not perform amper-variable substitution in FOCUS commands.
(As the current crop of GEICO radio adds might put it, "It can't. It doesn't have the brains.")

And Reporting Server, where those actions will take place, has no access to files stored in MR.

Which is what I alluded to in my previous post


- Jack Gross
WF through 8.1.05