473,403 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Unloading LOBs on DB2 v7.1 on OS/390

Hi.

Once a LOB size goes beyond 32KB in size, I'm not able to use the LOAD
utility to unload the data off the tables for DB2 7.1 on OS/390.
Instead, the documentation refers to a sample C++ program --
DSN710.SDSNSAMP(DSN8DLPL) to use for this purpose.

I'm wondering if anyone out there has a COBOL equivalent to this as I do
not have a C++ compiler?

Would I be able to use the same program to load LOBs larger than 32KB?

Lastly, how do you generally manage LOBs that are greater than 32KB in size?

Any response appreciated.

Thanks and best regards.

Rom Marshall
Nov 12 '05 #1
9 4404
We are DB2 6 and 7. We limit CLOBs to 31K because of this. Third party
software says it will support it (BMC has a V2 product as part of it's
DB2 Admin Solution Set - I forget the name but they just did a webex on it
- supports up to 32 MB). I think the real issue in the program is the
OS file record size limits. Hard to get over 32K, so you have to take it
apart and put it together.
RM> Hi.

RM> Once a LOB size goes beyond 32KB in size, I'm not able to use the LOAD
RM> utility to unload the data off the tables for DB2 7.1 on OS/390.
RM> Instead, the documentation refers to a sample C++ program --
RM> DSN710.SDSNSAMP(DSN8DLPL) to use for this purpose.

RM> I'm wondering if anyone out there has a COBOL equivalent to this as I do
RM> not have a C++ compiler?

RM> Would I be able to use the same program to load LOBs larger than 32KB?

RM> Lastly, how do you generally manage LOBs that are greater than 32KB in size?

RM> Any response appreciated.

RM> Thanks and best regards.

RM> Rom Marshall

Edward Lipson via Relaynet.org Moondog
ed***********@moondog.com el*****@bankofny.com
---
þ MM 1.1 #0361 þ MONEY TALKS ... all mine ever says is GOODBYE!
Nov 12 '05 #2
If your text is limited to 32K, you'd be better off using VARCHAR on a
32K page.

EDWARD LIPSON wrote:
We are DB2 6 and 7. We limit CLOBs to 31K because of this. Third party
software says it will support it (BMC has a V2 product as part of it's
DB2 Admin Solution Set - I forget the name but they just did a webex on it
- supports up to 32 MB). I think the real issue in the program is the
OS file record size limits. Hard to get over 32K, so you have to take it
apart and put it together.
RM> Hi.

RM> Once a LOB size goes beyond 32KB in size, I'm not able to use the LOAD
RM> utility to unload the data off the tables for DB2 7.1 on OS/390.
RM> Instead, the documentation refers to a sample C++ program --
RM> DSN710.SDSNSAMP(DSN8DLPL) to use for this purpose.

RM> I'm wondering if anyone out there has a COBOL equivalent to this as I do
RM> not have a C++ compiler?

RM> Would I be able to use the same program to load LOBs larger than 32KB?

RM> Lastly, how do you generally manage LOBs that are greater than 32KB in size?

RM> Any response appreciated.

RM> Thanks and best regards.

RM> Rom Marshall

Edward Lipson via Relaynet.org Moondog
ed***********@moondog.com el*****@bankofny.com
---
þ MM 1.1 #0361 þ MONEY TALKS ... all mine ever says is GOODBYE!


Nov 12 '05 #3
> I think the real issue in the program is the
OS file record size limits. Hard to get over 32K, so you have to take it
apart and put it together.


I've done RECFM=U cobol file processing in the past so 32k is not
allways the limit for logical records.

I think that the 32k limit is because the cobol BL and BLL cells can
(could?) only point/reference
adresses in the 32k following the base address. /offset

Logically, LOBS are 1 record.

PM
Nov 12 '05 #4
Unfortunately, the application I am using -- WBIFN -- has defined the
BLOBs to be 100MB in size. But they have not provided any mechanism for
backing up/restoring the data. Instead, the manual says to refer to the
DB2 manuals for the appropriate mechanism. Hah!

I'm finding it more than a little puzzling that DB2 provides the
facility to create such large LOBs but do not provide a utility to back
it up. But then, the world's full of puzzles ...

One suggestion I got was to use the DSN1COPY facility. But this raises
the possibility that I may not be able to restore the data when I move
my DB2 to a different version eventually.

Hence the search for an unloading/loading mechanism.

Rom Marshall

Blair Adamache wrote:
If your text is limited to 32K, you'd be better off using VARCHAR on a
32K page.

