View previous topic :: View next topic |
Author |
Message |
MFdigger Beginner
Joined: 09 Sep 2005 Posts: 124 Topics: 52 Location: Chicago
|
Posted: Wed Sep 03, 2008 9:59 pm Post subject: Insert & delete record |
|
|
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
 _________________ Tx
Digger |
|
Back to top |
|
 |
expat Intermediate

Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Thu Sep 04, 2008 1:34 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
MFdigger Beginner
Joined: 09 Sep 2005 Posts: 124 Topics: 52 Location: Chicago
|
Posted: Mon Oct 13, 2008 11:20 pm Post subject: |
|
|
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
 _________________ Tx
Digger |
|
Back to top |
|
 |
expat Intermediate

Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Tue Oct 14, 2008 2:12 am Post subject: |
|
|
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 |
|
 |
MFdigger Beginner
Joined: 09 Sep 2005 Posts: 124 Topics: 52 Location: Chicago
|
Posted: Thu Oct 16, 2008 4:14 pm Post subject: |
|
|
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
/*
 _________________ Tx
Digger |
|
Back to top |
|
 |
|
|