IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Repro with Replace option


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Wed Dec 02, 2009 12:23 pm
Reply with quote

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

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Wed Dec 02, 2009 12:32 pm
Reply with quote

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

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Wed Dec 02, 2009 12:47 pm
Reply with quote

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

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed Dec 02, 2009 1:02 pm
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Dec 02, 2009 2:08 pm
Reply with quote

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

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed Dec 02, 2009 2:11 pm
Reply with quote

Its forgiven icon_eek.gif
Back to top
View user's profile Send private message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Wed Dec 02, 2009 5:19 pm
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Dec 02, 2009 5:25 pm
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Dec 02, 2009 6:05 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts SCOPE PENDING option -check data DB2 2
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
No new posts CICS vs LE: STORAGE option CICS 0
Search our Forums:

Back to Top