Just another quick question from a guy who'd really rather not have to fart around with this stuff.... :) I'm converting a bunch of flat file FMTDTA stuff to use OPNQRYF instead.
when reading a file in cobol that's been sorted via opnqryf, is there anything I need to worry about as far as COBOL syntax?
this is what I have:
OVRDBF FILE(HISTRY4) SHARE(*YES) OPNQRYF FILE((HISTRY4)) QRYSLT( + 'HPEROD *EQ ' *CAT &PERIOD *BCAT + '*AND LMRKTC *NE "00" + *AND HITEM *NE 0') + KEYFLD((HITEM) (LMRKTC))
and in my cobol:
SELECT HISTRY4 ASSIGN TO DATABASE-HISTRY4 ORGANIZATION IS INDEXED ACCESS MODE IS SEQUENTIAL RECORD KEY IS EXTERNALLY-DESCRIBED-KEY FILE STATUS IS FILE-STATUS-01.
OPEN INPUT HISTRY4
READ HISTRY4 AT END MOVE "Y" TO EOF-HISTRY4.
If I'm missing something obvious, I'd appeciate the heads up - I'm particularly concerned about the ACCESS MODE and RECORD KEY clauses of the SELECT Statement. - indexed, sequential with external key - (not the file's natural key)
I'm changing a ton of these, and I won't have a chance to test till I'm done, and I'd like to get it right the first time.
Thanks a ton,
_______________________________________________ This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing list To post a message email: COBOL400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/cobol400-l or email: COBOL400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/cobol400-l.
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.