BookmarkSubscribeRSS Feed
pihu_11
Calcite | Level 5

Hi All,

I have a SAS data set in which I have variable var1 which has some of its values as 10^9/L.

I am using proc report and ODS to create an xml output. In the output, I am getting values for var1 as 10/L instead of 10^9/L.

I am also using ods escapechar = '^';. This also doesn't work. The part of the code is:

ods escapechar="^";

ods _all_ close;

ods tagsets.ExcelXP

    options(frozen_headers='2'

            sheet_name="data1"

             absolute_column_width='10,10,10');

  proc report data=final nowindows split='*';

   column var1 var2 var3;

     define var1/ display 'Variable One' ;

   define var2/ display 'Two' ;

   define var3/ display 'Three';

quit;


What can be the reason for not proper display of values?

2 REPLIES 2
Tim_SAS
Barite | Level 11

But '^' is working, that's why you're getting 10/L instead of 10^9/L. Choose an escape char that doesn't appear in your data. Maybe '~' or '%'?

pihu_11
Calcite | Level 5

Thank you!!!!!

It works Smiley Happy

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 848 views
  • 3 likes
  • 2 in conversation