Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 1610
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: 1610
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
This topic is locked: you cannot edit posts or make replies. Unwrap the data based on delimiter X'25' bhavana yalavarthi DFSORT/ICETOOL 30 Fri Dec 09, 2016 10:25 am
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us