<?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 in code to be executed repeatedly in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470207#M14701</link>
    <description>&lt;P&gt;The crucial error happens earlier:&lt;/P&gt;
&lt;PRE&gt;228        LIBNAME Z BASE "/u/SAS/datos";
NOTE: La librería Z no existe.
&lt;/PRE&gt;
&lt;P&gt;Previously, you used a remote connection for library Z:&lt;/P&gt;
&lt;PRE&gt;184        libname z "/u/SAS/datos" SERVER=ts12;
NOTE: Libref Z was successfully assigned as follows: 
      Engine:        REMOTE 
      Physical Name: /u/SAS/datos
&lt;/PRE&gt;</description>
    <pubDate>Thu, 14 Jun 2018 06:32:31 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-06-14T06:32:31Z</dc:date>
    <item>
      <title>Error in code to be executed repeatedly</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470145#M14690</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a code that, if ran manually (n times in a row) in SAS Guide performs perfectly well. Now, if I try to execute this code in DIS, it comes up with errors from the second time it is run. Any idea of what may be happening?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Martín&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 23:35:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470145#M14690</guid>
      <dc:creator>mchiappe83</dc:creator>
      <dc:date>2018-06-13T23:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error in code to be executed repeatedly</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470162#M14693</link>
      <description>&lt;P&gt;(Edited) log please?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 01:11:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470162#M14693</guid>
      <dc:creator>LaurieF</dc:creator>
      <dc:date>2018-06-14T01:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error in code to be executed repeatedly</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470163#M14694</link>
      <description>&lt;P&gt;Thanks a lot for your response. Please see the both the code and log attached. Let me know your thoughts.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 18:33:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470163#M14694</guid>
      <dc:creator>mchiappe83</dc:creator>
      <dc:date>2018-06-15T18:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Error in code to be executed repeatedly</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470164#M14695</link>
      <description>&lt;P&gt;It's too much to go through. Can you edit it down to just the bits around the error? say the data/proc steps either side?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 01:43:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470164#M14695</guid>
      <dc:creator>LaurieF</dc:creator>
      <dc:date>2018-06-14T01:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Error in code to be executed repeatedly</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470168#M14696</link>
      <description>&lt;P&gt;No problem.&amp;nbsp;The first error occurs in the following step:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;958 proc sql ;&lt;BR /&gt;959 insert into xxxx.STG_SPESERV_PADRON_AUTO&lt;BR /&gt;960 select * from z.XDAUTO&lt;BR /&gt;961 WHERE PUT(F_LOG, 8.)||put(H_LOG,Z6.) &amp;gt; put(&amp;amp;fecha,Z14.);&lt;BR /&gt;ERROR: The file Z.XDAUTO.DATA does not exist.&lt;BR /&gt;NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.&lt;BR /&gt;962 quit;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The file&amp;nbsp;XDAUTO is being deleted in the very beggining of the code, in order to ensure there's nothing called this way when creating this file inmediately after. Then, the error stated above occurs. At the end of the code, the file is being deleted again in orden to leave the directory clean for the next execution of the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know If you followed me.&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 02:12:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470168#M14696</guid>
      <dc:creator>mchiappe83</dc:creator>
      <dc:date>2018-06-14T02:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error in code to be executed repeatedly</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470178#M14698</link>
      <description>&lt;P&gt;I don't understand.&amp;nbsp; You deleted the file and then tried to write to it and are surprised it caused an error?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't see anything in the log where it worked once or where the file is created.&lt;/P&gt;
&lt;P&gt;If you deleted it then you need to create it again before you can use INSERT to put records into it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 03:34:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470178#M14698</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-06-14T03:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Error in code to be executed repeatedly</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470207#M14701</link>
      <description>&lt;P&gt;The crucial error happens earlier:&lt;/P&gt;
