Working with PL/I and BLOB columns (DB2) 
Author Message
 Working with PL/I and BLOB columns (DB2)

 Hi all,

We've to save, in a C/S environment, BLOB data in mainframe DB2 V7.
Application runs with
CICS with thin client and CICS programs on mainframe are written in PL/I.
DB2 manuals recommended not to manipulate directly BLOB data and reference
by using locators.
But, I've to receive BLOB from the client and insert it in his table.
    - Can I receive BLOB in a temp{*filter*}storage queue?
    - Can I receive all data? Have I to receive complete?, in parts? IS
there a limit amount in TS?
    - Have I to declare BLOB field in my pl/I program to transfer BLOB from
TS to DB2? It seems
       that locators and / or variable indicators isn't enough to do
this....

 any helps ?

 Thanks a lot...

    JL



Tue, 15 Nov 2005 16:00:35 GMT  
 Working with PL/I and BLOB columns (DB2)


Quote:
>  any helps ?

 BLOB?  (Sorry, never used CICS)


Thu, 17 Nov 2005 03:01:11 GMT  
 Working with PL/I and BLOB columns (DB2)
You said C/S environment, but didn't tell us the client or server platform,
nor did you make it clear where you're issuing what, or what PL/I version
you're using. The lack of important information means I have to guess.

I shall assume Enterprise PL/I on z/OS (although that's almost irrelevant
for your questions), Windows 2000 client (equivalently XP) with IBM
Websphere for CICS-CICS connectivity, all T/M code runs on z/OS CICS with no
client code on Windows.

DB2 recommendation is just that - a recommendation based on common sense. If
you have a 512MB BLOB, and you only need to alter 10 bytes of it, you are
best off using locators rather than rading and writing 512MB. If you need
the entire data, (e.g. it's an MPEG in a construction manual you have to
stream to or from the client) then by all means process it as a lump.

You're saying that you have a BLOB on the client, that you need to insert
into a database. Clearly locators are not the way to go for this problem.

You can use TS queues if you wish, it is neither a PL/I nor a DB2
requirement, but it is a possible technique for moving data around. Also,
until the data is in the database, it is not a BLOB, it's just a chunk of
memory that you program accordingly. TS limits are those of the underlying
VSAM dataset.

DB2 BLOB programming in PL/I is done as described in the Programming Guide.
As already stated, you can't use a locator if you need to transfer data. You
can, of course, use files ("SQL TYPE IS BLOB AS FILE"), this is usually the
simplest technique. Also, by far the fastest and easiest approach to
inserting BLOBS into a host database is to leave CICS out of the middle, and
go directly from your W2K client via a personal DB2 connect or W2K Server's
DB2 Connect gateway; it means you only have to move the data around once,
rather than twice (client -> CICS (TS) -> DB2). With DB2 V8 on W2K, you can
avoid the DB2 Connect (you said V7, but that may have meant server only,
with V8 client being permitted).

For basic questions on DB2, BLOBS, CICS and TS queues, I recommend your
asking on the DB2 and/or CICS forums; none of your questions here are in way
PL/I-specific.


Quote:

>  Hi all,

> We've to save, in a C/S environment, BLOB data in mainframe DB2 V7.
> Application runs with
> CICS with thin client and CICS programs on mainframe are written in PL/I.
> DB2 manuals recommended not to manipulate directly BLOB data and reference
> by using locators.
> But, I've to receive BLOB from the client and insert it in his table.
>     - Can I receive BLOB in a temp{*filter*}storage queue?
>     - Can I receive all data? Have I to receive complete?, in parts? IS
> there a limit amount in TS?
>     - Have I to declare BLOB field in my pl/I program to transfer BLOB
from
> TS to DB2? It seems
>        that locators and / or variable indicators isn't enough to do
> this....

>  any helps ?

>  Thanks a lot...

>     JL



Thu, 17 Nov 2005 16:30:01 GMT  
 Working with PL/I and BLOB columns (DB2)
