<?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: Error: Column Loan Could Not be Found in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942894#M42352</link>
    <description>&lt;P&gt;Exactly the same problem as in your other thread &lt;A href="https://communities.sas.com/t5/New-SAS-User/Error-Variable-not-Found/m-p/942814#M42332" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/New-SAS-User/Error-Variable-not-Found/m-p/942814#M42332&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Same data set, same proc contents result, no variable named LOAN in the data set. The wording is different because Proc Sql behaves a bit differently and you could have created the variable where the reference to the alias B was used.&lt;/P&gt;
&lt;P&gt;Example that selects a variable with one name into a new name:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sql;
   select b.loan
   from (select name as loan from sashelp.class) as b
  ;
quit;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Sep 2024 17:28:28 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2024-09-06T17:28:28Z</dc:date>
    <item>
      <title>Error: Column Loan Could Not be Found</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942866#M42337</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Seeking for help in fixing the errors as found in this code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sql;
create table pledge9 as select
a.*,
b.waterfall_frb_ny
from   pledge8  as a left join PledgeDataLoanLevel5 as b
on a.loan_number2 = b.loan_nb
;
quit ;
proc freq data = pledge9; tables   waterfall3 *   waterfall_frb_ny   / list missing   ;run;
&lt;/PRE&gt;
&lt;P&gt;Screenshot of Errors&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas code error.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100047i99E2E289D967E92B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sas code error.PNG" alt="sas code error.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Cykelops&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 09:48:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942866#M42337</guid>
      <dc:creator>Cykelops</dc:creator>
      <dc:date>2024-09-06T09:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Column Loan Could Not be Found</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942870#M42338</link>
      <description>&lt;P&gt;Please post proc contents of the datasets involved.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 10:15:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942870#M42338</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2024-09-06T10:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Column Loan Could Not be Found</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942871#M42339</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How should I do that? like this &amp;gt;&amp;gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;proc contents data = PledgeDataLOanLevel5; run;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Cykelops&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 10:23:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942871#M42339</guid>
      <dc:creator>Cykelops</dc:creator>
      <dc:date>2024-09-06T10:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Column Loan Could Not be Found</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942872#M42340</link>
      <description>&lt;P&gt;Yes, and for both datasets involved. You need to check if the variables you are using exist and are of same type (the vars used in the join)&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 10:36:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942872#M42340</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2024-09-06T10:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Column Loan Could Not be Found</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942873#M42341</link>
      <description>&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Maxims-of-Maximally-Efficient-SAS-Programmers/ta-p/352068" target="_blank" rel="noopener"&gt;Maxim&lt;/A&gt; 3: Know Your Data.&lt;/P&gt;
&lt;P&gt;Run &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/proc/n1hqa4dk5tay0an15nrys1iwr5o2.htm" target="_blank" rel="noopener"&gt;PROC CONTENTS&lt;/A&gt; on the dataset(s), but a quick view by opening the dataset interactively will already show you the variable names.&lt;/P&gt;
&lt;P&gt;Right-clicking on something (dataset or column) in the user interface will also enable you to show the properties.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 10:57:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942873#M42341</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-09-06T10:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Column Loan Could Not be Found</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942876#M42342</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to insert the proc contents pledge9 or PledgeDataLoanlevel5 but it gives me syntax error. I am not really good in this and I need your guidance on this.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas code error.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100048i4D4CD7770432AD15/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sas code error.PNG" alt="sas code error.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please advise.&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 11:23:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942876#M42342</guid>
      <dc:creator>Cykelops</dc:creator>
      <dc:date>2024-09-06T11:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Column Loan Could Not be Found</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942877#M42343</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Maxim 1: Read the Documentation.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I provided a link to the documentation of the CONTENTS procedure. Use it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the future, don't post pictures of code or logs. Copy/paste the text into a window opened with these buttons:&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;The one indicated is for logs and other fixed-format text (like the contents of csv files), the "little running man" right next to it for SAS code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And take care to post the whole shebang. In your picture, the important line is cut off.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess that you missed to use the DATA= option of the PROC CONTENTS statement.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 11:39:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942877#M42343</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-09-06T11:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Column Loan Could Not be Found</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942894#M42352</link>
      <description>&lt;P&gt;Exactly the same problem as in your other thread &lt;A href="https://communities.sas.com/t5/New-SAS-User/Error-Variable-not-Found/m-p/942814#M42332" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/New-SAS-User/Error-Variable-not-Found/m-p/942814#M42332&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Same data set, same proc contents result, no variable named LOAN in the data set. The wording is different because Proc Sql behaves a bit differently and you could have created the variable where the reference to the alias B was used.&lt;/P&gt;
&lt;P&gt;Example that selects a variable with one name into a new name:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sql;
   select b.loan
   from (select name as loan from sashelp.class) as b
  ;
quit;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 17:28:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942894#M42352</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-09-06T17:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Column Loan Could Not be Found</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942921#M42356</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the correction. Additional question, is this proc contents data can be inserted anywhere in the code? In my understanding, we do this in order to determine the variable use (like its source excel file).&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 16:02:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942921#M42356</guid>
      <dc:creator>Cykelops</dc:creator>
      <dc:date>2024-09-06T16:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Column Loan Could Not be Found</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942928#M42357</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/467272"&gt;@Cykelops&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the correction. Additional question, is this proc contents data can be inserted anywhere in the code? In my understanding, we do this in order to determine the variable use (like its source excel file).&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;SAS programs consists of STEPS.&amp;nbsp; You can have DATA steps and PROC steps.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can place a PROC CONTENTS step anywhere you want as long you you don't try to place it in the middle of another step in your program.&amp;nbsp; If you are using PROC IMPORT to read in an external file that you have never read before then a PROC CONTENTS step right after the PROC IMPORT step makes sense so that you can check that it is the data you were expecting.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 16:43:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942928#M42357</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-09-06T16:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Column Loan Could Not be Found</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942934#M42358</link>
      <description>&lt;P&gt;You use PROC CONTENTS to determine the structure of a dataset&amp;nbsp;&lt;U&gt;before&lt;/U&gt; you write the code processing the dataset. That's what Maxim 3 means: know your data before you work with it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want code to work repeatedly and seamlessly with newly arriving input, the data &lt;U&gt;must&lt;/U&gt; be of consistent structure.&lt;/P&gt;
&lt;P&gt;Since you are inflicted with the typical consequences of careless use of "simple" software (Excel is anything but in reality!), you must work hard with the source of the data to get more consistent input data. This may need to involve the application of a &lt;A href="http://www.catb.org/esr/jargon/html/L/LART.html" target="_blank" rel="noopener"&gt;LART&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 17:42:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-Column-Loan-Could-Not-be-Found/m-p/942934#M42358</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-09-06T17:42:47Z</dc:date>
    </item>
  </channel>
</rss>