&lt;PRE&gt;228        LIBNAME Z BASE "/u/SAS/datos";
NOTE: La librería Z no existe.
&lt;/PRE&gt;
&lt;P&gt;Previously, you used a remote connection for library Z:&lt;/P&gt;
&lt;PRE&gt;184        libname z "/u/SAS/datos" SERVER=ts12;
NOTE: Libref Z was successfully assigned as follows: 
      Engine:        REMOTE 
      Physical Name: /u/SAS/datos
&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Jun 2018 06:32:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470207#M14701</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-14T06:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error in code to be executed repeatedly</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470290#M14703</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&lt;/P&gt;&lt;P&gt;Let me understand your point and then I share my thought.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You say the crucial error comes with the following sentence in the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname z "/u/SAS/datos" SERVER=ts12;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And that, previously, I'm using a remote connection.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the code this sentence is being used only once and:&lt;/P&gt;&lt;P&gt;1) the very first thing the log informs is that Libref Z was successfully created&lt;/P&gt;&lt;P&gt;2) then, in line 228, the log informs that library Z does not exist -what I don't understand just because of 1)-&lt;/P&gt;&lt;P&gt;3) when ran manually this code in SAS Guide, over and over again, no error shows up.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let us know your thoughts. I appreciate your help very much.&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 12:48:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470290#M14703</guid>
      <dc:creator>mchiappe83</dc:creator>
      <dc:date>2018-06-14T12:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Error in code to be executed repeatedly</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470295#M14704</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;for your response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The file that is being reported in the error is being created in a previous step, inside&amp;nbsp;LIBNAME DATOS '/u/SAS/datos';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then&amp;nbsp;&lt;SPAN&gt;LIBNAME DATOS '/u/SAS/datos' is being renamed with the sentence&amp;nbsp;libname z "/u/SAS/datos" SERVER=ts12 so I expect that the file reported in the error is contained in this new libname.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Are my thoughts correct? Many thanks,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 12:57:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470295#M14704</guid>
      <dc:creator>mchiappe83</dc:creator>
      <dc:date>2018-06-14T12:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Error in code to be executed repeatedly</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470296#M14705</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/205100"&gt;@mchiappe83&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;for your response.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The file that is being reported in the error is being created in a previous step, inside&amp;nbsp;LIBNAME DATOS '/u/SAS/datos';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then&amp;nbsp;&lt;SPAN&gt;LIBNAME DATOS '/u/SAS/datos' is being renamed with the sentence&amp;nbsp;libname z "/u/SAS/datos" SERVER=ts12 so I expect that the file reported in the error is contained in this new libname.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Are my thoughts correct? Many thanks,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Z&lt;/STRONG&gt; is a different libref than &lt;STRONG&gt;DATOS&lt;/STRONG&gt;, even if they are both ultimately pointing to the same physical location.&lt;/P&gt;
&lt;P&gt;Make sure the code is using the libref that is active.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 13:05:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470296#M14705</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-06-14T13:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Error in code to be executed repeatedly</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470300#M14706</link>
      <description>&lt;P&gt;In lines 176 to 178 you sign on to a r4emote SAS/CONNECT server, which is running on z/OS:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;176        %let ts12=host.test.arba.gov.ar 7541;
177        options comamid=tcp remote=ts12;
178        signon user="consusas" password=XXXXXXXXX;
&lt;/PRE&gt;
&lt;P&gt;From log line 182 you remote submit code to that server, which returns 45 lines of its log before the rsubmit ends.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In log line 184 you assign a library Z via RLS to that CONNECT server:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;184        libname z "/u/SAS/datos" SERVER=ts12;
NOTE: Libref Z was successfully assigned as follows: 
      Engine:        REMOTE 
      Physical Name: /u/SAS/datos
