IBM AS/400 manual Example of an Interactive Application, Database Physical File

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 369
Image 369
Database Physical File

Database Physical File

Chapter 19. Example of an Interactive Application

This chapter illustrates some common workstation applications and their I coding.

The application program presented in this chapter consists of four mo module illustrates a common use for WORKSTN files. The first module (CU provides the main menu for the program. Based' selecontheion, userit calls the procedure in the appropriate module which provides the function requ

Each

module uses a WORKSTN

file to

prompt the user

for

input

and dis

mation

on the screen. Each

module,

except for the

main

module

CUSMAIN,

uses a logical file whichviewpresentsof thea master database file. This vie consists of only the fields of the master file which the module re essing.

Note: Each module, except CUSMAIN, can be compiled as a free standing program, that is, they can each be used as an independent pr

Table

 

29.

Description of Each Module in the Interactive Application Example

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Module

 

 

 

 

 

 

Description

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

“Main

Menu Inquiry”

on

 

An example of a basic

 

menu

 

inquiry

program

that

page

 

346

 

 

 

 

uses

a

WORKSTN

file to

 

display

menu

choices

 

 

 

 

 

 

 

 

and

 

accept input.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

“File

Maintenance”

on

page

349An

example

of

a

maintenance

program

which

 

 

 

 

 

 

 

 

allows customer records in a master file to be

 

 

 

 

 

 

 

updated,

deleted,

added,

and

displayed.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

“Search

by

Zip

Code”

on

An

example

program

which

uses

WORKSTN

 

 

 

page

 

358

 

 

 

 

subfile

processing

to

display

all matched records

 

 

 

 

 

 

 

for a specified zip code.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

“Search

and

Inquiry

by

 

Name”An example

program

which

uses

WORKSTN

 

 

 

on page 364

 

 

 

 

subfile

processing

to display all matched records

 

 

 

 

 

 

 

for

a

specified

customer name, and then allows t

 

 

 

 

 

 

 

user

to

 

select

a

record

from

the

subfile

to d

 

 

 

 

 

 

 

the

complete

customer

information.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Database Physical File

Figure 169 on page 346 shows the data description specifications (DDS) master customer file. This file contains important information for each such as name, address, account balance, and customer number. Every mo which requires customer information uses this database file (or a l

Copyright IBM Corp. 1994, 1999

345

Page 369
Image 369
IBM AS/400 manual Example of an Interactive Application, Database Physical File