<?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: sample of code to fix in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763507#M30452</link>
    <description>&lt;P&gt;it&amp;nbsp; does not&amp;nbsp; work i tried it&lt;/P&gt;</description>
    <pubDate>Tue, 24 Aug 2021 13:32:59 GMT</pubDate>
    <dc:creator>Armand_B</dc:creator>
    <dc:date>2021-08-24T13:32:59Z</dc:date>
    <item>
      <title>sample of code to fix</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763488#M30446</link>
      <description>&lt;P&gt;**** JOIN CHOLESTEROL AND DOSING DATA INTO ADLB ANALYSIS&lt;BR /&gt;**** DATASET AND CREATE WINDOWING VARIABLES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table ADLB as&lt;BR /&gt;select LB.USUBJID, LBDTC, LBTESTCD as PARAMCD,&lt;BR /&gt;LBSTRESN as AVAL, EXSTDTC, input(LBDTC,yymmdd10.) as&lt;BR /&gt;ADT format=yymmdd10.,&lt;BR /&gt;case&lt;BR /&gt;&amp;nbsp; &amp;nbsp; when -5 &amp;lt;= (input(LBDTC,yymmdd10.) – (input(EXSTDTC,yymmdd10.)) &amp;lt;= -1 and&lt;BR /&gt;LBSTRESN ne . then 'YES'&lt;BR /&gt;else 'NO'&lt;BR /&gt;end as within5days&lt;BR /&gt;from LB as LB, EX as EX&lt;BR /&gt;where LB.USUBJID = EX.USUBJID&lt;BR /&gt;order by USUBJID, LBTESTCD, within5days, ADT;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS&lt;/P&gt;&lt;P&gt;this code according to the log file ( see enclosed) has one error in the Case statement&lt;/P&gt;&lt;P&gt;&amp;nbsp; i m unable to fix it&lt;/P&gt;&lt;P&gt;any hint&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 12:35:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763488#M30446</guid>
      <dc:creator>Armand_B</dc:creator>
      <dc:date>2021-08-24T12:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: sample of code to fix</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763490#M30447</link>
      <description>&lt;P&gt;Since many of us will not or cannot download files, please copy the log as text and paste it into the window that appears when you click on the &amp;lt;/&amp;gt;. To be specific, do not copy the log from your PDF file, copy the log from the log window. This preserves the formatting of the log and makes it easier to read.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 12:43:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763490#M30447</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-08-24T12:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: sample of code to fix</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763496#M30449</link>
      <description>&lt;P&gt;Repeating: "&lt;SPAN&gt;copy the log as text and paste it into the window that appears when you click on the &amp;lt;/&amp;gt; icon&lt;/SPAN&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 13:04:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763496#M30449</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-08-24T13:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: sample of code to fix</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763501#M30450</link>
      <description>&lt;P&gt;The problem is with unbalanced brackets&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;( input(LBDTC,yymmdd10.) – &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/FONT&gt; input(EXSTDTC,yymmdd10.) )&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 13:24:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763501#M30450</guid>
      <dc:creator>AlexStr</dc:creator>
      <dc:date>2021-08-24T13:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: sample of code to fix</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763507#M30452</link>
      <description>&lt;P&gt;it&amp;nbsp; does not&amp;nbsp; work i tried it&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 13:32:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763507#M30452</guid>
      <dc:creator>Armand_B</dc:creator>
      <dc:date>2021-08-24T13:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: sample of code to fix</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763509#M30453</link>
      <description>&lt;P&gt;Show us the log. Copy the log as text and&amp;nbsp;&lt;FONT color="#FF0000"&gt;paste it into the window that appears when you click on the &amp;lt;/&amp;gt; icon.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 13:42:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763509#M30453</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-08-24T13:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: sample of code to fix</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763512#M30454</link>
      <description>&lt;P&gt;i think&amp;nbsp; i sent you the log file contents already&amp;nbsp; here it is&amp;nbsp; :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;BR /&gt;68&lt;BR /&gt;69 **** JOIN CHOLESTEROL AND DOSING DATA INTO ADLB ANALYSIS&lt;BR /&gt;70 **** DATASET AND CREATE WINDOWING VARIABLES;&lt;BR /&gt;71 proc sql;&lt;BR /&gt;72 create table ADLB as&lt;BR /&gt;73 select LB.USUBJID, LBDTC, LBTESTCD as PARAMCD,&lt;BR /&gt;74 LBSTRESN as AVAL, EXSTDTC, input(LBDTC,yymmdd10.) as&lt;BR /&gt;75 ADT format=yymmdd10.,&lt;BR /&gt;76 case&lt;BR /&gt;77 when -5 &amp;lt;= (input(LBDTC,yymmdd10.) – (input(EXSTDTC,yymmdd10.)) &amp;lt;= -1 and&lt;BR /&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ___&lt;BR /&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;22&lt;BR /&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;76&lt;BR /&gt;ERROR 22-322: syntax error,one of the following values is expected : !, !!, &amp;amp;, *, **, +, -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, ?, AND,&lt;BR /&gt;BETWEEN, CONTAINS, EQ, EQT, GE, GET, GT, GTT, LE, LET, LIKE, LT, LTT, NE, NET, OR, ^=, |, ||, ~=.&lt;BR /&gt;&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;&lt;BR /&gt;78 LBSTRESN ne . then 'YES'&lt;BR /&gt;79 else 'NO'&lt;BR /&gt;80 end as within5days&lt;BR /&gt;81 from LB as LB, EX as EX&lt;BR /&gt;82 where LB.USUBJID = EX.USUBJID&lt;BR /&gt;83 order by USUBJID, LBTESTCD, within5days, ADT;&lt;BR /&gt;NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.&lt;BR /&gt;84 quit;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE SQL a utilisé (Durée totale du traitement) :&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;user cpu time 0.00 seconds&lt;BR /&gt;system cpu time 0.00 seconds&lt;BR /&gt;memory 230.96k&lt;BR /&gt;OS Memory 23460.00k&lt;BR /&gt;Timestamp 24/08/2021 01:39:19 PM&lt;BR /&gt;Step Count 24 Switch Count 0&lt;BR /&gt;Page Faults 0&lt;BR /&gt;Page Reclaims 58&lt;BR /&gt;Page Swaps 0&lt;BR /&gt;Voluntary Context Switches 0&lt;BR /&gt;Involuntary Context Switches 0&lt;BR /&gt;Block Input Operations 0&lt;BR /&gt;Block Output Operations 0&lt;BR /&gt;&lt;BR /&gt;85&lt;BR /&gt;86 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;BR /&gt;96&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 14:06:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763512#M30454</guid>
      <dc:creator>Armand_B</dc:creator>
      <dc:date>2021-08-24T14:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: sample of code to fix</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763514#M30455</link>
      <description>&lt;P&gt;We would all benefit if the formatting of the log is maintained.&amp;nbsp;&lt;SPAN&gt;Copy the log as text and&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;paste it into the window that appears when you click on the &amp;lt;/&amp;gt; icon.&amp;nbsp;&lt;FONT color="#000000"&gt;Do not ignore the part in red.&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;From now on, this is mandatory that you present the log this way.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;It appears you don't have a minus sign where the error is happening, instead you have an "en-dash". Put a minus sign (hyphen) there.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 14:20:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763514#M30455</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-08-24T14:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: sample of code to fix</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763542#M30456</link>
      <description>&lt;P&gt;the symbol&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;"–" between&amp;nbsp;"input" instructions is wrong. It's from Unicode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Change it manually to the "-" (minus sign)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And of cause balance brackets, please&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 14:25:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763542#M30456</guid>
      <dc:creator>AlexStr</dc:creator>
      <dc:date>2021-08-24T14:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: sample of code to fix</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763543#M30457</link>
      <description>&lt;P&gt;The log often contains diagnostic characters as in this case, underscores where SAS determined there is a syntax problem. However, the main message windows on this forum reformat pasted text. Which moves the locations of those diagnostic characters making them less helpful.&lt;/P&gt;
&lt;P&gt;Which is why we request pasting the log into a text box opened with the &amp;lt;/&amp;gt; icon: that will preserve the text as it appears in the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you look real close you may see that the character you think is a subtraction symbol is actually a line character. at least that is what I see when I copy your pasted text into my editor.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try retyping the – as a -&amp;nbsp; &amp;lt;=See the difference between the two characters? The second is a subtraction.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you copy and paste text from different sources you may get artifacts like this from files like PDF, RTF, Word processors, and some websites where programming characters get converted into "pretty" text characters for display. But they are not valid in programming syntax.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 14:26:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763543#M30457</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-24T14:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: sample of code to fix</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763570#M30458</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table ADLB as
select 
LB.USUBJID, 
LBDTC, 
LBTESTCD as PARAMCD,
LBSTRESN as AVAL, 
EXSTDTC, 
input(LBDTC, yymmdd10.) as ADT format = yymmdd10.,
case
    when -5 &amp;lt;= (input(LBDTC, yymmdd10.) - input(EXSTDTC, yymmdd10.)) &amp;lt;= -1 
 and  LBSTRESN ne . then 'YES'
  else 'NO'
 end as within5days
from LB as LB, EX as EX
where LB.USUBJID = EX.USUBJID
order by USUBJID, LBTESTCD, within5days, ADT;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Does this work?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 15:29:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sample-of-code-to-fix/m-p/763570#M30458</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-08-24T15:29:07Z</dc:date>
    </item>
  </channel>
</rss>

