IBM AS/400 manual Externally, Devices, Accessing, Types of Device Files, Chapter, Attached

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 339
Image 339
Types of Device Files

Types of Device Files

Chapter

17.

Accessing

Externally

Attached

 

Devices

 

 

 

 

 

 

 

 

 

 

 

 

 

 

You can access externally attached

devices

from

RPG

by

using

devic

 

 

 

Device

files

 

 

are files that provide access to externally attached har

 

 

 

printers, tape units, diskette units, display stations, and other syst

 

 

 

attached

by

a

communications

 

line.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This chapter describes how to access externally attached devices

 

 

 

 

device names

PRINTER,

SEQ,

and

 

SPECIAL.

For

information

on

display stations

 

 

 

and

ICF devices see Chapter 18, “Using

WORKSTN

Files” on page 331

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Types

of Device

 

Files

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Before your program can read or write to the devices on the syst

 

 

 

description

that

identifies

 

the

hardware

capabilities

of

the

devic

 

 

 

system

must

be

created

 

when

the

device

is

configured.

A device

f

 

 

 

a

device

 

 

can

be

used.

By referring to a specific

device

file,

 

 

 

 

the device in the way

 

that it is described to the system. The

 

 

 

 

output data from your RPG

program

for

presentation

to

the

 

device,

a

 

 

 

input

 

data

from

the

device

 

for

presentation

to

your

RPG

program.

 

 

 

 

You use the device files listed in Table 22 to

access

the

associa

 

 

 

attached

devices:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Table

22.

AS/400 Device Files, Related CL commands, and RPG Device Name

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Device

 

 

 

 

Associated

Externally

 

Attached

Device

 

 

 

CL com-

 

 

 

RPG

 

 

 

 

 

 

 

 

File

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

mands

 

 

 

Device

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Name

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Printer

 

 

Provide

access

to

 

printer

 

devicesCRTPRTFand

 

 

 

PRINTER

 

 

 

 

 

 

 

Files

 

 

 

describe

the

format

of

 

printed

CHGPRTFoutput.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OVRPRTF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Tape

Files

 

Provide

access

to

 

data

files

whichCRTTAPF are

 

 

SEQ

 

 

 

 

 

 

 

 

 

 

 

 

 

 

stored

on

tape

devices.

 

 

 

CHGTAPF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OVRTAPF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Diskette

 

 

Provide

access

to data files whichCRTDKTFare

 

 

DISK

 

 

 

 

 

 

 

 

Files

 

 

 

stored

on

diskette

devices.

 

CHGDKTF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OVRDKTF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Display

 

 

Provide

access

to

 

display

 

devicesCRTDSPF.

 

 

 

WORKSTN

 

 

 

 

 

 

 

Files

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CHGDSPF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OVRDSPF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ICF

Files

 

 

Allow

a

program

 

on one system to comCRTICFF-

 

 

 

WORKSTN

 

 

 

 

 

 

 

 

 

 

 

 

 

municate

with

a

program

on

 

the

sameCHGICFF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

system

or

another

system.

 

 

 

OVRICFF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The

 

device

file

contains

the

file

 

description,

which

identifies the

 

 

 

it

does

not

contain

data.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright IBM Corp. 1994, 1999

315

Page 339
Image 339
IBM AS/400 manual Externally, Devices, Accessing, Types of Device Files, Chapter, Attached