When you define ddnames, use options to specify the characteristics of the file your program opens. Options can appear in any order and are not case-sensitive. If you specify an option more than once, only the last one takes effect. If an option is not valid, fopen fails and errno is set accordingly.
You can use the following options when specifying a ddname:
| Option | Description |
|---|---|
| blksize( n ) Default: none |
This option is meant to be
used with record level I/O. Because record level I/O is
not supported, this option is accepted but ignored. The size in bytes of the block of data moved between the disk and the program. The maximum size is 32760 for fixed block files and 32756 for variable block files. Larger values can improve the efficiency of disk access by lowering the number of times the disk must be accessed. Typically, values below 512 increase I/O time, and values above 8KB do not show improvement. |
| lrecl( n ) Default: none |
The size in
bytes of one record (logical record length). If the value
specified is larger than the value of blksize, the lrecl
value is ignored. This option is meant to be used with record level I/O. Because record level I/O is not supported, this option is accepted but ignored. |
| recfm(f | v |
fb | vb ) Default: recfm(f) |
This option
is meant to be used with record level I/O. Because record
level I/O is not supported, this option is accepted but
ignored. Specifies whether the record length is fixed or variable, and whether the records are stored in blocks.
|
| share (read |
none | all ) Default: share(read) |
Specifies the
file sharing.
|
| writethru( n
| y ) Default: writethru(n) |
Determines
whether to force the writing of OS/2 buffers.
|
| memory( n | y
) Default: memory(n) |
Specifies whether a file
will exist in permanent storage or in memory.
|
![]()
Open Streams Using
Data Definition Names
Direct I/O to Memory
Files