Focal Point
[SOLVED] Hilarious warning FOC2906

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

August 09, 2013, 04:38 AM
Wep5622
[SOLVED] Hilarious warning FOC2906
What is the purpose of this warning?

It makes no sense warning about a desired effect. Worse, without specifying a -DEFAULT, I'd have an undeclared variable if no records match. So in this case there appears to be no way around this warning?

[code]-SET &ECHO = ALL;

-DEFAULT &CAR = 'FIAT';

TABLE FILE CAR
PRINT CAR
WHERE CAR EQ 'FIAT' OR 'FERRARI' OR 'MASERATI';
WHERE RECORDLIMIT EQ 1;
ON TABLE HOLD
END
-RUN

-READFILE HOLD

-TYPE Car: &CAR[/car]

Output:[code] -DEFAULT &CAR = 'FIAT';
TABLE FILE CAR
PRINT CAR
WHERE CAR EQ 'FIAT' OR 'FERRARI' OR 'MASERATI';
WHERE RECORDLIMIT EQ 1;
ON TABLE HOLD
END
-RUN
0 NUMBER OF RECORDS IN TABLE= 1 LINES= 1
(FOC2906) WARNING: &CAR WILL BE OVERWRITTEN BY -READFILE HOLD
-READFILE HOLD
-TYPE Car: MASERATI
Car: MASERATI
[/car]

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
August 09, 2013, 08:03 AM
Dave
Wep,

Yup, found it too.
...but it's just a warning, don't worry.

It's just letting you know the value will be overwritten by the -READFILE command without explicitly mentioning the variable name.

e.g. if you'd use 'find' to find why &CAR isn't 'FIAT' anymore... ...you won't find the -READFILE HOLD line in the code...

...I guess that's the reason.

-READ doesn't give you the warning.

TABLE FILE CAR
	BY	CAR
WHERE CAR EQ 'TOYOTA'
ON TABLE HOLD AS X
END

-RUN
-READ X &CAR.A16.
-TYPE &CAR


Groeten,
Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
August 12, 2013, 12:58 PM
njsden
Well, it "looks" like a WARNING and up to 7.7.03M is treated as such by ReportCaster.

We are however currently testing 7.7.05 and have found that when running a scheduled report, if ReportCaster's distribution server detects that pesky FOC2906 "warning" it actually treats it as an error and decides not to distribute any results.

The solution was just to simply add 2906 to the list of FOC errors that the Distribution server will treat as warnings and we were back in business.

Just don't let the "WARNING" prefix in the description of the message mislead you as to think that it is a warning ... not all products are seeing it as such Confused



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
January 21, 2015, 12:01 PM
gregv
Does anyone know the doc that covers how to do this or can anyone explain the steps to add this error number to the Distribution Server so that it is treated as a warning for Report Caster?

Thanks.



Greg



current client: WF 8.1.05 & 8.2 - Windows 7 64bit - Tomcat 7 - MRE / BID - IE11

local: WF 8.2 - Windows 7 64bit - Tomcat 6 - MRE / BID - FOCUS - IE11

PMF 8
January 21, 2015, 05:07 PM
eric.woerle
what if you were to set message=off?

Will RC still crash?


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
January 21, 2015, 05:30 PM
gregv
Eric,
I did test SET WARNING=OFF but to no effect.

I can't test SET MESSAGE=OFF, now, (though I may have in my many tests and forgotten).

I 'fixed' this by adding this error number to the Distribution Server (FOC Message Numbers to be Processed as Warnings) and I can't switch it back, easily, without effecting others.

Thanks for your help.



Greg



current client: WF 8.1.05 & 8.2 - Windows 7 64bit - Tomcat 7 - MRE / BID - IE11

local: WF 8.2 - Windows 7 64bit - Tomcat 6 - MRE / BID - FOCUS - IE11

PMF 8
January 21, 2015, 06:42 PM
Francis Mariani
"MESSAGE" is a synonym for MSG. This will not have any effect on error/warning messages.

"WARNING" is only for ONE error, FOC441:
quote:
The WARNING parameter suppresses (FOC441) warnings. The file exists already. Create will overwrite it.

Then there's "FOC144":
quote:
The FOC144 parameter suppresses warning message FOC144, which reads: "Warning: Testing in Independent sets of Data."

(FOC441 and FOC144 - a funny/sad coincidence)

There's also "ERROROUT", one I've never used:
quote:
The ERROROUT parameter terminates a job and returns a message when an error is encountered in a request. The syntax is: SET ERROROUT = {ON|OFF|OVERRIDE/filename}

