Focal Point
How to eliminate (FOC2905) error?

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

July 02, 2008, 11:34 AM
cburtt
How to eliminate (FOC2905) error?
My application requires generating *.fex code dynamically from data in a table. One process generates a *.fex that is later INCLUDE'd into another process. To avoid conflicts between MRE Users and/or RCaster jobs running (nearly) simultaneously, and INCLUDE'ing the other's file in error, I give each generated INCLUDE file a unique name. This requires using an &var containing the unique filename in both the FILEDEF allocating the file when it is created and in the INCLUDE statement when it is used.

Apparently, the designers of DM's FOCExec parser decided that coding this:
 -INCLUDE &INCL_FNAME 
is illegal and they produce error 2905:
 (FOC2905)  &VARIABLE IS NOT ALLOWED AS A FILENAME IN THIS CONTEXT: &INCL_FNAME  


While the condition is benign, and both the driving and INCLUDE's *.fex run OK, the error message is incorporated into the &ECHO output of MRE and RCaster's job log. The former alarms the MRE user, should it not be masked with a real or 'dummy' report and the latter gives a production log reviewer the impression that something malfunctioned.

Does anyone know a way to eliminate this error while allowing other errors and messages to appear as they normally do?

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


WIN/2K running WF 7.6.4
Development via DevStudio 7.6.4, MRE, TextEditor.
Data is Oracle, MS-SQL.
July 02, 2008, 11:51 AM
Tom Flynn
cburtt,

Try

-MRNOEDIT -INCLUDE foldername/&INCL_FNAME

or

-MRNOEDIT -INCLUDE foldername/'&INCL_FNAME.EVAL'

Hope this helps...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
July 02, 2008, 02:30 PM
mgrackin
You may be able to get away with just this:

-INCLUDE &INCL_FNAME.EVAL


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
July 03, 2008, 09:58 AM
cburtt
Thanks Tom and mcgrakin.

I was all enghusiastic about using
 .EVAL 
and scolding myself for not thinking of it on my own.

Sorry but
 -INCLUDE &INCL_FNAME.EVAL 
produces:
 (FOC2905)  &VARIABLE IS NOT ALLOWED AS A FILENAME IN THIS CONTEXT:
 &INCL_FNAME.EVAL 

Chris


WIN/2K running WF 7.6.4
Development via DevStudio 7.6.4, MRE, TextEditor.
Data is Oracle, MS-SQL.
July 03, 2008, 10:18 AM
Tom Flynn
Chris,

Did you try -MRNOEDIT ??


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
July 08, 2008, 10:20 PM
cburtt
Tom,

Yes, but that's not allowed in *.fex run under ReportCaster.

Chris


WIN/2K running WF 7.6.4
Development via DevStudio 7.6.4, MRE, TextEditor.
Data is Oracle, MS-SQL.
July 09, 2008, 03:40 AM
Danny-SRL
Chris,

I understand that your procedure runs well, but you get a spurious error message.
I ran this in DS without any error message.

  
-* File chris1.fex
-SET &ECHO=ALL;
-SET &INCFEX='CHRIS';
-SET &FEXFILE='C' || &FOCCPU || '.FEX';
FILEDEF &INCFEX DISK &FEXFILE
-RUN
-WRITE &INCFEX.EVAL "TRYING AN INCLUDE"
-RUN
TABLE FILE CAR
HEADING
-INCLUDE &INCFEX
SUM SALES BY COUNTRY
END

Could you try it and see what happens?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF