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 

VSAM Repro-Add non Duplcate Records

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


Joined: 02 Dec 2002
Posts: 70
Topics: 19
Location: California

PostPosted: Tue Mar 25, 2003 8:07 pm    Post subject: VSAM Repro-Add non Duplcate Records Reply with quote

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
_________________
Venkataramana
-- Good judgement comes from experience, and often experience comes from bad judgement.
Back to top
View user's profile Send private message
Manas Biswal
Intermediate


Joined: 29 Nov 2002
Posts: 382
Topics: 27
Location: Chennai, India

PostPosted: Tue Mar 25, 2003 11:25 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
Venkata Ramana Reddy
Beginner


Joined: 02 Dec 2002
Posts: 70
Topics: 19
Location: California

PostPosted: Fri Mar 28, 2003 1:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
Anand_R
Intermediate


Joined: 24 Dec 2002
Posts: 189
Topics: 60

PostPosted: Wed Mar 03, 2004 3:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Wed Mar 03, 2004 4:08 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Anand_R
Intermediate


Joined: 24 Dec 2002
Posts: 189
Topics: 60

PostPosted: Wed Mar 03, 2004 4:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Wed Mar 03, 2004 5:32 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu Mar 25, 2004 9:55 am    Post subject: Reply with quote

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
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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