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

Loading Multiple DB2 tables in Single job STEP.


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

New User


Joined: 29 Mar 2006
Posts: 34

PostPosted: Thu Nov 06, 2008 4:37 pm
Reply with quote

Hi All,

How to load data(REPLACE) in more than one table(non partitioned table) in single job step.

I Used the load card as given below and got the error
KEYWORD 'REPLACE' REQUIRES KEYWORD 'PART'

Code:
----+----1----+----2----+----3----+----4----+----5----+----6----
                                                               
   LOAD DATA  LOG         NO                                   
              ENFORCE     CONSTRAINTS                           
              SHRLEVEL    NONE                                 
              WORKDDN    (SYSUT1,SORTOUT)                       
              NOCOPYPEND                                       
              STATISTICS TABLE (ALL) INDEX (ALL KEYCARD)       
                   REPORT YES UPDATE ALL HISTORY ALL           
                                                               
   INTO TABLE owner.table1   REPLACE INDDN SYSRE001   
              DISCARDDN DISCARD                                 
(                                                               
col1                                                       
     POSITION (     1  )         INTEGER                       
 ,                                                             
col2                                                 
     POSITION (     5  )         CHAR (     3 )     )     

INTO TABLE owner.table2   REPLACE INDDN SYSRE002   
              DISCARDDN DISCARD                                 
(                                                               
col1                                                       
     POSITION (     1 )       CHAR(10)                     
 ,                                                             
col2                                                 
     POSITION (     11  )         CHAR (    13 )     )



Edited: Please use BBcode when You post some code, that's rather readable...Anuj
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Nov 06, 2008 4:43 pm
Reply with quote

Quote:
KEYWORD 'REPLACE' REQUIRES KEYWORD 'PART'

why do You feel that the messages is related to the multiple load ??
it looks like a simple keyword congruence mismatch
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Thu Nov 06, 2008 4:52 pm
Reply with quote

Also, you need to specify LOAD statement for each table seperately.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Nov 06, 2008 5:01 pm
Reply with quote

also I dare to ask...
what savings are You expecting to achieve...
just troubles,
if one load fails instead of..
fixing the problem and resubmit the job
You will have to ...
fix the problem and modify the job to change the commands

also, remember, Your approach will not pass a decent production quality assurance
Back to top
View user's profile Send private message
sudhee_rb

New User


Joined: 29 Mar 2006
Posts: 34

PostPosted: Thu Nov 06, 2008 5:06 pm
Reply with quote

Yes, i have tried with load statement for each table but still getting the same error.
Back to top
View user's profile Send private message
sudhee_rb

New User


Joined: 29 Mar 2006
Posts: 34

PostPosted: Thu Nov 06, 2008 5:10 pm
Reply with quote

Hi Enrico,
The tables which we are trying to load involves lot of RI's among them. so loading table one at a time may give problem due to cyclic RI's.
That's why I am going for this special way of loading..

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Nov 06, 2008 5:11 pm
Reply with quote

Quote:
yes, i have tried with load statement for each table but still getting the same error.


before or after posting,?
in any case it looks like You did not care to read the manual for the message explanation
Back to top
View user's profile Send private message
sudhee_rb

New User


Joined: 29 Mar 2006
Posts: 34

PostPosted: Thu Nov 06, 2008 5:15 pm
Reply with quote

This message was for Srihari G.

"yes, i have tried with load statement for each table but still getting the same error."

enrico..Sorry for the confusion
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Thu Nov 06, 2008 5:39 pm
Reply with quote

Please refer to the following link for LOAD command syntax.

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/DSNUGK10/2.14.1.1?SHELF=&DT=20070125001207&CASE=
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Thu Nov 06, 2008 6:07 pm
Reply with quote

Each Table Should be loaded seperately. I guess there are syntax errors in your load card

How about trying this link and modifying the load card accordingly

publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.ugref/db2z_loadsyntax.htm
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 Nov 07, 2008 12:40 am
Reply with quote

Hello,

If you have RI defined, then you need to load the tables in the proper order. Using one step or multiple steps will not correct loading the tables improperly.
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Grouping by multiple headers DFSORT/ICETOOL 7
Search our Forums:

Back to Top