<?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: Using Proc SQL to match participants that have specific ICD-10 codes in SAS Software for Learning Community</title>
    <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/880333#M1276</link>
    <description>&lt;P&gt;Thank you! I went back and changed my code from proc import to a data step but I am still having issues with the proc sql step. I keep receiving the error:&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;ERROR: File WORK.EE2016.DATA does not exist.&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR: File WORK.ICD_CODES.DATA does not exist.&lt;/DIV&gt;&lt;DIV class=""&gt;but they both exist. Here is my code:&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P&gt;*data step for EE2106 with ICD10 code with decimal removed";&lt;BR /&gt;data EE2106;&lt;BR /&gt;infile '/home/u62039685/DatasetEE2016/PUF_ICD10_DCODE2016.csv' dsd;&lt;BR /&gt;input inc_key ICD10 $;&lt;BR /&gt;length ICD10_dcode $10;&lt;BR /&gt;ICD10_dcode = compress(icd10,".");&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;*data step for ICD10 code running list";&lt;BR /&gt;data ICD10csv;&lt;BR /&gt;infile '/home/u62039685/DatasetEE2016/TBI ICD-10.csv';&lt;BR /&gt;input icd10 $;&lt;BR /&gt;diag_code = compress (icd10,",");&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;*merging the two data sets to create cohort";&lt;BR /&gt;proc sql;&lt;BR /&gt;create table cohort2016 as&lt;BR /&gt;select *&lt;BR /&gt;from EE2016&lt;BR /&gt;where ICDTBI in (select ICD_Code from ICD_Codes);&lt;BR /&gt;run;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 13 Jun 2023 02:58:00 GMT</pubDate>
    <dc:creator>PunkinSAS08</dc:creator>
    <dc:date>2023-06-13T02:58:00Z</dc:date>
    <item>
      <title>Using Proc SQL to match participants that have specific ICD-10 codes</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/879839#M1255</link>
      <description>&lt;P&gt;Hi! I'm new to SAS and cannot figure out how to create a cohort of participants that have the ICD-10 codes I'm looking for. Here is my code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc import datafile='/home/u62039685/DatasetEE2016/PUF_ICD10_DCODE2016.csv'&lt;BR /&gt;out=cohort2016&lt;BR /&gt;dbms=csv replace;&lt;BR /&gt;getnames=yes;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc import datafile='/home/u62039685/DatasetEE2016/TBI ICD-10.xlsx'&lt;BR /&gt;out= icd10codes&lt;BR /&gt;dbms= XlSX replace;&lt;BR /&gt;Sheet= 'Sheet1';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table cohort as&lt;BR /&gt;select a.*, b.*&lt;BR /&gt;from cohort2016 a&lt;BR /&gt;inner join icd10codes b&lt;BR /&gt;on put (a.inc_key, best10.) = b.diag_code;&lt;BR /&gt;select * from cohort;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 02:53:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/879839#M1255</guid>
      <dc:creator>PunkinSAS08</dc:creator>
      <dc:date>2023-06-09T02:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using Proc SQL to match participants that have specific ICD-10 codes</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/879843#M1256</link>
      <description>&lt;P&gt;Without representative sample data nor SAS log nor you actually telling us if you get an error or just not the expected result, it's a bit hard to advise.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One thing I can see:&lt;/P&gt;
&lt;PRE&gt;put (a.inc_key, best10.)&lt;/PRE&gt;
&lt;P&gt;Will create a string of length 10 that is right aligned meaning you will have leading blanks if the number is less than 10 digits. If the string in variable diag_code is left aligned (most likely the case) then the keys wouldn't match.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get around this use either of below two coding options:&lt;/P&gt;
&lt;PRE&gt;put(b.inc_key,best10. -l)
 
or:

strip(put(b.inc_key,best10.))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 04:29:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/879843#M1256</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-06-09T04:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using Proc SQL to match participants that have specific ICD-10 codes</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/879844#M1257</link>
      <description>&lt;P&gt;Actual examples of data would be helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is unlikely to match given my limited experience with ICD-10 codes.&lt;/P&gt;
