<?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: Close the data (SAS Guide 8.3) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Close-the-data-SAS-Guide-8-3/m-p/790115#M252932</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Thank you, I added the code to my main message. The table PRODUITS_PRIIPS remains open.</description>
    <pubDate>Fri, 14 Jan 2022 08:34:14 GMT</pubDate>
    <dc:creator>SASdevAnneMarie</dc:creator>
    <dc:date>2022-01-14T08:34:14Z</dc:date>
    <item>
      <title>Close the data (SAS Guide 8.3)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Close-the-data-SAS-Guide-8-3/m-p/789983#M252887</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm working on SAS Guide 8.3. I have the error because the data remains open (in yellow)&amp;nbsp; after the code execution. There are some options please to close the data, please ? Thank you !&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarieT_0-1642080111380.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67377i3C1496A04BA38439/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MarieT_0-1642080111380.png" alt="MarieT_0-1642080111380.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro cleartemplib(libtofree);
	%if %sysfunc(libname(&amp;amp;libtofree)) ne 0 %then
		%put NOTE: Libref &amp;amp;libtofree could not be unassigned;
	%else %put NOTE: Libref &amp;amp;libtofree has been unassigned;
%mend;


%macro Affectation (libref= , metaLibName= );
	
	%cleartemplib(&amp;amp;libref);


	libname &amp;amp;libref meta library="&amp;amp;metaLibName";
%mend Affectation;

%Affectation(libref= PSAEU11, metaLibName= PEGASE - PSAEU11);

%let Rep_Travail			= \\lamondiale.com\LMPAPROD\USINE_PRIIPS\;
%let EntreesManuelles  		= &amp;amp;Rep_Travail.2. DONNES INPUT\2.1 DONNEES MANUELLES;
%let EntreesManuellesBis	= &amp;amp;Rep_Travail.\5. RETRAITEMENTS MANUELS\Chaine Produits;
%let EntreesPDFemtn			= &amp;amp;Rep_Travail.2. DONNES INPUT\2.2 PDF EMTN;
%let Sorties 				= &amp;amp;Rep_Travail.4. DONNEES OUTPUT;
%let Publications			= &amp;amp;Rep_Travail.6. PUBLICATIONS\6.1 DICTIONNAIRES DE DONNEES;
%let ArchivesPublications	= &amp;amp;Rep_Travail.6. PUBLICATIONS\6.1 ARCHIVES PUBLICATIONS;
%let SortiesPDFemtn			= &amp;amp;Rep_Travail.6. PUBLICATIONS\6.2 PDF EMTN;
%let SortiesFicemtn			= &amp;amp;Rep_Travail.6. PUBLICATIONS\6.4 FICHIERS_EMTN;


Data _null_;
	DateInitiale='01JAN2018:00:00:00'dt;
	Call symputx('DateInitiale',DateInitiale);
	DatePublication=today();
	Call symputx('DatePublication',DatePublication);
run;


Data _null_;
	YYYY=year(&amp;amp;DatePublication);

	if month(&amp;amp;DatePublication) &amp;lt; 10 then
		MM=compress(("0"!!month(&amp;amp;DatePublication)));
	else MM=month(&amp;amp;DatePublication);

	if day(&amp;amp;DatePublication) &amp;lt; 10 then
		DD=compress(("0"!!day(&amp;amp;DatePublication)));
	else DD=day(&amp;amp;DatePublication);
	DatePubli=compress(YYYY!!MM!!DD);
	Call symputx('DatePubli',DatePubli);
run;

%put  &amp;amp;DatePubli;


proc import 
	datafile= "&amp;amp;EntreesManuellesBis\xxxxxx"
	out=PRODUITS_PRIIPS
	replace dbms=xlsx;
	getnames=yes;
	range="SAS_IMPORT";
run;


proc import 
	datafile= "&amp;amp;EntreesManuelles\xxxx"
	out=EMTN_EXCLUS
	replace dbms=xlsx;
	getnames=yes;
run;&lt;/CODE&gt;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 08:32:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Close-the-data-SAS-Guide-8-3/m-p/789983#M252887</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2022-01-14T08:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Close the data (SAS Guide 8.3)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Close-the-data-SAS-Guide-8-3/m-p/789984#M252888</link>
      <description>How are you terminating the data creation code?&lt;BR /&gt;If you are using proc sql you probably should end with quit;&lt;BR /&gt;Can you provide the code?&lt;BR /&gt;&lt;BR /&gt;Best regards, Jos</description>
      <pubDate>Thu, 13 Jan 2022 13:39:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Close-the-data-SAS-Guide-8-3/m-p/789984#M252888</guid>
      <dc:creator>JosvanderVelden</dc:creator>
      <dc:date>2022-01-13T13:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Close the data (SAS Guide 8.3)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Close-the-data-SAS-Guide-8-3/m-p/790115#M252932</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Thank you, I added the code to my main message. The table PRODUITS_PRIIPS remains open.</description>
      <pubDate>Fri, 14 Jan 2022 08:34:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Close-the-data-SAS-Guide-8-3/m-p/790115#M252932</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2022-01-14T08:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: Close the data (SAS Guide 8.3)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Close-the-data-SAS-Guide-8-3/m-p/791509#M253543</link>
      <description>Hi Marie,&lt;BR /&gt;Were you able to solve this?&lt;BR /&gt;The code you provide is not enough to be able to help in solving.&lt;BR /&gt;Do you have an active libref to the xlsx-file?&lt;BR /&gt;If yes then you need to clear that libref so that the xlsx-file is released.&lt;BR /&gt;&lt;BR /&gt;Best regards, Jos</description>
      <pubDate>Fri, 21 Jan 2022 17:10:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Close-the-data-SAS-Guide-8-3/m-p/791509#M253543</guid>
      <dc:creator>JosvanderVelden</dc:creator>
      <dc:date>2022-01-21T17:10:09Z</dc:date>
    </item>
  </channel>
</rss>

