× 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.



On 01 Nov 2012 17:57, Mark S Waterbury wrote:

When the program is compiled over a file with LVLCHK(*YES) specified,
the program incorporates a copy of the Record Format Level ID for
each record format in the file. Then, when the file is opened, a
setting in the UFCB (User File Control Block) controls whether the
data management open routine checks to verify that the record format
level IDs in the program match those in the current file to be
opened... if not, the data management open routine sends CPF4131 as
an *ESCAPE message to the caller (your program), generating an
exception. If you issue OVRDBF ... LVLCHK(*NO) prior to opening the
file, or the program was compiled for a file with LVLCHK(*NO)
specified, then this check is not performed, so you will not get this
exception issued by the data management open routine.

Per my understanding and in my experience, I am confident of one correction to the above...

The compiler copies and stores the Record Format Level Identifier for later run-time comparison, and that information is shown in DSPPGMREF, irrespective of the LvlChk setting that was established for the file during compile-time. The stored value will always be compared for Level Check validation at run-time whenever the file is LVLCHK(*YES) and no override exists for LVLCHK(*NO). This is the case even if the program had originally been compiled either against the file with LVLCHK(*NO) or an override to LVLCHK(*NO) for that file; e.g. if the file was originally defined with LVLCHK(*NO), the program compiled with no overrides in effect, then CHGPF LVLCHK(*YES) was effected, and finally the program called, that run will perform the Data Management level checking.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.