The FILETYPE Compiler directive specifies the format of files created by your program.
You can put the FILETYPE Compiler directive at the top of your program as an initial $SET statement as follows:
$set filetype"n"
where n, in this case, can be either 5 or 6.
FILETYPE"5" is used when it is important for file operations to conform to ANSI standards. Btrieve does not normally conform to ANSI standards and this mode of operation requires a number of calls to the Btrieve run-time system to force it to emulate ANSI behavior.
FILETYPE"6" is used when speed is important. In this mode of operation, each Micro Focus File Handler operation is mapped to the nearest Btrieve run-time call. No attempt is made to conform to ANSI standards.
You can mix different types of file in your program by putting the FILETYPE Compiler directive around individual SELECT statements, for example:
$set filetype"0" select testfile-1 assign to "test-1.dat" organization indexed record key prime-key access sequential. $set filetype"5" select testfile-2 assign to "test-2.dat" organization relative access sequential.
In the above example, all I/O on test-1.dat is handled by the Micro Focus File Handler while all I/O on test-2.dat is handled by the Xfh2btr call conversion module.
To specify the format to use when creating an indexed file, you can include the IDXFORMAT parameter under that file's settings in your File Handler configuration file. Set IDXFORMAT to either 5 or 6 to indicate Btrieve with or without ANSI conformance respectively. For more information, see the chapter File Handler Configuration.