<?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 Request to start a session fails when libname statement is executed in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Request-to-start-a-session-fails-when-libname-statement-is/m-p/880629#M347955</link>
    <description>&lt;P&gt;Hello everyone:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm preparing a script so execute several tasks in parallel on one server. My first step is to execute the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;signon mySess sascmd="!sascmd";
rsubmit mySess;
	data test;
		x = 1;
	run;
endrsubmit;
signoff mySess;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;When I do, I get the following log (everythin is OK).&lt;/P&gt;&lt;PRE&gt;83   signon mySess sascmd="!sascmd";
NOTE: Remote signon to MYSESS commencing (SAS Release V.03.05M0P111119).
NOTE: Copyright (c) 2016 by SAS Institute Inc., Cary, NC, USA. 
NOTE: SAS (r) Proprietary Software V.03.05 (TS5M0 MBCS3170) 
      Licensed to EGP- SAS X ADVANCED ANALYTICS / ESP ON VIYA, Site 70237841.
NOTE: This session is executing on the Linux 3.10.0-1160.15.2.el7.x86_64 (LIN X64) platform.
NOTE: Analytical products:
      
      SAS/STAT 15.1
      SAS/ETS 15.1
      SAS/OR 15.1
      SAS/IML 15.1
NOTE: Additional host information:
 Linux LIN X64 3.10.0-1160.15.2.el7.x86_64 #1 SMP Thu Jan 21 16:15:07 EST 2021 x86_64 Red Hat Enterprise Linux Server release 7.9 
      (Maipo) 
NOTE: SAS initialization used:
      real time           0.04 seconds
      cpu time            0.04 seconds
      
NOTE: AUTOEXEC processing beginning; file is /opt/sas/viya/config/etc/compsrv/default/autoexec.sas.
NOTE: DATA statement ha utilizado (Tiempo de proceso total):
      real time           0.00 seconds
      cpu time            0.00 seconds
      
NOTE: AUTOEXEC processing completed.
NOTE: Remote signon to MYSESS complete.
84   rsubmit mySess;
NOTE: Remote submit to MYSESS commencing.
2     data test;
3      x = 1;
4     run;
NOTE: The data set WORK.TEST has 1 observations and 1 variables.
NOTE: DATA statement ha utilizado (Tiempo de proceso total):
      real time           0.00 seconds
      cpu time            0.01 seconds
      
NOTE: Remote submit to MYSESS complete.
85   signoff mySess;
NOTE: Remote signoff from MYSESS commencing.
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
      real time           0.05 seconds
      cpu time            0.05 seconds
      
NOTE: Remote signoff from MYSESS complete.
86   
87   %studio_hide_wrapper;
98   
99   &lt;/PRE&gt;&lt;P&gt;Now I add a libname statement in order to access to tables in it (this lib exists and I use it in other scritps):&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;signon mySess sascmd="!sascmd";
rsubmit mySess;
	libname emibal cas caslib=BAL_EMISIONES;
	data test;
		x = 1;
	run;
