IBM AS/400 manual SCHNAM RPG Source, Search and Inquiry by Name

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 390
Image 390

Search and Inquiry by Name

¹SFLDSPCTL indicates when to display the subfile-control record format (w

indicator 55 is off).

¹

SFLDSP

indicates when to display the

subfile

(when

indicator 55 is of

¹

SFLSIZ

specifies

the

total

size

of

the subfile. In this example,

 

13 records

that

are

displayed

on

lines 9

through

21.

¹

SFLPAG

defines

the

number of

records

on a page. In this example, t

 

size

is the

same as

the

subfile

size.

 

 

¹ROLLUP indicates that indicator 95 is set on in the program when th function is used.

The OVERLAY keyword defines this subfile-control record format as an ov format. This record format can be written without the OS/400 system er screen first. F4 is valid for repeating the search with the same na F4 allows a form of roll down.)

The CUSDSP record format displays information for the selected customers

SCHNAM: RPG Source

*****************************************************************

*

PROGRAM NAME:

SCHNAM

 

*

* RELATED FILES:

CUSMSTL3 (LOGICAL FILE)

*

*

 

 

 

SNAMMENU (WORKSTN FILE)

*

*

DESCRIPTION:

THIS PROGRAM SHOWS A CUSTOMER MASTER SEARCH

*

*

 

 

 

PROGRAM USING WORKSTN SUBFILE PROCESSING.

*

*

 

 

 

THIS PROGRAM PROMPTS THE USER FOR THE CUSTOMER*

*

 

 

 

NAME AND USES IT TO POSITION THE CUSMSTL3

*

*

 

 

 

FILE BY THE SETLL OPERATION. THEN IT DISPLAYS *

*

 

 

 

THE RECORDS USING SUBFILES.

*

*

 

 

 

TO FILL ANOTHER PAGE, PRESS THE ROLL UP KEY.

*

*

 

 

 

TO DISPLAY CUSTOMER DETAIL, ENTER 'X' BESIDE

*

*

 

 

 

THAT CUSTOMER AND PRESS ENTER.

*

*

 

 

 

TO QUIT THE PROGRAM, PRESS PF3.

*

*****************************************************************

FCUSMSTL3

IF

E

K DISK

 

FSNAMMENU

CF

E

 

WORKSTN SFILE(SUBFILE:RECNUM)

 

C

CSTKEY

 

KLIST

 

 

C

 

 

 

KFLD

SRCNAM

 

C

ZIPKEY

 

KLIST

 

 

C

 

 

 

KFLD

NAME

 

 

 

 

 

 

 

Figure

189 (Part

1

of 3).

Source for module SCHNAM

 

366 ILE RPG for AS/400 Programmer's Guide

Page 390
Image 390
IBM AS/400 manual SCHNAM RPG Source, Search and Inquiry by Name