Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VSAM

Status
Not open for further replies.

SJF49

Programmer
Apr 13, 2002
1
US
AS I'M USING TWO MASTER FILES TO CREATE A NEW MASTER FILE, I HAVE DUPLICATE KEYS. RATHER THAN GETTING AN ERROR 22 (DUPLICATE PRIMARY KEY), I AM GETTING ERROR 21 (RECORD OUT OF SEQUENCE). ANY IDEAS WHAT MIGHT BE HAPPENING?
 
Hi SJF,

When you WRITE w/access is SEQ specified in the SELECT, you get RC=21; if RANDOM or DYNAM is speced, you get RC=22.

You didn't say, but if you're running on a mainframe, have you tried IDCAMS w/the REPLACE option? Save some coding.
HTH, Jack.
 
Idcams the two masters out to two flat files

Sort the two flat files together using this sort option
Sort fields=( your KEYS)
Sum fields=none

Use your out file from the sort as the input for the idcams to reproduce your master


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top