Creating Header Descriptions
- File and library name of the external file
- File type (physical, logical, device)
- Date the file was created
- Record format name
- Record format level ID (level checking information)
For example, the following directives are used to create
the header shown below: #pragma mapinc("payroll","example/test(fmt1)","input","")
#include "payroll" /* ------------------------------------------------------------------ */
/* PHYSICAL FILE: EXAMPLE/TEST */
/* FILE CREATION DATE: 93/09/01 */
/* RECORD FORMAT: FMT1 */
/* FORMAT LEVEL IDENTIFIER: 371E00A681EA7 */
/* ------------------------------------------------------------------ */
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. | Field Type | Tag |
|---|---|
| input | i |
| output | o |
| both | both |
| key | key |
| indicators | indic |
| nullflds | nmap/nkmap |
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.