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 

Comparision mismatches - Help

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


Joined: 06 Dec 2002
Posts: 117
Topics: 44
Location: Chennai,India

PostPosted: Wed Apr 06, 2005 9:40 am    Post subject: Comparision mismatches - Help Reply with quote

Hi Gurus,

I have a table which has only a unique index defined on it. (NO Primary key and foreign keys) The unique index consists of 3 columns.
Given below the result of query

select * from sysibm.SYSKEYS where IXNAME = 'EFPROCX1'
order by COLSEQ
Code:

COLNAME              COLNO  COLSEQ  ORDERING
--------+---------+---------+---------+-----
PROC_SWT_ID              1       1  A       
PROC_ID                  2       2  A       
PROC_DATA_STATUS       125       3  A       

I have a program which will insert rows in this table thru a "View" defined on it. View has all columns from the table. A few new fields are added to this table. Hence View also redefined to have the new fields. So i had to modify the program to introduce new fields in the INSERT query.

I followed the below mentioned method to test the changes.

1. Production Run (Unmodified program)
2. Copy the newly inserted rows in the table to a temporary dataset
3. Delete the newly inserted rows from the table
4. Beta Run (Modified Program)
5. Copy the newly inserted rows in the table to another temporary dataset.
6. Compare the datasets created in steps 2 and 5 to verify
that my code changes are not affecting existing functionality.

Note that i am using the SAME VIEW for both Production and Beta run. The View has already new fields included.

The problem is that in step-6 i am getting mismatch. That is, some rows are out of sequence. In other words the records when compared are not in the same order,when I do a sort before compare(based on some column) it is perfectly matching.

What could be the reason for the records to be in out of sequence when compared ?.

Thanks,
Ravikumar.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Apr 06, 2005 10:07 am    Post subject: Reply with quote

ravikumar,

How are you creating the datasets in step 2 and 5 ? are you unloading the data from 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
coolman
Intermediate


Joined: 03 Jan 2003
Posts: 283
Topics: 27
Location: US

PostPosted: Wed Apr 06, 2005 2:15 pm    Post subject: Reply with quote

Ravikumar,

The steps in which you are copying records from table to temp. datasets need not be in the same order. Hence, the mismatch.

But I have another question. You said the modified program, you are adding some extra columns-to the VIEW and running the Production program. Is this correct?
Should you just run the PRODUCTION version with your old view and run your beta with the new view and even though the records added in both cases would be the same, a file-aid compare of the 2 files, would highlight the newly added columns for the beta version which would be justifiable
Cheers,
Coolman
________
[URL=http://www.dodge-wiki.com/wiki/Dodge_Charger_(1999_concept)]Dodge Charger (1999 concept)[/URL]


Last edited by coolman on Sat Feb 05, 2011 1:42 am; edited 1 time in total
Back to top
View user's profile Send private message
ravikumar_sri2001
Beginner


Joined: 06 Dec 2002
Posts: 117
Topics: 44
Location: Chennai,India

PostPosted: Thu Apr 07, 2005 3:00 am    Post subject: Reply with quote

I am unloading the rows from VIEW to datasets using utility DSNTIAUL. In production run, i getting spaces in newly introduced fields. In Beta run, i am supplying values to newly introduced fields. So, i can justify my testing.

Thanks,
Ravikumar.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Apr 07, 2005 5:40 am    Post subject: Reply with quote

Ravikumar,

When unloading the rows from a table using DSNTIAUL you are not guranteed the order of the records unless you specify the ORDER BY clause. When you insert rows into the table, it inserts into the available free page . Unless you re-org after a mass insert you are not guranteed to have the inserted records in order.

So add a ORDER BY the index columns in your unload step for both production and test run to avoid the sequence errors.

Hope this helps...

Cheers

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


Joined: 06 Dec 2002
Posts: 117
Topics: 44
Location: Chennai,India

PostPosted: Wed Apr 13, 2005 7:41 am    Post subject: Reply with quote

Thanks a lot for your replies.

Thanks,
Ravikumar.
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