Focal Point
FOC006

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

July 21, 2008, 04:07 AM
rb4u
FOC006
Hi
I get FOC006 error while comparing values.


//code...

DATE1/A2 = EDIT(DATE,'99$$$$$$');
DATE2/I2 = EDIT(DATE1);
PMON1/A2 = EDIT(PMON);
PMON2/I2 = EDIT(PMON1);

IF DATE2 EQ PMON2 THEN '4' ELSE '0'

//code -ends

How to solve this error


Focus Core 7.1.1 & 7.6.4
XP
MainFrames
July 21, 2008, 06:43 AM
Danny-SRL
RB4U,

1. Is your IF statement part of a DEFINE or COMPUTE? If so, since you are comparing two I fields, that would mean that the result (either '4' or '0') is not assigned to an alpha field.

2. Is your IF statement in a TABLE command? If so, you cannot use this syntax:
2a. there is no IF THEN ELSE in a screening condition
2b. if you use IF then the comparison is between a field and a value, never 2 fields

So, what are you doing?


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

July 21, 2008, 02:13 PM
Leah
quote:
IF DATE2 EQ PMON2 THEN '4' ELSE '0'

As Danny says, what are you doing here. The code makes no sense as posted, sorry.


Leah
July 22, 2008, 10:19 AM
PBrightwell
RB,

I am not meaning to be unkind, but from what you have posted I think you don't understand WebFocus at all. If this is all of your code, where is your DEFINE (you have defined fields) your END, your TABLE and the final END?

If your company won't provide training, the manuals are available for download in PDF format for free. Click the link at the top of the screen that says Technical Documentation Library and download Creating Reports With WebFOCUS Language for your version. You need a minimum of chapters 1 through 9 to have a basic understanding. You can absorb the rest of the manual as you need it.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
July 22, 2008, 06:15 PM
Waz
Danny, Leah, Pat

I completely agree, code out of context is almost meaningless.

rb4u, please post a more complete set of code or an example using the CAR file.


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!