Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Read a partition while Load replace.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Read a partition while Load replace.
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Fri Apr 17, 2009 1:29 pm    Post subject: Reply to: Read a partition while Load replace.
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: 1013
Location: India

PostPosted: Fri Apr 17, 2009 4:15 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Fri Apr 17, 2009 4:33 pm    Post subject: Reply to: Read a partition while Load replace.
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: 1013
Location: India

PostPosted: Fri Apr 17, 2009 6:39 pm    Post subject:
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

Site Director


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

PostPosted: Fri Apr 17, 2009 9:29 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
No new posts CICS VSAM RLS READ akodakka CICS 3 Tue Oct 04, 2016 3:09 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Copybook structure in Load module Vai123 COBOL Programming 7 Fri Sep 16, 2016 8:29 pm
This topic is locked: you cannot edit posts or make replies. Sort card to replace text using cross... Susanta SYNCSORT 32 Tue Sep 13, 2016 4:17 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us