&lt;PRE&gt;put (a.inc_key, best10.) = b.diag_code;&lt;/PRE&gt;
&lt;P&gt;First problem: Put (a.inc_key, best10.) will generate a 10 character value that is right justified. That means if the numeric value of Inc_key is 123, for example the result is "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123" and comparisons with character values start with the first character. Unless diag_code is pretty strange it is unlikely to start with spaces.&lt;/P&gt;
&lt;P&gt;The justification issue can be solved with the -L parmeter in the Put function call:&lt;/P&gt;
&lt;PRE&gt;put(a.inc_key, best10. -L)&lt;/PRE&gt;
&lt;P&gt;But that may not be sufficient. There are many ICD-10 codes that incorporate letters in the code the value. So the Imported data may have a bunch of missing values for the code because of treating it as numeric.&lt;/P&gt;
&lt;P&gt;Suggestion: go back to the import step an modify it to examine more than the default 20 rows that Proc Import uses to set properties of variables. The Guessingrows statement lets you specify a number of rows to use to set properties or the keyword Max to use the whole file.&lt;/P&gt;
&lt;PRE&gt;proc import datafile='/home/u62039685/DatasetEE2016/PUF_ICD10_DCODE2016.csv'
out=cohort2016
dbms=csv replace;
getnames=yes;
Guessingrows=max;
run;&lt;/PRE&gt;
&lt;P&gt;Or use documentation from the file source to write a data step with the correct properties for all of the variables.&lt;/P&gt;
&lt;P&gt;You can have similar issues with spreadsheets depending on how someone makes them. Typically I save the data from XLSX files to CSV using spreadsheet program options and read the CSV file where I can set properties.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 04:39:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/879844#M1257</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-06-09T04:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using Proc SQL to match participants that have specific ICD-10 codes</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/879882#M1258</link>
      <description>&lt;P&gt;Ah, sorry. Here is the log:&lt;/P&gt;&lt;DIV&gt;&lt;DIV class=""&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class=""&gt;68&lt;/DIV&gt;&lt;DIV class=""&gt;69 proc sql;&lt;/DIV&gt;&lt;DIV class=""&gt;70 create table cohort as&lt;/DIV&gt;&lt;DIV class=""&gt;71 select a.*, b.*&lt;/DIV&gt;&lt;DIV class=""&gt;72 from cohort2016 a&lt;/DIV&gt;&lt;DIV class=""&gt;73 inner join icd10codes b&lt;/DIV&gt;&lt;DIV class=""&gt;74 on put (a.inc_key, best10.-L) = b.diag_code;&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: Table WORK.COHORT created, with 0 rows and 4 columns.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;75 select * from cohort;&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: No rows were selected.&lt;/DIV&gt;&lt;DIV class=""&gt;76 quit;&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;/DIV&gt;&lt;DIV class=""&gt;real time 0.93 seconds&lt;/DIV&gt;&lt;DIV class=""&gt;user cpu time 0.91 seconds&lt;/DIV&gt;&lt;DIV class=""&gt;system cpu time 0.01 seconds&lt;/DIV&gt;&lt;DIV class=""&gt;memory 7241.40k&lt;/DIV&gt;&lt;DIV class=""&gt;OS Memory 29872.00k&lt;/DIV&gt;&lt;DIV class=""&gt;Timestamp 06/09/2023 03:30:44 PM&lt;/DIV&gt;&lt;DIV class=""&gt;Step Count 26 Switch Count 5&lt;/DIV&gt;&lt;DIV class=""&gt;Page Faults 0&lt;/DIV&gt;&lt;DIV class=""&gt;Page Reclaims 550&lt;/DIV&gt;&lt;DIV class=""&gt;Page Swaps 0&lt;/DIV&gt;&lt;DIV class=""&gt;Voluntary Context Switches 17&lt;/DIV&gt;&lt;DIV class=""&gt;Involuntary Context Switches 1&lt;/DIV&gt;&lt;DIV class=""&gt;Block Input Operations 0&lt;/DIV&gt;&lt;DIV class=""&gt;Block Output Operations 264&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;77&lt;/DIV&gt;&lt;DIV class=""&gt;78 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class=""&gt;88&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;**this produces a blank table in the output tab with all columns from both imported tables instead of just the inc_key (participants) with the intended diag_code (ICD-10 codes).&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;I hope this helps! I added the -L function and there is no difference in output.&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 09 Jun 2023 15:34:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/879882#M1258</guid>
      <dc:creator>PunkinSAS08</dc:creator>
      <dc:date>2023-06-09T15:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using Proc SQL to match participants that have specific ICD-10 codes</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/879886#M1259</link>
      <description>&lt;P&gt;Time to extract some values from BOTH data sets that you think should match.&lt;/P&gt;
