ILE C/C++ Programmer's Guide


Opening Database and DDM Files as Binary Stream Files

To open an iSeries database file as a binary stream file for record-at-a-time processing, use the fopen() function with one of the following modes:

The valid keyword parameters for database and DDM files are:

If you specify a database or a DDM file, the parameter type must be record.

Note:
The physical database files that are created when the database file does not exist (that is, where the open mode is wb or ab) are equivalent to specifying the following CL command:

CRTPF FILE(filename) RCDLEN(lrecl)

Records in this file are created with a record length that is based on the keyword parameter lrecl.

The only way to create a DDM file is to use the Create DDM File (CRTDDMF) command. If you use the fopen() function with a mode of wb or ab, and the DDM file exists on the source system but the database file does not exist on the remote system, a physical database file is created on the remote system. If the DDM file does not exist on the source system, a physical database file is created on the source system.


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