I want to write a COBOL program that will run in z/OS and create a sequential file that can then be FTP's to a...
network drive and opened with MS-Word (MS-Office 2003) as a fully formatted Word document with page headers, tables, and paragraphs.
I've tried XML, but MS-Word opens the file as if you are wanting to edit an XML document. I've tried HTML, but when I click it, I get most of the "view" I want, but I'm in Internet Explorer and cannot modify the document.
I've also tried a *.csv to MS-Excel, but I cannot get the formatting I need.
These files are to document test cases and will need to be opened by MS-Word and updated.
Can you please give me some direction? I don't even know where to begin looking.
Is your problem in the formatting of the file, or in getting Word to open it as a Word document? I can't help with the formatting except to say that whatever the format is, it must contain ASCII data written in an EBCDIC environment and whatever control information is needed for Word to open it as a fully formatted Word file (if that is what you want). This implies that you must do a BINARY FTP transfer to the network drive where the file will reside to be opened by someone.
Since I can't help with any of the formatting part, the only advise I can give is to make sure the file name is suffixed with ".doc" on the network drive when you FTP it. That is what will cause windows to open the document using Word by default when someone clicks on the file. If you launch word manually and try to open the file from the Word menu (File --> Open) and it does not open correctly, then there is a problem with the format of the file you are creating in your COBOL program.
If you create a machine readable text file on z/OS (which will be in EBCDIC), then you should be able to FTP it using the ASCII option (which will translate the EBCDIC text to ASCII) to the network drive and as long as the file name ends in ".doc" Word should be able to open it without any problems. However, you still could encounter some EBCDIC to ASCII translation issues depending on the data in the file.
Dig Deeper on IBM system z and mainframe systems
Related Q&A from Mark Zelden
When initial program load stalls out on a mainframe logical partition, the culprit is often consoles. Connectivity is one of many potential causes. Continue Reading
Programming expert Mark Zelden offers some coding help to a user trying to FTP files from the mainframe to a Linux OS. Continue Reading
Expert Mark Zelden tries to help a reader find out if his z/OS problem is a known vulnerability. When he can't find anything, he explains how to ... Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.