This library/extension for PHP implements basic functions to access database files created with Micro Focus Cobol (.dat e .idx files). These files .dat and .idx are created by the engine of Micro Focus Cobol and contains respectively raw records (in sequential format) and index in order to get direct access to records of table.
At the moment the extension is tested with fixed length record (most useful in MF Cobol archives).
The functions implementation is similar to other php extension to database access as dba* functions. All functions are identified by suffix mfcdb_ + function name:
| Function Name | Task | Status of Implementation |
|---|---|---|
| mfcdb_key | Declare a key to use in a table | |
| mfcdb_create | Create a new table | |
| mfcdb_open | Open a table | |
| mfcdb_close | Close a table | |
| mfcdb_insert | Insert new record | |
| mfcdb_replace | Replace a record | |
| mfcdb_delete | Delete a record | |
| mfcdb_fetch | Get the record pointed by key | |
| mfcdb_exists | Verify if a record exists in table | |
| mfcdb_start | Select a index and a starting point to reading | |
| mfcdb_curr | Read current record after a mfcdb_start | |
| mfcdb_next | Read next record after a mfcdb_start | |
| mfcdb_prev | Read previous record after a mfcdb_start | |
| mfcdb_get_info | Get information about table struct and keys declared | |
| mfcdb_error | Get last error | |
| mfcdb_comp3encode | Encode a string in COMP-3 format | |
| mfcdb_comp3decode | Decode data from COMP-3 format | |