<?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 do I fix :  &amp;quot;DATA STEP component object failure 780-185&amp;quot; In my do loop in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-fix-quot-DATA-STEP-component-object-failure-780-185/m-p/862589#M340733</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/440423"&gt;@mcoccia&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;BR /&gt;I have two different datasets 'rmi.zins' and 'rmi.zpub'&lt;BR /&gt;Each only have two variables: 'ticker_symboli' and 'ticker_symbolp' respectively&amp;nbsp;&lt;BR /&gt;the second variable is 'mktcapi' and 'mktcapp' respectively&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other than SORTING those two data sets I do not see any place that rmi.zins or rmi.zpub are actually used.&lt;/P&gt;
&lt;P&gt;To use a data set in a data step it must be on a Set, Merge, Update or Modify statement. Which does not occur.&lt;/P&gt;
&lt;P&gt;Once a variable is read into the data vector it no longer has any association with the source data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would almost guess that this is sort of an attempt to use logic from a spreadsheet except your data description does not have enough columns to match either of your attempted uses (Do i=1 to 89 or Do j=1 to 4024 so where did those magic numbers come from?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you expect to match records on some values of data variables that have different names then perhaps this belongs in proc sql.&lt;/P&gt;
&lt;P&gt;Or provide a small sample of data from both the sets and what you expect as a result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would also expect that an variable with a name like ticker_symbol or ticker_symbolp might be used to MATCH on but I don't see that anywhere.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Mar 2023 22:44:55 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2023-03-06T22:44:55Z</dc:date>
    <item>
      <title>How do I fix :  "DATA STEP component object failure 780-185" In my do loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-fix-quot-DATA-STEP-component-object-failure-780-185/m-p/862576#M340727</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to run a matching procedure in my code. I have been stuck on this for a while and cannot seem to find the fix.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sort data=rmi.zins; by mktcapi; run;&lt;BR /&gt;proc sort data=rmi.zpub; by mktcapp; run;&lt;/P&gt;&lt;P&gt;/* Initialize variables */&lt;BR /&gt;data rmi.zmatches;&lt;BR /&gt;length ticker_symbolp $10 ticker_symboli $10;&lt;BR /&gt;do i = 1 to 89;&lt;BR /&gt;match = 0;&lt;BR /&gt;mkt_diff = .;&lt;BR /&gt;do j = 1 to 4024;&lt;BR /&gt;/* Check if zpub record has not been matched */&lt;BR /&gt;if match = 0 then do;&lt;BR /&gt;/* Calculate market cap difference */&lt;BR /&gt;mkt_diff_temp = abs(rmi.zins.mktcapi[i] - rmi.zpub.mktcapp[j]);&lt;BR /&gt;/* If no previous match or if new match has smaller difference */&lt;BR /&gt;if mkt_diff = . or mkt_diff_temp &amp;lt; mkt_diff then do;&lt;BR /&gt;mkt_diff = mkt_diff_temp;&lt;BR /&gt;ticker_symbolp = rmi.zpub.ticker_symbolp[j];&lt;BR /&gt;ticker_symboli = rmi.zins.ticker_symboli[i];&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;/* Output match */&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;I have two different datasets 'rmi.zins' and 'rmi.zpub'&lt;BR /&gt;Each only have two variables: 'ticker_symboli' and 'ticker_symbolp' respectively&amp;nbsp;&lt;BR /&gt;the second variable is 'mktcapi' and 'mktcapp' respectively&lt;BR /&gt;&lt;BR /&gt;I am POSITIVE that everything is spelt correctly. I tried this in the work library and now I have everything in a different library titled "rmi" hoping this would be the fix.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;mkt_diff_temp = abs(rmi.zins.mktcapi[i] - rmi.zpub.mktcapp[j]);&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; ----------------&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; 780&lt;BR /&gt;ERROR: DATA STEP Component Object failure. Aborted during the COMPILATION phase.&lt;BR /&gt;ERROR 780-185: Invalid object or method name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;^ this is the error code I get in the log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help would be much appreciated&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 21:15:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-fix-quot-DATA-STEP-component-object-failure-780-185/m-p/862576#M340727</guid>
      <dc:creator>mcoccia</dc:creator>
      <dc:date>2023-03-06T21:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I fix :  "DATA STEP component object failure 780-185" In my do loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-fix-quot-DATA-STEP-component-object-failure-780-185/m-p/862581#M340729</link>
      <description>&lt;P&gt;Variable names don't have dots in them:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;mkt_diff_temp = abs(rmi.zins.mktcapi[i] - rmi.zpub.mktcapp[j]);&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Also it looks like you are using array logic (rmi.zins.mktcapi[i]) but you have no array defined in your DATA step. An ARRAY statement is needed.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;EDIT: you are also missing input data to your DATA step as well. You need to add a SET statement to read in your data.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 22:43:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-fix-quot-DATA-STEP-component-object-failure-780-185/m-p/862581#M340729</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-03-06T22:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I fix :  "DATA STEP component object failure 780-185" In my do loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-fix-quot-DATA-STEP-component-object-failure-780-185/m-p/862589#M340733</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/440423"&gt;@mcoccia&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;BR /&gt;I have two different datasets 'rmi.zins' and 'rmi.zpub'&lt;BR /&gt;Each only have two variables: 'ticker_symboli' and 'ticker_symbolp' respectively&amp;nbsp;&lt;BR /&gt;the second variable is 'mktcapi' and 'mktcapp' respectively&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other than SORTING those two data sets I do not see any place that rmi.zins or rmi.zpub are actually used.&lt;/P&gt;
&lt;P&gt;To use a data set in a data step it must be on a Set, Merge, Update or Modify statement. Which does not occur.&lt;/P&gt;
&lt;P&gt;Once a variable is read into the data vector it no longer has any association with the source data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would almost guess that this is sort of an attempt to use logic from a spreadsheet except your data description does not have enough columns to match either of your attempted uses (Do i=1 to 89 or Do j=1 to 4024 so where did those magic numbers come from?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you expect to match records on some values of data variables that have different names then perhaps this belongs in proc sql.&lt;/P&gt;
&lt;P&gt;Or provide a small sample of data from both the sets and what you expect as a result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would also expect that an variable with a name like ticker_symbol or ticker_symbolp might be used to MATCH on but I don't see that anywhere.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 22:44:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-fix-quot-DATA-STEP-component-object-failure-780-185/m-p/862589#M340733</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-03-06T22:44:55Z</dc:date>
    </item>
  </channel>
</rss>

