How do you read vsam file?

Showing Answers 1 - 2 of 2 Answers

manoj

  • Sep 29th, 2006
 

 VSAM files can be read and write same like cobol files. But only difference is you have to give the dsn path of your vsam file in jcl step while compile time.

  select empfile assign to dd1

  dd1 will have the dsn parameter with vsam file path.

try it

manoj.

  Was this answer useful?  Yes

Apurbita Roy Majumder

  • Oct 16th, 2007
 


It is similar to the sequential read but here first a pointer is set and then the file is read from that particular record. For example:

START file name KEY >= file key ( Key of the VSAM file). After the pointer is set the file is read 

READ  file name NEXT

In PS files we can only do a sequential read but in VSAM we can do a random read and this is possibe by setting the key of the VSAM.

 

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