We shouldn't have to suppress warning messages and warning messages should not stop execution in ReportCaster and return an error number in &FOCERRNUM. The concept of warnings was poorly implemented since the beginning, hence these clumsy attempts at suppressing them.


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
January 22, 2015, 01:03 PM
susannah
greg, caster console, configuration tab, Distribution Servers (first choice on left).
Entry for 'FOC Message Numbers to be Processed as Warnings'...
default set is 95,96,201,757,837,36359
Add some.
also, while you're there, change MAXMESSAGES from 1000 to something bigger.. if you want. i found that the caster log is too short to give me what i need when it only allows itself 1000 messages. so i upped mine by x10. just sayin...




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
January 22, 2015, 01:32 PM
gregv
Perfect susannah!
Thanks!



Greg



current client: WF 8.1.05 & 8.2 - Windows 7 64bit - Tomcat 7 - MRE / BID - IE11

local: WF 8.2 - Windows 7 64bit - Tomcat 6 - MRE / BID - FOCUS - IE11

PMF 8
October 28, 2015, 10:18 PM
Waz
I just found this issue also, and its in 8.1.04.

And hears the hilarious part, the section in Report caster console for adding the number in has now gone, you have to add it to webcontent.xml and it still doesn't work.

Raising a case...


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!

October 29, 2015, 10:19 AM
CoolGuy
Thanks Susannah and Waz for the instructions on where and how on adding things to that list and for letting us know your experience and findings concerning this in 8.1.04 Waz. Let us know how the case goes. Thanks for opening one for this!


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
October 29, 2015, 10:21 AM
CoolGuy
Waz,

What directory is webcontent.xml in? Can't seem to find it.

Thanks!


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
October 29, 2015, 12:36 PM
j.gross
-SET &var=;

used to drop the & variable. See if it does in your release. If so, simply drop the var(s) that -READFILE is about to set (perhaps first testing that &LINES > 0).
October 29, 2015, 04:57 PM
Waz
Its in WebFOCUSnn\config


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!

October 29, 2015, 05:02 PM
Waz
Jack, I'm a bit slow.

That may work.

The -SET should "null" the variable and the not have it prompted, and the -READFILE shouldn't generate the warning.

I'll give it a go and let you know.


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!

October 29, 2015, 05:15 PM
Waz
Jack,

That worked like a charm.

I also think that with a bit of coding a process could be set up to handle this for records found and not found with the READFILE.

Just a check on &LINES and branch to a -SET for 0 records or a -READFILE for records found.

Funny how it takes a single line of code to make the light bulb turn on.


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!

October 29, 2015, 06:53 PM
j.gross
Or perhaps move the -DEFAULT further down.

With -READFILE (unlike -READ) the names of the variables do not appear in the code, so a -DEFAULT further down will still be the first explicit reference that the Autoprompt scanner sees, and the code to that point will sail on smooth waters.
October 30, 2015, 04:41 AM
Wep5622
Oh! That looks like a clever trick, got to try that sometime. Thanks!


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
November 11, 2015, 04:28 PM
awardb
quote:
Originally posted by j.gross:
-SET &var=;

used to drop the & variable. See if it does in your release. If so, simply drop the var(s) that -READFILE is about to set (perhaps first testing that &LINES > 0).


This worked for us when trying to set up 8.1.05. Thanks for the tip!


Release 8.1.05
Windows
Excel, HTML, PDF, AHTML, COMT
November 12, 2015, 10:47 AM
Wep5622
I've taken to the method of declaring a -DEFAULTH after the -READFILE. Works a charm, thanks.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
January 07, 2016, 10:29 AM
Gerard B.
Hi Susanna,
In Report Caster - configuration tab - Distribution Servers, the possibility to add FOC message Numbers is gone (WebFocus 8.104).
Do you know where/how to add a number to the default set?
Thanks,
Gerard

quote:
Originally posted by susannah:
greg, caster console, configuration tab, Distribution Servers (first choice on left).
Entry for 'FOC Message Numbers to be Processed as Warnings'...
default set is 95,96,201,757,837,36359
Add some.
also, while you're there, change MAXMESSAGES from 1000 to something bigger.. if you want. i found that the caster log is too short to give me what i need when it only allows itself 1000 messages. so i upped mine by x10. just sayin...



WebFOCUS 7.6
Windows, All Outputs
January 07, 2016, 04:08 PM
Waz
Its now in the webconfig.xml, look for "IBI_FOCUS_Warning_Numbers"


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!

January 08, 2016, 05:01 AM
Clayton Peacock
If your running Linux 8105 there is a know bug, I have logged a call for this on TechSupport:

In ReportCaster 8105, the option to list FOC errors is gone.

The IBI_FOCUS_Warning_Numbers in the WebFOCUS Administration Console does not work.
In 7X ReportCaster, this functionality was available from the Caster Server Configuration as the 'FOC Message Numbers to Be Processed as Warnings' field.


WF 8.1.05, MRE, BI Portal, App Studio, Apache Tomcat/8.0.21, MS Windows Server 2014 Express, MS Windows 10, Chrome
January 11, 2016, 12:23 PM
Gerard B.
Hi Waz and Clayton,

Great, problem solved!

Thanks!


WebFOCUS 7.6
Windows, All Outputs