<?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 to use character value similar to numeric value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459091#M116568</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This sentence meaning&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt;If there are no orres='pd' and visit='cy6' then I have to pick best observed value by&amp;nbsp;following (cr&amp;gt;pr&amp;gt;sd&amp;gt;pd&amp;gt;ne)&lt;/SPAN&gt;"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;assuming the patient discontinued before "visit=cy6". If there is visit in (cy7&amp;nbsp; or cy8 or cy9) I should not pick these.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Tue, 01 May 2018 20:14:56 GMT</pubDate>
    <dc:creator>knveraraju91</dc:creator>
    <dc:date>2018-05-01T20:14:56Z</dc:date>
    <item>
      <title>How to use character value similar to numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459057#M116547</link>
      <description>&lt;P&gt;Dear&lt;/P&gt;
&lt;P&gt;Some one from support helped me in the before. It worked for me until there is an obs I need to modify my code. Please help.&lt;/P&gt;
&lt;P&gt;I highlighted in blue where i am getting wrong in results and code. How to exclude visit greater than '6' which is in character as cy9.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;output&amp;nbsp; needed;&lt;/P&gt;
&lt;P&gt;id&amp;nbsp; &amp;nbsp; &amp;nbsp; param&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aval&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;visit&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; date&lt;/P&gt;
&lt;P&gt;&amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bor&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pr&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cy6&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2016-11-10&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bor&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sd&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cy4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;2016-08-02&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bor&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pr&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cy5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2016-11-10&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bor&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cr&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cy4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2016-08-02&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bor&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cr&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cy4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2016-08-02&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;output getting&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;id&amp;nbsp; &amp;nbsp; &amp;nbsp; param&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aval&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;visit&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; date&lt;/P&gt;
&lt;P&gt;&amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bor&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pr&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cy6&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2016-11-10&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bor&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sd&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cy4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;2016-08-02&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bor&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cr&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cy9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2016-12-10&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bor&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cr&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cy4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2016-08-02&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bor&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cr&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cy4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2016-08-02&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data ONE ;
  input ID TEST $ ORRES $ VISIT $ DATE $10.;
datalines;
1 ovrp sd cy5 2016-08-02 
1 ovrp pr cy6 2016-11-10
1 ovrp pd cy7 2016-12-10
2 ovrp sd cy4 2016-08-02 
2 ovrp pd cy5 2016-11-10
2 ovrp pd cy6 2016-11-10
3 ovrp sd cy4 2016-08-02 
3 ovrp pr cy5 2016-11-10
3 ovrp cr cy9 2016-12-10
4 ovrp cr cy4 2016-08-02 
4 ovrp pr cy5 2016-11-10
5 ovrp cr cy4 2016-08-02 
5 ovrp pr cy5 2016-11-10
5 ovrp sd dvs 2016-11-10
;
proc sort data=ONE out=SORTED(index=(ID_ORRES=(ID ORRES)));
  by ID DATE  VISIT;
run;
data TWO; 
  set SORTED;
  by ID;

  %* init;
  if first.ID then ID_DONE=0;
  if ID_DONE=0;
  ORDER=6-whichc(ORRES,'cr','pr','sd','pd','ne');
  output;

  &lt;FONT color="#0000FF"&gt;if VISIT &amp;gt;='cy6' then do; &lt;FONT color="#FF6600"&gt;"in my  code I used visit='cy6"&lt;/FONT&gt;&lt;/FONT&gt;
    ID_DONE+1;
    return;
  end;

  NEXTOBS=_N_+1;
  set SORTED(keep=ID ORRES rename=(ID=NEXT_ID ORRES=NEXT_ORRES) ) point=NEXTOBS;
  if ID=NEXT_ID and NEXT_ORRES='pd' then do;
    ID_DONE+1;
    return;
  end;
  keep ID TEST ORRES VISIT DATE ORDER;
