IBM AS/400 manual Name, without, Format, Input Specifications, Calculation Specifications, File

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 364
Image 364

Using Program-Described WORKSTN Files

Input Specifications

The

input specifications describe the record that the RPG program

re

the

display

or

ICF device. The WORKSTN file

name

must

be

specified

i

7 through 16.

Input fields

must

be

located

in the input record in

th

as

defined

in

the DDS; however, the field

names

do

not

have

to be

field location

entries refer

to

the

location

of

the

fields

in the

in

To receive indicators on input, do one of the following:

¹ Specify the

keyword

INDARA in

the

DDS for the WORKSTN file. Do not

the PASS(*NOIND)

keyword

on the

file

description specification and do

specify the indicators on the input specifications. The program and separate indicator area to pass the indicators.

¹Specify the PASS(*NOIND) keyword on the file description specification.

Specify the indicators in the

input specifications

 

as

fields

in

the

They

must

appear in

the input

record

in

the

order

specified

by

file DDS.

You can determine this order

from

the

DDS

listing.

 

 

A record

identifying indicator should be assigned to

 

each

record

in

tify the record that has been read from

the

WORKSTN

file. A

hidden

default

value

can be

specified

in the

DDS

for

the

record

identifica

Calculation Specifications

The operation code READ is valid for a program-described

WORKSTN

file

t

defined

as

a combined, full-procedural file. See Table 28

on

page 341.

name

must

be

specified in factor 2 for this operation.

A

format must

device before any input operations can

take

place.

This

requirement

c

fied on a display device by

conditioning

an

output

record

with

1P

or

first format

to

the

device

in

another

program

(for

example,

in

the

CL

EXFMT

operation

is

not

valid for

a program-described WORKSTN

file.

You

c

also

use

the EXCEPT operation

to

write to

a WORKSTN file.

 

 

 

 

Additional Considerations

When

using a

format name with a program-described WORKSTN file, you must

also

consider

the following:

¹The name specified in positions 53 through 80 of the output specifi

assumed

to be the name

of a

record

format

in

the

DDS

that

was

u

the

file.

 

 

 

 

 

 

 

 

 

 

 

 

 

¹ If

a

Kn

specification

is

present

for

an

output

record,

it

must

al

any

other

output records

for

that

file.

If

a

Kn

specification

is

output records to a file, a run-time error will occur.

Using a Program-Described

WORKSTN

 

File

without

a

Format

Name

 

 

 

 

 

 

When a record-format name is not used, a program-described display-devi

describes

a

file

containing

one

record-format

description

with one fiel

in the record must be described

within the

program that

uses

the

f

When

you create the display file

by using

the

Create

Display

File

c

has

the

following

attributes:

 

 

 

 

 

 

 

 

 

¹ A

variable

record

length

can

be

specified; therefore,

the

actual

must

be

specified

in

the using

program. (The

maximum

record

length

 

the

screen size minus

one.)

 

 

 

 

 

 

 

 

340 ILE RPG for AS/400 Programmer's Guide

Page 364
Image 364
IBM AS/400 manual Name, without, Format, Input Specifications, Calculation Specifications, Additional Considerations, File