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

XML-GENERATE to render edited numeric


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

Active User


Joined: 31 Oct 2006
Posts: 131
Location: brisbane

PostPosted: Fri Sep 18, 2020 12:05 pm
Reply with quote

I'm having problems getting the XML-GENERATE to render edited numerics correctly.

I have a (large) source structure that contains a variety of numeric edited fields, such as Z(14)9.99 BLANK WHEN ZERO; Z(7)9.99 BLANK WHEN ZERO. etc as well as many PIC X(n) elements.

PIC X(n) elements are being rendered correctly, eg:

Code:
<some_node></some_node>
<another_node>some text</another_node>

(no trailing spaces)

but the numeric edited fields are being rendered as, eg:

Code:
<some_edited_num1><some_edited_num1>
<some_edited_num2>   34.56</some_edited_num2>


(I don't want leading spaces showing for non-zero content)

so, I can simply redefine my input structure to be all PIC X(n), and add some MOVE statements .

or is there a better option ?
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 Generate random number from range of ... COBOL Programming 3
No new posts Convert HEX to Numeric DB2 3
No new posts Generate output lines (SYSIN card for... DFSORT/ICETOOL 4
No new posts Find a record count/numeric is multip... COBOL Programming 1
No new posts Handling the numeric data in unstring... COBOL Programming 18
Search our Forums:

Back to Top