Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Repro with Replace option

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Repro with Replace option
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    Post subject: Reply to: Repro with Replace option
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    Post subject:
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: 2435
Location: Netherlands, Amstelveen

PostPosted: Wed Dec 02, 2009 1:02 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Dec 02, 2009 2:08 pm    Post subject:
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: 2435
Location: Netherlands, Amstelveen

PostPosted: Wed Dec 02, 2009 2:11 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Dec 02, 2009 5:25 pm    Post subject:
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: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Wed Dec 02, 2009 6:05 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us