EDWARD LIPSON wrote:
We are DB2 6 and 7. We limit CLOBs to 31K because of this. Third party
software says it will support it (BMC has a V2 product as part of it's
DB2 Admin Solution Set - I forget the name but they just did a webex
on it - supports up to 32 MB). I think the real issue in the program
is the OS file record size limits. Hard to get over 32K, so you have
to take it apart and put it together.
RM> Hi.

RM> Once a LOB size goes beyond 32KB in size, I'm not able to use the LOAD
RM> utility to unload the data off the tables for DB2 7.1 on OS/390.
RM> Instead, the documentation refers to a sample C++ program --
RM> DSN710.SDSNSAMP(DSN8DLPL) to use for this purpose.

RM> I'm wondering if anyone out there has a COBOL equivalent to this as I do
RM> not have a C++ compiler?

RM> Would I be able to use the same program to load LOBs larger than 32KB?

RM> Lastly, how do you generally manage LOBs that are greater than 32KB in size?

RM> Any response appreciated.

RM> Thanks and best regards.

RM> Rom Marshall

Edward Lipson via Relaynet.org Moondog
ed***********@moondog.com el*****@bankofny.com
---
þ MM 1.1 #0361 þ MONEY TALKS ... all mine ever says is GOODBYE!


Nov 12 '05 #5
Can you cast them to varchar(31K) when unloading:

db2 select varchar(col1,31000) from testclob

Rom Marshall wrote:
Unfortunately, the application I am using -- WBIFN -- has defined the
BLOBs to be 100MB in size. But they have not provided any mechanism for
backing up/restoring the data. Instead, the manual says to refer to the
DB2 manuals for the appropriate mechanism. Hah!

I'm finding it more than a little puzzling that DB2 provides the
facility to create such large LOBs but do not provide a utility to back
it up. But then, the world's full of puzzles ...

One suggestion I got was to use the DSN1COPY facility. But this raises
the possibility that I may not be able to restore the data when I move
my DB2 to a different version eventually.

Hence the search for an unloading/loading mechanism.

Rom Marshall

Blair Adamache wrote:
If your text is limited to 32K, you'd be better off using VARCHAR on a
32K page.

EDWARD LIPSON wrote:
We are DB2 6 and 7. We limit CLOBs to 31K because of this. Third
party software says it will support it (BMC has a V2 product as part
of it's DB2 Admin Solution Set - I forget the name but they just did
a webex on it - supports up to 32 MB). I think the real issue in the
program is the OS file record size limits. Hard to get over 32K, so
you have to take it apart and put it together.
RM> Hi.

RM> Once a LOB size goes beyond 32KB in size, I'm not able to use the
LOAD
RM> utility to unload the data off the tables for DB2 7.1 on OS/390.
RM> Instead, the documentation refers to a sample C++ program --
RM> DSN710.SDSNSAMP(DSN8DLPL) to use for this purpose.

RM> I'm wondering if anyone out there has a COBOL equivalent to this
as I do
RM> not have a C++ compiler?

RM> Would I be able to use the same program to load LOBs larger than
32KB?

RM> Lastly, how do you generally manage LOBs that are greater than
32KB in size?

RM> Any response appreciated.

RM> Thanks and best regards.

RM> Rom Marshall

Edward Lipson via Relaynet.org Moondog
ed***********@moondog.com el*****@bankofny.com
---
þ MM 1.1 #0361 þ MONEY TALKS ... all mine ever says is GOODBYE!



Nov 12 '05 #6
Most of the BLOBs are <32K but there are those that are larger in size.
I would end up unloading truncated data by doing that.

Blair Adamache wrote:
Can you cast them to varchar(31K) when unloading:

db2 select varchar(col1,31000) from testclob

Rom Marshall wrote:
Unfortunately, the application I am using -- WBIFN -- has defined the
BLOBs to be 100MB in size. But they have not provided any mechanism
for backing up/restoring the data. Instead, the manual says to refer
to the DB2 manuals for the appropriate mechanism. Hah!

I'm finding it more than a little puzzling that DB2 provides the
facility to create such large LOBs but do not provide a utility to
back it up. But then, the world's full of puzzles ...

One suggestion I got was to use the DSN1COPY facility. But this
raises the possibility that I may not be able to restore the data when
I move my DB2 to a different version eventually.

Hence the search for an unloading/loading mechanism.

Rom Marshall