&lt;P&gt;Depending on the source of the ICD codes you may have different implementations of some of the conventions. I have seen some users that have replaced decimal points in codes with other characters or removed them entirely, as mentioned LETTERS are standard in many ICD codes and your code shows that you are using a numeric value. So if all of the B data set Diag_code values have letters then none of the A.inc_key will ever match because those from A are numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 15:45:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/879886#M1259</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-06-09T15:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using Proc SQL to match participants that have specific ICD-10 codes</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/879889#M1260</link>
      <description>&lt;P&gt;ICD-10 codes are not numbers.&amp;nbsp; A quick search found this site:&amp;nbsp;&amp;nbsp;&lt;A href="https://www.aapc.com/codes/icd-10-codes-range" target="_blank"&gt;https://www.aapc.com/codes/icd-10-codes-range&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1686325905455.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/84843iF5BE07CE9563EABA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Tom_0-1686325905455.png" alt="Tom_0-1686325905455.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have numbers for ICD-10 codes then something is wrong.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 15:53:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/879889#M1260</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-09T15:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Using Proc SQL to match participants that have specific ICD-10 codes</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/879891#M1261</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ICD-10 codes are alphanumeric and do not have any spaces or decimals.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 15:57:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/879891#M1261</guid>
      <dc:creator>PunkinSAS08</dc:creator>
      <dc:date>2023-06-09T15:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using Proc SQL to match participants that have specific ICD-10 codes</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/879894#M1262</link>
      <description>&lt;P&gt;You should start with first getting your data import process right. This means that you do NOT use PROC IMPORT, and do NOT use Excel files.&lt;/P&gt;
&lt;P&gt;Save the Excel spreadsheet as a csv file, and then use DATA steps to read both csv files, in which &lt;EM&gt;you&lt;/EM&gt; take full control over variable types and attributes, and how data is read.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 16:21:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/879894#M1262</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-06-09T16:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using Proc SQL to match participants that have specific ICD-10 codes</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/879895#M1263</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/443503"&gt;@PunkinSAS08&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Tom,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The ICD-10 codes are alphanumeric and do not have any spaces or decimals.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You cannot apply a numeric format like BEST to a character variable.&amp;nbsp; Note that ICD-10 procedure codes also include letters.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1686327677489.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/84845i3215D7C35A32B92B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Tom_0-1686327677489.png" alt="Tom_0-1686327677489.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps the code was previously used with ICD-9 codes?&amp;nbsp; Those were frequently stored as numbers since they mainly did not include letters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 16:22:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/879895#M1263</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-09T16:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using Proc SQL to match participants that have specific ICD-10 codes</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/879921#M1264</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/443503"&gt;@PunkinSAS08&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Tom,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The ICD-10 codes are alphanumeric and do not have any spaces or decimals.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Your attempt to use this code says that statement is not correct:&lt;/P&gt;
&lt;PRE&gt;on put (a.inc_key, best10.) = b.diag_code;&lt;/PRE&gt;
&lt;P&gt;and again here&lt;/P&gt;
&lt;PRE&gt;74 on put (a.inc_key, best10.-L) = b.diag_code;
NOTE: Table WORK.COHORT created, with 0 rows and 4 columns.&lt;/PRE&gt;
&lt;P&gt;If a.inc_key was "alphanumeric", meaning character values allowed, then that Put would generate the following error:&lt;/P&gt;
&lt;PRE&gt;ERROR: Numeric format BEST in PUT function requires a numeric argument.
&lt;/PRE&gt;
&lt;P&gt;So a.inc_key is numeric. For the nth time.&lt;/P&gt;
&lt;P&gt;You need to reread the source data to make sure the variable is character.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:11:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/879921#M1264</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-06-09T17:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using Proc SQL to match participants that have specific ICD-10 codes</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/880333#M1276</link>
      <description>&lt;P&gt;Thank you! I went back and changed my code from proc import to a data step but I am still having issues with the proc sql step. I keep receiving the error:&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;ERROR: File WORK.EE2016.DATA does not exist.&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR: File WORK.ICD_CODES.DATA does not exist.&lt;/DIV&gt;&lt;DIV class=""&gt;but they both exist. Here is my code:&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P&gt;*data step for EE2106 with ICD10 code with decimal removed";&lt;BR /&gt;data EE2106;&lt;BR /&gt;infile '/home/u62039685/DatasetEE2016/PUF_ICD10_DCODE2016.csv' dsd;&lt;BR /&gt;input inc_key ICD10 $;&lt;BR /&gt;length ICD10_dcode $10;&lt;BR /&gt;ICD10_dcode = compress(icd10,".");&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;*data step for ICD10 code running list";&lt;BR /&gt;data ICD10csv;&lt;BR /&gt;infile '/home/u62039685/DatasetEE2016/TBI ICD-10.csv';&lt;BR /&gt;input icd10 $;&lt;BR /&gt;diag_code = compress (icd10,",");&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;*merging the two data sets to create cohort";&lt;BR /&gt;proc sql;&lt;BR /&gt;create table cohort2016 as&lt;BR /&gt;select *&lt;BR /&gt;from EE2016&lt;BR /&gt;where ICDTBI in (select ICD_Code from ICD_Codes);&lt;BR /&gt;run;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 Jun 2023 02:58:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/880333#M1276</guid>
      <dc:creator>PunkinSAS08</dc:creator>
      <dc:date>2023-06-13T02:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using Proc SQL to match participants that have specific ICD-10 codes</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/880342#M1277</link>
      <description>&lt;P&gt;When SAS tells you something isn't there, then it is not there, period.&lt;/P&gt;
