View previous topic :: View next topic |
Author |
Message |
vijay Beginner
Joined: 09 May 2003 Posts: 131 Topics: 64
|
Posted: Tue Mar 02, 2004 12:13 pm Post subject: Help with EZT |
|
|
I've a file with 200 records.Each record will have more than 1 matching key in huge vsam file.
I need to find all those records in the vsam and delete them.Also I've to create a copy of the records
deleted from the vsam file with a new key.
input file:
1234 5678
vsam:
1234 a
1234 b
1234 c
output vsam should be:
5678 a
5678 b
5678 c
Could someone there help me with the code uisng EZT.The vsam files are big with around 1 million records.
Thanks,
Vijay |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Tue Mar 02, 2004 1:51 pm Post subject: |
|
|
vijay,
A couple of questions. what type of vsam file are we talking in here? ESDS/KSDS/RRDS? A record cannot be deleted in ESDS.
Also input file key is only 4 bytes, but your vsam file key is 6 bytes. Easytrieve does not let you read with a partial key.
Another way of deleting and updating of vsam records can be done as follows:
1. Copy vsam file to a flat file using SORT or IDCAMS Repro
2. Now match the input file with the flat file created in step 1 and create the desired output as another flatfile.
3. Now Delete and redefine the vsam file and repro back the file created in step 2 to the vsam file.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|