run;
proc sql;
  create table THREE as 
  select ID, TEST, ORRES, VISIT, DATE
  from TWO
  group by ID
  having ORDER=max(ORDER);
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 19:01:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459057#M116547</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2018-05-01T19:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to use character value similar to numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459060#M116548</link>
      <description>&lt;P&gt;6 is 'cy9'?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is that all you want to do is exclude where visit = 'cy9'?? Or is this a more general problem, in which case you haven't explained the problem at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can exclude from any analysis 'cy9' with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;set sorted(where=(visit^='cy9'));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 May 2018 19:11:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459060#M116548</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-05-01T19:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to use character value similar to numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459061#M116549</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/68272"&gt;@knveraraju91&lt;/a&gt;&amp;nbsp;It may help to link to your original question.&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 19:14:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459061#M116549</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-05-01T19:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to use character value similar to numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459067#M116551</link>
      <description>&lt;P&gt;Thank you for quick reply.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will try to explain as much as I can.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my code i highlighted in blue&amp;nbsp; "&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt; VISIT&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'cy6'&lt;/SPAN&gt;&amp;nbsp;or "index(visit,'cy6')&amp;nbsp;&lt;BR /&gt;&amp;nbsp;condition gives me the output i need if subject has visit=cy6.&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;CODE class="  language-sas"&gt;But for subject Id=3 does not have visit=cy6. He has visit=cy9 after cy4.&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so if I use&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;VISIT&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'cy6'&lt;/SPAN&gt;&amp;nbsp;or "index(visit,'cy6') &amp;gt;0"&lt;SPAN&gt;&amp;nbsp;it is picking up visit=cy9.&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN&gt;I am including my link to original post:&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/forums/replypage/board-id/programming/message-id/116548" target="_self"&gt;https://communities.sas.com/t5/forums/replypage/board-id/programming/message-id/116548&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 19:29:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459067#M116551</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2018-05-01T19:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to use character value similar to numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459070#M116554</link>
      <description>&lt;P&gt;That's not the right link.&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 19:37:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459070#M116554</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-05-01T19:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to use character value similar to numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459074#M116556</link>
      <description>&lt;P&gt;Thank you. I checked. This is the link.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/How-to-output-an-OBS-based-specific-order/m-p/458850#M116469" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/How-to-output-an-OBS-based-specific-order/m-p/458850#M116469&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 19:41:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459074#M116556</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2018-05-01T19:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use character value similar to numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459079#M116559</link>
      <description>&lt;P&gt;I have looked at that thread, I really don't see a clear explanation in one place of what you want. Perhaps if I read every single comment and then combine them together in my mind, your requirements are clear, but really that's your job to make the requirements clear. So ... if you could, write a clear statement of the requirements you have ...&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 19:51:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459079#M116559</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-05-01T19:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to use character value similar to numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459083#M116563</link>
      <description>&lt;P&gt;Thank you very much for your time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;specs:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First I have to sort data by id date visit.&lt;BR /&gt;second by id, I have look until "orres='pd'" or up to visit='cy6'&lt;BR /&gt;which ever comes earlier&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of the all the "orres values" till either "orres='pd'" or up to visit='cy6'&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I have to pick best "orres" value by following (cr&amp;gt;pr&amp;gt;sd&amp;gt;pd&amp;gt;ne).Which means if there is 'cr' at any visit prior to either&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt; "orres='pd'" or up to visit='cy6' then i have to pick that 'cr' over others.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If there are no orres='pd' and visit='cy6' then I have to pick best observed value by&amp;nbsp;following (cr&amp;gt;pr&amp;gt;sd&amp;gt;pd&amp;gt;ne)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;With my code the issue is, if any subject(ex: id=3) does not have visit=cy6&amp;nbsp; then visits after visit='cy6'&amp;nbsp; (eg: 'cy9' is appearing in my output. Thank you&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 20:07:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459083#M116563</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2018-05-01T20:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to use character value similar to numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459088#M116566</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This sentence meaning&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt;If there are no orres='pd' and visit='cy6' then I have to pick best observed value by&amp;nbsp;following (cr&amp;gt;pr&amp;gt;sd&amp;gt;pd&amp;gt;ne)"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;assuming the patient discontinued before "visit=cy6"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 20:12:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459088#M116566</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2018-05-01T20:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use character value similar to numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459091#M116568</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This sentence meaning&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt;If there are no orres='pd' and visit='cy6' then I have to pick best observed value by&amp;nbsp;following (cr&amp;gt;pr&amp;gt;sd&amp;gt;pd&amp;gt;ne)&lt;/SPAN&gt;"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;assuming the patient discontinued before "visit=cy6". If there is visit in (cy7&amp;nbsp; or cy8 or cy9) I should not pick these.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 20:14:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459091#M116568</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2018-05-01T20:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to use character value similar to numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459121#M116577</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/68272"&gt;@knveraraju91&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This sentence meaning&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt;If there are no orres='pd' and visit='cy6' then I have to pick best observed value by&amp;nbsp;following (cr&amp;gt;pr&amp;gt;sd&amp;gt;pd&amp;gt;ne)&lt;/SPAN&gt;"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;assuming the patient discontinued before "visit=cy6". If there is visit in (cy7&amp;nbsp; or cy8 or cy9) I should not pick these.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Do these values of visit have ANY role in the selection process: (cy7&amp;nbsp; or cy8 or cy9).&lt;/P&gt;
&lt;P&gt;If not then exclude them entirely such as:&lt;/P&gt;
&lt;PRE&gt;proc sort data=ONE out=SORTED(index=(ID_ORRES=(ID ORRES)));
  where visit not in ('cy7' 'cy8' 'cy9');
  by ID DATE  VISIT;
run;&lt;/PRE&gt;
&lt;P&gt;If they do play any role then the details need to be shared.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 21:28:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-character-value-similar-to-numeric-value/m-p/459121#M116577</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-05-01T21:28:25Z</dc:date>
    </item>
  </channel>
</rss>

