Hi All,

I'm trying to force a program using embedded SQL to use a particular Access
Path when it's doing an OPEN & FETCH on a particular file. I do a STRSRVJOB
& STRDBG to look at what the Query Optimizer (QO) is doing. Messages
CPI432C  & tell you what Access Paths the QO considers and why it rejects
or chooses them. My Access Path is being rejected with Reason Code 13 which

"The access path contains one or more keys which may be changed by the
query during an insert or an update".

I can't find anything in the manuals to give me any further clues.

My SELECT statements is as follows

SELECT field1, field2 
FROM filea
WHERE field3 = value1 AND field4 = value2 AND field5 <> value3

I have tried creating an access path in QTEMP in my program using an SQL
CREATE INDEX command on field3, field4, field5 and various combinations of
the three. I have also tried including all five fields in the index ( to
use index only access).

I have also tried doing DDS and creating a logical file and doing my OPEN
statement on the created logical (rather then the physical file).

Both of these methods produce the same message indicated above. The only
other relevant point is that I am using two different cursors over this
file, but the other one is always closed when I am getting this error.

Any suggestions would be appreciated.

Mark Burns
Primary Superannuation Services
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com

This thread ...

Return to Archive home page | Return to MIDRANGE.COM home page