Use this command to open the specified database file. The most current entries are at the end of the file. If you only specify the file name in this command, the first block, that is the block containig the oldest part of the file content, is displayed. You can specify more options to get the latest n number of lines or the file content from a certain date onwards displayed.
In the command line, you can use the DBM command only to display the content of plain text files. Programs can access the content of binary files via the DBM interface.
The data of plain text files 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 computer, the line feed consists of one character only. This is why the value initially output for the file length may be smaller than the data length.
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 permission DBFileRead.
You have determined the file ID of the requested database file (see: file_getlist).
file_getfirst <file_ID> [<file_spec>]
<file_spec> :: = DATE=<timestamp> | LINE=<nnn>
Option |
Description |
---|---|
<file_ID> |
For possible file ID values, see: Database Administration, Log Files or |
DATE=<timestamp> |
The file content is output starting from the line with the specified timestamp. |
LINE=<nnn> |
From text files, the most current <nnn> lines are output. |
OK
<file_handle>
CONTINUE|END
<file_length><data_length>
<data_line>
<data_line>
...
Value |
Description |
---|---|
<file_handle> |
Numeric value, which can be used for subsequent access to this file. |
END |
The content of the file has been transferred completely. The file is closed automatically. |
CONTINUE |
The file contains further entries, which were not transferred due to the limited size of the reply package. You can display this data by entering the DBM command again, or close the file. |
<file_length> |
File length Length of entry: max. 20 characters |
<data_length> |
Length of the displayed data block Length of entry: max. 20 characters |
<data_line> |
Data line |
In the event of errors, see Reply Format.
Glossary, Database File