MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help with EZT

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
vijay
Beginner


Joined: 09 May 2003
Posts: 131
Topics: 64

PostPosted: Tue Mar 02, 2004 12:13 pm    Post subject: Help with EZT Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Mar 02, 2004 1:51 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group