<?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: data step in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249355#M46903</link>
    <description>&lt;P&gt;&amp;nbsp;The code&amp;nbsp;&lt;SPAN&gt;newvar = '(' || put(a, 3.) || '%)'; works for me as long as 'a' values are not zero.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;for example when a=17, &amp;nbsp;I am &amp;nbsp;getting&amp;nbsp;17 ( 28%) what i need.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In some observation there are values i need to concatenate zero number also.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;for example when a=0, &amp;nbsp;I need values&amp;nbsp;0 (&amp;nbsp; 0%). But iam getting &amp;nbsp;0 ( %). Please help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Feb 2016 02:44:00 GMT</pubDate>
    <dc:creator>knveraraju91</dc:creator>
    <dc:date>2016-02-11T02:44:00Z</dc:date>
    <item>
      <title>data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249325#M46891</link>
      <description>&lt;P&gt;I need help in my code.&lt;/P&gt;&lt;P&gt;a values =100 and 12&lt;/P&gt;&lt;P&gt;I need to have values like this (100%)&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( &amp;nbsp;12%)&lt;/P&gt;&lt;P&gt;I am using the code &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;cat("(",right(a),")").&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting values&amp;nbsp;(100.0) and&amp;nbsp;( 12.0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 21:51:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249325#M46891</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2016-02-10T21:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249327#M46892</link>
      <description>&lt;P&gt;Is it a number or character?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;new_var= catt("(", put(old_var/100, percent8.1), ")");&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 21:54:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249327#M46892</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-10T21:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249328#M46893</link>
      <description>&lt;P&gt;One possibility:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;newvar = '(' || put(a, 3.) || '%)';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See if that's what you need.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 21:55:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249328#M46893</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-02-10T21:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249331#M46894</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you for help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This code help me. newvar = '(' || put(a, 3.) || '%)';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 22:16:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249331#M46894</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2016-02-10T22:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249336#M46897</link>
      <description>&lt;P&gt;If you have an answer please mark the question answered &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 22:42:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249336#M46897</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-10T22:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249355#M46903</link>
      <description>&lt;P&gt;&amp;nbsp;The code&amp;nbsp;&lt;SPAN&gt;newvar = '(' || put(a, 3.) || '%)'; works for me as long as 'a' values are not zero.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;for example when a=17, &amp;nbsp;I am &amp;nbsp;getting&amp;nbsp;17 ( 28%) what i need.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In some observation there are values i need to concatenate zero number also.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;for example when a=0, &amp;nbsp;I need values&amp;nbsp;0 (&amp;nbsp; 0%). But iam getting &amp;nbsp;0 ( %). Please help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 02:44:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249355#M46903</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2016-02-11T02:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249357#M46904</link>
      <description>&lt;P&gt;Is the variable you're using missing in that circumstance or is it 0?&lt;/P&gt;
&lt;P&gt;I'm going to guess it's missing. You can use the COALESCE() function to assign the value 0 when the variable is missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;newvar = '(' || put(coalesce(a, 0), 3.) || '%)';&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Feb 2016 03:19:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249357#M46904</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-11T03:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249362#M46905</link>
      <description>&lt;P&gt;The variable is zero. Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 03:50:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249362#M46905</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2016-02-11T03:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249363#M46906</link>
      <description>&lt;P&gt;Just the fact that you could possibly get 17 ( 28%) means that your program is a little different than what I imagine it to be. &amp;nbsp;Show us exactly what is in your program (just the one or two relevant lines of code), and what the data values are to generate the wrong result.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 03:52:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249363#M46906</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-02-11T03:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249364#M46907</link>
      <description>&lt;P&gt;If it was 0, it should&amp;nbsp;work. Make sure you have no formats applied to the data that's causing 0 to appear as missing. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
x=0;
y="("||put(x, 3.)||"%)";
run;
proc print; run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
Obs	x	y
1	0	( 0%)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 04:00:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249364#M46907</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-11T04:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249368#M46909</link>
      <description>&lt;P&gt;Hi I have another questions.&lt;/P&gt;&lt;P&gt;I need to produce a report like this: File attached&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the code: The output doesnot look same. Please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OPTIONS nodate nonumber;&lt;BR /&gt;ods listing close;&lt;BR /&gt;ods escapechar="^";&lt;BR /&gt;title1 justify=right 'page ^{pageof}';&lt;BR /&gt;title2 "Table 14.3.1.1 Treatment-Emergent Adverse Event Frequency by Treatment -";&lt;/P&gt;&lt;P&gt;title3 "Number of Subjects Reporting the Event (% of Subjects Dosed) (Safety Population)";&lt;BR /&gt;footnote1 "Note: Adverse events (AEs) were coded with MedDRA Version 18.0.";&lt;BR /&gt;footnote2 "Program: /CA17139/sas_prg/stsas/tab/adam_tblae1a_auto.sas 16DEC2015 12:16";&lt;BR /&gt;footnote2 " %sysget(sas_execfilepath) &amp;amp;sysdate. &amp;amp;systime.";&lt;BR /&gt;options orientation=landscape formchar="|----|+|---+=|-/\&amp;lt;&amp;gt;*";&lt;/P&gt;&lt;P&gt;ods rtf file="C:\Users\vvemireddy\Desktop\ae_1.rtf" style=journal;&lt;BR /&gt;proc report data=four nowd headline headskip style(report)=[frame=void];&lt;BR /&gt;column grp aebodsys aedecod aetext cnt_pct4 ("JPZ" "_______________" cnt_pct1 cnt_pct2) cnt_pct3 cnt_pct5;&lt;BR /&gt;define grp/order noprint;&lt;BR /&gt;define aebodsys/order noprint;&lt;BR /&gt;define aedecod/display center noprint;&lt;BR /&gt;define aetext/ display 'Adverse Event' style(column)={asis=on cellspacing=.25pt just=left};&lt;BR /&gt;define cnt_pct1 / "300 mg" style(column)={cellspacing=.25pt just=left};&lt;BR /&gt;define cnt_pct2/ "900 mg" style(column)={cellspacing=.25pt just=left} ;&lt;BR /&gt;define cnt_pct3/ "400 mg Moxifloxacin" style(column)={cellspacing=.25pt just=left};&lt;BR /&gt;define cnt_pct4/"Plcebo" style(column)={cellspacing=.25pt just=left} ;&lt;BR /&gt;define cnt_pct5/"TOTAL" style(column)={cellspacing=.25pt just=left} ;&lt;BR /&gt;compute after grp/style={protectspecialchars=off};&lt;BR /&gt;n+1;&lt;BR /&gt;len=ifn(n=1,20,0);&lt;BR /&gt;dummy='\brdrt\brdrs';&lt;BR /&gt;line dummy $varying20. len;&lt;BR /&gt;endcomp;&lt;BR /&gt;run;&lt;BR /&gt;ods rtf close;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 05:42:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249368#M46909</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2016-02-11T05:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249387#M46914</link>
      <description>&lt;P&gt;If this question is answered please mark this one answered and create a new question.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 09:11:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249387#M46914</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-11T09:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249439#M46922</link>
      <description>&lt;P&gt;Also without data we have no idea what your resulting report actually looks like.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please describe how it doesn't look right.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 13:36:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step/m-p/249439#M46922</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-02-11T13:36:45Z</dc:date>
    </item>
  </channel>
</rss>