&lt;P&gt;Run all three steps in one sweep and look at the log. If this does not give you a clue, post the complete (code and messages) log text by copy/pasting it into a window opened with this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54552i914D97BE1B0F21E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can reduce multiple identical ERROR messages, if such exist.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 04:51:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/880342#M1277</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-06-13T04:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using Proc SQL to match participants that have specific ICD-10 codes</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/880547#M1281</link>
      <description>&lt;P&gt;Code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;*data step for EE2106 with ICD10 code with decimal removed";&lt;BR /&gt;data EE2106;&lt;BR /&gt;infile '/home/u62039685/DatasetEE2016/PUF_ICD10_DCODE2016.csv' dsd;&lt;BR /&gt;input inc_key ICD10 $;&lt;BR /&gt;length ICD10_dcode $10;&lt;BR /&gt;ICD10_dcode = compress(icd10,".");&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;*data step for ICD10 code running list";&lt;BR /&gt;data ICD10csv;&lt;BR /&gt;infile '/home/u62039685/DatasetEE2016/TBI ICD-10.csv';&lt;BR /&gt;input icd10 $;&lt;BR /&gt;diag_code = compress (icd10,",");&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;*merging the two data sets to create cohort";&lt;BR /&gt;proc sql;&lt;BR /&gt;create table cohort2016 as&lt;BR /&gt;select *&lt;BR /&gt;from EE2016&lt;BR /&gt;where ICDTBI in (select ICD_Code from ICD_Codes);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class=""&gt;68&lt;/DIV&gt;&lt;DIV class=""&gt;69 proc sql;&lt;/DIV&gt;&lt;DIV class=""&gt;70 create table cohort2016 as&lt;/DIV&gt;&lt;DIV class=""&gt;71 select *&lt;/DIV&gt;&lt;DIV class=""&gt;72 from EE2016&lt;/DIV&gt;&lt;DIV class=""&gt;73 where ICDTBI in (select ICD_Code from ICD_Codes);&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR: File WORK.EE2016.DATA does not exist.&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR: File WORK.ICD_CODES.DATA does not exist.&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.&lt;/DIV&gt;&lt;DIV class=""&gt;74 run;&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: PROC SQL statements are executed immediately; The RUN statement has no effect.&lt;/DIV&gt;&lt;DIV class=""&gt;75&lt;/DIV&gt;&lt;DIV class=""&gt;76 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class=""&gt;86&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 Jun 2023 20:57:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/880547#M1281</guid>
      <dc:creator>PunkinSAS08</dc:creator>
      <dc:date>2023-06-13T20:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using Proc SQL to match participants that have specific ICD-10 codes</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/880575#M1282</link>
      <description>&lt;P&gt;You only ran the SQL, not the DATA steps. So the datasets in the temporary WORK library won't be there.&lt;/P&gt;
&lt;P&gt;As I already said,&amp;nbsp;&lt;STRONG&gt;run all three steps in one submit&lt;/STRONG&gt; and post the log,&amp;nbsp;&lt;STRONG&gt;and use the proper window!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 03:31:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Using-Proc-SQL-to-match-participants-that-have-specific-ICD-10/m-p/880575#M1282</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-06-14T03:31:56Z</dc:date>
    </item>
  </channel>
</rss>

