The header description for each format contains the following information:
#pragma mapinc("payroll","example/test(fmt1)","input","")
#include "payroll"
Figure 108. Header Description
|
The following is an example of a type definition of type structure:
typedef struct {
.
.
.
} LIBRARY_FILE_FORMAT_tag_t;
Parameters of the #pragma mapinc directive are used to create the
name of the created type. LIBRARY, FILE, and FORMAT are the
library-name, file-name, and format-name specified on the #pragma
mapinc directive. These names are folded to uppercase unless
quoted names are used. The library and file names can be replaced with
your own prefix-name as specified on the #pragma mapinc
directive.
Any characters that are not recognized as valid by the C language that appear
in library and file names are translated to the underscore (_)
character.
The tag on the structure name indicates the type of fields that are
included in the structure definition. The possible values for tag
are:
|
|
Unlike the naming convention used for other listed field types, if field type lvlchk is specified, the name of the array of structure type created is _LVLCHK_T.
To include external file descriptions for more than one format, specify more
than one format name (format1 format2) or
(*ALL) on the #pragma mapinc directive.
A header description and type definitions are created for each format.
When the lname option is specified and the filename in the #pragma mapinc directive is greater than 10 characters in length, a system-generated 10-character name will be used in the type definitions generated by the compiler.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.