<?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 Trouble debugging code-How to resolve in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Trouble-debugging-code-How-to-resolve/m-p/759280#M239913</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm getting this error message in my log. I tried a few things. Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(SUM(t1.DETERM_CASE)) AS SUM_of_DETERM_CASE,&lt;BR /&gt;52 t1.DETERM_CASE,&lt;BR /&gt;53 /* DAT_DIF */&lt;BR /&gt;54 (INTCK('YEAR',t1.LST_DCN_DT, t1.DOD)) LABEL="DAT_DIF" AS DAT_DIF,&lt;BR /&gt;55 /* DAT_DIF_1 */&lt;BR /&gt;56 (YRDIF(t1.LST_DCN_DT, t1.DOD, 'ACT/ACT')) LABEL="DAT_DIF_1" AS DAT_DIF_1&lt;BR /&gt;57 FROM ODA_FTRS.DASH_INIT_REPORT t1&lt;BR /&gt;58 WHERE t1.QDD_CASES = 1 AND YEAR(t1.ERLST_EFF_FLG_DT) =2014 AND t1.ALLOW_CASE = 1 AND t1.AGE_AT_DCN_DT &amp;lt; 18;&lt;BR /&gt;NOTE: A CASE expression has no ELSE clause. Cases not accounted for by the WHEN clauses will result in a missing value for the CASE&lt;BR /&gt;expression.&lt;BR /&gt;NOTE: The query requires remerging summary statistics back with the original data.&lt;BR /&gt;NOTE: Invalid (or missing) arguments to the INTCK function have caused the function to return a missing value.&lt;BR /&gt;NOTE: Invalid argument to function YRDIF. Missing values may be generated.&lt;BR /&gt;NOTE: Table WORK.QUERY_FOR_DASH_INITIAL_CASE_REPO created, with 1 rows and 10 columns.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Aug 2021 11:18:54 GMT</pubDate>
    <dc:creator>Jssa8423</dc:creator>
    <dc:date>2021-08-04T11:18:54Z</dc:date>
    <item>
      <title>Trouble debugging code-How to resolve</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-debugging-code-How-to-resolve/m-p/759280#M239913</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm getting this error message in my log. I tried a few things. Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(SUM(t1.DETERM_CASE)) AS SUM_of_DETERM_CASE,&lt;BR /&gt;52 t1.DETERM_CASE,&lt;BR /&gt;53 /* DAT_DIF */&lt;BR /&gt;54 (INTCK('YEAR',t1.LST_DCN_DT, t1.DOD)) LABEL="DAT_DIF" AS DAT_DIF,&lt;BR /&gt;55 /* DAT_DIF_1 */&lt;BR /&gt;56 (YRDIF(t1.LST_DCN_DT, t1.DOD, 'ACT/ACT')) LABEL="DAT_DIF_1" AS DAT_DIF_1&lt;BR /&gt;57 FROM ODA_FTRS.DASH_INIT_REPORT t1&lt;BR /&gt;58 WHERE t1.QDD_CASES = 1 AND YEAR(t1.ERLST_EFF_FLG_DT) =2014 AND t1.ALLOW_CASE = 1 AND t1.AGE_AT_DCN_DT &amp;lt; 18;&lt;BR /&gt;NOTE: A CASE expression has no ELSE clause. Cases not accounted for by the WHEN clauses will result in a missing value for the CASE&lt;BR /&gt;expression.&lt;BR /&gt;NOTE: The query requires remerging summary statistics back with the original data.&lt;BR /&gt;NOTE: Invalid (or missing) arguments to the INTCK function have caused the function to return a missing value.&lt;BR /&gt;NOTE: Invalid argument to function YRDIF. Missing values may be generated.&lt;BR /&gt;NOTE: Table WORK.QUERY_FOR_DASH_INITIAL_CASE_REPO created, with 1 rows and 10 columns.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 11:18:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-debugging-code-How-to-resolve/m-p/759280#M239913</guid>
      <dc:creator>Jssa8423</dc:creator>
      <dc:date>2021-08-04T11:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble debugging code-How to resolve</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-debugging-code-How-to-resolve/m-p/759281#M239914</link>
      <description>&lt;P&gt;There are no ERRORs in the log that you show us.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTEs do not necessarily indicate problems that have to be "resolved". What resolution would you like?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 11:23:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-debugging-code-How-to-resolve/m-p/759281#M239914</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-08-04T11:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble debugging code-How to resolve</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-debugging-code-How-to-resolve/m-p/759283#M239916</link>
      <description>I would like to resolve&lt;BR /&gt;&lt;BR /&gt;NOTE: The query requires remerging summary statistics back with the original data.&lt;BR /&gt;NOTE: Invalid (or missing) arguments to the INTCK function have caused the function to return a missing value.&lt;BR /&gt;NOTE: Invalid argument to function YRDIF. Missing values may be generated.&lt;BR /&gt;NOTE: Table WORK.QUERY_FOR_DASH_INITIAL_CASE_REPO created, with 1 rows and 10 columns.&lt;BR /&gt;&lt;BR /&gt;The program is not producing any results.</description>
      <pubDate>Wed, 04 Aug 2021 11:30:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-debugging-code-How-to-resolve/m-p/759283#M239916</guid>
      <dc:creator>Jssa8423</dc:creator>
      <dc:date>2021-08-04T11:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble debugging code-How to resolve</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-debugging-code-How-to-resolve/m-p/759285#M239918</link>
      <description>&lt;P&gt;again, I ask ... what resolution would you like?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are getting a data set that has one observation and 10 columns. This is not what you claimed that "&lt;SPAN&gt;The program is not producing any results". Are you expecting more observations? Are you expecting more columns? If so, can you please indicate what the desired output is?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We also need to see the ENTIRE log for this PROC SQL, not just the last dozen lines or so. Paste the log into the window that appears when you click on the &amp;lt;/&amp;gt; icon,&amp;nbsp;&lt;STRONG&gt;DO NOT SKIP THIS STEP&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 11:41:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-debugging-code-How-to-resolve/m-p/759285#M239918</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-08-04T11:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble debugging code-How to resolve</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-debugging-code-How-to-resolve/m-p/759286#M239919</link>
      <description>&lt;P&gt;Here is the entire log&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1 ;*';*";*/;quit;run;&lt;BR /&gt;2 OPTIONS PAGENO=MIN;&lt;BR /&gt;3 %LET _CLIENTTASKLABEL='Allowed Adult QDD Mortality Filed 2014';&lt;BR /&gt;4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';&lt;BR /&gt;5 %LET _CLIENTPROJECTPATH='C:\Users\117415\AppData\Local\Microsoft\Windows\INetCache\Content.Outlook\7875I2WH\Gerry History&lt;BR /&gt;5 ! Shell.egp';&lt;BR /&gt;6 %LET _CLIENTPROJECTPATHHOST='S352052';&lt;BR /&gt;7 %LET _CLIENTPROJECTNAME='Gerry History Shell.egp';&lt;BR /&gt;8&lt;BR /&gt;9 ODS _ALL_ CLOSE;&lt;BR /&gt;10 OPTIONS DEV=PNG;&lt;BR /&gt;11 GOPTIONS XPIXELS=0 YPIXELS=0;&lt;BR /&gt;12 FILENAME EGSR TEMP;&lt;BR /&gt;13 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR&lt;BR /&gt;14 STYLE=HtmlBlue&lt;BR /&gt;15 STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css")&lt;BR /&gt;16 NOGTITLE&lt;BR /&gt;17 NOGFOOTNOTE&lt;BR /&gt;18 GPATH=&amp;amp;sasworklocation&lt;BR /&gt;19 ENCODING=UTF8&lt;BR /&gt;20 options(rolap="on")&lt;BR /&gt;21 ;&lt;BR /&gt;NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR&lt;BR /&gt;22&lt;BR /&gt;23 GOPTIONS ACCESSIBLE;&lt;BR /&gt;24 %_eg_conditional_dropds(WORK.QUERY_FOR_DASH_INITIAL_CASE_REPO);&lt;BR /&gt;NOTE: Table WORK.QUERY_FOR_DASH_INITIAL_CASE_REPO has been dropped.&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;25&lt;BR /&gt;26 PROC SQL;&lt;BR /&gt;27 CREATE TABLE WORK.QUERY_FOR_DASH_INITIAL_CASE_REPO AS&lt;BR /&gt;28 SELECT /* DEATHCAT */&lt;BR /&gt;29 (case&lt;BR /&gt;30 when t1.DOD IS MISSING&lt;BR /&gt;31 then 'No Death Recorded'&lt;BR /&gt;32 when (YRDIF(t1.LST_DCN_DT, t1.DOD, 'ACT/ACT')) &amp;lt; 1 and t1.DOD NOT IS MISSING&lt;BR /&gt;33 then 'Less than 1 Year'&lt;BR /&gt;34 when ((YRDIF(t1.LST_DCN_DT, t1.DOD, 'ACT/ACT')) BETWEEN 1 and 1.99999999) and t1.DOD NOT IS MISSING&lt;BR /&gt;35 then '1 Years'&lt;BR /&gt;36 when ((YRDIF(t1.LST_DCN_DT, t1.DOD, 'ACT/ACT')) BETWEEN 2 and 2.99999999) and t1.DOD NOT IS MISSING&lt;BR /&gt;37 then '2 Years'&lt;BR /&gt;38 when ((YRDIF(t1.LST_DCN_DT, t1.DOD, 'ACT/ACT')) BETWEEN 3 and 3.99999999) and t1.DOD NOT IS MISSING&lt;BR /&gt;39 then '3 Years'&lt;BR /&gt;40 when ((YRDIF(t1.LST_DCN_DT, t1.DOD, 'ACT/ACT')) BETWEEN 4 and 4.99999999) and t1.DOD NOT IS MISSING&lt;BR /&gt;41 then '4 Years'&lt;BR /&gt;42 when ((YRDIF(t1.LST_DCN_DT, t1.DOD, 'ACT/ACT')) &amp;gt;= 5) and t1.DOD NOT IS MISSING&lt;BR /&gt;43 then '5 Years+'&lt;BR /&gt;44 end) AS DEATHCAT,&lt;BR /&gt;45 t1.FLDR_NUM,&lt;BR /&gt;46 t1.CASE_NUM,&lt;BR /&gt;47 t1.RECEIPT_CASES,&lt;BR /&gt;48 t1.ERLST_EFF_FLG_DT,&lt;BR /&gt;49 t1.DOD,&lt;BR /&gt;50 /* SUM_of_DETERM_CASE */&lt;BR /&gt;2 The SAS System 11:47 Tuesday, August 3, 2021&lt;/P&gt;&lt;P&gt;51 (SUM(t1.DETERM_CASE)) AS SUM_of_DETERM_CASE,&lt;BR /&gt;52 t1.DETERM_CASE,&lt;BR /&gt;53 /* DAT_DIF */&lt;BR /&gt;54 (INTCK('YEAR',t1.LST_DCN_DT, t1.DOD)) LABEL="DAT_DIF" AS DAT_DIF,&lt;BR /&gt;55 /* DAT_DIF_1 */&lt;BR /&gt;56 (YRDIF(t1.LST_DCN_DT, t1.DOD, 'ACT/ACT')) LABEL="DAT_DIF_1" AS DAT_DIF_1&lt;BR /&gt;57 FROM ODA_FTRS.DASH_INIT_REPORT t1&lt;BR /&gt;58 WHERE t1.QDD_CASES = 1 AND YEAR(t1.ERLST_EFF_FLG_DT) =2014 AND t1.ALLOW_CASE = 1 AND t1.AGE_AT_DCN_DT &amp;lt; 18;&lt;BR /&gt;NOTE: A CASE expression has no ELSE clause. Cases not accounted for by the WHEN clauses will result in a missing value for the CASE&lt;BR /&gt;expression.&lt;BR /&gt;NOTE: The query requires remerging summary statistics back with the original data.&lt;BR /&gt;NOTE: Invalid (or missing) arguments to the INTCK function have caused the function to return a missing value.&lt;BR /&gt;NOTE: Invalid argument to function YRDIF. Missing values may be generated.&lt;BR /&gt;NOTE: Table WORK.QUERY_FOR_DASH_INITIAL_CASE_REPO created, with 1 rows and 10 columns.&lt;/P&gt;&lt;P&gt;59 QUIT;&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 1:57.22&lt;BR /&gt;cpu time 51.18 seconds&lt;/P&gt;&lt;P&gt;60&lt;BR /&gt;61 GOPTIONS NOACCESSIBLE;&lt;BR /&gt;62&lt;BR /&gt;63&lt;BR /&gt;64 %LET _CLIENTTASKLABEL=;&lt;BR /&gt;65 %LET _CLIENTPROCESSFLOWNAME=;&lt;BR /&gt;66 %LET _CLIENTPROJECTPATH=;&lt;BR /&gt;67 %LET _CLIENTPROJECTPATHHOST=;&lt;BR /&gt;68 %LET _CLIENTPROJECTNAME=;&lt;BR /&gt;69&lt;BR /&gt;70 ;*';*";*/;quit;run;&lt;BR /&gt;71 ODS _ALL_ CLOSE;&lt;BR /&gt;72&lt;BR /&gt;73&lt;BR /&gt;74 QUIT; RUN;&lt;BR /&gt;75&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I was expected observations and not just missing observations.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 11:43:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-debugging-code-How-to-resolve/m-p/759286#M239919</guid>
      <dc:creator>Jssa8423</dc:creator>
      <dc:date>2021-08-04T11:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble debugging code-How to resolve</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-debugging-code-How-to-resolve/m-p/759287#M239920</link>
      <description>&lt;P&gt;You have this line in your code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;WHERE t1.QDD_CASES = 1 AND YEAR(t1.ERLST_EFF_FLG_DT) =2014 AND t1.ALLOW_CASE = 1 AND t1.AGE_AT_DCN_DT &amp;lt; 18&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you are getting fewer observations than you expect, then the problem is in here somehow. One or more of these conditions is removing observations that you do not expect it to remove. You can remove these conditions one-at-a-time to see if these are improperly removing observations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So for example, you can comment out part of this WHERE like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;WHERE t1.QDD_CASES = 1 AND YEAR(t1.ERLST_EFF_FLG_DT) =2014 AND t1.ALLOW_CASE = 1 /* AND t1.AGE_AT_DCN_DT &amp;lt; 18 */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and see if this particular change helps. Similarly, you can comment out each of the other parts of the WHERE to see if it is causing the wrong observations to be excluded.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 11:50:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-debugging-code-How-to-resolve/m-p/759287#M239920</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-08-04T11:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble debugging code-How to resolve</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-debugging-code-How-to-resolve/m-p/759288#M239921</link>
      <description>&lt;PRE&gt;NOTE: The query requires remerging summary statistics back with the original data.&lt;/PRE&gt;
