Q

COBOL program that will run in z/OS and open in MS-Word

I want to write a COBOL program that will run in z/OS and create a sequential file that can then be FTP'd to a network drive and opened with MS-Word (MS-Office 2003) as a fully formatted Word document with page headers, tables, and paragraphs. Help?

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.

This was first published in March 2006

Dig deeper on Mainframe Linux, IBM System z

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWindowsServer

SearchEnterpriseLinux

SearchServerVirtualization

SearchCloudComputing

Close