<?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: SAS Viya: PROC CPANEL and CAS engine libref error in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/SAS-Viya-PROC-CPANEL-and-CAS-engine-libref-error/m-p/884077#M4704</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your input data set&amp;nbsp;WORK.paper1 is not uploaded in-memory (in a CAS library).&lt;/P&gt;
&lt;P&gt;"WORK" is an on-disk&amp;nbsp;location.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use PROC PANEL (SAS/ETS) it will work.&lt;BR /&gt;PROC &lt;FONT size="4"&gt;&lt;STRONG&gt;C&lt;/STRONG&gt;&lt;/FONT&gt;PANEL (SAS Econometrics) is the distributed computing equivalent of PROC PANEL.&lt;BR /&gt;For PROC CPANEL the input data should be in a CAS Library (and not a classical V9 base on-disk library).&lt;/P&gt;
&lt;P&gt;Data in a CAS library are distributed to different worker nodes (and different threads on these worker nodes).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS Viya has two compute engines :&lt;/P&gt;
&lt;UL class="lia-list-style-type-square"&gt;
&lt;LI&gt;The SAS Programming Runtime Environment (SPRE) is also referred to as the compute&lt;BR /&gt;server in SAS Viya. You can think of this engine as a SAS Workspace Server (like the one in SAS 9.4).&lt;/LI&gt;
&lt;LI&gt;The second compute engine is CAS. The CAS engine is an in-memory engine. This means&lt;BR /&gt;that the data is in memory and spread across all threads on all CAS worker nodes. The&lt;BR /&gt;processing of this in-memory data is distributed across all the threads and happens in&lt;BR /&gt;parallel. This can reduce run times of CAS enabled procedures and DATA Steps.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;PROC PANEL will run on SPRE (single-threaded).&lt;BR /&gt;PROC CPANEL will run on CAS (parallel computing).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you absolutely want to use PROC CPANEL (instead of PROC PANEL), you can try this:&lt;BR /&gt;( PROC CPANEL has a few more features than PROC PANEL and on big data it will work faster )&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;cas mySession sessopts=(caslib=casuser timeout=1800 locale="en_US");
caslib _all_ assign;
/*****************************************************************************/
/*  Load SAS data set from a Base engine library (library.tableName) into    */
/*  the specified caslib ("myCaslib") and save as "targetTableName".         */
/*****************************************************************************/
proc casutil;
	load data=WORK.paper1 outcaslib="casuser"
	casout="paper1_in_memory";
run; QUIT;

PROC CPANEL data=casuser.paper1_in_memory ...;
/* end of program */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck,&lt;BR /&gt;Koen&lt;/P&gt;</description>
    <pubDate>Sun, 09 Jul 2023 10:42:20 GMT</pubDate>
    <dc:creator>sbxkoenk</dc:creator>
    <dc:date>2023-07-09T10:42:20Z</dc:date>
    <item>
      <title>SAS Viya: PROC CPANEL and CAS engine libref error</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/SAS-Viya-PROC-CPANEL-and-CAS-engine-libref-error/m-p/884064#M4703</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to use the PROC CPANEL method in the SAS Viya Learner environment and keep receiving a LIBREF error. Could someone help point me in the right direction? I'm use to using SAS Studio for Academics so this is a new environment for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;/* Generated Code (IMPORT) */
/* Source File: EmpiricalPaperData.csv */
/* Source Path: /shared/home/X@X.edu/casuser/EmpiricalPaperData.csv */
/* Code generated on: Jul 8, 2023, 5:41:06 PM */

proc sql;
%if %sysfunc(exist(WORK.paper1)) %then %do;
    drop table WORK.paper1;
%end;
%if %sysfunc(exist(WORK.paper1,VIEW)) %then %do;
    drop view WORK.paper1;
%end;
quit;

FILENAME REFFILE DISK '/shared/home/X@X.edu/casuser/EmpiricalPaperData.csv';

PROC IMPORT DATAFILE=REFFILE
	DBMS=CSV
	OUT=WORK.paper1;
	GETNAMES=YES;
RUN;

PROC CONTENTS DATA=WORK.paper1; RUN;

proc sort data=WORK.paper1 out=WORK.paper1;
	by CountryCode time;
run;

