Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Eliminating blank space in XML parsed by COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
elixir1986
Warnings : 1

New User


Joined: 10 Nov 2015
Posts: 25
Location: USA

PostPosted: Tue Feb 11, 2020 4:41 am    Post subject: Eliminating blank space in XML parsed by COBOL
Reply with quote

Hi Team,

I saw a similar issue in the forum where solution was never posted.

I have "XML GENERATE" in COBOL which works fine. Some of my elements in the structure for XML conversion can have empty values after they are mapped to an input file. For example, the XML structure is

Code:
01 cardRecord.
05 addrLine1 PIC X(20).
05 addrLine2 PIC X(20).
05 name PIC X(30).
05 businessName PIC X(26).


Here,after mapping this to the i/p XML file, I have non-empty values in addrLine1,addrLine2,name whereas my businessName field has empty values.

Is there any way for me to prevent the tag having empty values not getting displayed after XML-GENERATE statement like this ?

Code:
<businessName> </businessName>
(Note there is a blank space)

Please let me know if any more details are required.

Original post - http://ibmmainframes.com/about43457.html#ixzz6Day886QK

I am planning to suggest move NA to the attribute value for tag "businessName" if happens to be blank. Is this a good approach?

Also, if the suggested approach is not good, how do I eliminate that blank space from
Code:
<businessName> </businessName>
?

Many Thanks for all your help and support!
Back to top
View user's profile Send private message

View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CALL statement in COBOL for VSE Kirthishine COBOL Programming 1 Fri Jun 26, 2020 12:12 pm
No new posts Question for Cobol Report Writer jackzhang75 COBOL Programming 3 Wed May 27, 2020 4:35 am
No new posts Compare multiple files using JCL/Rexx... tanvi110788 JCL & VSAM 4 Tue May 19, 2020 5:47 pm
No new posts Need example for CALL 'ISRSUPC' in COBOL Sue Adams COBOL Programming 2 Thu May 14, 2020 5:32 am
No new posts COBOL Student learning COBOL File Han... torrind COBOL Programming 3 Sat May 09, 2020 3:40 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us