IBM Books

Net.Data Programming Guide


Flat File Interface

If you chose to use flat files (or plain-text files) as your data source, you can use the flat file interface (FFI) and its associated Net.Data functions to open, close, read, write, and delete files on the Web server. You must specify a path for the FFI_PATH variable in the initialization file.

What is FFI?

The file language support uses FFI functions to read from or write to files on the Web server at the Web client's request through the browser. FFI views the file as a record file, each record equivalent to a row in a Net.Data macro table variable, and each value in a record equivalent to a field value in a Net.Data macro table variable. FFI reads records from a file into rows of a Net.Data macro table, and writes rows from a table into records.

Security Considerations

You can specify which files FFI functions can access with the FFI_PATH statement in the Net.Data initialization file. FFI only searches the paths listed in the statement, so files in other directories are safe. This is an example statement:

FFI_PATH     C:\public;.\;E:\WWW;E:\guest;A:

The paths listed in FFI_PATH are searched from first to last. The first copy found is used. If the FFI_PATH is not in the initialization file, FFI attempts to find the file in the current directory or with the path, if one is given (for example, ../reports/nov96.txt). The Net.Data initialization file is shipped without FFI_PATH.

Plan ahead before setting up FFI. Consider these points:

Other Considerations

General considerations

Current directory

DELIMITER parameter

FFI_PATH

DTWF_SEARCH function

STARTROW and ROWS parameters

TABLE parameter

TRANSFORM parameter

File locking DTWF_APPEND


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]