Focal Point
Error (FOC003) THE FIELDNAME IS NOT RECOGNIZED

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

September 05, 2007, 11:11 AM
<BrianS>
Error (FOC003) THE FIELDNAME IS NOT RECOGNIZED
I'm getting the following error

0 NUMBER OF RECORDS IN TABLE= 1647 LINES= 1647
0 ERROR AT OR NEAR LINE 54 IN PROCEDURE ve4y0fpcFOCEXEC *
(FOC003) THE FIELDNAME IS NOT RECOGNIZED: J002.TOCACDTV.INV_D
BYPASSING TO END OF COMMAND
(FOC009) INCOMPLETE REQUEST STATEMENT

When I exclude the J002 fields the query runs properly, but when added the query errors out.

Below is my code. Thanks for your help.

-* Created by Report Assistant
-* HTML Tool
-* Created by Report Assistant
-* FF Line do not change this line! Field Name
-* FF Line do not change this line! Alias
-* FF Line do not change this line! Format
-* FF Line do not change this line! Segment
-* FF Line do not change this line! displayTree=0
-* J001 J001
SET ASNAMES=ON


-* Pulled in user defined table - TELCOCODELIST
-SET &DBDATA='/users/1/nsuser/ibi/webfocus71/ibi_html/publish/cfo';

-*SET &FROM_D = '20061201';
-*SET &TO_D = '20061231';

APP MAP TEMP2 &DBDATA
APP APPENDPATH TEMP2

FILEDEF TELCOCODES DISK -
/users/1/nsuser/ibi/webfocus71/ibi_html/publish/cfo/telcocodes.csv
-RUN
TABLE FILE TELCOCODES
PRINT *
BY TELCO_CODE
ON TABLE HOLD AS TELCOCODESHOLD FORMAT FOCUS INDEX TELCO_CODE
END

JOIN CLEAR *

JOIN TELCO_CODE IN TELCOCODESHOLD TO MULTIPLE
TELCO IN MBANTAB TAG J001
AS J001
END

JOIN
MBANTAB.MBANTAB.BAN_N
IN MBANTAB
TO MULTIPLE TOCACDTV.TOCACDTV.BAN_N
IN TOCACDTV TAG J002
AS J002
END


TABLE FILE TELCOCODESHOLD
PRINT TELCOCODESHOLD.TELCO_CODE
TELCOCODESHOLD.TCO_N
TELCOCODESHOLD.ANALYST_SP
MBANTAB.BAN_N
J002.TOCACDTV.INV_D
J002.INV_D
J002.TOCACDTV.MCI_PO_N
J002.TOCACDTV.AUDIT_N
J002.TOCACDTV.OCC_A
J002.TOCACDTV.OCC_FR_D
J002.TOCACDTV.OCC_TO_D
J002.TOCACDTV.SO_N
J002.TOCACDTV.PHR_C
J002.TOCACDTV.EC_CKT_N
J002.TOCACDTV.SAMPLE_I
J002.TOCACDTV.RCR_NONRCR_I
J002.TOCACDTV.OCL_LOC_CD
J002.TOCACDTV.JUR_I
J002.TOCACDTV.ST_C



ON TABLE PCHOLD FORMAT HTML

-*WHERE J001.TOCACDTV.INV_D FROM '&FROM_D' TO '&TO_D';

-*ON TABLE HOLD AS CABSBASEHOLD

END


-* End Report Assistant
September 05, 2007, 12:03 PM
N.Selph
I don't know if this is your problem, but both of your hold file "TELCOCODESHOLD" is more than 8 characters. WebFocus still has some problems if you filedef a file to a virtual name that is longer than 8 characters. As I recall, the error messages in that case are deceptive, and don't indicate the real problem.


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
September 05, 2007, 01:42 PM
codermonkey
Hi. I think the issue is with the join. For the first join TELCOCODESHOLD is the host. It needs to stay the host for the 2nd join. Second join should be:

JOIN
MBANTAB.MBANTAB.BAN_N
IN TELCOCODESHOLD
TO MULTIPLE TOCACDTV.TOCACDTV.BAN_N
IN TOCACDTV TAG J002
AS J002
END
September 05, 2007, 04:12 PM
<BrianS>
That join returned the following.

0 NUMBER OF RECORDS IN TABLE= 1647 LINES= 1647
0 NUMBER OF RECORDS IN TABLE= 0 LINES= 0
September 06, 2007, 08:16 AM
codermonkey
I"m not sure what you've tried so please forgive that some of these questions are pretty simple:

1. Are the field formats for BAN Number on MBANTAB to TOCACDTV the same? Check the data dictionary not just the master, in case they are alpha. (Check char vs. varchar)

2. Try the join without TELCOCODESHOLD. Can you get data for the MBANTAB and TOCACDTV join with a where statement on one of the telco codes from TELCOCODESHOLD? (Just pull one out of the hold file to test with).

3. Is this cross platform? Either way, can you turn on SQL trace and see what SQL is getting generated under the covers?