View previous topic :: View next topic
|
Author |
Message |
VIKRAM KUMAR MISHRA
New User
Joined: 24 Dec 2012 Posts: 3 Location: India
|
|
|
|
My requirement is to read a table data with a BLOB column > 32K length and store it in a file and then reload the file back to the table using DB2 load utility.
I know that while we unload BLOB data using DB2 utility through JCL, we provide a PDS for BLOB and a PS for rest of data. The PS file will have a reference to PDS file and member for the row to be loaded. This PS when used to load will automatically load BLOB data to table.
I need to understand if I can use same concept through cobol. That is to create a PS file with all data and reference to a PDS file. The PDS file will be created in COBOL with n number of members and store the BLOB data. Then define SYSPUNCH accordingly and use the PS file to load.
Will this concept work or is there some other concept. Also if this way it can work then how to know how many members to be created in PDS. How to specify multiple members in PS for a single row of data. I could not find any documentation.
Please help. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Why would you like to reinvent another wheel when we you know this can be done through utility? Do you have any reason? |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
Back to top |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
Hi,
You may have to consider spanning records in multiple lines as length of a file cannot be greater than 32K.
DB2 load utility uses a option SPANNED YES but the file format is VBS and cannot be edited. (No need to have PDS members now). |
|
Back to top |
|
|
Mr Swann
New User
Joined: 09 Jul 2020 Posts: 6 Location: France
|
|
|
|
Rohit Umarjikar wrote: |
Why would you like to reinvent another wheel when we you know this can be done through utility? Do you have any reason? |
For instance I have a unload file
and I want to use SQL INSERT coded in COBLOL (instead if reload )
to put it into another DB2
solution described here ..
ibmmainframes.com/viewtopic.php?p=350035#350035 |
|
Back to top |
|
|
|