IBM AS/400 manual Using Externally Described WORKSTN Files, field, Subfile Display

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 360
Image 360
Subfile Display

Using Externally Described WORKSTN Files

 

 

 

 

 

 

 

 

 

Customer Name Search

 

 

 

 

 

Search Code _______

 

 

 

 

 

Number Name

Address

City

State

XXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XX

XXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XX

XXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XX

XXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XX

XXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XX

XXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XX

XXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XX

XXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XX

XXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XX

XXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XX

XXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XX

XXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XX

XXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XX

XXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XX

XXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XX

XXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XX

XXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XX

ˆXXXX

XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXXX

XX

 

˜

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure

166.

Subfile Display

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

To use

a

 

subfile

for

a display device file in an

RPG

 

program,

you m

SFILE

keyword

on

a

file

description

specification

for

the

 

 

WORKSTN

file.

of

the SFILE

keyword

isrecordSFILE( format :RECNOname

field

name).

The

 

 

 

 

 

WORKSTN

file

must

be

an

externally-described file (E

in

position 22).

You

must

specify

for

the

SFILE

keyword

the

name

of

the

subfile

reco

the control-record format) and the

name

of

the

field

that

contains

the

number

to

be

used

in

processing

the

subfile.

 

 

 

 

 

 

 

 

 

In

an

RPG

 

program,

relative

record

number

processing

is

defined

as

pa

SFILE

definition.

The

SFILE definition

implies

a

full-procedural

update

fil

for the subfile. Therefore, the file operations that are valid for

dependent

on

the definition

of the

main WORKSTN file. That is,

the WORK

file can

be

defined as a

primary

file or a full-procedural

file.

Use the CHAIN, READC, UPDATE, or WRITE operation codes with the subfile record format to transfer data between the program and the subfile. WRITE, or EXFMT operation codes with the subfile control-record format t data between the program and the display device or to process subf ations.

Subfile processing

follows

the

rules for relative-record-number processing.

RPG

program places the relative-record number of any record retrieved

READC

operation into

the field

named

in

the second position of the SFIL

keyword. This field is also

used

to

specify the record number that

uses

for

WRITE operation

to

the subfile or for output operations tha

RECNO

field name specified for the

SFILE keyword

must be

defined

as

with

zero

decimal

positions.

The

field

must have

enough

positions

to co

largest record number for the file. (See the DDSSFLSIZ keyword in the Reference.) The WRITE operation code and the ADD specification on the

336 ILE RPG for AS/400 Programmer's Guide

Page 360
Image 360
IBM AS/400 manual Using Externally Described WORKSTN Files, field, Subfile Display