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

Read a partition while Load replace.


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

New User


Joined: 05 Apr 2007
Posts: 2
Location: Chennai

PostPosted: Fri Apr 17, 2009 1:19 pm
Reply with quote

Hi all,

This is my first post and i would be very happy on any kind of help.

I have been tring to Load Replace into a particular partition. While the
job is executing, i need to Read the database. Ie., While the partition is load replaced, i need to access the same.

I referred to some manuals and found REUSE might work. But it is not working as i get SQLCODE -911.

LOAD DATA RESUME YES LOG NO NOCOPYPEND REUSE
INDDN SYSREC INTO TABLE XXXX.YYYYY PART 13 REPLACE (
BUS_CTR_CD POSITION(001) CHAR(03),
TRK_ID POSITION(176) CHAR(13),
STTL_SEQ_NO POSITION(189) INTEGER,
SPLIT_PAY_NO POSITION(193) SMALLINT,
STTL_SE_ACCT_NO POSITION(195) CHAR(10),
STTL_DT POSITION(205) DATE EXTERNAL(10),
)


Any sort of help would be welcome.

Thanks, Satish
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Apr 17, 2009 1:29 pm
Reply with quote

Quote:
But it is not working as i get SQLCODE -911.

what does the manual say about the -911 SQLCODE ?

I do not see any logic into reading something that is being reloaded
what about data consistency?

apart db2 issues! (-911)

the whole process needs to be reviewed a bit icon_smile.gif
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Fri Apr 17, 2009 4:15 pm
Reply with quote

Sathish,

Are you telling, while load replacing the data, you want to read the data in that table.
REUSE is for entirely for different purpose. That is while LOAD replacing, it will DELETE & REDEFINE datasets. If you don't want that to happen and save that time, you go for REUSE.

With SHRLEVEL CHANGE you read data while loading.
LOG YES data being loaded are logged.

Try something like

Code:
LOAD DATA LOG YES
SHRLEVEL CHANGE
INTO TABLE XXXX.YYYYY PART 13 RESUME YES


Haven't TESTED. TRY it OUT !

Quote:
what about data consistency?

I think DATA CONSISTENCY will be taken care by LOG YES.

Open for your suggestions......


Sushanth
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Apr 17, 2009 4:33 pm
Reply with quote

Quote:
think DATA CONSISTENCY will be taken care by LOG YES.

LOG YES will take care of DATA INTEGRITY

DATA INTEGRITY is a rdbms concern regardless of the application

DATA CONSISTENCY is an application related concern

for example if it were possible to query a table during a load
the query might return a not found simply because the related rows have not been loaded yet .....
but in other application table the related data might be there

DATA INTEGRITY is there, not DATA CONSISTENCY
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Fri Apr 17, 2009 6:39 pm
Reply with quote

Yes you are right ENRICO.
Thank You for enlighting me with the defination of the terms.

I don't think shops will go for this kinda LOADing. They will be going for the regular and the best one, NO ACCESS during LOAD.

Emergency kinda situation, we can opt for this kind of loading.
I till now, never seen a scenario like that.

TESTING=LEARNING
with this kind of stuff.

Sushanth
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 Apr 17, 2009 9:29 pm
Reply with quote

Hello,

Quote:
While the
job is executing, i need to Read the database.
No, you truly do not.

If you execute jobs this way, the very best you can hope for is an abend. If the process somehow "successfully" completes, you have only questionable results. You may be missing some or all of the data for a particular query.
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts How to load to DB2 with column level ... DB2 6
Search our Forums:

Back to Top