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

Db2 Table Load


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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
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
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: 1787
Location: Bloomington, IL

PostPosted: Tue Sep 06, 2011 10:07 pm
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
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: 1787
Location: Bloomington, IL

PostPosted: Tue Sep 06, 2011 10:41 pm
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
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: 1787
Location: Bloomington, IL

PostPosted: Tue Sep 06, 2011 11:07 pm
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Unload and Load ISPF Table TSO/ISPF 4
No new posts ISPF Table to add a new column TSO/ISPF 1
No new posts Inserting into table while open selec... DB2 1
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top