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 

Insert & delete record

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


Joined: 09 Sep 2005
Posts: 124
Topics: 52
Location: Chicago

PostPosted: Wed Sep 03, 2008 9:59 pm    Post subject: Insert & delete record Reply with quote

Hi All,

I have to delete a record with a key value of 1111 and insert a key value of 2222 record in a VSAM dataset.

Can I do it without writing a cobol program using IDCAMS or any other utility. Could some one please help me on this.

Thank you
Rolling Eyes
_________________
Tx
Digger
Back to top
View user's profile Send private message
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Thu Sep 04, 2008 1:34 am    Post subject: Reply with quote

With IDCAMS the INSERT part is dead easy, just the DELETE part that might be a PITA.

You would need to unload to a flat file, delete the record and reload to the KSDS.

SORT - Probably easier to do the delete, but DO take a backup first as with sort you can use the same file as input & output to the sort, using an OMIT card - but any errors during the sort may result in a corrupt file.
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
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: Thu Sep 04, 2008 10:15 am    Post subject: Reply with quote

MFdigger,

Check this link

http://www.mvsforums.com/helpboards/viewtopic.php?p=9479#9479
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MFdigger
Beginner


Joined: 09 Sep 2005
Posts: 124
Topics: 52
Location: Chicago

PostPosted: Mon Oct 13, 2008 11:20 pm    Post subject: Reply with quote

Hi Kolusu

Thank you for the link, I coded my JCL to delete the record from the VSAM in the same way as you mentioned in your link, While running the job, its returning the code of 16 and in the spool output its shwoing a message as:

WER255A VSAM LOGICAL ERROR 0C ON OUTPUT

in DFSMSG sysout

Could you please let me know how can I avoid this. Let me know if you need complete sysout
Rolling Eyes
_________________
Tx
Digger
Back to top
View user's profile Send private message
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Tue Oct 14, 2008 2:12 am    Post subject: Reply with quote

Kolusu's solution is for DFSORT - you are using SYNCSORT
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
MFdigger
Beginner


Joined: 09 Sep 2005
Posts: 124
Topics: 52
Location: Chicago

PostPosted: Thu Oct 16, 2008 4:14 pm    Post subject: Reply with quote

Hi Kosulu,expat

Could you please provide the idea on how I can work this out using SYNCSORT which I can use in input stream.

I used FIELDS=COPY just to verify if I can copy the VSAM records into flat file and its working but how I can change the rest in SYNCSORT as in DFSORT mentioned below. Please advice

//TOOLIN DD *
COPY FROM(VSAMIN) TO(T1)
SELECT FROM(CON) TO(OUT) ON(9,8,CH) NODUPS
//DFSPARM DD *
OPTION VSAMIO,RESET
/*

bonk
_________________
Tx
Digger
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 -> Data Management 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