START with Alt Index Key

Post your questions related to VSAM

Moderator: Moderator Group

Post Reply
jay
Member
Posts: 1
Joined: Thu Dec 27, 2007 5:18 pm

START with Alt Index Key

Post by jay » Tue Jun 10, 2008 11:33 am

Can we use START command withkey as alternate Index Key of VSAM file ?

laxmi_maha2000
Member
Posts: 8
Joined: Wed May 21, 2008 4:27 pm

Post by laxmi_maha2000 » Thu Jul 03, 2008 8:20 pm

Hi Jay,

Yes. You can use it.

When a direct READ is performed for a VSAM indexed file, based on an alternate
index for which duplicates exist, only the first record in the data set (base cluster)
with that alternate key value is retrieved. You need a series of READ NEXT statements to retrieve each of the data set records with the same alternate key.

A FILE STATUS value of '02' is returned if there are more records with the same alternate key value to be read; a value of '00' is returned when the last record with
that key value has been read.

I hope it clears your doubt!!!
Regards,
Lakshmi

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others