<?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: (execution) Matrix has not been set to a value in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/ERROR-execution-Matrix-has-not-been-set-to-a-value/m-p/654428#M5133</link>
    <description>&lt;P&gt;I think the problem is a simple typo.&amp;nbsp; The line :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;L1=length(vis);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;uses the number '1' in the variable name instead of the letter 'I'.&amp;nbsp; Then the error that you have shown occurs at the line,&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;wsi=substr(w(|position,1|),1,LI);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;as the 3rd agrument to the substr() function does not exist.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jun 2020 09:40:40 GMT</pubDate>
    <dc:creator>IanWakeling</dc:creator>
    <dc:date>2020-06-08T09:40:40Z</dc:date>
    <item>
      <title>ERROR: (execution) Matrix has not been set to a value</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/ERROR-execution-Matrix-has-not-been-set-to-a-value/m-p/654361#M5132</link>
      <description>&lt;P&gt;Hello, I am new to SAS and have a problem using the SAS/IML.&lt;/P&gt;&lt;P&gt;When I use the following code, it shows the following error. The code is from a textbook I use to create a word matrix, but I get an error message and blank matrix.&lt;/P&gt;&lt;P&gt;Can anybody give me some suggestions for this problem?&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname d'/folders/myfolders/song';
options ps=500 ls=132;
data worddata;
infile '/folders/myfolders/song/70songs.txt' delimiter='';
input word: $20. @@;
LW=length(word);
check=substr(word,LW,1);

data voclist;
infile "/folders/myfolders/song/voclist.txt";
input voc $;

proc iml; reset fw=5;
workspace=30000;
use worddata;
read all var {word} into w;
read all var {check} into c;
use voclist;
read all var _char_ into v;
w=concat(w,c);
d=j(nrow(v),nrow(v),0);
LW=length(w);

tagi=0;tagj=0;

check=substr(w,LW,1);

do i=1 to nrow(v);
vis=v(|i,1|);
do j=1 to nrow(v);
vjs=v(|j,1|);
L1=length(vis);
LJ=length(vjs);
k=1; ti=0; tj=0;
jf=j(nrow(w),1,0);

loop: do position = k to (nrow(w)-1) until (check(|position,1|)="#");
wsi=substr(w(|position,1|),1,LI);
wsj=substr(w(|position,1|),1,LJ);

if v(|i,l|)=wsi then do;
tagi=tagi+1; ti=ti+1; end;
if v(|j,1|)=wsj then do;
tagj=tagj+1; tj=tj+1; end;
end;
jf[position,1]=min(ti,tj);
k=position+1; ti=0; tj=0;

if position&amp;lt;nrow(w) then goto loop;

s=sum(jf);
d[i,j]=d(|i,j|)+s;
end;
end;

print d;

create d.network from d;
append from d;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Error message:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ERROR: (execution) Matrix has not been set to a value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Log:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;126 end;&lt;BR /&gt;ERROR: (execution) Matrix has not been set to a value.&lt;BR /&gt;&lt;BR /&gt;operation : SUBSTR at line 110 column 11&lt;BR /&gt;operands : _TEM1001, *LIT1022, LI&lt;BR /&gt;&lt;BR /&gt;_TEM1001 1 row 1 col (character, size 40)&lt;BR /&gt;&lt;BR /&gt;가는 �&lt;BR /&gt;&lt;BR /&gt;*LIT1022 1 row 1 col (numeric)&lt;BR /&gt;&lt;BR /&gt;1&lt;BR /&gt;&lt;BR /&gt;LI 0 row 0 col (type ?, size 0)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;statement : ASSIGN at line 110 column 1&lt;BR /&gt;127&lt;BR /&gt;128 print d;&lt;BR /&gt;129&lt;BR /&gt;130 create d.network from d;&lt;BR /&gt;131 append from d;&lt;BR /&gt;132 quit;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 08:56:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/ERROR-execution-Matrix-has-not-been-set-to-a-value/m-p/654361#M5132</guid>
      <dc:creator>kindernet</dc:creator>
      <dc:date>2020-06-08T08:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: (execution) Matrix has not been set to a value</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/ERROR-execution-Matrix-has-not-been-set-to-a-value/m-p/654428#M5133</link>
      <description>&lt;P&gt;I think the problem is a simple typo.&amp;nbsp; The line :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;L1=length(vis);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;uses the number '1' in the variable name instead of the letter 'I'.&amp;nbsp; Then the error that you have shown occurs at the line,&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;wsi=substr(w(|position,1|),1,LI);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;as the 3rd agrument to the substr() function does not exist.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 09:40:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/ERROR-execution-Matrix-has-not-been-set-to-a-value/m-p/654428#M5133</guid>
      <dc:creator>IanWakeling</dc:creator>
      <dc:date>2020-06-08T09:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: (execution) Matrix has not been set to a value</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/ERROR-execution-Matrix-has-not-been-set-to-a-value/m-p/654440#M5134</link>
      <description>&lt;P&gt;That must be a VERY old textbook! The indexing syntax v(|j,1|) instead of v[j,1] has not been used in decades.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 09:49:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/ERROR-execution-Matrix-has-not-been-set-to-a-value/m-p/654440#M5134</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2020-06-08T09:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: (execution) Matrix has not been set to a value</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/ERROR-execution-Matrix-has-not-been-set-to-a-value/m-p/654451#M5135</link>
      <description>&lt;P&gt;A good point Rick. I must be showing my age as it didn't appear wrong to me! This type of syntax is from the days when not all computer keyboards had square brackets.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 10:23:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/ERROR-execution-Matrix-has-not-been-set-to-a-value/m-p/654451#M5135</guid>
      <dc:creator>IanWakeling</dc:creator>
      <dc:date>2020-06-08T10:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: (execution) Matrix has not been set to a value</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/ERROR-execution-Matrix-has-not-been-set-to-a-value/m-p/654558#M5136</link>
      <description>&lt;P&gt;Thank you very much for the quick response.&lt;/P&gt;&lt;P&gt;I changed the code as you commented, and was able to run the code.&lt;/P&gt;&lt;P&gt;-Actually, I had another error with the same typo(1/l) you commented, and also had to fix it.&lt;/P&gt;&lt;PRE&gt;if v(|i,1|)=wsi then do;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I am still learning to use SAS, so I really appreciate your help.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 15:08:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/ERROR-execution-Matrix-has-not-been-set-to-a-value/m-p/654558#M5136</guid>
      <dc:creator>kindernet</dc:creator>
      <dc:date>2020-06-08T15:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: (execution) Matrix has not been set to a value</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/ERROR-execution-Matrix-has-not-been-set-to-a-value/m-p/654566#M5137</link>
      <description>&lt;P&gt;Thank you for the information.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I changed the code, and it worked well.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 15:26:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/ERROR-execution-Matrix-has-not-been-set-to-a-value/m-p/654566#M5137</guid>
      <dc:creator>kindernet</dc:creator>
      <dc:date>2020-06-08T15:26:00Z</dc:date>
    </item>
  </channel>
</rss>

