Rational Developer for System z
PL/I for Windows, Version 8.0, Programming Guide

Accessing records in workstation VSAM data sets

You can access records in all types of workstation VSAM data sets either directly by means of a key or sequentially (backward or forward). You can also use a combination of the two ways, in which you select a starting point with a key and then read forward or backward from that point.

Table 18 shows how data could be stored in the three different types of workstation VSAM data sets and illustrates their respective advantages and disadvantages.

Table 18. Types and advantages of workstation VSAM data sets
Data Set Type Method of Loading Method of Reading Method of Updating Pros and Cons
Sequential Sequentially (forward only)

The sequential record value of each record can be obtained and used as a key

SEQUENTIAL backward or forward

KEYED using the sequential record value

Positioning by key followed by sequential either backward or forward

New records at end only

Access can be sequential or KEYED

Record deletion allowed

Advantages Simple fast creation

Uses For uses where data is primarily accessed sequentially

Keyed Either sequentially or randomly by key KEYED by specifying key of record

SEQUENTIAL backward or forward in order of any index

Positioning by key followed by sequential reading either backward or forward

KEYED specifying a key

SEQUENTIAL following positioning by key

Record deletion allowed

Record insertion allowed

Advantages Complete access and updating

Uses For uses where access is related to key

Direct Sequentially starting from slot 1

KEYED specifying number of slot

Positioning by key followed by sequential writes

KEYED specifying numbers as key

Sequential forward or backward omitting empty records

Sequentially starting at a specified slot and continuing with next slot

Keyed specifying numbers as key

Record deletion allowed

Record insertion into empty slots allowed

Advantages Speedy access to record by number

Disadvantages Structure tied to numbering sequences

Uses For use where records are accessed by number


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)