× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi,

I'm trying to make GENERATE XML work.
I am not a COBOL programmer. I have studied it for about 3 months but 10 years ago.
Please could someone tell me how to get the XML generated visible on a PC.

Shouldn't there be a line like <?xml version="1.0" encoding="UTF-8"?>

Thanks.

DATA DIVISION.
WORKING-STORAGE SECTION.
01 EmployeeRec.
03 Name pic X(25).
03 MailAddress.
05 Street pic X(20).
05 City pic X(12).
05 State pic X(2).
03 Personal.
05 MaritalStatus pic X.
05 BirthDate pic X(8).

01 XMLMsg pic x(1000).
01 IFSFile pic x(50) value "/home/FOXWELL/test.xml".

PROCEDURE DIVISION.
POPULATE-EmployeeRec.
MOVE 'John Doe' TO Name.
MOVE '5th Avenue' TO Street.
MOVE 'Manhattan' TO City.
MOVE 'NY' TO State.
MOVE 'Y' TO MaritalStatus.
MOVE '19651231' TO BirthDate.
XML GENERATE FILE-STREAM IFSFile
FROM EmployeeRec
END-XML.
STOP RUN.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.