Externally described files are files that have their field descriptions stored as part of the file. The description includes information about the type of file (such as data or device), record formats, and a description of each field and its attributes.
You can create an externally described database file using any of the following:
The #pragma mapinc directive identifies only those file formats and fields to the compiler; it does not include the file description in the ILE C program. To include a file description, the #include directive must be coded in the ILE C program.
You refer to the include-name parameter of the #pragma mapinc directive on the #include. The #include directive must be coded after the #pragma mapinc directive in your source program.
For example, to include a type definition of the input fields for the record format FMT from the file EXAMPLE/TEST, the following statements must appear in your program in the order shown below:
#pragma mapinc("tempname","EXAMPLE/TEST(FMT)","input","d",,"")
#include "tempname"
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.