How do I add a record to a existing VSAM RRDS file?
search cancel

How do I add a record to a existing VSAM RRDS file?

book

Article ID: 26805

calendar_today

Updated On:

Products

Easytrieve Report Generator

Issue/Introduction

How is a record added to an existing VSAM RRDS file?

 

 

 

 

Resolution

To add records to VSAM RRDS file:

  1. Define a KEY as a 4 byte binary field
  2. Use the POINT and PUT functions.

Example:

DEFINE REC-CNT S  4  B  VALUE xxx - (xxx is 1 greater than the current number of records on file)

POINT RRDSFILE GE REC-CNT STATUS  (check status)

PUT RRDSFILE

STATUS (check status)

REC-CNT = REC-CNT + 1 (loop back to point and put for next record)