ILE C/C++ Programmer's Guide

Specifying the Record Format Name

C language onlyA record format describes all the fields and the arrangement of these fields within a record. You can include a record format from an externally described file in your ILE program by providing its name on the #pragma mapinc directive. You can provide more than one format name, or you can specify the special value *ALL to include all record formats from the file.

If the file you are working with contains more than one record format, set the format for subsequent I/O operations with the _Rformat() function.

Record format functions are useful when working with display, ICF, and printer files. Logical files can also contain more than one record format.

The record format name for a device file defaults to blank unless you explicitly set it to a name with _Rformat(). You can reset the format name to blank by passing a blank name to _Rformat().

C language onlyIf the record format does not contain fields that match the option specified (input, output, both, key, indicators or nullflds) on the #pragma mapinc directive, the following comment appears after the header description:


 
/* FORMAT HAS NO FIELDS OF REQUIRED TYPE */

Note:
Do not use #, @, or $ in record format names. These characters are not allowed in ILE identifiers and cannot appear in a type definition name. If you have record format names that contain #, @ or $, these characters are translated to the lowercase characters p, a, and d, respectively.


[ Top of Page | Previous Page | Next Page | Table of Contents ]