IBM AS/400 manual Use of Subfiles, Using Externally Described WORKSTN Files

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 361
Image 361

Using Externally Described WORKSTN Files

specifications require that a relative-record-number field be specif

position

of

the SFILE keyword

on the file

description

specification.

If a

WORKSTN

file

has an associated subfile, all implicit input opera

explicit calculation

operations

that refer

to the file

name are proc

main WORKSTN file. Any operations that specify a record format name t

designated

 

as

a

subfile

are processed

on

the

main

WORKSTN

file.

If

you press

a

specified

function key

during

a

read of

a

non-sub

quent reads

of

 

a subfile

record will cause the

corresponding

functi

to

be

set

 

on

again, even

if the function key indicator has been s

reads.

This

will

continue until

a non-subfile

record

is

read

from the

 

 

 

 

 

*.. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ..*

 

 

 

 

AAN01N02N03T.Name++++++RLen++TDpBLinPosFunctions++++++++++++++++++++*

 

 

 

 

A** CUSTOMER

NAME SEARCH

 

 

 

 

 

 

 

 

 

A

 

 

 

 

 

 

 

REF(DSTREF) .1/

 

 

 

 

 

 

 

A

 

R

SUBFIL

 

 

 

SFL .2/

 

 

 

 

 

 

 

A

 

 

 

 

 

 

 

TEXT('Subfile Record')

 

 

 

 

 

A

 

 

CUST

 

R

7 3

 

 

 

 

 

 

 

 

A

 

 

NAME

 

R

7 10

 

 

 

 

 

 

 

 

A

 

 

ADDR

 

R

7 32

.3/

 

 

 

 

 

 

 

A

 

 

CITY

 

R

7 54

 

 

 

 

 

 

 

 

A

 

 

STATE

 

R

7 77

 

 

 

 

 

 

 

 

A*

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure

167.

 

Data Description Specifications for a Subfile Record Format

 

 

The data description specifications (DDS) for a subfile record forma records in the subfile:

.1/ The attributes for the fields in the record format are co reference file DSTREF as specified by the REF keyword.

.2/ The SFL keyword identifies the record format as a subfile.

.3/ The line and position entries define the location of the fie display.

Use of Subfiles

Some typical ways you can make use of subfiles include:

¹ Display only. The work-station user reviews the display.

¹Display with selection. The user requests more information about on

items on the display.

¹

Modification.

The

user changes

one

or

more

of

the

records.

¹

Input

only,

with

no validity checking. A subfile is used for a d

¹

Input

only,

with

validity checking. A subfile is used for a data

 

the

records

are

checked.

 

 

 

 

 

 

¹ Combination of tasks. A subfile

can

be

used

as

a

display with mo

 

the

input of new

records.

 

 

 

 

 

 

The following figure shows an example of data description specificati subfile control-record format. For an example of using a subfile in a see “Search by Zip Code” on page 358.

Chapter 18. Using WORKSTN Files337

Page 361
Image 361
IBM AS/400 manual Use of Subfiles, Using Externally Described WORKSTN Files