Blair Adamache wrote:
If your text is limited to 32K, you'd be better off using VARCHAR on
a 32K page.

EDWARD LIPSON wrote:

We are DB2 6 and 7. We limit CLOBs to 31K because of this. Third
party software says it will support it (BMC has a V2 product as part
of it's DB2 Admin Solution Set - I forget the name but they just did
a webex on it - supports up to 32 MB). I think the real issue in the
program is the OS file record size limits. Hard to get over 32K, so
you have to take it apart and put it together.
RM> Hi.

RM> Once a LOB size goes beyond 32KB in size, I'm not able to use
the LOAD
RM> utility to unload the data off the tables for DB2 7.1 on OS/390.
RM> Instead, the documentation refers to a sample C++ program --
RM> DSN710.SDSNSAMP(DSN8DLPL) to use for this purpose.

RM> I'm wondering if anyone out there has a COBOL equivalent to this
as I do
RM> not have a C++ compiler?

RM> Would I be able to use the same program to load LOBs larger than
32KB?

RM> Lastly, how do you generally manage LOBs that are greater than
32KB in size?

RM> Any response appreciated.

RM> Thanks and best regards.

RM> Rom Marshall

Edward Lipson via Relaynet.org Moondog
ed***********@moondog.com el*****@bankofny.com
---
þ MM 1.1 #0361 þ MONEY TALKS ... all mine ever says is GOODBYE!

Nov 12 '05 #7
> I'm finding it more than a little puzzling that DB2 provides the
facility to create such large LOBs but do not provide a utility to back
it up. But then, the world's full of puzzles ...

Rom
you can use DB2 COPY utility to back up your LOB table spaces,
and RECOVER to recover them.
Note that you must COPY the table space set in
SHRLEVEL REFERENCE when the LOB table space is defined without
logging, and that you must recover the entire table space set
in case you do a point-in-time recovery.

Instead of unloading, you may consider to copy the LOB data
to a clone of the table using SQL INSERT INTO ... SELECT FROM.
This works also for large LOBs. This way you can at least put
your LOB data somewhere safe if you have to drop the
table spaces for some reason. When you use LOBs in DB2, you will
most probably run into data corruption problems, the DB2 software
still is very wobbly in this area. The SQL method will allow to
at least pick out those rows that are still readable and put them
into a new table space.

regards,
Heinz Buehler
Nov 12 '05 #8
Heinz, hi.

You've given me some ideas for short term data protection -- thanks for
that thought.

I looked back and realised that I didn't explain why I seemed bent on
using LOAD. The biggest reason is that we may need to recover the data
up to 7 years from now -- the local (Singaporean) monetary authority
requires us to keep customer information for a period that long.

If, for some reason, we have to restore 6 year old data, we would
probably face a problem if there are data file incompatibilities between
the version of DB2 at the time we took the COPY and the version at the
time we attempt to do a RECOVER.

A DSN1COPY is just as problematic for the same reason.

LOAD bypasses this problem by extracting out the data.

On the open platforms (AIX, Windows, etc), one other way around would be
to use EXPORT in IXF format. This does not exist on the OS/390
environment, unfortunately.

I have one idea lurking at the back of my mind, and that's to catalog
the database on the OS/390 to an AIX/Windows box and perform a backup
from there. I don't know if this would work, though, as I have not
tried such a thing yet. Does anyone know? And, if I do this, will I
lose any data -- e.g. authentication or privilege settings?

Rom Marshall

Heinz Buehler wrote:
I'm finding it more than a little puzzling that DB2 provides the
facility to create such large LOBs but do not provide a utility to back
it up. But then, the world's full of puzzles ...


Rom
you can use DB2 COPY utility to back up your LOB table spaces,
and RECOVER to recover them.
Note that you must COPY the table space set in
SHRLEVEL REFERENCE when the LOB table space is defined without
logging, and that you must recover the entire table space set
in case you do a point-in-time recovery.

Instead of unloading, you may consider to copy the LOB data
to a clone of the table using SQL INSERT INTO ... SELECT FROM.
This works also for large LOBs. This way you can at least put
your LOB data somewhere safe if you have to drop the
table spaces for some reason. When you use LOBs in DB2, you will
most probably run into data corruption problems, the DB2 software
still is very wobbly in this area. The SQL method will allow to
at least pick out those rows that are still readable and put them
into a new table space.

regards,
Heinz Buehler

Nov 12 '05 #9
Partial answer - could you get the short ones using the length function:

select varchar(col1,31000) from testclob where length(col1)<32728

