<?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 adding value in a variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/adding-value-in-a-variable/m-p/540945#M149294</link>
    <description>&lt;P&gt;i wanted to value in an already existed variable. visdate is a numeric variable. I used this code.&lt;/P&gt;&lt;P&gt;/*Fixing TOC information*/&lt;BR /&gt;DATA Marchsub.CLN1718_E;&lt;BR /&gt;SET Marchsub.CLN1718_D;&lt;BR /&gt;if visdate=2019-01-19 AND cl_patientid='48095' then toc_vis="1";&lt;BR /&gt;if visdate=2017-12-17 AND cl_patientid='50055' then toc_vis="1";&lt;BR /&gt;if visdate=2019-02-06 AND cl_patientid='591438' then toc_vis="1";&lt;BR /&gt;if visdate=2019-01-17 AND cl_patientid='1091715' then toc_vis="1";&lt;BR /&gt;if visdate=2018-09-06 AND cl_patientid='1750418' then toc_vis="1";&lt;BR /&gt;if visdate=2019-01-17 AND cl_patientid='1950740' then toc_vis="1";&lt;BR /&gt;if visdate=2018-02-16 AND cl_patientid='1961685' then toc_vis="1";&lt;BR /&gt;if visdate=2018-08-06 AND cl_patientid='2131239' then toc_vis="1";&lt;BR /&gt;if visdate=2018-03-21 AND cl_patientid='2179071' then toc_vis="1";&lt;BR /&gt;if visdate=2017-07-24 AND cl_patientid='2485717' then toc_vis="1";&lt;BR /&gt;if visdate=2019-02-04 AND cl_patientid='3192471' then toc_vis="1";&lt;BR /&gt;if visdate=2017-12-27 AND cl_patientid='3454954' then toc_vis="1";&lt;BR /&gt;if visdate=2017-07-17 AND cl_patientid='3471634' then toc_vis="1";&lt;BR /&gt;if visdate=2017-12-27 AND cl_patientid='3475545' then toc_vis="1";&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;AND used this code to check if the codes above worked.;&lt;/P&gt;&lt;P&gt;proc freq data=Marchsub.CLN1718_E;&lt;BR /&gt;table toc_vis/norow nocol nopercent;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;Log says :&lt;/P&gt;&lt;P&gt;272 DATA Marchsub.CLN1718_E;&lt;BR /&gt;273 SET Marchsub.CLN1718_D;&lt;BR /&gt;274 if cl_patientid='48095' AND visdate=2019-01-19 then toc_vis="1";&lt;BR /&gt;275 if cl_patientid='50055' AND visdate=2017-12-17 then toc_vis="1";&lt;BR /&gt;276 RUN;&lt;/P&gt;&lt;P&gt;NOTE: There were 3437 observations read from the data set MARCHSUB.CLN1718_D.&lt;BR /&gt;NOTE: The data set MARCHSUB.CLN1718_E has 3437 observations and 61 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.06 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it did not work. Please help me.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Mar 2019 22:22:02 GMT</pubDate>
    <dc:creator>Dhana18</dc:creator>
    <dc:date>2019-03-06T22:22:02Z</dc:date>
    <item>
      <title>adding value in a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/adding-value-in-a-variable/m-p/540945#M149294</link>
      <description>&lt;P&gt;i wanted to value in an already existed variable. visdate is a numeric variable. I used this code.&lt;/P&gt;&lt;P&gt;/*Fixing TOC information*/&lt;BR /&gt;DATA Marchsub.CLN1718_E;&lt;BR /&gt;SET Marchsub.CLN1718_D;&lt;BR /&gt;if visdate=2019-01-19 AND cl_patientid='48095' then toc_vis="1";&lt;BR /&gt;if visdate=2017-12-17 AND cl_patientid='50055' then toc_vis="1";&lt;BR /&gt;if visdate=2019-02-06 AND cl_patientid='591438' then toc_vis="1";&lt;BR /&gt;if visdate=2019-01-17 AND cl_patientid='1091715' then toc_vis="1";&lt;BR /&gt;if visdate=2018-09-06 AND cl_patientid='1750418' then toc_vis="1";&lt;BR /&gt;if visdate=2019-01-17 AND cl_patientid='1950740' then toc_vis="1";&lt;BR /&gt;if visdate=2018-02-16 AND cl_patientid='1961685' then toc_vis="1";&lt;BR /&gt;if visdate=2018-08-06 AND cl_patientid='2131239' then toc_vis="1";&lt;BR /&gt;if visdate=2018-03-21 AND cl_patientid='2179071' then toc_vis="1";&lt;BR /&gt;if visdate=2017-07-24 AND cl_patientid='2485717' then toc_vis="1";&lt;BR /&gt;if visdate=2019-02-04 AND cl_patientid='3192471' then toc_vis="1";&lt;BR /&gt;if visdate=2017-12-27 AND cl_patientid='3454954' then toc_vis="1";&lt;BR /&gt;if visdate=2017-07-17 AND cl_patientid='3471634' then toc_vis="1";&lt;BR /&gt;if visdate=2017-12-27 AND cl_patientid='3475545' then toc_vis="1";&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;AND used this code to check if the codes above worked.;&lt;/P&gt;&lt;P&gt;proc freq data=Marchsub.CLN1718_E;&lt;BR /&gt;table toc_vis/norow nocol nopercent;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;Log says :&lt;/P&gt;&lt;P&gt;272 DATA Marchsub.CLN1718_E;&lt;BR /&gt;273 SET Marchsub.CLN1718_D;&lt;BR /&gt;274 if cl_patientid='48095' AND visdate=2019-01-19 then toc_vis="1";&lt;BR /&gt;275 if cl_patientid='50055' AND visdate=2017-12-17 then toc_vis="1";&lt;BR /&gt;276 RUN;&lt;/P&gt;&lt;P&gt;NOTE: There were 3437 observations read from the data set MARCHSUB.CLN1718_D.&lt;BR /&gt;NOTE: The data set MARCHSUB.CLN1718_E has 3437 observations and 61 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.06 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it did not work. Please help me.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2019 22:22:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/adding-value-in-a-variable/m-p/540945#M149294</guid>
      <dc:creator>Dhana18</dc:creator>
      <dc:date>2019-03-06T22:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: adding value in a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/adding-value-in-a-variable/m-p/540947#M149295</link>
      <description>&lt;P&gt;Why would the value of VISDATE be equal to 2,&lt;SPAN&gt;019 minus 20 ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to enter a date literal use a string that is compatible with the DATE informat enclosed in quotes followed by the letter d.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if visdate="19JAN2019"d&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Mar 2019 22:32:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/adding-value-in-a-variable/m-p/540947#M149295</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-03-06T22:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: adding value in a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/adding-value-in-a-variable/m-p/540986#M149301</link>
      <description>&lt;P&gt;AND if cl_patientid is a character string, you might need to left-justify it for the comparison:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;left(cl_patientid) = '48095'&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2019 04:11:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/adding-value-in-a-variable/m-p/540986#M149301</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-03-07T04:11:03Z</dc:date>
    </item>
  </channel>
</rss>

