BT09 - Programming with VSAM Files - 2 Days

View Dates and Locations

Course Description

The course is aimed at developers' not familiar VSAM file access. This course covers all aspects of Programming with VSAM files. The course teaches the design, writing and testing of COBOL or PL/1 programs accessing VSAM files. Many exercises are performed by the developer to ensure that the statements taught are fully understood and practical experience is gained


Pre-requisites

Knowledge of COBOL or PL/1 is required. This can be gained by attending either course BT05 or BT06.


Objectives

Whilst covering the basics of VSAM programming and how it is used, this course also aims to give an insight into different types of VSAM files.

On completion of this course the student will be able to:

  • Understand and define VSAM files in a program
  • Correctly code VSAM data access in a program

Environment

Development will be performed using:

  • IBM Mainframe

Customisation

For on-site courses (i.e. at your premises), we are more than happy to tailor the course agenda to suit your exact requirements. In many cases, we are able to build your in-house standards and naming conventions into the delivered course.

On-site course enquiry (from £165 pp per day)

Course Details

GETTING STARTED
VSAM Datasets
VSAM File Characteristics
VSAM Advantages
VSAM File Types
Ways to Identify Logical Records
VSAM Components
VSAM Cluster
Control Interval
Control Area
Spanned Records
Considerations
VSAM Access Types
Summary Of VSAM Facilities

VSAM DEFINITION
Defining a Cluster
Cluster Definition Parameters
Deleting a Cluster
Cluster Deletion Parameters
Parameter Abbreviations
Using ISPF to Define and Delete VSAM Clusters
VSAM File - Define
Allocating A New VSAM File Using File-AID

ENTRY-SEQUENCED DATASETS
Entry-Sequenced Datasets
ESDS Main Features
Alternate Index
ESDS Data Access

KEY-SEQUENCED DATASETS
Key-Sequenced Datasets
KSDS Freespace Considerations
KSDS Main Features
The Index Component
Index Structure
Control Interval Splits and Control Area Splits
Data Access
Direct Access
Sequential Access
Skip-Sequential Access

RELATIVE RECORD DATASETS
Relative Record Datasets
Data Access
RRDS Main Features
RRDS Structure

LINEAR DATASETS
Linear Datasets
Linear Main Features

VSAM COMMANDS
Overview
The Alter Command
The Repro Command
Using Repro to Reorganize a Dataset
Repro Parameters
The Listcat Command
The Examine Command
The Verify Command
The Print Command

USING AN ALTERNATE INDEX
What Is An Alternate Index?
How Does An Alternate Index Work
Defining An Alternate Index

BROWSING USING FILE-AID
Overview
Datasets Supported
Accessing Browse
The Browse Panel
Character Mode
Vertical Mode
Formatted Mode
Browse Primary Commands
COBOL File Layout / Copybook Example

VSAM AND CICS
Initial Setup
File Control Table (FCT)
Reading
Writing
Deleting
Updating
Unlocking
Browsing Multiple Records
Batch And On-Line File Access

VSAM AND COBOL
File Definition Select Statement
Opening VSAM Files
Indexed Read
Sequential Read
Write Records
Rewriting Records
Deleting Records
Positioning Within A File - Start

VSAM AND SAS
Using SAS System Options
VSAM Option for the FILENAME Statement
Reading a VSAM File
Writing to an Empty VSAM File
Updating a VSAM Data Set
Reading Records from a KSDS
KSDS Reading Key Option
KSDS Reading KEYGE Option
KSDS Reading GENKEY Option
KSDS Reading Direct RBA Access
Reading a KSDS with Skip Sequential Access
Adding Records to a KSDS
Updating Records in a KSDS
Erasing Records from a KSDS

VSAM AND REXX
Rexx / Vsam - File Processing
Rexx / Vsam - File Definition / Deletion
Rexx / Vsam - File Repro
Rexx / Vsam Data Manipulation

FILE ACCESS STATUS CODES
File Access Status Codes

COBOL SELECT / ASSIGN STATEMENT
VSAM Select / Assign Statement

COBOL FILE DEFINITION
VSAM File Definition

COBOL OPEN STATEMENT
Opening VSAM Files

COBOL READING AND RID FIELDS
Specifying Key Fields for a VSAM Dataset
VSAM File Direct Access
VSAM File Sequential Access
VSAM File Alternate Index Data Access

COBOL START STATEMENT
Positioning the File Pointer within a VSAM File

COBOL WRITE STATEMENT
Inserting Records into a VSAM File
Placement of Records

COBOL REWRITE STATEMENT
Updating Records on a VSAM File
Updating Restrictions

COBOL DELETE STATEMENT
Deleting Records from a VSAM File

CLOSE STATEMENT
Closing a VSAM File

FILE STATUS CHECKING
Checking the VSAM File Status


Course Format

Practical sessions make up a large part of the course, allowing delegates to demonstrate and reinforce the lectures given. During these sessions the delegate will gain experience of writing and testing different types of COBOL or PL/1 programs accessing the various VSAM datasets available.

Examples are used extensively, ranging from simple code snippets to full applications with complete 'real world' functionality. These are supplied at the start of the course and it is encouraged that the delegates execute and 'experiment' with these under the instructor's guidance as they are introduced.

These examples are available to take away, along with the delegate's own work.

The comprehensive Student Guide supplied is fully indexed serving as a useful reference tool long after the course has finished. Delegates will also be able to access a free help-line with technical questions relating to topics covered on the course.


Availability

Course Enquiry