Files

To run a program off the AS/400 family, the program must use files. Programs perform read and write operations on these files. In general, a file (or file object) is comprised of a description that contains a unique set of characteristics. These characteristics describe how the data associated with the file is organized. For example, files can be structured to contain separate records and fields.

The information required in a file description is determined by the file type. Different file types have different capabilities. The file description contains the valid operations of a particular file, and determines how a program can use the data. When creating a file using DDS, the file description is based on DDS specifications.

Files that reside on an AS/400 business computing system include:

Database files
The database file contains the data and the descriptions of the data. This description is used to control the flow of data between the program and the database file. For instance, how input data is to be presented to a program from internal storage and how output data is to be presented to internal storage from a program. There are two kinds of database files: physical files and logical files

Device files
A device file does not have actual data associated with it. It specifies how a device can be used. The actual device is externally attached hardware, such as a display station, printer, tape or diskette unit, or a communication file. The device description defines the device to the system, while the device file formats output data from the program for presentation to the device, and formats input data from the device for presentation to the program. The different types of device files described using DDS are: printer files, display files, and Intersystem Communications Function (ICF) files

Spooled files
You can specify a diskette or printer file to be spooled. When you specify a file to be spooled, the data is stored as an file object until the program or device is available to process it. Spooling can usually shorten the run-time of the job and increase the number of jobs that can be run because spooling allows the job the continue independently of the speed or availability of the device.

Distributed Data Management (DDM) files
DDM files describe database files stored on a remore system. This type of file allows an application program to use data stored on another system in the network. Programs using DDM files run as though the remote database files were local database files.

Save files
Save files can be used to store saved data on a disk to perform input/output operations from a high-level language program, or to receive objects sent through the network. This type of file does not require diskettes or tapes. It is stored in auxiliary storage.