Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Loading Multiple DB2 tables in Single job STEP.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Loading Multiple DB2 tables in Single job STEP.
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Thu Nov 06, 2008 4:43 pm    Post subject: Reply to: Loading Multiple DB2 tables in Single job STEP.
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Thu Nov 06, 2008 5:01 pm    Post subject: Reply to: Loading Multiple DB2 tables in Single job STEP.
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    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Thu Nov 06, 2008 5:11 pm    Post subject: Reply to: Loading Multiple DB2 tables in Single job STEP.
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    Post subject:
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    Post subject:
Reply with quote

Please refer to the following link for LOAD command syntax.

http://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    Post subject: Reply to: Loading Multiple DB2 tables in Single job STEP.
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

http://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

Site Director


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

PostPosted: Fri Nov 07, 2008 12:40 am    Post subject:
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    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 Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
No new posts it is possible output a SET value fro... Martylin JCL & VSAM 5 Fri Sep 22, 2017 7:08 am
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us