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 

Doubt in load
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
kingo
Intermediate


Joined: 01 Sep 2006
Posts: 167
Topics: 40
Location: chennai

PostPosted: Thu Feb 15, 2007 7:49 am    Post subject: Doubt in load Reply with quote

Hi,

I created table EMPLOYEE with some two columns.

emp id SMALLINT
salary INTEGER
kept emp id as primary key
and created a unique index for that.

using insert statement I inserted some 6 rows to the table.
Then I unloaded the table to one flat file.Using the output of that unload I tried to load again to the same table.The job went fine with maxcc=4 but the
records which i was trying to load where skipped.Why it is so?Why it did not abend?

Regds,
Kingo
_________________
IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE.
Back to top
View user's profile Send private message Yahoo Messenger
kingo
Intermediate


Joined: 01 Sep 2006
Posts: 167
Topics: 40
Location: chennai

PostPosted: Thu Feb 15, 2007 8:00 am    Post subject: Reply with quote

And It is in copy pending status.

Regds,
Kingo
_________________
IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE.
Back to top
View user's profile Send private message Yahoo Messenger
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu Feb 15, 2007 8:00 am    Post subject: Reply with quote

was your table empty when you ran the load? could be that you have an option (in the load) which says: ignore dups
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
kingo
Intermediate


Joined: 01 Sep 2006
Posts: 167
Topics: 40
Location: chennai

PostPosted: Thu Feb 15, 2007 8:07 am    Post subject: Reply with quote

Nope the table was not empty.

Regds,
Kingo
_________________
IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE.
Back to top
View user's profile Send private message Yahoo Messenger
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu Feb 15, 2007 8:35 am    Post subject: Reply with quote

kingo wrote:
And It is in copy pending status.


before or after the load? you are not answering any questions; the answers would help others, help you.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
kingo
Intermediate


Joined: 01 Sep 2006
Posts: 167
Topics: 40
Location: chennai

PostPosted: Thu Feb 15, 2007 8:43 am    Post subject: Reply with quote

The table was in copy pending state after LOAD.

Regds,
Kingo
_________________
IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE.
Back to top
View user's profile Send private message Yahoo Messenger
kingo
Intermediate


Joined: 01 Sep 2006
Posts: 167
Topics: 40
Location: chennai

PostPosted: Thu Feb 15, 2007 8:46 am    Post subject: Reply with quote

I first inserted some 6 rows and then i unloaded the data into one flat file and then used the same flat file as input to load to the same table.


Regds,
Kingo
_________________
IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE.
Back to top
View user's profile Send private message Yahoo Messenger
bauer
Intermediate


Joined: 10 Oct 2003
Posts: 315
Topics: 49
Location: Germany

PostPosted: Thu Feb 15, 2007 9:06 am    Post subject: Reply with quote

kingo,

"copy pending": do an image copy or issue -START DATABASE command with ACCESS = FORCE


regards,
bauer
Back to top
View user's profile Send private message
kingo
Intermediate


Joined: 01 Sep 2006
Posts: 167
Topics: 40
Location: chennai

PostPosted: Thu Feb 15, 2007 9:13 am    Post subject: Reply with quote

I know that copy pending status can be reset by taking an image copy.My question is when i have created unique index over a column and try to load the same data which is already present in the table it should supposed to result in some DB2 error for the violation of unique index.But my job did not.It didnot give error but instead it skipped the records which are same and gave maxcc=4 and kept the table in copy-pending status.Why did that happen?

Regds,
Kingo
_________________
IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE.
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Feb 15, 2007 9:22 am    Post subject: Reply with quote

kingo,

Quote:

But my job did not.It didnot give error but instead it skipped the records which are same and gave maxcc=4 and kept the table in copy-pending status.Why did that happen?


Look at the SYSDISC dataset from your job. All duplicate keys are routed to that dataset. Also the error messages are also listed in the output in SYSPRINT/UTPRINT dd statements. A load job automatically puts the table in copy pending status.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kingo
Intermediate


Joined: 01 Sep 2006
Posts: 167
Topics: 40
Location: chennai

PostPosted: Thu Feb 15, 2007 9:32 am    Post subject: Reply with quote

Kolusu,

My question is why it didnt fail?

Regds,
Kingo
_________________
IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE.
Back to top
View user's profile Send private message Yahoo Messenger
kingo
Intermediate


Joined: 01 Sep 2006
Posts: 167
Topics: 40
Location: chennai

PostPosted: Thu Feb 15, 2007 10:07 am    Post subject: Reply with quote

Load is nothing but bulk insert right.So when we try to insert a duplicate row into a table it will throw some unique index violation error.Why is it not happening in my case here?

Regds,
Kingo
_________________
IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE.
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Feb 15, 2007 10:08 am    Post subject: Reply with quote

kingo,

The Load job does NOT abend if the dups are detected while load.why do you think it should fail ? You are using Load RESUME to append the data to an existing data in the table. so why do you want the job to fail? If you used Load REPLACE then it would have deleted your existing rows and loaded data from your file into the table.

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 Feb 15, 2007 10:10 am    Post subject: Reply with quote

kingo,

You are just wasting time. You don't show us the load cards used and how do you expect us to help you ?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kingo
Intermediate


Joined: 01 Sep 2006
Posts: 167
Topics: 40
Location: chennai

PostPosted: Thu Feb 15, 2007 10:11 am    Post subject: Reply with quote

LOAD resume will append but wont it check when there is same duplicate row.Here I am using LOAD RESUME only replace wont give any problem.

Regds,
Kingo
_________________
IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE.
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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