endrsubmit;
signoff mySess;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and I get the following message in the log (I omit the first part because it's the same):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;84   rsubmit mySess;
NOTE: Remote submit to MYSESS commencing.
1     libname emibal cas caslib=BAL_EMISIONES;
ERROR: The request to start or connect to a session failed. Specify a UUID to connect to an existing session or specify a session 
       name, port and host name to start a session.
ERROR: Error in the LIBNAME statement.
2     data test;
3      x = 1;
4     run;
NOTE: The data set WORK.TEST has 1 observations and 1 variables.
NOTE: DATA statement ha utilizado (Tiempo de proceso total):
      real time           0.00 seconds
      cpu time            0.00 seconds
      
NOTE: Remote submit to MYSESS complete.
85   signoff mySess;
NOTE: Remote signoff from MYSESS commencing.
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
      real time           0.13 seconds
      cpu time            0.07 seconds
      
NOTE: Remote signoff from MYSESS complete.
86   
87   %studio_hide_wrapper;
98   
99   &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am not still accessing any data in that lib, but I already get an error. Do you know why this might be happening?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jun 2023 12:17:15 GMT</pubDate>
    <dc:creator>JordiGC</dc:creator>
    <dc:date>2023-06-14T12:17:15Z</dc:date>
    <item>
      <title>Request to start a session fails when libname statement is executed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Request-to-start-a-session-fails-when-libname-statement-is/m-p/880629#M347955</link>
      <description>&lt;P&gt;Hello everyone:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm preparing a script so execute several tasks in parallel on one server. My first step is to execute the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;signon mySess sascmd="!sascmd";
rsubmit mySess;
	data test;
		x = 1;
	run;
endrsubmit;
signoff mySess;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;When I do, I get the following log (everythin is OK).&lt;/P&gt;&lt;PRE&gt;83   signon mySess sascmd="!sascmd";
NOTE: Remote signon to MYSESS commencing (SAS Release V.03.05M0P111119).
NOTE: Copyright (c) 2016 by SAS Institute Inc., Cary, NC, USA. 
NOTE: SAS (r) Proprietary Software V.03.05 (TS5M0 MBCS3170) 
      Licensed to EGP- SAS X ADVANCED ANALYTICS / ESP ON VIYA, Site 70237841.
NOTE: This session is executing on the Linux 3.10.0-1160.15.2.el7.x86_64 (LIN X64) platform.
NOTE: Analytical products:
      
      SAS/STAT 15.1
      SAS/ETS 15.1
      SAS/OR 15.1
      SAS/IML 15.1
NOTE: Additional host information:
 Linux LIN X64 3.10.0-1160.15.2.el7.x86_64 #1 SMP Thu Jan 21 16:15:07 EST 2021 x86_64 Red Hat Enterprise Linux Server release 7.9 
      (Maipo) 
NOTE: SAS initialization used:
      real time           0.04 seconds
      cpu time            0.04 seconds
      
NOTE: AUTOEXEC processing beginning; file is /opt/sas/viya/config/etc/compsrv/default/autoexec.sas.
NOTE: DATA statement ha utilizado (Tiempo de proceso total):
      real time           0.00 seconds
      cpu time            0.00 seconds
      
NOTE: AUTOEXEC processing completed.
NOTE: Remote signon to MYSESS complete.
84   rsubmit mySess;
NOTE: Remote submit to MYSESS commencing.
2     data test;
3      x = 1;
4     run;
NOTE: The data set WORK.TEST has 1 observations and 1 variables.
NOTE: DATA statement ha utilizado (Tiempo de proceso total):
      real time           0.00 seconds
      cpu time            0.01 seconds
      
NOTE: Remote submit to MYSESS complete.
85   signoff mySess;
NOTE: Remote signoff from MYSESS commencing.
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
      real time           0.05 seconds
      cpu time            0.05 seconds
      
NOTE: Remote signoff from MYSESS complete.
86   
87   %studio_hide_wrapper;
98   
99   &lt;/PRE&gt;&lt;P&gt;Now I add a libname statement in order to access to tables in it (this lib exists and I use it in other scritps):&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;signon mySess sascmd="!sascmd";
rsubmit mySess;
	libname emibal cas caslib=BAL_EMISIONES;
	data test;
		x = 1;
	run;
endrsubmit;
signoff mySess;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and I get the following message in the log (I omit the first part because it's the same):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;84   rsubmit mySess;
NOTE: Remote submit to MYSESS commencing.
1     libname emibal cas caslib=BAL_EMISIONES;
ERROR: The request to start or connect to a session failed. Specify a UUID to connect to an existing session or specify a session 
       name, port and host name to start a session.
ERROR: Error in the LIBNAME statement.
2     data test;
3      x = 1;
4     run;
NOTE: The data set WORK.TEST has 1 observations and 1 variables.
NOTE: DATA statement ha utilizado (Tiempo de proceso total):
      real time           0.00 seconds
      cpu time            0.00 seconds
      
NOTE: Remote submit to MYSESS complete.
85   signoff mySess;
NOTE: Remote signoff from MYSESS commencing.
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
      real time           0.13 seconds
      cpu time            0.07 seconds
      
NOTE: Remote signoff from MYSESS complete.
86   
87   %studio_hide_wrapper;
98   
99   &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am not still accessing any data in that lib, but I already get an error. Do you know why this might be happening?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 12:17:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Request-to-start-a-session-fails-when-libname-statement-is/m-p/880629#M347955</guid>
      <dc:creator>JordiGC</dc:creator>
      <dc:date>2023-06-14T12:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Request to start a session fails when libname statement is executed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Request-to-start-a-session-fails-when-libname-statement-is/m-p/880729#M347985</link>
      <description>&lt;P&gt;Try adding the following before the libname statement:&lt;/P&gt;
&lt;P&gt;cas mySess sessopts=(caslib=BAL_EMISONES);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this does not work, reach out to technical support.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sas.com/en_ca/contact/technical-support.html" target="_blank"&gt;Technical Support | SAS&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 15:54:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Request-to-start-a-session-fails-when-libname-statement-is/m-p/880729#M347985</guid>
      <dc:creator>JOL</dc:creator>
      <dc:date>2023-06-14T15:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: Request to start a session fails when libname statement is executed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Request-to-start-a-session-fails-when-libname-statement-is/m-p/880785#M348010</link>
      <description>&lt;P&gt;Thanks JOL for your message. Unfortunatelly it didn't work. Now I get the same message for both lines:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;NOTE: Remote signon to MYSESS complete.
84   rsubmit mySess;
NOTE: Remote submit to MYSESS commencing.
1     cas mySess sessopts=(caslib=BAL_EMISIONES);
ERROR: The request to start or connect to a session failed. Specify a UUID to connect to an existing session or specify a session 
       name, port and host name to start a session.
2     libname emibal cas caslib=BAL_EMISIONES;
ERROR: The request to start or connect to a session failed. Specify a UUID to connect to an existing session or specify a session 
       name, port and host name to start a session.
ERROR: Error in the LIBNAME statement.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I'm reaching out for the technical service.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 19:24:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Request-to-start-a-session-fails-when-libname-statement-is/m-p/880785#M348010</guid>
      <dc:creator>JordiGC</dc:creator>
      <dc:date>2023-06-14T19:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Request to start a session fails when libname statement is executed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Request-to-start-a-session-fails-when-libname-statement-is/m-p/885029#M349682</link>
      <description>&lt;P&gt;I eventually managed to solve the problem myself by opening a new cas session in every rsubmit. I attach some code as an example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;signon mySess1 sascmd="!sascmd" signonwait=no;
signon mySess2 sascmd="!sascmd" signonwait=no;

rsubmit mySess1 wait=no;
	cas Sess1 host='myserver' port=myport;
	libname emibal cas caslib=BAL_EMISIONES;
	proc delete data=emibal.multitask1;
	data emibal.multitask1;
		x = 1;
	run;
	proc casutil incaslib="bal_emisiones" outcaslib="bal_emisiones";
		promote casdata="multitask1" casout="multitask1";
	run;
endrsubmit;

rsubmit mySess2 wait=no;
	cas Sess2 host='myserver' port=myport;
	libname emibal cas caslib=BAL_EMISIONES;
	proc delete data=emibal.multitask2;
	data emibal.multitask2;
		x = 1;
	run;
	proc casutil incaslib="bal_emisiones" outcaslib="bal_emisiones";
		promote casdata="multitask2" casout="multitask2";
	run;
endrsubmit;

waitfor _all_ mySess1 mySess2;

signon mySess3 sascmd="!sascmd" signonwait=no;
rsubmit mySess3 wait=no;
	cas General host='myserver' port=myport;
	libname emibal cas caslib=BAL_EMISIONES;
	proc delete data=emibal.multitask3;
	data emibal.multitask3;
		set emibal.multitask1 emibal.multitask2;
	run;
	proc casutil incaslib="bal_emisiones" outcaslib="bal_emisiones";
		promote casdata="multitask3" casout="multitask3";
	run;
endrsubmit;

signoff _all_;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Jul 2023 12:08:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Request-to-start-a-session-fails-when-libname-statement-is/m-p/885029#M349682</guid>
      <dc:creator>JordiGC</dc:creator>
      <dc:date>2023-07-17T12:08:25Z</dc:date>
    </item>
  </channel>
</rss>

