Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Handling BLOB data in COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
VIKRAM KUMAR MISHRA

New User


Joined: 24 Dec 2012
Posts: 3
Location: India

PostPosted: Wed Aug 13, 2014 1:00 am    Post subject: Handling BLOB data in COBOL
Reply with quote

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
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1806
Location: NY,USA

PostPosted: Wed Aug 13, 2014 9:15 pm    Post subject: Reply to: Handling BLOB data in COBOL
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1806
Location: NY,USA

PostPosted: Wed Aug 13, 2014 9:32 pm    Post subject:
Reply with quote

However, please refer to below link which might be helpful to what you have asked,
http://www-01.ibm.com/support/knowledgecenter/#!/ssw_ibm_i_71/rzajp/rzajpcoblob.htm

Note:If you want the data to be in readable format then,you should define it as a CLOB. A BLOB is for binary data and a CLOB is for character data.
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Thu Aug 14, 2014 7:19 pm    Post subject: Reply to: Handling BLOB data in COBOL
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us