View previous topic :: View next topic
|
Author |
Message |
chockalingam_rsp
New User
Joined: 13 Aug 2009 Posts: 43 Location: chennai
|
|
|
|
I have a flat file that contain 50 records (sorted) . I want to load this file into a KSDS file using the repro with replace command . This KSDS file had 100,000 records. I want to replace only these 50 records without deleting the remaing records. How do i do that ...?
please find my jcl for the same
Code: |
//STEP01 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=SHR,DSN=TRK358.TN.KOC.FST9POL
//SYSUT2 DD DISP=MOD,DSN=TRK358.CT.ACCT.ARMASTER.CL
//SYSIN DD *
REPRO INFILE(SYSUT1) OUTFILE(SYSUT2) REPLACE
/*
// |
when I submit this job , i am getting error as
Code: |
REPRO INFILE(SYSUT1) OUTFILE(SYSUT2) REPLACE
IDC3302I ACTION ERROR ON TRK358.CT.ACCT.ARMASTER.CL
IDC3314I **RECORD OUT OF SEQUENCE - KEY FOLLOWS:
000000 F3F1F1F6 C1F0F1F0 F7F10000 0C |
can any one help me in this. |
|
Back to top |
|
|
Mathiv Anan
Active User
Joined: 23 Jul 2008 Posts: 106 Location: USA
|
|
|
|
Please check following things:
1. If your input file is sorted?
2. If sorted, on what basis? sorted based on your VSAM keys?
3. If the input key has unique records in it?
4. What is the key length and poistion for VSAM? |
|
Back to top |
|
|
chockalingam_rsp
New User
Joined: 13 Aug 2009 Posts: 43 Location: chennai
|
|
|
|
Yes i have checked every thing, for both the files the key length is 13. and it starts from postion 6.
sort condn used
SORT FIELDS=(6,13,CH,A) for the input file . |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
so the cluster is defined with KEYS(13 6) ?
Which means that de key data in your input file starts at posisition 7.
Your sort should also remove duplicates. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Mmmmmmmmmmmmm, quite a common error is for people to use offsets as positions rather than offsets and vice versa.
So if the VSAM key is defined as (13 6) then the actual position is 7, NOT 6
Oooooooooops, Peter beat me to that one |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Its forgiven |
|
Back to top |
|
|
chockalingam_rsp
New User
Joined: 13 Aug 2009 Posts: 43 Location: chennai
|
|
|
|
Thanks a lot .
Can you give me a sampe jcl for which i need to add records and replace exsisting records for this repro . what option do we give in disp parameter for the vsam file...? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Why not try to do something for yourself before asking. Try different DISP parameters.
We helped you with the sort issue, so come on, give it a go yourself and then ask. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
I want to replace only these 50 records without deleting the remaing records. |
Why would you think REPRO would delete records? Unless you use a program with DELETE commands, or run IDCAMS to delete and define the file, once a record is loaded into a VSAM file it stays there. You can replace it with REPRO REPLACE but you cannot delete it that way. |
|
Back to top |
|
|
|