How do you convert flat files to VSAM files?

Showing Answers 1 - 5 of 5 Answers


  • Mar 6th, 2006


You can use RERPO option in IDCAMS utility.



  Was this answer useful?  Yes


  • Mar 19th, 2006

Let's be a little more precise.We will take the tack that you will be creating a KSDS file.First, you need to know which field/s you will be using as the primary key and if you need, alternate keys. Sort the records by that field/s.Use IDCAMS REPRO to load the flat file into the VSAM file.

  Was this answer useful?  Yes


  • Sep 29th, 2006

Hi all,

     You can't convert the flat files to Vsam files. The data, it means the record in the flat file will be copied to vsam file where you can have any field as the primary key but it should be unique.

  Was this answer useful?  Yes


  • Nov 18th, 2007

You can convert flat files to VSAM:
1. Identify what will be your primary key. If you don't want to, the whole record can be your primary key.
2. Sort the file by primary key or the whole record (if no primary key selected) and use the sort statement that drop duplicates.
3. Submit a JCL (IDCAMS - Define Cluster) using the output of step #2 as your input.  


  • Oct 25th, 2008

Following steps will convert a sequential file to VSAM file.
1. Sort the sequential fille, with SORT FIELD=NONE, to remove the duplicate key records.
2. Define a VSAM file
3. Use REPRO to copy the sequential file to VSAM file.

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