<?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 Format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Format/m-p/498504#M132493</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname HW 'C:\Desktop';
proc format;
value $TestSite 'LS'='Lumbar-Spine' 'T'='Thoracic';
Value $TypeOfImaging 1='MRI' 2='CT' 3='Plain';
format test site $TestSite. Type of Imaging $TypeOfImaging.;
Data HW6;
Set HW.HW6;
proc sort data=hw.hw6 nodupkey;
by DOS;
proc print;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are 4 variables:&lt;/P&gt;&lt;P&gt;PATID – Patient ID&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;DOS – Date of Service&amp;nbsp;&lt;/P&gt;&lt;P&gt;TestSite – test Site: LS=Lumbar-Spine, T=Thoracic&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TypeOfImaging – Type of Imaging: 1=MRI, 2=CT, 3=Plain&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is possible that a patient may have more than 1 entry on the same date of service.&lt;/P&gt;&lt;P&gt;I am trying to write a program so that:&lt;/P&gt;&lt;P&gt;A. Create a SAS data set so that a patient may not have more than 1 entry on the same date of service.&lt;/P&gt;&lt;P&gt;B. Create 2 formats: 1 for TestSite and 1 for TypeOfImaging so that their values will be listed in full details when PRINT procedure is used.&lt;/P&gt;&lt;P&gt;C. Use PRINT procedure to print out the data with full details of the values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure where the error lies.&lt;/P&gt;</description>
    <pubDate>Mon, 24 Sep 2018 18:12:06 GMT</pubDate>
    <dc:creator>sachin05t</dc:creator>
    <dc:date>2018-09-24T18:12:06Z</dc:date>
    <item>
      <title>Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format/m-p/498504#M132493</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname HW 'C:\Desktop';
proc format;
value $TestSite 'LS'='Lumbar-Spine' 'T'='Thoracic';
Value $TypeOfImaging 1='MRI' 2='CT' 3='Plain';
format test site $TestSite. Type of Imaging $TypeOfImaging.;
Data HW6;
Set HW.HW6;
proc sort data=hw.hw6 nodupkey;
by DOS;
proc print;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are 4 variables:&lt;/P&gt;&lt;P&gt;PATID – Patient ID&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;DOS – Date of Service&amp;nbsp;&lt;/P&gt;&lt;P&gt;TestSite – test Site: LS=Lumbar-Spine, T=Thoracic&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TypeOfImaging – Type of Imaging: 1=MRI, 2=CT, 3=Plain&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is possible that a patient may have more than 1 entry on the same date of service.&lt;/P&gt;&lt;P&gt;I am trying to write a program so that:&lt;/P&gt;&lt;P&gt;A. Create a SAS data set so that a patient may not have more than 1 entry on the same date of service.&lt;/P&gt;&lt;P&gt;B. Create 2 formats: 1 for TestSite and 1 for TypeOfImaging so that their values will be listed in full details when PRINT procedure is used.&lt;/P&gt;&lt;P&gt;C. Use PRINT procedure to print out the data with full details of the values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure where the error lies.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Sep 2018 18:12:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format/m-p/498504#M132493</guid>
      <dc:creator>sachin05t</dc:creator>
      <dc:date>2018-09-24T18:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format/m-p/498506#M132494</link>
      <description>This code doesn't really do anything...where are you expecting something to happen? It creates a format and copies the file over but that's all. &lt;BR /&gt;&lt;BR /&gt;Please comment your code with what you expect to be happening. This looks a lot like homework, so it's definitely preferable if you show a strong attempt first.</description>
      <pubDate>Mon, 24 Sep 2018 18:18:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format/m-p/498506#M132494</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-24T18:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format/m-p/498507#M132495</link>
      <description>&lt;P&gt;The format statement is a data step statement, not for open code or proc format.&lt;/P&gt;
&lt;P&gt;This:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;format test site $TestSite. Type of Imaging $TypeOfImaging.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;would also mean you have the following variables:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;test&lt;/LI&gt;
&lt;LI&gt;site&lt;/LI&gt;
&lt;LI&gt;type&lt;/LI&gt;
&lt;LI&gt;of&lt;/LI&gt;
&lt;LI&gt;imaging&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;You create work.hw6, but sort hw.hw6.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Sep 2018 18:18:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format/m-p/498507#M132495</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-09-24T18:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format/m-p/498511#M132499</link>
      <description>&lt;P&gt;Sure..I will make more attempts. We were taught Sort and Format today.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Sep 2018 18:23:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format/m-p/498511#M132499</guid>
      <dc:creator>sachin05t</dc:creator>
      <dc:date>2018-09-24T18:23:11Z</dc:date>
    </item>
  </channel>
</rss>

