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 

Count Mismatch

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
THRIVIKRAM
Beginner


Joined: 03 Oct 2005
Posts: 70
Topics: 34

PostPosted: Sun Feb 11, 2007 3:47 am    Post subject: Count Mismatch Reply with quote

Hi,

I am trying to unload a table using PGM=INZUTILB .For the same table when I do a "select count (*)....." , then I get few more records than the earlier count.

Iam surprised to see this difference for the same table.

Can any one please tell me why there is a difference in the record count when I do a unload and when I execute the SQL (Select count (*) )

Thanks,
Thrivikram.
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Sun Feb 11, 2007 10:08 am    Post subject: Reply with quote

THRIVIKRAM,

couple of things to check

1. Were there any inserts/updates/deletes between the batch job run and spufi?
2. Are you quering the same table in spufi and batch unload?

PGM=INZUTILB seems to be your shop specific utility. Is it actually running DSNTEP2 or DSNTIAUL utility ?

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


Joined: 03 Oct 2005
Posts: 70
Topics: 34

PostPosted: Wed Feb 14, 2007 4:32 am    Post subject: Reply with quote

Kolusu,

1) No there are no inserts/updates/deletes between the batch job run and spufi. I checked that today also by running both consequently.

2)Yes Iam quering the same table.

PGM=INZUTILB is using "FORMAT DSNTIAUL"( I saw this in the Sysin)

Thanks,
Thrivikram.
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Feb 14, 2007 6:50 am    Post subject: Reply with quote

THRIVIKRAM,

How did you check if any user ran a spufi and deleted the records from the table? An online screen can delete/update the rows

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


Joined: 03 Oct 2005
Posts: 70
Topics: 34

PostPosted: Wed Feb 14, 2007 12:08 pm    Post subject: Reply with quote

Kolusu,

Thats correct and has a probability. But in my case, I did two sets of Unloads and Querried the table.
1)Ran querry: 27,834 - records
2)Unload Job: 27,563
Got a doubt and again,
3)Ran Querry: 27,834
4)Unload job: 27,563

This is what I did.

Thanks,
Thrivikram.
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Feb 14, 2007 12:44 pm    Post subject: Reply with quote

Thrivikram,

Is this a partitioned table ?

Also can you run this query and show us the results?

Code:

SELECT *                   
  FROM SYSIBM.SYSTABLES   
 WHERE NAME LIKE 'your table name%'
 ;                         


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


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

PostPosted: Wed Feb 14, 2007 1:48 pm    Post subject: Reply with quote

Thrivikram,
also, what sql are you using in the table unload?

an unload for all rows will unload all rows. something is not right here.

go thru your output of the unload and determine which rows are in the table that are not in the output.

only 30k rows, 15min to write a prog, 2 min to run. analyze the rows in the table that are not in the unload output.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
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