<?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 proc imstat score hashdata =&amp;gt; ERROR 42S02: Table does not exist in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/proc-imstat-score-hashdata-gt-ERROR-42S02-Table-does-not-exist/m-p/306666#M5677</link>
    <description>&lt;P&gt;Hi , I am struggling to make the data step hash object work with proc imstat score hashdata. I am following this example:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/inmsref/68736/HTML/default/viewer.htm#p1bvghq0m6b0wgn1fyyr07abx9gi.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/inmsref/68736/HTML/default/viewer.htm#p1bvghq0m6b0wgn1fyyr07abx9gi.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One important quote from the example is "&lt;SPAN&gt;The names specified in the program code are the actual table names in the server, and not the names where a libref masks the tag.". As you will see below I am doing that. The fact that default tag in LASR is called "work" is just coincidence and has nothing to do with SASwork.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;libname lasrlib sasiola PORT=10095 HOST="host.xyz.com";
/*
NOTE: No tag was specified in the LIBNAME statement. The default tag (WORK) is used to name and identify tables in the LASR 
       Analytic Server. You can specify a tag as a data set option.
NOTE: Libref LASRLIB was successfully assigned as follows: 
       Engine:        SASIOLA 
       Physical Name: SAS LASR Analytic Server engine on host 'host.xyz.com', port 10095
*/
 
data a;
  x=1; output;
  x=2; output;
run;
proc sql; drop table lasrlib.a; quit;
data lasrlib.a; set a; run;
/*
NOTE: The data set WORK.A has 2 observations and 1 variables.
NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
NOTE: The table WORK.A has been removed from the SAS LASR Analytic Server.
NOTE: Table LASRLIB.A has been dropped.
NOTE: PROCEDURE SQL used (Total process time):
       real time           6.24 seconds
       cpu time            0.01 seconds
NOTE: There were 2 observations read from the data set WORK.A.
NOTE: The data set LASRLIB.A has 2 observations and 1 variables.
NOTE: DATA statement used (Total process time):
       real time           0.02 seconds
       cpu time            0.00 seconds
*/
 
data b;
  x=1; y=11; output;
  x=2; y=12; output;
run;
proc sql; drop table lasrlib.b; quit;
data lasrlib.b; set b; run;
/*
NOTE: The data set WORK.B has 2 observations and 2 variables.
NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
NOTE: The table WORK.B has been removed from the SAS LASR Analytic Server.
NOTE: Table LASRLIB.B has been dropped.
NOTE: PROCEDURE SQL used (Total process time):
       real time           0.01 seconds
       cpu time            0.00 seconds
NOTE: There were 2 observations read from the data set WORK.B.
NOTE: The data set LASRLIB.B has 2 observations and 2 variables.
NOTE: DATA statement used (Total process time):
       real time           0.02 seconds
       cpu time            0.00 seconds
*/
 
filename pgm clear;
filename pgm "%sysfunc(pathname(work))/pgm.txt";
data _null_;
  file pgm;
  put "declare hash h(dataset:'WORK.B');";
  put "__lasr_output = 1;";
run;
/*
NOTE: Fileref PGM has been deassigned.
NOTE: The file PGM is:
       Filename=/opt/saswork/SAS_work9FD20000AC81_xyz/SAS_work4E090000AC81_xyz/pgm.txt,
       Owner Name=u531771,Group Name=xyz,
       Access Permission=-rw-rw-r--,
       Last Modified=23Oct2016:12:44:41
NOTE: 2 records were written to the file PGM.
       The minimum record length was 18.
       The maximum record length was 33.
NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
*/
 
proc imstat;
  table lasrlib.a;
  tableinfo;
  run;
  table lasrlib.b;
  tableinfo;
  run;
quit;
/*
Table Information
Table Name | NLS encoding | Number of Rows | Number of Columns | Owner
WORK.A     | latin1       | 2              | 1                 | u531771
WORK.B     | latin1         2                2                 | u531771 
*/
 
proc imstat;
  table lasrlib.a;
  score code=pgm hashdata(WORK.B) keep=(_ALL_) temptable;
  run;
quit;
/*
ERROR: [42S02]Table "WORK.B" does not exist or cannot be accessed (0x81bfc10b)
ERROR: [3F000]BASE driver, schema name WORK was not found for this connection (0x81bfc8d1)
ERROR: Unable to open dataset 'WORK.B' for HASH object creation.
NOTE: PROCEDURE IMSTAT used (Total process time):
       real time           0.03 seconds
       cpu time            0.02 seconds
*/&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;Is this a LASR setup issue? Am I doing something wrong in the code? Is anybody successfully able to run this example?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please help. Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 23 Oct 2016 22:32:56 GMT</pubDate>
    <dc:creator>burkheart14</dc:creator>
    <dc:date>2016-10-23T22:32:56Z</dc:date>
    <item>
      <title>proc imstat score hashdata =&gt; ERROR 42S02: Table does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/proc-imstat-score-hashdata-gt-ERROR-42S02-Table-does-not-exist/m-p/306666#M5677</link>
      <description>&lt;P&gt;Hi , I am struggling to make the data step hash object work with proc imstat score hashdata. I am following this example:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/inmsref/68736/HTML/default/viewer.htm#p1bvghq0m6b0wgn1fyyr07abx9gi.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/inmsref/68736/HTML/default/viewer.htm#p1bvghq0m6b0wgn1fyyr07abx9gi.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One important quote from the example is "&lt;SPAN&gt;The names specified in the program code are the actual table names in the server, and not the names where a libref masks the tag.". As you will see below I am doing that. The fact that default tag in LASR is called "work" is just coincidence and has nothing to do with SASwork.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;libname lasrlib sasiola PORT=10095 HOST="host.xyz.com";