Rom Marshall wrote:
Most of the BLOBs are <32K but there are those that are larger in size.
I would end up unloading truncated data by doing that.

Blair Adamache wrote:
Can you cast them to varchar(31K) when unloading:

db2 select varchar(col1,31000) from testclob

Rom Marshall wrote:
Unfortunately, the application I am using -- WBIFN -- has defined the
BLOBs to be 100MB in size. But they have not provided any mechanism
for backing up/restoring the data. Instead, the manual says to refer
to the DB2 manuals for the appropriate mechanism. Hah!

I'm finding it more than a little puzzling that DB2 provides the
facility to create such large LOBs but do not provide a utility to
back it up. But then, the world's full of puzzles ...

One suggestion I got was to use the DSN1COPY facility. But this
raises the possibility that I may not be able to restore the data
when I move my DB2 to a different version eventually.

Hence the search for an unloading/loading mechanism.

Rom Marshall

Blair Adamache wrote:

If your text is limited to 32K, you'd be better off using VARCHAR on
a 32K page.

EDWARD LIPSON wrote:

> We are DB2 6 and 7. We limit CLOBs to 31K because of this. Third
> party software says it will support it (BMC has a V2 product as
> part of it's DB2 Admin Solution Set - I forget the name but they
> just did a webex on it - supports up to 32 MB). I think the real
> issue in the program is the OS file record size limits. Hard to get
> over 32K, so you have to take it apart and put it together.
>
>
> RM> Hi.
>
> RM> Once a LOB size goes beyond 32KB in size, I'm not able to use
> the LOAD
> RM> utility to unload the data off the tables for DB2 7.1 on OS/390.
> RM> Instead, the documentation refers to a sample C++ program --
> RM> DSN710.SDSNSAMP(DSN8DLPL) to use for this purpose.
>
> RM> I'm wondering if anyone out there has a COBOL equivalent to
> this as I do
> RM> not have a C++ compiler?
>
> RM> Would I be able to use the same program to load LOBs larger
> than 32KB?
>
> RM> Lastly, how do you generally manage LOBs that are greater than
> 32KB in size?
>
> RM> Any response appreciated.
>
> RM> Thanks and best regards.
>
> RM> Rom Marshall
>
> Edward Lipson via Relaynet.org Moondog
> ed***********@moondog.com el*****@bankofny.com
> ---
> þ MM 1.1 #0361 þ MONEY TALKS ... all mine ever says is GOODBYE!



Nov 12 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Fredrik Lindstrom | last post by:
Hi folks! When I browse the web about information regarding dequeue and enqueue (b)lobs to an Advanced Queue in PRO/C I do not find a good example. About RAW I can find a lot of info and because...
1
by: LilleSkutt | last post by:
I want to use assemblies (Window Forms as .dll) so that I can replace the form while the main application is running. To accomplish this, I used Assembly.LoadForm to manually load the assembly when I...
1
by: stoat2337 | last post by:
I'm looking to purge rows from a DB2 table that contains both a CLOB (1M) and BLOB (51K), but our DBA is not familiar with LOBs. I work on a mainframe (z/OS), and we don't normally use LOBs in our...
2
by: mjf | last post by:
Hello, I have a table that has a BLOB field, which is defined as follows: create table raw_image( image_id INTEGER NOT NULL, image BLOB(2M)) I intend to use import utility to import...
4
by: Stanley Sinclair | last post by:
Given I have binary input which is to be stored in one table, and it may consist of any size -- ie, VARCHAR(n) FOR BIT DATA, WHERE THE n is less than 32K, or the n is bigger such that it is a BLOB...
2
by: Guru Prasad | last post by:
Is there a delay involved in unloading assemblies once a virtual directory is "deleted" using IIS Manager ? At times even after the virtual directory is removed i cannot delete the backing physical...
0
by: ibenc | last post by:
Is there a way to prevent w3wp.exe from unloading a particular appDomain. Some parameters, config files? Here is some info about why I need this. I have a long running background thread in...
1
by: gezerpunta | last post by:
Hi I need to fetch lobs with php script. I found it but there is an error. $stmt = $db->prepare("select * from test where oid = 17056"); $stmt->execute(); $stmt->bindColumn('oid', $lob,...
0
vdraceil
by: vdraceil | last post by:
Hi,i use VB6.0..is it possible to prevent a form from unloading ever? I know to set cancel=true in query unload event of the form..but this applies only to limited cases. If my exe is closed from...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.