&lt;/PRE&gt;
&lt;P&gt;which obviously succeeds.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In log line 228 you have another libname statement, which tries to assign library Z with a local path (no server specified as in line 184):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;228        LIBNAME Z BASE "/u/SAS/datos";
NOTE: La librería Z no existe.
&lt;/PRE&gt;
&lt;P&gt;which fails, as can be seen by the NOTE. This leaves you with an unassigned library Z, so all future references to datasets in library Z will fail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This non-existence of library Z causes the ERRORs happening from log line 958:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;958        proc sql ;
959         insert into xxxx.STG_SPESERV_PADRON_AUTO
960        	select * from  z.XDAUTO
961        	 WHERE PUT(F_LOG, 8.)||put(H_LOG,Z6.) &amp;gt; put(&amp;amp;fecha,Z14.);
ERROR: El archivo Z.XDAUTO.DATA no existe.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
962        quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: SAS set option OBS=0 and will continue to check statements. This might cause NOTE: No observations in data set.
&lt;/PRE&gt;
&lt;P&gt;You now have no dataset xxxx.STG_SPESERV_PADRON_AUTO, and since OBS=0, and SAS has gone into syntax check mode, you have NOEXEC in the SQL following later:&lt;/P&gt;
&lt;PRE&gt;1240       proc sql;
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
1241       		
1242       	select max(f_log) INTO :HOY from xxxx.STG_SPESERV_PADRON_AUTO;
NOTE: Statement not executed due to NOEXEC option.
1243       	select max(h_log) into :hora from xxxx.STG_SPESERV_PADRON_AUTO where f_log = (select max(f_log) from
1243     ! xxxx.STG_SPESERV_PADRON_AUTO );
NOTE: Statement not executed due to NOEXEC option.
1244       
1245       	
1246       	UPDATE xxxx.parametro_procesamiento AS a
1247       	SET  fecha_ult_ejec = put(&amp;amp;hoy, 8.) || put(&amp;amp;hora, z6.),
                                      _
                                      22
