July 21, 2008, 04:07 AM
rb4uFOC006
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
July 21, 2008, 06:43 AM
Danny-SRLRB4U,
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?
July 21, 2008, 02:13 PM
Leahquote:
IF DATE2 EQ PMON2 THEN '4' ELSE '0'
As Danny says, what are you doing here. The code makes no sense as posted, sorry.
July 22, 2008, 10:19 AM
PBrightwellRB,
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.
July 22, 2008, 06:15 PM
WazDanny, 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.