Background documentationfile_getfirst Locate this document in the navigation structure


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>





For possible file ID values, see: Database Administration, Log Files or

Configuration Files


The file content is output starting from the line with the specified timestamp.


From text files, the most current <nnn> lines are output.









Values for the Reply Fields




Numeric value, which can be used for subsequent access to this file.


The content of the file has been transferred completely. The file is closed automatically.


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

Length of entry: max. 20 characters


Length of the displayed data block

Length of entry: max. 20 characters


Data line

In the event of errors, see Reply Format.

More Information

Glossary, Database File