WARNING: Apparent symbolic reference HOY not resolved.
&lt;/PRE&gt;
&lt;P&gt;which also causes that no macro variables are created. From then on, all hell breaks loose, for obvious reasons.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 13:16:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470300#M14706</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-14T13:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error in code to be executed repeatedly</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470303#M14707</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/205100"&gt;@mchiappe83&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;for your response.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The file that is being reported in the error is being created in a previous step, inside&amp;nbsp;LIBNAME DATOS '/u/SAS/datos';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then&amp;nbsp;&lt;SPAN&gt;LIBNAME DATOS '/u/SAS/datos' is being renamed with the sentence&amp;nbsp;libname z "/u/SAS/datos" SERVER=ts12 so I expect that the file reported in the error is contained in this new libname.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Are my thoughts correct? Many thanks,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You have here a fundamental misunderstanding of what happens where.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;LIBNAME DATOS '/u/SAS/datos';&lt;/SPAN&gt; is being executed during an &lt;U&gt;rsubmit to the remote server&lt;/U&gt;, so a local assignment using the BASE engine works.&lt;/P&gt;
&lt;P&gt;libname z "/u/SAS/datos" SERVER=ts12; is executed in the &lt;U&gt;local context,&lt;/U&gt; but uses the REMOTE engine to the server, so it works also.&lt;/P&gt;
&lt;P&gt;But LIBNAME Z BASE "/u/SAS/datos"; is used once again in the &lt;U&gt;local&lt;/U&gt; context (not during an rsubmit!) &lt;U&gt;without specifying the server&lt;/U&gt;, and so it fails, as that path is not available in your local SAS session. That failed libname effectively clears the libref for Z. Either remove that statement (and keep on using the previously successfully assigned remote library), or specify the server.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 13:27:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470303#M14707</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-14T13:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error in code to be executed repeatedly</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470405#M14708</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your guidance&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;But LIBNAME Z BASE "/u/SAS/datos"; is used once again in the&amp;nbsp;&lt;/SPAN&gt;&lt;U&gt;local&lt;/U&gt;&lt;SPAN&gt;&amp;nbsp;context (not during an rsubmit!)&amp;nbsp;&lt;/SPAN&gt;&lt;U&gt;without specifying the server&lt;/U&gt;&lt;SPAN&gt;, and so it fails, as that path is not available in your local SAS session. That failed libname effectively clears the libref for Z. Either remove that statement (and keep on using the previously successfully assigned remote library), or specify the server.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not being able to understand where does &lt;SPAN&gt;&amp;nbsp;LIBNAME Z BASE "/u/SAS/datos" happens, as there's no place in the code where I write it down strictly that way.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;From the log, it seems to have place before the following piece of code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
 insert into xxxx.STG_SPESERV_PADRON_AUTO
	select * from  z.XDAUTO 
	 WHERE PUT(F_LOG, 8.)||put(H_LOG,Z6.) &amp;gt; put(&amp;amp;fecha,Z14.);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But there's nothing like&amp;nbsp;&lt;SPAN&gt;LIBNAME Z BASE "/u/SAS/datos" there.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Martin&lt;/SPAN&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;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks again for your time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 19:37:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470405#M14708</guid>
      <dc:creator>mchiappe83</dc:creator>
      <dc:date>2018-06-14T19:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Error in code to be executed repeatedly</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470407#M14709</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/205100"&gt;@mchiappe83&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Thanks a lot for your guidance&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;But LIBNAME Z BASE "/u/SAS/datos"; is used once again in the&amp;nbsp;&lt;/SPAN&gt;&lt;U&gt;local&lt;/U&gt;&lt;SPAN&gt;&amp;nbsp;context (not during an rsubmit!)&amp;nbsp;&lt;/SPAN&gt;&lt;U&gt;without specifying the server&lt;/U&gt;&lt;SPAN&gt;, and so it fails, as that path is not available in your local SAS session. That failed libname effectively clears the libref for Z. Either remove that statement (and keep on using the previously successfully assigned remote library), or specify the server.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not being able to understand where does &lt;SPAN&gt;&amp;nbsp;LIBNAME Z BASE "/u/SAS/datos" happens, as there's no place in the code where I write it down strictly that way.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks again for your time.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Look at the log. I gave you all log line numbers.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 18:19:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470407#M14709</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-14T18:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Error in code to be executed repeatedly</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470425#M14710</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;In log line 228 you have another libname statement, which tries to assign library Z with a local path (no server specified as in line 184):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;228        LIBNAME Z BASE "/u/SAS/datos";
NOTE: La librería Z no existe.&lt;/PRE&gt;&lt;P&gt;which fails, as can be seen by the NOTE. This leaves you with an unassigned library Z, so all future references to datasets in library Z will fail.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I'm not being able to understand why this piece of log shows up. I believe that's because I'm calling z.xdauto in the following step&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
 insert into xxxx.STG_SPESERV_PADRON_AUTO
	select * from  z.XDAUTO 
	 WHERE PUT(F_LOG, 8.)||put(H_LOG,Z6.) &amp;gt; put(&amp;amp;fecha,Z14.);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Why the following statement (written previously in the code) isn't useful to this end?&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname z "/u/SAS/datos" SERVER=ts12;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 19:47:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470425#M14710</guid>
      <dc:creator>mchiappe83</dc:creator>
      <dc:date>2018-06-14T19:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error in code to be executed repeatedly</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470426#M14711</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;Z&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is a different libref than&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;DATOS&lt;/STRONG&gt;, even if they are both ultimately pointing to the same physical location.&lt;/P&gt;&lt;P&gt;Make sure the code is using the libref that is active&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;How can I make sure of this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 19:51:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470426#M14711</guid>
      <dc:creator>mchiappe83</dc:creator>
      <dc:date>2018-06-14T19:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error in code to be executed repeatedly</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470439#M14712</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/205100"&gt;@mchiappe83&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;In log line 228 you have another libname statement, which tries to assign library Z with a local path (no server specified as in line 184):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;228        LIBNAME Z BASE "/u/SAS/datos";