/*
NOTE: No tag was specified in the LIBNAME statement. The default tag (WORK) is used to name and identify tables in the LASR 
       Analytic Server. You can specify a tag as a data set option.
NOTE: Libref LASRLIB was successfully assigned as follows: 
       Engine:        SASIOLA 
       Physical Name: SAS LASR Analytic Server engine on host 'host.xyz.com', port 10095
*/
 
data a;
  x=1; output;
  x=2; output;
run;
proc sql; drop table lasrlib.a; quit;
data lasrlib.a; set a; run;
/*
NOTE: The data set WORK.A has 2 observations and 1 variables.
NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
NOTE: The table WORK.A has been removed from the SAS LASR Analytic Server.
NOTE: Table LASRLIB.A has been dropped.
NOTE: PROCEDURE SQL used (Total process time):
       real time           6.24 seconds
       cpu time            0.01 seconds
NOTE: There were 2 observations read from the data set WORK.A.
NOTE: The data set LASRLIB.A has 2 observations and 1 variables.
NOTE: DATA statement used (Total process time):
       real time           0.02 seconds
       cpu time            0.00 seconds
*/
 
data b;
  x=1; y=11; output;
  x=2; y=12; output;
run;
proc sql; drop table lasrlib.b; quit;
data lasrlib.b; set b; run;
/*
NOTE: The data set WORK.B has 2 observations and 2 variables.
NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
NOTE: The table WORK.B has been removed from the SAS LASR Analytic Server.
NOTE: Table LASRLIB.B has been dropped.
NOTE: PROCEDURE SQL used (Total process time):
       real time           0.01 seconds
       cpu time            0.00 seconds
NOTE: There were 2 observations read from the data set WORK.B.
NOTE: The data set LASRLIB.B has 2 observations and 2 variables.
NOTE: DATA statement used (Total process time):
       real time           0.02 seconds
       cpu time            0.00 seconds
*/
 
filename pgm clear;
filename pgm "%sysfunc(pathname(work))/pgm.txt";
data _null_;
  file pgm;
  put "declare hash h(dataset:'WORK.B');";
  put "__lasr_output = 1;";
run;
/*
NOTE: Fileref PGM has been deassigned.
NOTE: The file PGM is:
       Filename=/opt/saswork/SAS_work9FD20000AC81_xyz/SAS_work4E090000AC81_xyz/pgm.txt,
       Owner Name=u531771,Group Name=xyz,
       Access Permission=-rw-rw-r--,
       Last Modified=23Oct2016:12:44:41
NOTE: 2 records were written to the file PGM.
       The minimum record length was 18.
       The maximum record length was 33.
NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
*/
 
proc imstat;
  table lasrlib.a;
  tableinfo;
  run;
  table lasrlib.b;
  tableinfo;
  run;
quit;
/*
Table Information
Table Name | NLS encoding | Number of Rows | Number of Columns | Owner
WORK.A     | latin1       | 2              | 1                 | u531771
WORK.B     | latin1         2                2                 | u531771 
*/
 
proc imstat;
  table lasrlib.a;
  score code=pgm hashdata(WORK.B) keep=(_ALL_) temptable;
  run;
quit;
/*
ERROR: [42S02]Table "WORK.B" does not exist or cannot be accessed (0x81bfc10b)
ERROR: [3F000]BASE driver, schema name WORK was not found for this connection (0x81bfc8d1)
ERROR: Unable to open dataset 'WORK.B' for HASH object creation.
NOTE: PROCEDURE IMSTAT used (Total process time):
       real time           0.03 seconds
       cpu time            0.02 seconds
*/&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;Is this a LASR setup issue? Am I doing something wrong in the code? Is anybody successfully able to run this example?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please help. Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2016 22:32:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/proc-imstat-score-hashdata-gt-ERROR-42S02-Table-does-not-exist/m-p/306666#M5677</guid>
      <dc:creator>burkheart14</dc:creator>
      <dc:date>2016-10-23T22:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: proc imstat score hashdata =&gt; ERROR 42S02: Table does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/proc-imstat-score-hashdata-gt-ERROR-42S02-Table-does-not-exist/m-p/306765#M5678</link>
      <description>&lt;P&gt;I found out what caused this problem: I was missing the nopreparse option on the score statement. The following works now:&lt;/P&gt;&lt;PRE&gt;proc imstat;
  table lasrlib.a;
  score code=pgm hashdata(WORK.B) keep=(_ALL_) nopreparse temptable;
  run;
quit;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Oct 2016 12:58:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/proc-imstat-score-hashdata-gt-ERROR-42S02-Table-does-not-exist/m-p/306765#M5678</guid>
      <dc:creator>burkheart14</dc:creator>
      <dc:date>2016-10-24T12:58:35Z</dc:date>
    </item>
  </channel>
</rss>

