IBM AS/400 manual Defining Files, Associating Files with Input/Output Devices

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 285
Image 285
Associating Files with Input/Output Devices

Associating Files with Input/Output Devices

Chapter 14. Defining Files

Files serve as the connecting link between a program and the device Each file on the system has an associated file description which d characteristics and how the data associated with the file is orga and fields.

In order for a program to perform any I/O operations, it must ide description(s) the program is referencing, what type of I/O device and how the data is organized. This chapter provides general informa

¹ Associating file descriptions with input/output devices

¹ Defining externally described files

¹Defining program-described files

¹Data management operations

Information on how to use externally and program-described files with device types is found in subsequent chapters.

Associating Files with Input/Output Devices

The key element for all ports the following file

I/O operations on the AS/400 is the file. Th types:

database files

allow storage of data permanently on system

device files

allow access to externally attached devices. Include display files, tape files, diskette files, and ICF files.

save files

used to store saved data on disk

DDM files

allow access to data files stored on remote systems.

Each I/O device has a corresponding file description of one of the which the program uses to access that device. The actual device a made when the file is processed: the data is read from or writte when the file is used for processing.

RPG also allows access to files and devices not directly supported through the use of SPECIAL files. With a SPECIAL file, you must provid program that handles the association of the name to the file, and t ment for the file. With other types of files, this is handled by system.

To

indicate to the operating system which

file

description(s) your

p

you

specifyfilea namein

positions

7 through

16

of

a

file

description

sp

for

each

file used.

In

positions

36

through

42deviceyou namesp. cify an RP

The device name defines which RPG operations

can be used with the

file. The

device name can

be

one

of:

DISK,

PRINTER,

WORKSTN, SEQ, or

 

Copyright IBM Corp. 1994, 1999

261

Page 285
Image 285
IBM AS/400 manual Defining Files, Associating Files with Input/Output Devices