data WORK.paper1 (drop=VAR17 VAR18 VAR19);
	set WORK.paper1;
	/*Regional Dummies*/
	dSA = 0; if Region="South Asia" then dSA=1;
	dECA = 0; if Region="Europe &amp;amp; C" then dECA=1;
	dMENA = 0; if Region="Middle Eas" then dMENA=1;
	dSSA = 0; if Region="Sub-Sahara" then dSSA=1;
	dLAC = 0; if Region="Latin Amer" then dLAC=1;
	dEAP = 0; if Region="East Asia" then dEAP=1;
	
	/*Income Group Dummies*/
	dLI = 0; if IncomeGroup="Low income" then dLI=1;
	dLMI = 0; if IncomeGroup="Lower midd" then dLMI=1;
	dUMI = 0; if IncomeGroup="Upper midd" then dUMI=1;
	
	/*global variables*/
	lgdp = log(gdp);
	loda = log(oda);
	lpop = log(pop);
run;

proc sort data=WORK.paper1 out=WORK.paper1;
	by CountryCode time;
run;

proc cpanel data=WORK.paper1;
	id CountryCode time;
	model PovIndex = lgdp loda curhealth_expn educ_expn goveffect / pooled cluster robust hccme=0;
run;&lt;/PRE&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;211  proc cpanel data=WORK.paper1;
212  id CountryCode time;
213  model PovIndex = lgdp loda curhealth_expn educ_expn goveffect / pooled cluster robust hccme=0;
214  run;
ERROR: The data set WORK.PAPER1 must use a CAS engine libref.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE CPANEL used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/PRE&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Sat, 08 Jul 2023 22:08:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/SAS-Viya-PROC-CPANEL-and-CAS-engine-libref-error/m-p/884064#M4703</guid>
      <dc:creator>jselland</dc:creator>
      <dc:date>2023-07-08T22:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Viya: PROC CPANEL and CAS engine libref error</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/SAS-Viya-PROC-CPANEL-and-CAS-engine-libref-error/m-p/884077#M4704</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your input data set&amp;nbsp;WORK.paper1 is not uploaded in-memory (in a CAS library).&lt;/P&gt;
&lt;P&gt;"WORK" is an on-disk&amp;nbsp;location.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use PROC PANEL (SAS/ETS) it will work.&lt;BR /&gt;PROC &lt;FONT size="4"&gt;&lt;STRONG&gt;C&lt;/STRONG&gt;&lt;/FONT&gt;PANEL (SAS Econometrics) is the distributed computing equivalent of PROC PANEL.&lt;BR /&gt;For PROC CPANEL the input data should be in a CAS Library (and not a classical V9 base on-disk library).&lt;/P&gt;
&lt;P&gt;Data in a CAS library are distributed to different worker nodes (and different threads on these worker nodes).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS Viya has two compute engines :&lt;/P&gt;
&lt;UL class="lia-list-style-type-square"&gt;
&lt;LI&gt;The SAS Programming Runtime Environment (SPRE) is also referred to as the compute&lt;BR /&gt;server in SAS Viya. You can think of this engine as a SAS Workspace Server (like the one in SAS 9.4).&lt;/LI&gt;
&lt;LI&gt;The second compute engine is CAS. The CAS engine is an in-memory engine. This means&lt;BR /&gt;that the data is in memory and spread across all threads on all CAS worker nodes. The&lt;BR /&gt;processing of this in-memory data is distributed across all the threads and happens in&lt;BR /&gt;parallel. This can reduce run times of CAS enabled procedures and DATA Steps.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;PROC PANEL will run on SPRE (single-threaded).&lt;BR /&gt;PROC CPANEL will run on CAS (parallel computing).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you absolutely want to use PROC CPANEL (instead of PROC PANEL), you can try this:&lt;BR /&gt;( PROC CPANEL has a few more features than PROC PANEL and on big data it will work faster )&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;cas mySession sessopts=(caslib=casuser timeout=1800 locale="en_US");
caslib _all_ assign;
/*****************************************************************************/
/*  Load SAS data set from a Base engine library (library.tableName) into    */
/*  the specified caslib ("myCaslib") and save as "targetTableName".         */
/*****************************************************************************/
proc casutil;
	load data=WORK.paper1 outcaslib="casuser"
	casout="paper1_in_memory";
run; QUIT;

PROC CPANEL data=casuser.paper1_in_memory ...;
/* end of program */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck,&lt;BR /&gt;Koen&lt;/P&gt;</description>
      <pubDate>Sun, 09 Jul 2023 10:42:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/SAS-Viya-PROC-CPANEL-and-CAS-engine-libref-error/m-p/884077#M4704</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2023-07-09T10:42:20Z</dc:date>
    </item>
  </channel>
</rss>

