For accessing a VSAM cluster sequentially, STARTBR, READNEXT, ENDBR commands are used. Suppose the VSAM cluster is sorted on the basis of a field (lets say age) and using STARTBR pointer is positioned on the record with name 'brijesh'. By using READNEXT that record is read. Now if i again use READNEXT, next record will be read(which could be the record with name other than 'brijesh'). If I want to read the next record with the same name (i.e. brijesh), whether RESETBR will be correct option for me. By using RESETBR here, whether the pointer will be placed at the next record with same name(brijesh) or the first record with the name 'brijesh'. Please explain the same.

Showing Answers 1 - 3 of 3 Answers

Hi Brijesh,

I guess your question is purely dependent on the situation(i.e data present in the dataser which you are accessing)

when ever you sorted the data with age, it will sort like depend on age only.

that is no rule that brijesh record will come very after the birjesh record.


according to your quesry, you want all the records with name "brijesh" will have to come at a time. for this you have to sort the record on multiple keys.
i.e first sort the record depending on name and then age, then it will give all record with name "brijesh" as a group, then u can follow your process.

please let me know if i am wrong incase

Regards
jinka.saikrishna@gmail.com

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions