IBM AS/400 manual Using Output Specifications, Files, editing DDS Referin the

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 293
Image 293

 

 

 

 

Defining Externally Described

Files

field

in

positions

49

through 62

and

assign

a match-level value

tions

65

and 66.

 

 

 

 

 

In this

example, the CUSTNO field in both records MSTREC and

WKREC

is

assigned

the

match-level

value

M1.

 

.2/ To assign a field indicator to a field in an externally des specify the record-format name in positions 7 through 16 of identification line. On the field-description line, specify th positions 49 through 62, and specify an indicator in positions 74.

In this

example,

the field BALDUE in the record

WKREC is

te

zero

when

it is

read into the program. If the

field’s

val

cator

98

is

set

on.

 

 

Using Output Specifications

Output specifications are optional for an externally described file. operation codes such as WRITE and UPDATE that use the external rec description to describe the output record without requiring output the externally described file.

You can use output specification to control when the data is to be specify selective fields that are to be written. The valid entries

description

line

for an

externally described

file

are

output indicat

29),

field name (positions 30 -

43), and

blank

after (position 45). Ed

edit

codes

for

fields

written

to an externally described file are

for

the file. Device-dependent

functions

such

as

fetch

overflow (pos

space/skip (positions 40 - 51) are not valid in an RPG program for ex described files. The overflow indicator is not valid for externally

either. For a description of

how

to

specify

editingDDS Referin the-

DDS,

se

ence.

 

 

 

 

 

 

 

If

output specifications are

used

for an externally

described

file

name

is specified in positions

7 -

16

instead

of the

file name.

 

If all the fields in an externally described file are to be plac enter *ALL in positions 30 through 43 of the field-description line. I fied, you cannot specify other field description lines for that re

If you want to place only certain fields in the output record, ent positions 30 through 43. The field names you specify in these posit field names defined in the external record description, unless the on the input specifications. See Figure 135 on page 270.

You

should know about these considerations for using the output spec

an

externally described file:

¹In the output of an update record, only those fields specified specifications and meeting the conditions specified by the output placed in the output record to be rewritten. Fields not specifie

specifications are rewritten using the values that were read. Th offers a good method of control as opposed to the UPDATE operat that updates all fields.

Chapter 14. Defining Files269

Page 293
Image 293
IBM AS/400 manual Using Output Specifications, Files, editing DDS Referin the