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!

writing xml record

Status
Not open for further replies.

municipal

Programmer
Jan 1, 2001
62
0
0
IL
Hi
I want to write a COBOL general routine that write XML record
the format that i think is like DISPLAY statement
for example : DISPLAY FIELD-1
and if FIELD-1 contain the value 1234
the result is <FIELD-1>1234<\FIELD-1>

ANY IDEA ?
TIA.
MENAS.
 
It would be more helpful if you told us what you are trying to accomplish?
 
I want to write a log file
to view the file from explorer
and later to export it to another platform
TIA.
 
Hi municipal,

The simplest solution to this, you have already supplied. Assuming you know XML, then all you have to do is what you posted:

&quot;for example : DISPLAY FIELD-1
and if FIELD-1 contain the value 1234
the result is <FIELD-1>1234<\FIELD-1>&quot;

The most involved solution is to use any of the various tools/APIs already on the market (use COBOL XML in any search engine).

If this post does not address your problem, try being more specific about your request.

Dimandja


 
is there any free sample in cobol that do it?
TIA.
 
The best COBOL XML interface I know is XML Toolkit of Liant Software. You can write/read what ever XML code you
need from COBOL. No XML knowledge is necessary.
 
Muni,

Tell us something along these lines:

&quot;I have a file that contains these fields, name, address, city, state, etc. in the form:
Code:
Jack   Sleight     123 Ave A Any  OK
George Bush        1 Ave B   Wash DC
Field lengths are as follows: yada yada yada.

I want to create a series of variable XML records of the form:

<fname>Jack<\fname><lname>Sleight<\lname>yada yada
<fname>George<\fname><lname>Bush<\lname>yada yada

I don't know if this is what you're looking for because you didn't take the time to explain your problem fully.

I don't mean to be rude, but this has to be said: If you expect US to take the time to provide an answer for you, YOU should show the courtesy of taking the time and expending the effort to adequately explain your problem.

Regards, Jack.

 
Just for the record...

XML ending tag uses the forward slash[/] so it is, for example:

<fname>...</fname> Tom Morrison
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top