467,880 Members | 1,090 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,880 developers. It's quick & easy.

copy a db2/zos table with a blob column

I have to add a date column to a db2/zos table with a blob column.

Can I rename the blob table to old,
create a new table with the date column,
then insert/select the data from the old table?

Do I have to select data from the main table and the aux table or is the aux
table done automatically?

What's the best way to handle this?

Thanks.
Nov 12 '05 #1
  • viewed: 6858
Share:
3 Replies
Hello,

ALTER TABLE creator.tablename ADD date-column name DATE [NOT NULL WITH
DEFAULT ['default date']]

Cheers - Walter.
"Carmine" <ca************@iqfinancial.com> schrieb im Newsbeitrag
news:1e*************************@posting.google.co m...
I have to add a date column to a db2/zos table with a blob column.

Can I rename the blob table to old,
create a new table with the date column,
then insert/select the data from the old table?

Do I have to select data from the main table and the aux table or is the aux table done automatically?

What's the best way to handle this?

Thanks.

Nov 12 '05 #2
Thanks for the help.

How about if I want to unload a table with a blob column
and load it into a new table with a blob column?
Do I need to do anything with the rowid or the aux table
or do i just load into the main table?

Thanks.

"Walter Schneider" <wa**************@telekom.at.nospam> wrote in message news:<41**********************@newsreader01.highwa y.telekom.at>...
Hello,

ALTER TABLE creator.tablename ADD date-column name DATE [NOT NULL WITH
DEFAULT ['default date']]

Cheers - Walter.
"Carmine" <ca************@iqfinancial.com> schrieb im Newsbeitrag
news:1e*************************@posting.google.co m...
I have to add a date column to a db2/zos table with a blob column.

Can I rename the blob table to old,
create a new table with the date column,
then insert/select the data from the old table?

Do I have to select data from the main table and the aux table or is the

aux
table done automatically?

What's the best way to handle this?

Thanks.

Nov 12 '05 #3
Hello,

as long as the total length of any row (blob column + other columns) does
not exceed the length of 32760 bytes (this is the maximim supported record
length of z/OS flat files), you may unload a table with blob columns like
any other table with the UNLOAD Utility or the DSNTIAUL sample program and
use the unload dataset and the generated load control to load the data into
other tables with the LOAD Utility.

To unload larger blobs, you must write your own program and invent your own
solution (e.g. sequenced records) for how to store fat blob data in z/OS
flat files.

If you have DB2 Connect in place (usually, a personal edition is shipped
together with DB2 for z/OS), try the export/import functions of that
product! This way, you may unload your table to a Windows/Unix/LinuX machine
where each single lob will be unloaded to a seperate file (if your table
contains millions of rows with lob data, you'll get millions of lob files of
course...)

Cheers - Walter.

"Carmine" <ca************@iqfinancial.com> schrieb im Newsbeitrag
news:1e*************************@posting.google.co m...
Thanks for the help.

How about if I want to unload a table with a blob column
and load it into a new table with a blob column?
Do I need to do anything with the rowid or the aux table
or do i just load into the main table?

Thanks.

"Walter Schneider" <wa**************@telekom.at.nospam> wrote in message

news:<41**********************@newsreader01.highwa y.telekom.at>...
Hello,

ALTER TABLE creator.tablename ADD date-column name DATE [NOT NULL WITH
DEFAULT ['default date']]

Cheers - Walter.
"Carmine" <ca************@iqfinancial.com> schrieb im Newsbeitrag
news:1e*************************@posting.google.co m...
I have to add a date column to a db2/zos table with a blob column.

Can I rename the blob table to old,
create a new table with the date column,
then insert/select the data from the old table?

Do I have to select data from the main table and the aux table or is
the aux
table done automatically?

What's the best way to handle this?

Thanks.

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Stanley Sinclair | last post: by
7 posts views Thread by 2803stan | last post: by
10 posts views Thread by John Smith | last post: by
2 posts views Thread by deepgun74 | last post: by
7 posts views Thread by greywire | last post: by
9 posts views Thread by matt | last post: by
4 posts views Thread by =?ISO-8859-1?Q?Hans_M=FCller?= | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.