× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi,

Please help me understand this :


OPNQRYF FILE((FMT01)) FORMAT(QTEMP/T040) +
QRYSLT(&QRYSLT) +
MAPFLD((IAGT ACDA) (IAD CAD) +
(IRTR A1AG) (IGRP CGR)) +
OPNID(T040)
CPYFRMQRYF FROMOPNID(T040) TOFILE(QTEMP/T040) +
MBROPT(*REPLACE)
CLOF OPNID(T040)


OVRDBF FILE(FMT01A) TOFILE(FMT01) SHARE(*YES)
OPNQRYF FILE((FMT01A) (QTEMP/T040)) +
FORMAT(FMT01 FMT1F1) KEYFLD(*FILE) +
JFLD((1/AID 2/IID *EQ)) OPNID(FMT01A)

CALL PGM(myRPG)


MyRPG :
FFMT01A IP E K DISK


It looks to me like the 1st OPNQRYF copies a client (&QRYSLT has a client
number coded) from FMT01 to QTEMP/T040. The second OPNQRYF then joins
QTEMP/T040 back to FMT01 (client file).

Does the the second QRYF, FMT01A, have all the fields of FMT01 +
QTEMP/T040?

The RPG is compiled on file FMT01 by running a OVRDBF FILE(FMT01A)
TOFILE(FMT01) before the compile command. So it can't know anything about
the fields in the file QTEMP/T040.

Does OVRDBF FILE(FMT01A) TOFILE(FMT01) SHARE(*YES) mean that MyRPG will
only "see" the fields in the QRYF FMT01A that are in the file FMT01?

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.