Both in the API descriptions in this document and in the actual API specifications it is specified in various places that an access method implementation can specify particular definitions.
These definitions are shown in the table below for the DMS access methods supported in this version.
Details | SAM access method | ISAM access method | UPAM access method |
Name to be used at the JRIO interfaces | “SAM” | “ISAM” | “UPAM” |
Permissible record formats | Record format with variable and fixed record length | Record format with variable and fixed record length | Record format with fixed record length |
Maximum record length (depending on the record format (fixed, variable), logical block format (NO, KEY, DATA) and block size (1 | fixed, KEY BS * 2048 fixed, NO, DATA BS * 2048 - 16 variable, KEY: BS * 2048 -4 variable, NO, DATA BS * 2048 - 20 | fixed: BS * 2048 variable: BS * 2048 - 4 In the event of full utilization overflow blocks may occur | fixed, NO, KEY BS * 2048 fixed, DATABS * 2048 (the first 12 bytes contain metadata!) |
Permissible values for setRecordLength() of the AccessParameter... classes | 0 through 32768 (0 means: variable, restricted only by block size) | 0 through 32768 (0 means: variable, restricted only by block size) | 0 through 32768 (0 means: pubset standard) Values != n*2048 (n=0,,16) are not permitted |
Permissible values for the setBlocksize, setPrimarySpaceAllocation, setSecondarySpaceAllocation, setPrimary-KeyPosition,setSecondaryKeyPosition methods of the AccessParameter... classes | See API documentation on the AccessParameter SAM interface | See API documentation on the AccessParameter ISAM interface | See API documentation on the AccessParameter U PAM interface |
markSupported() methodFor marking and repositioning in the event of sequential reading of the FileInputRecordStream class | Always false | Always false | Always false |
Writing buffered output to the output stream with the flush() method of the FileOutputRecordStream class | The write buffer is emptied | The write buffer is emptied | No function |
Permissible values when generating secondary keys with the createSecondaryKey() method of the KeyedAccessRecordFile class | Not supported | Yes Max. 30 secondary keys, each max. 127 bytes long. | Not supported |
Name of secondary keys (createSecondaryKey() method of the KeyedAccessRecordFile class) | Not supported | 8-character, as per DMS rules, lower-case letters may be converted to upper-case letters | Not supported |
Setting the file position with the setCurrentRecordNumber() method of the RandomAccessRecordFile class after the last record (value of getRecordCount()) - or writing at such a position | Yes - empty records (with variable record format) or records with undefined contents (with fixed record format) may be added | No | Yes - records with undefined contents may be added |
Overwriting records with the write() method | Same record length at records with variable lenght | Possible without restrictions | |
Overwriting records with the writeBack() method | - | The primary key may not be modified | |
Sequence in the event of sequential reading with the KeyedAccessRecordFile class | - | Write or delete operations modify the file position and should therefore not be used between sequential read operations. With regard to different keys, ISAM behavior applies for the sequence in sequential read operations (see themanual “Introductory Guide to DMS” [8]) | |
Shared update processing: general | Not possible | Possible as: FileInputStream, FileOutputStream KeyedAccessRecordFile | Only possible for PAM files as FileInputStream or as RandomAccessRecordFile |
Shared update processing: open modes | - | INPUT, INOUT or OUTIN permitted, FileOutputStream only to add to a file, OUTIN only for the first application that opens the file | INPUT or INOUT permitted |
Shared update processing: lock granularity | - | With NK-ISAM, the lock is on key level (primary key), withK-ISAM the lock is on block level | Lock is on block level |
Shared update processing:other special features | - | Locks apply for the entire application (not only for a file) | It is not possible to increase or decrease the size of a file |
Table 5: Access-method-specific definitions