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
 

 

Db2 Table Load

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
srinathds83

New User


Joined: 17 Jul 2007
Posts: 41
Location: pune

PostPosted: Tue Sep 06, 2011 9:36 pm    Post subject: Db2 Table Load
Reply with quote

Hi,

I have Unloaded TABLE_X from Region1 (using QMF command EXPORT DATA TO 'TTEN.UAISD.TABLEX' ). Now I have to Load the Unloaded TABLE_X dataset to Region2.

Region2
TABLE_X has the one extra column at Last which is Declared as INTEGER.

Problem is i am Using File-AID to Load the table using 3.7 option. I have increased the Size of 'TTEN.UAISD.TABLEX' but not able to load the table.

Thanks in advance....

Srinath
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Sep 06, 2011 9:44 pm    Post subject:
Reply with quote

Integer huh?

any special type of column, or just a plain vanilla integer column to store application data?

is it nullable?
Back to top
View user's profile Send private message
srinathds83

New User


Joined: 17 Jul 2007
Posts: 41
Location: pune

PostPosted: Tue Sep 06, 2011 9:49 pm    Post subject: Reply to: Db2 Table Load
Reply with quote

It can't have Null. we have to Load it with Zeros For Integer Column in Region2.

After Loading of the TABLE_X in Region2, we will run the programs which will populate the Application data for Integer Column.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Sep 06, 2011 10:03 pm    Post subject:
Reply with quote

wellllllllllllllll, you could go back to the 'unload', and add an integer column with value zero....................................
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Tue Sep 06, 2011 10:07 pm    Post subject:
Reply with quote

  1. What version of DB2 do you have?
  2. What version of File-AID do you have?
  3. Are you trying to load it with SQL or a batch utility?
  4. What error are you getting?

Show us the DDL (or alternatively SELECTs from SYSIBM.SYSCOLUMNS) and the SQL or control cards.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Sep 06, 2011 10:19 pm    Post subject:
Reply with quote

Akatsukami,

good luck. i imagine this highly-technical process consists of
select * from table in qmf,
export the result.
and he want to import the results into the new table.

but, i could be wrong, would not be the first time.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Tue Sep 06, 2011 10:41 pm    Post subject:
Reply with quote

dbzTHEdinosauer wrote:
Akatsukami,

good luck. i imagine this highly-technical process consists of
select * from table in qmf,
export the result.
and he want to import the results into the new table.

I'd look more closely at loading exported data, but our DBAs broke QMF -- and almost every other DB2 utility -- a few months back when they upgraded DB2 from V9 to V10, and haven't fixed it yet...if they ever intend to.

(Just in case anyone was wondering why I generally have such contempt for DBAs.)
Back to top
View user's profile Send private message
srinathds83

New User


Joined: 17 Jul 2007
Posts: 41
Location: pune

PostPosted: Tue Sep 06, 2011 10:56 pm    Post subject:
Reply with quote

dbzTHEdinosauer wrote:
Akatsukami,

good luck. i imagine this highly-technical process consists of
select * from table in qmf,
export the result.
and he want to import the results into the new table.

but, i could be wrong, would not be the first time.



I am Exporting the Data to DataSet and then Increasing the Size of DataSet for the New Integer Column.
Through File Aid 3.7 Option with Sql Option i am trying to Load it but its getting Failed.

Could you please help me out how to handle the New integer Column so that it can become Compatible with Region2 Table Structure?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Tue Sep 06, 2011 11:07 pm    Post subject:
Reply with quote

srinathds83 wrote:
I am Exporting the Data to DataSet and then Increasing the Size of DataSet for the New Integer Column.
Through File Aid 3.7 Option with Sql Option i am trying to Load it but its getting Failed.

Could you please help me out how to handle the New integer Column so that it can become Compatible with Region2 Table Structure?

No, because you refuse to tell us the DDL and the SQLCODE.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Sep 07, 2011 2:31 am    Post subject:
Reply with quote

dbzTHEdinosauer wrote:
wellllllllllllllll, you could go back to the 'unload', and add an integer column with value zero....................................


i would not mess with the mess you have already exported.

i would rerun the 'UNLOAD'
which
since you did it in qmf
can be changed to add a as a last column in the select list
,int(0)

your result would then be a exportable file which already has a zero value integer as the last column. Which can then be imported to populate the new table.

if the new integer column in the new table is not the last column,
then put the scalar function in the proper place in the select list.
Back to top
View user's profile Send private message
srinathds83

New User


Joined: 17 Jul 2007
Posts: 41
Location: pune

PostPosted: Wed Sep 07, 2011 10:46 am    Post subject:
Reply with quote

dbzTHEdinosauer wrote:
dbzTHEdinosauer wrote:
wellllllllllllllll, you could go back to the 'unload', and add an integer column with value zero....................................


i would not mess with the mess you have already exported.

i would rerun the 'UNLOAD'
which
since you did it in qmf
can be changed to add a as a last column in the select list
,int(0)

your result would then be a exportable file which already has a zero value integer as the last column. Which can then be imported to populate the new table.

if the new integer column in the new table is not the last column,
then put the scalar function in the proper place in the select list.


Thanks !!!! by putting Int(0) in Query its working....
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Sep 07, 2011 12:21 pm    Post subject:
Reply with quote

you are welcome.

thx for you thanks.
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 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. ERROR WHILE SUBMITTING LOAD JOB ANURADHA NEELAKANTAN JCL & VSAM 12 Thu Aug 25, 2016 11:50 am
No new posts Command UNIQUE CONSTRAINT on any tabl... rohanthengal DB2 2 Thu Aug 18, 2016 3:48 pm
No new posts Updating online Db2 table kishpra DB2 3 Fri Aug 12, 2016 2:44 pm


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