Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Files

$
0
0

If you mean the files you define in your COBOL program using file-control entries, etc, then no, they aren't in an Access or Excel format. Access and Excel are Microsoft applications and they use multiple file formats, none of which are suitable for COBOL indexed files. (At least that's true of the Excel file formats. I'm not sure what Access uses, but given its reputation, I'd be leery of it.)

If you need to write a COBOL program that can use Access and Excel files, you should probably use COM objects provided by Microsoft for that purpose. There are alternatives (MS Office APIs, CSV files with Excel), but they're more complicated.

Regarding your second question, no, you don't use SQL for file access. Embedded SQL is only used for operations against DBMSes. For file operations, COBOL provides various statements (OPEN, READ, etc), and MF COBOL also supplies library routines (CBL_OPEN_FILE, etc) for low-level file access. Or you can call OS or third-party APIs, directly or through interfaces like COM.

There's a chapter on file handling in the product documentation:

documentation.microfocus.com/.../GUID-50FC4716-ADA2-41F1-AA48-7694E03ED62B.html


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>