View previous topic :: View next topic |
Author |
Message |
Venkata Ramana Reddy Beginner
Joined: 02 Dec 2002 Posts: 70 Topics: 19 Location: California
|
Posted: Tue Mar 25, 2003 8:07 pm Post subject: VSAM Repro-Add non Duplcate Records |
|
|
I have a requirement wherein I have to add some records to the existing VSAM KSDS file.There may be duplicates and hence the IDCAMS will abort once it detects 4 duplicate records.
The following is the Repro Command I am using
REPRO INFILE(XXX) OUTFILE(YYY) NOREPLACE
My requirement is only to add the non-duplicate records to the existing VSAM KSDS File
The following is the error message we are getting.
Code: |
IDC3302I ACTION ERROR ON TDSCW.DEBUG.IDX34.CV00X0D
IDC3308I ** DUPLICATE RECORD - KEY FOLLOWS:
000000 C3F0F0F1 F0F7F9F1 F040
IDC31467I MAXIMUM ERROR LIMIT REACHED.
IDC0005I NUMBER OF RECORDS PROCESSED WAS 0
IDC3003I FUNCTION TERMINATED. CONDITION CODE IS 12
IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 12 | _________________ Venkataramana
-- Good judgement comes from experience, and often experience comes from bad judgement. |
|
Back to top |
|
|
Manas Biswal Intermediate
Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
|
Posted: Tue Mar 25, 2003 11:25 pm Post subject: |
|
|
Venkata Ramana Reddy,
Quote: |
REPRO INFILE(XXX) OUTFILE(YYY) NOREPLACE
|
Instead of the above use the following -
REPRO INFILE(XXX) OUTFILE(YYY) NOREPLACE ERRORLIMIT(100000)
Noe, the IDCAMS will abort only when it encounters 100000 duplicate records. Basically you can set the maximum number of permissible duplicates using ERRORLIMIT. The default is 4 and hence IDCAMS aborts when 4 duplicates are encountered.
Regards,
Manas |
|
Back to top |
|
|
Venkata Ramana Reddy Beginner
Joined: 02 Dec 2002 Posts: 70 Topics: 19 Location: California
|
Posted: Fri Mar 28, 2003 1:12 pm Post subject: |
|
|
Manas,
Sorry for the late reply.I was busy with work.Thanks for your info ...it worked _________________ Venkataramana
-- Good judgement comes from experience, and often experience comes from bad judgement. |
|
Back to top |
|
|
Anand_R Intermediate
Joined: 24 Dec 2002 Posts: 189 Topics: 60
|
Posted: Wed Mar 03, 2004 3:22 pm Post subject: |
|
|
Hi,
Can it be possible to copy from vsam to vsam by replacing the target vsam file contents(if any) in one step.
Thanks
Anand |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Wed Mar 03, 2004 4:08 pm Post subject: |
|
|
Anand_r,
You can code a delete , define and a repro as a single input to IDCAMS.Note that you need to have the vsam file defined with REUSE.
Here is a sample job which will copy the contents of input vsam file into target.vsam file
Code: |
//STEP0100 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE (TARGET.VSAM)
DEFINE CLUSTER -
(NAME(TARGET.VSAM) -
VOLUMES(DMASW1) -
BUFFERSPACE(12288) -
INDEXED -
REUSE -
KEYS(9 0) -
OWNER(TARGET) -
RECORDSIZE(731 731) -
SHAREOPTIONS(3 3) -
SPEED -
) -
DATA(NAME(TARGET.VSAM.DATA) -
TRACKS(3 1) -
CONTROLINTERVALSIZE(4096)) -
INDEX(NAME(TARGET.VSAM.INDEX) -
CONTROLINTERVALSIZE(4096))
REPRO IDS('INPUT VSAM FILE') -
ODS('TARGET.VSAM')
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Anand_R Intermediate
Joined: 24 Dec 2002 Posts: 189 Topics: 60
|
Posted: Wed Mar 03, 2004 4:57 pm Post subject: |
|
|
Kolusu,
My target VSAM is already exist. So is there any way that I can use only copy step , rather than deleting and cataloging everytime the target vsam file.
Thanks
Anand |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Wed Mar 03, 2004 5:32 pm Post subject: |
|
|
Anand_R,
I can't think of any utility which can do just copy and replace the contents.
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
|
|