You open the database file specified and transfer the first block.
As you can only access database files with this DBM Command, you do not need to log on to the operating system.
· You have the server authorization DBFileRead.
· You have determined the file ID of the file (see: Displaying a List of Database Files).
file_getfirst <file_id>
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>
Values for the Reply Fields
Field |
Description |
<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.