Focal Point
Alternate/INDEXED view table file

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

June 17, 2004, 02:11 AM
Sandy Weller
Alternate/INDEXED view table file
Also posted at ITToolBox

Running 7.2.5 under MVS

I get a FOC269 error tellng me
EQUALITY SCREENING TESTS MUST BE PROVIDED IN AN INDEXED VIEW

See below; I've got it.

Is it because I also have PC_YYM as a WHERE field?
Any other ideas.

Thanks
Sandy Weller


The MFD:
FILE=PCRSUM1,SUFFIX=FOC
SEGNAME=DATEINFO,SEGTYPE=S1,$
FIELD=PC_YYM ,,FORMAT=YYM ,INDEX=I,$
$
SEGNAME=CUST ,SEGTYPE=S1,PARENT=DATEINFO,$
FIELD=PC_SOLD_NBR ,,FORMAT=I6L,TITLE='SOLD,NBR',INDEX=I,$
$
SEGNAME=PRODUCT,SEGTYPE=S2,PARENT=CUST,$
FIELD=PC_VENDOR_NM ,,FORMAT=A10 ,TITLE='VENDOR,NAME',INDEX=I,$
FIELD=PC_PROD_CLS ,,FORMAT=A4 ,TITLE='PROD,CLS',INDEX=I,$
FIELD=PC_BIG_KEY ,,FORMAT=A20 ,TITLE='KEY,FOR,JOIN',INDEX=I,$
FIELD=GRS_SLS ,,FORMAT=P13.2C ,TITLE='GROSS,SALES',$
..
etc.

PC_BIG_KEY is a concatenation of SOLD_NBR VENDOR_NM PROD_CLS
I need to be able to get all records for one BIGKEY value for up to 24 months.

My code looks like this:
-READ BKEYIN &BIGKEY.A20.
-*
TABLE FILE PCRSUM1.PC_BIG_KEY
PRINT
GRS_SLS
.
etc.
BY PC_YYM
BY PC_SOLD_NBR
BY PC_VENDOR_NM
BY PC_PROD_CLS
WHERE PC_BIG_KEY EQ '&BIGKEY' (Assigned above in -READ)
WHERE PC_YYM LE CY_YYM OR PC_YYM GE PY_YYMJ (defined above; not shown)
ON TABLE HOLD AS HISTDATA
END
-*
July 11, 2004, 07:04 AM
Piipster
Yes, I think the second Where statement is causing your problem.

If you change

TABLE FILE PCRSUM1.PC_BIG_KEY

to

TABLE FILE PSCRSUM1

I think you will be ok.

Specifying a fieldname on the TABLE FILE statement for the alternate file view requires EQ in the WHERE tests.
July 11, 2004, 04:17 PM
GCohen
You are missing semicolons at the ends of the
WHERE statements.
July 11, 2004, 05:29 PM
susannah
gerry, i've never seen semicolons at the end of WHERE statements in a fex. Please explain. thanks.
July 12, 2004, 03:47 PM
Chris Boylan
quote:
Originally posted by susannah:
[qb] gerry, i've never seen semicolons at the end of WHERE statements in a fex. Please explain. thanks. [/qb]
The semi-colon in FOCUS/WebFOCUS WHERE statements is usually optional (unlike SQL), but is required when you're doing dynamic compute-like expressions within the WHERE, e.g.,

WHERE SUBSTR(15,LAST_NAME,1,2,2,'A2') IS 'MC';

and I've seen cases in multi-line compound WHERE clauses where the semi-colon has been required.

But this does not seem to be related to Sandy's question. Sandy posted a follow-up message on IT Toolbox that this was happening only when there were embedded blanks in the concatenated field. With the blanks gone it worked.

-CB
July 13, 2004, 02:31 PM
susannah
thats such a swell feature! and so needed! thanks Chris. Guess i'ld better read my New Features Summaries more closely Big Grin