&lt;P&gt;This means that you have a column in the SELECT that is neither the argument of a summary function, nor part of the GROUP BY clause. Instead of just having one observation per group, the original number of observations is taken, and the result(s) of the summary function(s) are stored in each observation.&lt;/P&gt;
&lt;P&gt;Fix your SELECT and GROUP BY, if you did not intend this.&lt;/P&gt;
&lt;PRE&gt;NOTE: Invalid (or missing) arguments to the INTCK function have caused the function to return a missing value.&lt;/PRE&gt;
&lt;P&gt;What it says. You have values in the columns used in the INTCK functions that can't be computed, so it returns missing values. Check your data.&lt;/P&gt;
&lt;PRE&gt;NOTE: Invalid argument to function YRDIF. Missing values may be generated.&lt;/PRE&gt;
&lt;P&gt;Same as above. Check your data.&lt;/P&gt;
&lt;PRE&gt;NOTE: Invalid argument to function YRDIF. Missing values may be generated.&lt;/PRE&gt;
&lt;P&gt;This is a NOTE you will always get; it simply notifies you of the basic outline of the resulting dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It mostly boils down to Maxim 3: Know Your Data.&lt;/P&gt;
&lt;P&gt;Inspect your dataset, especially paying attention to the formats used, so you get a clue about the raw values stored in there. It might be that you try to use a datetime where a date is expected.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 11:49:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-debugging-code-How-to-resolve/m-p/759288#M239921</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-08-04T11:49:52Z</dc:date>
    </item>
  </channel>
</rss>

