<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I keep the compute block in PROC REPORT from using scientific notation? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-keep-the-compute-block-in-PROC-REPORT-from-using/m-p/885797#M350044</link>
    <description>That works, thanks!</description>
    <pubDate>Fri, 21 Jul 2023 11:56:16 GMT</pubDate>
    <dc:creator>Syntas_error</dc:creator>
    <dc:date>2023-07-21T11:56:16Z</dc:date>
    <item>
      <title>How do I keep the compute block in PROC REPORT from using scientific notation?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-keep-the-compute-block-in-PROC-REPORT-from-using/m-p/885771#M350031</link>
      <description>&lt;P&gt;My "period" variable is a character variable which has the format $32. It can take on the following values:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2004-2007 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[...]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2013-2016&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2015-2016,2018 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2018, 2020 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2018,2020,2021 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2020,2021,2022&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use the compute block in PROC REPORT in order to use these periods as headlines for the values in that time period:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;ods excel file="[path]";
ods excel options(sheet_interval='bygroup' sheet_name="#byval(bladnamn)");


PROC REPORT data=export;
by bladnamn;
column period variabelnamn bladnamn variabel_cat_varde (kon,(andel CI_lower CI_upper lillan));
/* define variabelnamn / order order=internal;*/
define period / group order=internal descending format=$32. noprint;
define variabelnamn / group order=data noprint;
define order / order order=internal noprint;
define variabel / order order=internal noprint;
define bladnamn / group order=data noprint;
define variabel_cat_varde / order=data group;
/*define alder_grupp / order=data group;*/
define andel / mean;
define CI_lower / mean;
define CI_upper / mean;
define lillan / mean;
DEFINE kon / ACROSS ORDER=INTERNAL; 

compute before period /style={just=left};;
period_char= put(period, $32.);
line period_char $char200.;
endcomp;

compute before variabelnamn /style={just=left};;
line variabelnamn $char200.;
endcomp;

run;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The "period" values separated by commas are however converted to scientific notation in the COMPUTE block, despite my best efforts:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Syntas_error_0-1689929107738.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85983iA7F434DEB59863D8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Syntas_error_0-1689929107738.png" alt="Syntas_error_0-1689929107738.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is however just an issue with the comma-separated values.&amp;nbsp; More specifically, this only seems to happen with the entries with three comma-separated values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I keep this from happening and in that case how?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2023 08:56:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-keep-the-compute-block-in-PROC-REPORT-from-using/m-p/885771#M350031</guid>
      <dc:creator>Syntas_error</dc:creator>
      <dc:date>2023-07-21T08:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do I keep the compute block in PROC REPORT from using scientific notation?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-keep-the-compute-block-in-PROC-REPORT-from-using/m-p/885795#M350043</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input period :$40. a $ x;
cards;
2018,2020,2021 a1 12
2018,2020,2021 a2 1
2020,2021,2022 b1  6
2020,2021,2022 b2 7
;

ods excel file='c:\temp\temp.xlsx';
proc report data=have nowd;
column period a x;
define period/group noprint;
define a/display;
define x/display;
 
compute before period /style={just=left tagattr='type:string'};
line period $char200.;
endcomp;

run;
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1689940074264.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85986iB3D4028A7233FAC8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1689940074264.png" alt="Ksharp_0-1689940074264.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2023 11:47:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-keep-the-compute-block-in-PROC-REPORT-from-using/m-p/885795#M350043</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-07-21T11:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I keep the compute block in PROC REPORT from using scientific notation?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-keep-the-compute-block-in-PROC-REPORT-from-using/m-p/885797#M350044</link>
      <description>That works, thanks!</description>
      <pubDate>Fri, 21 Jul 2023 11:56:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-keep-the-compute-block-in-PROC-REPORT-from-using/m-p/885797#M350044</guid>
      <dc:creator>Syntas_error</dc:creator>
      <dc:date>2023-07-21T11:56:16Z</dc:date>
    </item>
  </channel>
</rss>

