At file creation and open, the filmod parameter is used to specify the important file characteristics discussed above. Due to the number of different options it is not practical to show you all possible combinations.
When you are asked to supply the filmod parameter you can OR the various options together. For example:
(ctVIRTUAL | ctEXCLUSIVE | ctFIXED)
(ctPERMANENT | ctSHARED | ctFIXED | ctTRNLOG | ctDUPCHANEL)
Certain options are mutually exclusive, so they should not be used together. Only one option should be used from each of the following groups:
ctVIRTUAL or ctPERMANENT
ctEXCLUSIVE or (ctSHARED and/or ctREADFIL)
ctFIXED or ctVLENGTH
ctPREIMG or ctTRNLOG
When creating a data or index file you MUST specify one option from each of the FIRST THREE groups shown above.
Most file modes are applicable to data and index files. The following four exceptions should only be applied to data files:
ctSUPERFILE ctVLENGTH ctCHECKLOCK ctCHECKREAD
The following table defines the values for the file modes. You should always use the defined name for the values if possible. However, you need the numeric values if you are using an ISAM parameter file.
These values can be found in ctport.h.
File mode |
Decimal value |
Hexadecimal value |
---|---|---|
ctEXCLUSIVE |
0 |
0x0000 |
ctSHARED |
1 |
0x0001 |
ctVIRTUAL |
0 |
0x0000 |
ctPERMANENT |
2 |
0x0002 |
ctFIXED |
0 |
0x0000 |
ctVLENGTH |
4 |
0x0004 |
ctREADFIL |
8 |
0x0008 |
ctPREIMG |
16 |
0x0010 |
ctTRNLOG |
48 |
0x0030 |
ctWRITETHRU |
64 |
0x0040 |
ctCHECKLOCK |
128 |
0x0080 |
ctDUPCHANEL |
256 |
0x0100 |
ctSUPERFILE |
512 |
0x0200 |
ctCHECKREAD |
1024 |
0x0400 |
ctDISABLERES |
2048 |
0x0800 |
ctMIRROR_SKP |
8192 |
0x2000 |
ctOPENCRPT |
16384 |
0x4000 |
ctLOGIDX |
32768 |
0x8000 |
ctInsertOnly |
|
0x08000000 |