NOTE: La librería Z no existe.&lt;/PRE&gt;
&lt;P&gt;which fails, as can be seen by the NOTE. This leaves you with an unassigned library Z, so all future references to datasets in library Z will fail.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I'm not being able to understand why this piece of log shows up. I believe that's because I'm calling z.xdauto in the following step&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
 insert into xxxx.STG_SPESERV_PADRON_AUTO
	select * from  z.XDAUTO 
	 WHERE PUT(F_LOG, 8.)||put(H_LOG,Z6.) &amp;gt; put(&amp;amp;fecha,Z14.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Why the following statement (written previously in the code) isn't useful to this end?&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname z "/u/SAS/datos" SERVER=ts12;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Martin&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Because (as I already explained) the following wrong libname statement clears the libref.&lt;/P&gt;
&lt;P&gt;And code appears in the log because you ran it, period.&lt;/P&gt;
&lt;P&gt;Pay attention to details and make sure that code and logs are from the same execution.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 20:28:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470439#M14712</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-14T20:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Error in code to be executed repeatedly</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470443#M14713</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Look at the log. I gave you all log line numbers.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did, but I can't figure out why LIBNAME Z BASE "/u/SAS/datos"; is automatically being generated if&amp;nbsp;libname z "/u/SAS/datos" SERVER=ts12; is created inmediately before.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it for the PROC SQL?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Martín&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 20:37:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470443#M14713</guid>
      <dc:creator>mchiappe83</dc:creator>
      <dc:date>2018-06-14T20:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Error in code to be executed repeatedly</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470454#M14714</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;for your time&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Because (as I already explained) the following wrong libname statement clears the libref.&lt;/P&gt;&lt;P&gt;And code appears in the log because you ran it, period.&lt;/P&gt;&lt;P&gt;Pay attention to details and make sure that code and logs are from the same execution.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I'm sorry but, if you look into the code -not the log- (the wrong libname statement that appears in the log) isn't there. Code and logs are from the same execution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd understand if you prefer not to continue with this stuff.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again, thanks a lot for your time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 21:08:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470454#M14714</guid>
      <dc:creator>mchiappe83</dc:creator>
      <dc:date>2018-06-14T21:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Error in code to be executed repeatedly</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470522#M14719</link>
      <description>&lt;P&gt;When something unexpected happens, the log is your sole authority in determining what went wrong, as it reflects &lt;EM&gt;&lt;U&gt;the code that was actually executed&lt;/U&gt;&lt;/EM&gt;, period. Base(!) SAS does not "invent" phantom statements on its own. So you need to investigate where that erroneus libname statement comes from, and remove it. Until you do that, the code will not work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I think I see where this is coming from. Log line 228 (the erroneous libname) is in a code part that seems to be automatically created by DI Studio. This part is inserted between your program code (delta-automotor.sas) lines 67 (which corresponds to log line 193) and 70 (which corresponds to log line 958). So you see there's almost 800 lines of code created that are not part of the code you see.&lt;/P&gt;
&lt;P&gt;Maybe one of the DI Studio experts can come up with an idea why that libname appears "out of the blue".&lt;/P&gt;
&lt;P&gt;If none of the posters here can come up with an idea that helps, I am afraid (as I do not work with DI Studio, it's not even installed here) I can only refer you to SAS technical support. Make sure you point them to the problem point so they do not need to find it on their own.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a workaround, you could insert a correct libname statement immediately before code line 70, so that it overrides the wrong one. And you need to investigate which mechanism makes DI Studio insert that additional code. Is it because the code you showed is actually compiled from several nodes in a DI Studio project/flow?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 06:56:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Error-in-code-to-be-executed-repeatedly/m-p/470522#M14719</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-15T06:56:39Z</dc:date>
    </item>
  </channel>
</rss>