http://www-3.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/d...

Has info about working with DB2 and various languages.
ie.  C++  COBOL and 3 vendor flavors of fortran.

Note there is NO DB2 info provided by IBM for working with ANY vendor
flavor of PL/I at this link, why is that?



Thu, 17 Nov 2005 17:53:44 GMT  
 Working with PL/I and BLOB columns (DB2)

Quote:

> http://www-3.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/d...

> Has info about working with DB2 and various languages.
> ie.  C++  COBOL and 3 vendor flavors of Fortran.

> Note there is NO DB2 info provided by IBM for working with ANY vendor
> flavor of PL/I at this link, why is that?

Because the current PL/I compiler supports DB2 directly.

--
John W. Kennedy
"Sweet, was Christ crucified to create this chat?"
   -- Charles Williams:  "Judgement at Chelmsford"



Thu, 17 Nov 2005 23:11:29 GMT  
 Working with PL/I and BLOB columns (DB2)



http://www-3.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/d...

Quote:

> > Has info about working with DB2 and various languages.
> > ie.  C++  COBOL and 3 vendor flavors of Fortran.

> > Note there is NO DB2 info provided by IBM for working with ANY
vendor
> > flavor of PL/I at this link, why is that?

> Because the current PL/I compiler supports DB2 directly.

> --
> John W. Kennedy
> "Sweet, was Christ crucified to create this chat?"
>    -- Charles Williams:  "Judgement at Chelmsford"

Your statement does not compute, since the 2001 version link below
does
include info for PL/I along with the C++ COBOL Fortran info.
On the surface it would seem that IBM no longer claims their current
release of DB2 is PL/I compatible..

http://www2.ibmlink.ibm.com/cgi-bin/master?xh=tJQXlrUvDl79WU2USenGnN9...



Fri, 18 Nov 2005 21:33:18 GMT  
 Working with PL/I and BLOB columns (DB2)

Quote:




> http://www-3.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/d...

>>>Has info about working with DB2 and various languages.
>>>ie.  C++  COBOL and 3 vendor flavors of Fortran.

>>>Note there is NO DB2 info provided by IBM for working with ANY

> vendor

>>>flavor of PL/I at this link, why is that?

>>Because the current PL/I compiler supports DB2 directly.

>>--
>>John W. Kennedy
>>"Sweet, was Christ crucified to create this chat?"
>>   -- Charles Williams:  "Judgement at Chelmsford"

> Your statement does not compute, since the 2001 version link below
> does
> include info for PL/I along with the C++ COBOL Fortran info.
> On the surface it would seem that IBM no longer claims their current
> release of DB2 is PL/I compatible..

> http://www2.ibmlink.ibm.com/cgi-bin/master?xh=tJQXlrUvDl79WU2USenGnN9...

I say again, the current PL/I compiler supports DB2 instead of the other
way around.  The compiler recognizes and compiles EXEC SQL statements.

--
John W. Kennedy
"Sweet, was Christ crucified to create this chat?"
   -- Charles Williams:  "Judgement at Chelmsford"



Fri, 18 Nov 2005 22:44:44 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. SQL and BLOBs (DB2-UDB)

2. How to initialize a BLOB in DB2 using Update

3. Store a file using COBOL, DB2 and BLOBS

4. New PL/I or Old working PL/I releases

5. PL/I and TTY input (was Card Columns ...)

6. Working with BLOB

7. PL/1 - DB2

8. DB2-UDB V5.0 under PL/1 for Professionals on NT 4.0

9. Canada Vancouver - PL/1, IMS, DB2, MVS, TSO, ISPF, JCL - Experienced Programmers

10. Canada Vancouver - Programmer PL/1 IMS DB2 MVS - contract job

11. PL/1, DB2 skills wanted.

12. US-NY P/A PL/1, DB2

 

 
Powered by phpBB® Forum Software