Using the #pragma mapinc Directive for Level Checking
The #pragma mapinc directive provides
the opportunity to convert DDS files to include files directly.
If you specify the
LVLCHK
option on the #pragma mapinc directive,
the following are generated: - An array of structures of type
_LVLCHK_T
- A variable of type
_LVLCHK_T
The name of the variable is LIBRARY_FILE_INCLUDE_lvlchk
,
where LIBRARY, FILE, and INCLUDE are the library_name, file_name and
include_name, respectively.
If you specify the lvlchk keyword on
the _Ropen varparm
parameter and the composition
of the file is changed, the file pointer on the _Ropen returns NULL
and the CPF4131 message is issued.
Note: For more information about using the
LVLCHK
option
of the #pragma mapinc directive,
see the ILE C/C++
Compiler Reference.The following figure shows the #pragma mapinc directive
and the LVLCHK
option to perform a level check on
a file when it is opened.
The following example contains the DDS in the file T1520DD3 in
the library MYLIB.
The DDS part of the program listing is as follows: