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 

Delete a record using a key from VSAM.

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


Joined: 23 Dec 2002
Posts: 80
Topics: 32
Location: Chennai, India

PostPosted: Mon Jun 19, 2006 5:14 pm    Post subject: Delete a record using a key from VSAM. Reply with quote

Hi

I need a record to be deleted from the VSAM file using IDCAMS based on the primary key, is this possible.

Please help !
_________________
Thanks,
Vinod.
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: Mon Jun 19, 2006 8:07 pm    Post subject: Reply with quote

Vinodch,

You CANNOT delete a key using IDCAMS. However if your cluster is defined with RESET , then here is a possible solution

http://mvsforums.com/helpboards/viewtopic.php?t=2014&highlight=vsam

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
Vinodch
Beginner


Joined: 23 Dec 2002
Posts: 80
Topics: 32
Location: Chennai, India

PostPosted: Tue Jun 20, 2006 8:20 am    Post subject: Reply with quote

Hi Kolusu

Thanks for the information. Any possibility thru EZT ?
_________________
Thanks,
Vinod.
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 Jun 20, 2006 8:29 am    Post subject: Reply with quote

Quote:

Thanks for the information. Any possibility thru EZT ?


Vinodch,

Here is an example straight from the Easytrieve reference guide (chapter 11)

Code:

  FILE KSDS VS (UPDATE)

  FILE DELFILE
       DEL-KEY   1  05 N
 
  JOB INPUT DELFILE
 
      READ KSDS KEY DEL-KEY STATUS
           IF FILE-STATUS NE 0
              DISPLAY 'READ FAILED...KEY= ' DEL-KEY
              STOP
           END-IF
           WRITE KSDS DELETE STATUS
           IF FILE-STATUS NE 0
              DISPLAY 'DELETE FAILED'
              STOP
           END-IF
     END


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
Vinodch
Beginner


Joined: 23 Dec 2002
Posts: 80
Topics: 32
Location: Chennai, India

PostPosted: Tue Jun 20, 2006 4:34 pm    Post subject: Reply with quote

Thanks Kolusu It's working.
_________________
Thanks,
Vinod.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities 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