Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can COBOL Store Binary Files?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Hi!<br><br>I am thinking seriously of walking against the main stream - replacing Informix 4GL application with a COBOL package. One of my major concerns is COBOL files' connectivity.<br>(1) Can COBOL Store Binary Files (for example: images)? If the answer is positive, then are they stored in Unix file system or in COBOL data files?<br>(2) If ODBC is used to connect COBOL data files in Unix and Delphi in Windows95, is it possible to use Delphi to read from/write to COBOL files which consists of OCCURS structure (non-normalized files)?<br><br>Thanks!<br><br>CN
 
Hi,<br><br>many COBOL environments know a kind of unformatted format like the <U> format in CA-REALIA COBOL.<br><br>If you can use such a format you can read/store anything. It is good to try it out by reading something like a JPG file.<br><br>About talking with Delphi: Delphi and most other languages can 'talk' with each other using C or Pascal conventions. Your program should behave like one of them. In CA-REALIA COBOL you do that using entries or a program name with prefix C_ or P_.<br><br>Many compiler providers have an example with interfacing with C. You should read that part.
 
COBOL can store bytestream (Binary) files, so that isn't a problem.<br><br>If you use C-ISAM for your indexed file structure, then handling the ODBC should be a breeze as well.&nbsp;&nbsp;What I don't know the answer to is if you can handle the occurs with the ODBC data mapping.&nbsp;&nbsp;
 
COBOL can work with Binary files, but unless the specific compiler has some extension to make use of say images, the data will have to correspond to specific COBOL record definitions in the program.&nbsp;&nbsp;<br><br>The Transoft ODBC product will handle occurs easily.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top