IBM AS/400 manual Spooling

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 302
Image 302
Spooling

Spooling

¹ If a program sharing

an open

data path for an externally describe

use a record format

that the

first program ignored

¹If a program sharing an open data path for a program described

record length that exceeds the length established by the first o

When

several files

in

one program are overridden to one shared file

file

opening

order

is

important.

In

order

to

control

the

file

opening

use

a programmer-controlled open or use a CL

program

 

to

open

the

files

calling

the

program.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

If

a

program

shares

the open data path for a primary or secondary

must

process the detail calculations for the record being processed

another

program

that

shares

that

open

data

path.

Otherwise,

if

lookahe

or if

the

call

is

at

total

time,

sharing

the

open

 

data

path

for

a

file

may

cause

the

called program to read data

from

the

wrong

recor

You

must make sure that when the shared file

is

opened

for

the

fir

open

options

that

are

required for subsequent opens of the file are

open

options specified for subsequent opens of a

shared

file

 

are no

those

specified

for

the first

open

of

a

shared

file,

an

error

mess

program.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Table 18

details

the

system

open

options

allowed for

each

of

the

open

can

specify.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Table

18.

System Open Options Allowed with User Open Options

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RPG

User

 

 

 

 

 

 

 

 

 

System

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Open

Options

 

 

 

 

 

 

 

 

Open

Options

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

INPUT

 

 

 

 

 

 

 

 

 

INPUT

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OUTPUT

 

 

 

 

 

 

 

 

 

OUTPUT

(program

created

file)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

UPDATE

 

 

 

 

 

 

 

 

 

INPUT,

UPDATE,

DELETE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ADD

 

 

 

 

 

 

 

 

 

 

OUTPUT

(existing

file)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

For

additional information about sharing an open dataDB2 path,UDB forsee the

 

AS/400

Database

Programming manual.ILE

Concepts also

contains

information

 

 

 

about

sharing

open

data

paths and

activation

group

versus

job

level

sc

Spooling

Spooling is a system function

that

puts

data into

a

storage

area

to w

essing. The AS/400 system provides for the use

of

input

and

output

spo

tions. Each AS/400 file description contains a spool attribute

that

dete

whether

spooling

is

used

for the

file

at

run

time.

The

RPG

program

i

that spooling

is

being used.

The

actual

physical

device

from

which

a

to

which

a file

is

written

is determined

by

the

spool

reader

or

th

more

detailed

information

on

spooling,DataseeManagementthe

manual.

 

 

 

 

278 ILE RPG for AS/400 Programmer's Guide

Page 302
Image 302
IBM AS/400 manual Spooling