DATA Step, Macro, Functions and more

Trim Spaces

Accepted Solution Solved
Reply
PROC Star
Posts: 633
Accepted Solution

Trim Spaces

I've a SAS program where it reads a SAS dataset and convert it to the XML file. However, I observed that there is an extra space is appended with few of the variables in the output XML file and I want to remove the extra spaces as highlighted in yellow below. Since the values are coming from the dataset, I think I've apply trim function to the variables 'dateRenewal' and 'clause_Base' but I'm not certain how to apply. Appreciate if someone of you guide me here.

 

Snippet of SAS program:

 

 

put '<dateRenewal>' dateRenewal '</dateRenewal>';
put '<clauseCode>' clause_Base '</clauseCode>';

Snippet of Output XML file:

 

 

Blank Spaces.PNG


Accepted Solutions
Solution
‎02-20-2018 05:34 AM
Super User
Super User
Posts: 9,840

All Replies
Solution
‎02-20-2018 05:34 AM
Super User
Super User
Posts: 9,840

Re: Trim Spaces

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 126 views
  • 1 like
  • 2 in conversation