VSAM Repro-Add non Duplcate Records
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Data Management

#1: VSAM Repro-Add non Duplcate Records Author: Venkata Ramana ReddyLocation: California PostPosted: Tue Mar 25, 2003 8:07 pm
    —
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
Question

#2:  Author: Manas BiswalLocation: Chennai, India PostPosted: Tue Mar 25, 2003 11:25 pm
    —
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

#3:  Author: Venkata Ramana ReddyLocation: California PostPosted: Fri Mar 28, 2003 1:12 pm
    —
Manas,
Sorry for the late reply.I was busy with work.Thanks for your info ...it worked

#4:  Author: Anand_R PostPosted: Wed Mar 03, 2004 3:22 pm
    —
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

#5:  Author: kolusuLocation: San Jose PostPosted: Wed Mar 03, 2004 4:08 pm
    —
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

#6:  Author: Anand_R PostPosted: Wed Mar 03, 2004 4:57 pm
    —
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

#7:  Author: kolusuLocation: San Jose PostPosted: Wed Mar 03, 2004 5:32 pm
    —
Anand_R,


I can't think of any utility which can do just copy and replace the contents.

kolusu

#8:  Author: kolusuLocation: San Jose PostPosted: Thu Mar 25, 2004 9:55 am
    —
Anand_r,

I stand corrected. Check this topic which will give you the desired results without having to delete and recreate the cluster.

http://www.mvsforums.com/helpboards/viewtopic.php?t=2014

Hope this helps...

Cheers

Kolusu



MVSFORUMS.com -> Data Management


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group