By using the Generate C/C++ Source (GENCSRC) utility to generate database header files, you can:
GENCSRC provides the means to retrieve externally described file information for use in a C/C++ program. The utility creates a C/C++ header file which contains the type definition structure for the include file.
The #pragma mapinc directive uses the GENCSRC command to provide the opportunity to convert DDS files to include files directly.
To compare the GENCSRC utility and the #pragma mapinc directive:
The following table shows the comparison of #pragma mapinc options
and the keywords for GENCSRC. For more information on any particular
option, refer to the description of #pragma mapinc in WebSphere Development Studio: ILE C/C++ Compiler
Reference.
Table 36. Comparison of GENCSRC Keywords and #pragma mapinc Options
GENCSRC Keyword | #pragma mapinc option | Description |
---|---|---|
SRCFILE | member_name | The name of the file that you reference on the #include directive in the source program. The output file is generated in the Data Management file system. |
SRCMBR | member_name | The name of member with the header information. It follows the iSeries naming conventions. The output file is generated in the Data Management file system. |
OBJ | file_name | The path name of the object to map in QSYS file system. |
SRCSTMF | member_name | The output file is generated in the IFS file system. |
RCDFMT | format_name | Indicates the DDS record format to be included in your program. The default is *ALL. |
SLTFLD | options | Restricted to a combination of the following values:
|
PKDDECFLD | d or p | *DECIMAL or *CHAR |
STRUCTURES | _P | *NONPACKED or *PACKED |
ONEBYTE | 1BYTE_CHAR | *CHAR or *ARRAY |
UNIONDFN | union_name | *OBJ , NONE , or union_name
|
TYPEDEFPFX | prefix_name | *OBJ or *NONE1 |
Notes:
|
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.