IBM Mainframe Forum Index
Log In
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register

XML Generate - Hierarchy of the Output File

IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message

New User

Joined: 12 May 2007
Posts: 9
Location: arizona

PostPosted: Tue Jul 28, 2015 2:13 am
Reply with quote

I am new at using the XML Generate statement.
Input layout is as follows:
01 noattso.
05 na-bko PIC XXX.
05 na-bro PIC XXX.
05 na-cuso PIC X(7).
05 na-lno PIC X(4).
05 na-nam1o PIC X(36).
05 na-nam2o PIC X(36).
05 na-nam3o PIC X(36).
05 na-nam4o PIC X(36).
05 na-nam5o PIC X(36).
05 na-rate PIC SV9(7).
05 na-org PIC S9(09)V99.

01 xml-out.
05 xml-out-rec PIC X(1000) VALUE SPACES.

Procedure Division Chunk:

Output file currently is producted as follows:

Question: Is there a way to preserve the input hierarchy (each field on its on line) of noattso and produce an output file such as:
Back to top
View user's profile Send private message
Robert Sample

Global Moderator

Joined: 06 Jun 2008
Posts: 8578
Location: Dubuque, Iowa, USA

PostPosted: Tue Jul 28, 2015 3:47 am
Reply with quote

If you read the syntax diagram for XML GENERATE in the Enterprise COBOL Language Reference manual, you will find that XML GENERATE works to produce a single output variable. If you want anything else, it is NOT XML and you will have to produce it by parsing the output variable after the XML GENERATE is complete.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming


Similar Topics
Topic Forum Replies
No new posts To pull the file with Date and Time u... TSO/ISPF 17
No new posts Is the Output of Sort/Join dependent ... DFSORT/ICETOOL 2
No new posts regarding COBOL WRITE verb (VB File H... COBOL Programming 6
No new posts COBOL Table data to a flat file with ... COBOL Programming 8
No new posts Compare 2 files replace data in 1st f... DFSORT/ICETOOL 4
Search our Forums:

Back to Top