You open the database file specified under <file_id> and transfer the first block. Using the <file_id>, the Database Manager determines the actual name of the file and whether it is a binary or text file.
File access using this command is limited to the database files. For this reason this command does not necessitate logging on to the operating system.
You can request the files that are currently available and their <file_id> with the command file_getlist (Creating a List of the Database Files).
You have the DBM operator authorization DBFileRead.
file_getfirst <file_id>
See: Database Files
OK<NL>
<file_handle><NL>
[CONTINUE|END]<NL>
<file_length>:20<data_length>:20<NL>
<data><NL>
<data><NL>
...
OK<NL>
file_handle><NL>
[CONTINUE|END]<NL>
<file_length><data_length><NL>
<data
><NL>
<file_handle> |
Numeric value that can be used for subsequent access to this file. |
END |
The contents of the file have been transferred in full. The file is closed automatically. |
CONTINUE |
The file contains further entries that were not transferred due to the limited storage available for replies. Interrogate this data by entering the above command or close the file. |
<file_length> |
File length |
<data_length> |
Data length |
<data> |
Data |
In ASCII mode the data is read from the file line by line. Each line is extended by a line feed (0x0D,0x0A) in the output area.
On a UNIX server, the line feed only consists of one character. This is why the value initially output for the file length may be smaller than the data length.
In the event of errors, see Reply Format.