<?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: Format issue in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678523#M204801</link>
    <description>wgat would be the variable name for "Country/Sex/Age" then?</description>
    <pubDate>Fri, 21 Aug 2020 17:42:58 GMT</pubDate>
    <dc:creator>zimcom</dc:creator>
    <dc:date>2020-08-21T17:42:58Z</dc:date>
    <item>
      <title>Format issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678440#M204764</link>
      <description>&lt;P&gt;Good morning!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;TD&gt;Sex&lt;/TD&gt;&lt;TD&gt;Age&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Canada&lt;/TD&gt;&lt;TD&gt;Female&lt;/TD&gt;&lt;TD&gt;89&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Canada&lt;/TD&gt;&lt;TD&gt;Male&lt;/TD&gt;&lt;TD&gt;62&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;USA&lt;/TD&gt;&lt;TD&gt;Female&lt;/TD&gt;&lt;TD&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to convert into a table below with one variable but combining the 3 variables values into different row&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Country/ Sex/ Age&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Canada&lt;BR /&gt;Female&lt;BR /&gt;89&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Canada&lt;BR /&gt;Male&lt;BR /&gt;62&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;USA&lt;BR /&gt;Female&lt;BR /&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 13:58:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678440#M204764</guid>
      <dc:creator>zimcom</dc:creator>
      <dc:date>2020-08-21T13:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Format issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678441#M204765</link>
      <description>&lt;P&gt;Is this for reporting purposes or do you need at SAS data set like this?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 14:01:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678441#M204765</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-08-21T14:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Format issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678443#M204766</link>
      <description>Yes, for reporting purpose.</description>
      <pubDate>Fri, 21 Aug 2020 14:05:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678443#M204766</guid>
      <dc:creator>zimcom</dc:creator>
      <dc:date>2020-08-21T14:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Format issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678455#M204772</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
 set have;
     file print;
     if _N_ = 1 then put "Country/Sex/Age";
     put country / Sex / Age;
end;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Aug 2020 14:32:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678455#M204772</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-08-21T14:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Format issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678475#M204783</link>
      <description>I have other variables in the table as well, only want to combine the 3 avriables into one variable, how can I modify the code below:&lt;BR /&gt;if _N_ = 1 then put "Country/Sex/Age";&lt;BR /&gt;put country / Sex / Age;</description>
      <pubDate>Fri, 21 Aug 2020 15:09:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678475#M204783</guid>
      <dc:creator>zimcom</dc:creator>
      <dc:date>2020-08-21T15:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Format issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678493#M204790</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/219549"&gt;@zimcom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I have other variables in the table as well, only want to combine the 3 avriables into one variable, how can I modify the code below:&lt;BR /&gt;if _N_ = 1 then put "Country/Sex/Age";&lt;BR /&gt;put country / Sex / Age;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The show the variables in the example data and how they are supposed to appear in the output.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 15:47:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678493#M204790</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-08-21T15:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: Format issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678496#M204791</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;PID&lt;/TD&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;TD&gt;Sex&lt;/TD&gt;&lt;TD&gt;Age&lt;/TD&gt;&lt;TD&gt;Outcome&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;Canada&lt;/TD&gt;&lt;TD&gt;Female&lt;/TD&gt;&lt;TD&gt;89&lt;/TD&gt;&lt;TD&gt;Good&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;Canada&lt;/TD&gt;&lt;TD&gt;Male&lt;/TD&gt;&lt;TD&gt;62&lt;/TD&gt;&lt;TD&gt;Good&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;789&lt;/TD&gt;&lt;TD&gt;USA&lt;/TD&gt;&lt;TD&gt;Female&lt;/TD&gt;&lt;TD&gt;55&lt;/TD&gt;&lt;TD&gt;Best&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Want&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;PID&lt;/TD&gt;&lt;TD&gt;Country/Sex/Age&lt;/TD&gt;&lt;TD&gt;Outcome&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;Canada&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Female&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;89&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;Good&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;Canada&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Male&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;62&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;Good&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;789&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;USA&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Female&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;55&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;Best&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 15:55:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678496#M204791</guid>
      <dc:creator>zimcom</dc:creator>
      <dc:date>2020-08-21T15:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: Format issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678504#M204795</link>
      <description>Thank you very much!!</description>
      <pubDate>Fri, 21 Aug 2020 16:39:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678504#M204795</guid>
      <dc:creator>zimcom</dc:creator>
      <dc:date>2020-08-21T16:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Format issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678516#M204798</link>
      <description>&lt;P&gt;Adapting the code to desired output:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
 set have;
     file print;
     if _N_ = 1 then put "PID   Country/Sex/Age   Outcome"; /* as labels */ 
     put        @5 country / 
        @1 PID  @5 Sex  @15 outcome / 
                @5  Age;
end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;each&amp;nbsp;@ assigns the starting position of the vale,&amp;nbsp; and / assigns new line.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 17:32:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678516#M204798</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-08-21T17:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Format issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678523#M204801</link>
      <description>wgat would be the variable name for "Country/Sex/Age" then?</description>
      <pubDate>Fri, 21 Aug 2020 17:42:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678523#M204801</guid>
      <dc:creator>zimcom</dc:creator>
      <dc:date>2020-08-21T17:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: Format issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678533#M204804</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Here's a solution using PROC REPORT with the NEWLINE function and ODS ESCAPECHAR set to '^':&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1598033029675.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48539i6D9C7F7FF139EE69/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1598033029675.png" alt="Cynthia_sas_0-1598033029675.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 18:05:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678533#M204804</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-08-21T18:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Format issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678547#M204810</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/219549"&gt;@zimcom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;wgat would be the variable name for "Country/Sex/Age" then?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You asked for a report. With the method I used, there is no need to create a new variable, especially as y want to have them vertically, in the same column of the report.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 18:46:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-issue/m-p/678547#M204810</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-08-21T18:46:43Z</dc:date>
    </item>
  </channel>
</rss>

