HP 3000 Manuals

Using Disc Files in an RPG Program [ HP RPG/XL Programmer's Guide ] MPE/iX 5.0 Documentation


HP RPG/XL Programmer's Guide

Chapter 3  Using Disc Files in an RPG Program 

RPG contains language elements that let you process several kinds of disc
files.  You can use MPE files, Keyed Sequential Access Method (KSAM)
files and TurboIMAGE databases.  The following list summarizes these
files and how you can use them in RPG programs:

File type:          Ways you can access the file: 

MPE                 Sequentially, randomly.

KSAM                Sequentially, sequentially within key limits,
                    randomly and chronologically.

TurboIMAGE          Sequentially, sequentially within key limits,
                    randomly.

A KSAM file consists of a data file and a key file.  Data files contain
the actual data records and are maintained in chronological sequence
(records are placed in the file in the order that they are added).  The
key file lets you access the data file records in key sequence.  When you
create a KSAM file, you specify the fields that are the keys.

A TurboIMAGE database is a collection of files (data sets) whose data
field relationships are maintained automatically.  You can easily query
data in TurboIMAGE databases and there are extensive file security
provisions that you can use.

This chapter discusses KSAM files and TurboIMAGE databases and how you
access and use them in RPG programs.



MPE/iX 5.0 Documentation