IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

COPY TABLESPACE inquiry


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sprikitik

New User


Joined: 29 Jan 2007
Posts: 61
Location: Makati City, Philippines

PostPosted: Thu Jun 10, 2010 4:20 pm
Reply with quote

I have created a 'clone' of a Job (JOBA). The clone job is JOBB.

The scenario is this:

JOBA will load data (1000 records) to an empty partitioned table TABLEA and then will do a COPY TABLESPACE XXXXXXXX.XXXXXXXX DSNUM 1 FULL YES into DATASETA

After running JOBA, I will delete all records from the same table and will run JOBB. JOBB will also load the same records loaded by JOBA at the same table and then will also do a COPY TABLESPACE XXXXXXXX.XXXXXXXX DSNUM 1 FULL YES into DATASETB

Im expecting that the UNLOADED files (result of the COPY TABLESPACE of JOBA and JOBB) will be exactly the same when compared but upon comparing, there are a lot of differences. Any idea why the output of the unloads are not the same eventhough both jobs are loading the same records in an empty table?

Thanks!
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Jun 10, 2010 4:38 pm
Reply with quote

Hello There,

You have not mention any thing about Unload step in your jobs . You mentioned that u are running load followed by copy tablespace first partition.You have not mention what query you are using for delete and
secondly is it Load resume or replace ? Did you check the table is empty before running teh first job? Is its multi table tablespace? Please provide load card as well copy stmt of both the jobs.Will surely be able to help you once we will get answer for above queries
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Thu Jun 10, 2010 4:45 pm
Reply with quote

It is not a different sort order of the outputdatasets that causes confusion ?
Back to top
View user's profile Send private message
sprikitik

New User


Joined: 29 Jan 2007
Posts: 61
Location: Makati City, Philippines

PostPosted: Thu Jun 10, 2010 4:59 pm
Reply with quote

guptae wrote:
Hello There,

You have not mention any thing about Unload step in your jobs . You mentioned that u are running load followed by copy tablespace first partition.You have not mention what query you are using for delete and
secondly is it Load resume or replace ? Did you check the table is empty before running teh first job? Is its multi table tablespace? Please provide load card as well copy stmt of both the jobs.Will surely be able to help you once we will get answer for above queries


Thanks for the reply.

Sorry for the confusion, i used the term 'unload' for 'COPY TABLESPACE'. The load is LOAD RESUME. Before running JOBA and JOBB, i will delete the records from spufi (DELETE * FROM TABLEA) to make sure that I'm using an empty table.

Additional details below:

STEP1

LOAD STEP SYSIN

//SYSIN DD *
LOAD DATA LOG NO INTO TABLE TABLEA PART 1 KEEPDICTIONARY RESUME YES
(table definition...)
/*


STEP2

COPY TABLESPACE STEP SYSIN

//SYSIN DD *
COPY TABLESPACE XXXXXXXX.XXXXXXXX DSNUM 1 FULL YES
/*
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Jun 10, 2010 5:02 pm
Reply with quote

Hello There,

I am assuming that before running JOBB you are again deleting the records from the table and no other job is running before your load which
updating the table like insert. And one more Question how you are comparing Imagecopy dataset?
Back to top
View user's profile Send private message
sprikitik

New User


Joined: 29 Jan 2007
Posts: 61
Location: Makati City, Philippines

PostPosted: Thu Jun 10, 2010 5:08 pm
Reply with quote

guptae wrote:
Hello There,

I am assuming that before running JOBB you are again deleting the records from the table and no other job is running before your load which
updating the table like insert. And one more Question how you are comparing Imagecopy dataset?


Yes. Before running JOBA, JOBB i will delete all records to make sure that the table is empty, I'm also positive that no other Job/s is using the table.

I'm comparing the imagecopy using SuperCE Utility.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Jun 10, 2010 5:09 pm
Reply with quote

And what difference you are getting?can you paste few unmatched records of superCE result?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jun 10, 2010 5:10 pm
Reply with quote

what exactly are the differences presented by the SuperCE Utility output?

and I would not compare image copy files.
for some reason,
I think they contain more data than just the table's column values -
but somebody else will have to make that call, as I don't feel like trying to find out the image-copy record format.

why not just unload to a ps and compare those, which I know only contain column values?
Back to top
View user's profile Send private message
sprikitik

New User


Joined: 29 Jan 2007
Posts: 61
Location: Makati City, Philippines

PostPosted: Thu Jun 10, 2010 5:21 pm
Reply with quote

The differences looks like garbage, it is unreadable. Basically JOBA will be replaced by JOBB that is why i need to compare the imagecopy to make sure everything is still the same
Back to top
View user's profile Send private message
sprikitik

New User


Joined: 29 Jan 2007
Posts: 61
Location: Makati City, Philippines

PostPosted: Thu Jun 10, 2010 5:25 pm
Reply with quote

dbzTHEdinosauer wrote:
what exactly are the differences presented by the SuperCE Utility output?

and I would not compare image copy files.
for some reason,
I think they contain more data than just the table's column values -
but somebody else will have to make that call, as I don't feel like trying to find out the image-copy record format.

why not just unload to a ps and compare those, which I know only contain column values?


Thanks, It is also my understanding that COPY TABLESPACE will contain extra data and not only column values.

Maybe i will try to unload to PS and see if the unloaded data will match.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jun 10, 2010 5:29 pm
Reply with quote

Quote:
I have created a 'clone' of a Job (JOBA). The clone job is JOBB.


apparently JOBB is not really a clone of JOBA.

there are some differences.

as far as comparing the imagecopy - that is a waste of time.

the results of restoring the imagecopy is what is important,
and that is what you should be comparing.

again,
unload the the results of JOBA and JOBB using something other than imagecopy and compare that.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Thu Jun 10, 2010 5:36 pm
Reply with quote

sprikitik,

Does your table have Identity columns or default timestamp columns, those attributes might also cause the confusion.

Thanks,
Sushanth
Back to top
View user's profile Send private message
sprikitik

New User


Joined: 29 Jan 2007
Posts: 61
Location: Makati City, Philippines

PostPosted: Fri Jun 11, 2010 7:18 am
Reply with quote

Hi All, I followed the suggestion of dbzTHEdinosauer and unloaded the data into ps and all the records matched. Can anyone please provide an explanation why the compare of image does not match?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jun 11, 2010 8:47 am
Reply with quote

Hello,

Possibly because of what Sushanth mentioned. . .

It might also be:
Quote:
OBID
Specifies that the object identifier (OBID) for the table (a two byte
binary data) is placed in the first two bytes of the output records
unloaded from the table.


Suggest you look at the first records in the files that don't match in hex to see exactly what is different.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Fri Jun 11, 2010 9:25 am
Reply with quote

Sprikitik,

Quote:
Can anyone please provide an explanation why the compare of image does not match?

Run DSN1PRNT utility with FORMAT and NODATA option on both the IC's and compare the output, you will know, what doesn't match.

Thank You,
Sushanth
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts force tablespace using LISTDEF input DB2 1
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts DB2 Table - Image copy unload IBM Tools 2
Search our Forums:

Back to Top