<?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 on proc download in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/506387#M135746</link>
    <description>&lt;P&gt;You have answered your own question then.&amp;nbsp; Libname points to a path, not a dataset:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000214133.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000214133.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;E.g.&lt;/P&gt;
&lt;PRE&gt;%let path=c:/temp;
&lt;BR /&gt;%MACRO DOWNLOAD_BIB(DSN);

%chk_dir(dir=&amp;amp;path.\&amp;amp;DSN);

LIBNAME outme "&amp;amp;path.";  

OPTIONS VALIDVARNAME=any;

signon Rsysv user="&amp;amp;_host_user" password="&amp;amp;_host_pass" noscript;

%SYSLPUT DSN=&amp;amp;DSN;

RSUBMIT;

OPTIONS VALIDVARNAME=any;

LIBNAME getme "..." DISP=SHR;  &amp;lt;-- Put the path to the server here ...

OPTIONS OBS=MAX;

 

PROC DOWNLOAD INLIB=getme OUTLIB=outme V6TRANSPORT;

RUN;

LIBNAME getme CLEAR;

ENDRSUBMIT;

%MEND DOWNLOAD_BIB;&lt;/PRE&gt;
&lt;P&gt;From:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/connref/61908/HTML/default/viewer.htm#prcd.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/connref/61908/HTML/default/viewer.htm#prcd.htm&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Oct 2018 10:17:48 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2018-10-22T10:17:48Z</dc:date>
    <item>
      <title>error on proc download</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/505479#M135366</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%MACRO DOWNLOAD_BIB(DSN);

%chk_dir(dir=&amp;amp;path.\&amp;amp;DSN);

LIBNAME new "&amp;amp;path.\&amp;amp;DSN";

OPTIONS VALIDVARNAME=any;

signon Rsysv user="&amp;amp;_host_user" password="&amp;amp;_host_pass" noscript;

%SYSLPUT DSN=&amp;amp;DSN;

RSUBMIT;

OPTIONS VALIDVARNAME=any;

LIBNAME new "&amp;amp;DSN." DISP=SHR;

OPTIONS OBS=MAX;

 

PROC DOWNLOAD INLIB=new OUTLIB=new V6TRANSPORT;

RUN;

LIBNAME new CLEAR;

ENDRSUBMIT;

%MEND DOWNLOAD_BIB;

 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this I am downloading SAS dataset from mainframe to windows&lt;/P&gt;&lt;P&gt;Macro variable path will have location where SAS dataset would be downloaded in windows&lt;/P&gt;&lt;P&gt;when I am ruuning the macro I am getting below error&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ERROR: Cannot open data library new because it is uninitialized and user has has only read access&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you help what is the error&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 09:27:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/505479#M135366</guid>
      <dc:creator>shubham1</dc:creator>
      <dc:date>2018-10-18T09:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: error on proc download</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/505481#M135367</link>
      <description>&lt;P&gt;First I would avoid calling the library reference new.&amp;nbsp; That might cause problems.&amp;nbsp; Second you have two initialisations of the library new, one with \&amp;amp;path.\&amp;amp;DSN, and one with just &amp;amp;DSN.&amp;nbsp; Which one causes the issue.&amp;nbsp; Posting the log really helps!!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other than that, make sure you (i.e. the machine you work or or session) has access to the given areas.&lt;/P&gt;
&lt;P&gt;And please avoid coding all in uppercase, no need to shout it at me.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 09:38:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/505481#M135367</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-10-18T09:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: error on proc download</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/505484#M135368</link>
      <description>&lt;P&gt;what should I use in library reference other than new&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;error is coming after proc download step&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 09:49:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/505484#M135368</guid>
      <dc:creator>shubham1</dc:creator>
      <dc:date>2018-10-18T09:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: error on proc download</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/505486#M135369</link>
      <description>&lt;P&gt;You should put a descriptive bit of text which conforms to SAS naming conventions.&amp;nbsp; In your code you create two lirary references called the same thing, and then copy from one to theo other.&amp;nbsp; Which is going to cause errors:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;LIBNAME new "&amp;amp;path.\&amp;amp;DSN"; &lt;BR /&gt;LIBNAME new "&amp;amp;DSN." DISP=SHR; &lt;BR /&gt;PROC DOWNLOAD INLIB=new OUTLIB=new V6TRANSPORT;&lt;BR /&gt; &lt;BR /&gt; ^ Both in and out are the same libary! &lt;BR /&gt;RUN;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As an example correction:&lt;/P&gt;
&lt;PRE&gt;%MACRO DOWNLOAD_BIB(DSN);

%chk_dir(dir=&amp;amp;path.\&amp;amp;DSN);

LIBNAME path_dsn "&amp;amp;path.\&amp;amp;DSN";

OPTIONS VALIDVARNAME=any;

signon Rsysv user="&amp;amp;_host_user" password="&amp;amp;_host_pass" noscript;

%SYSLPUT DSN=&amp;amp;DSN;

RSUBMIT;

OPTIONS VALIDVARNAME=any;

LIBNAME dsn"&amp;amp;DSN." DISP=SHR;

OPTIONS OBS=MAX;

 

PROC DOWNLOAD INLIB=path_dsn OUTLIB=dsn V6TRANSPORT;

RUN;

LIBNAME new CLEAR;

ENDRSUBMIT;

%MEND DOWNLOAD_BIB;&lt;/PRE&gt;
&lt;P&gt;You will see each library has a different reference.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 09:58:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/505486#M135369</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-10-18T09:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: error on proc download</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/506371#M135734</link>
      <description>&lt;P&gt;I have changed the name of libraray reference now but still I am getting the error&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 09:12:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/506371#M135734</guid>
      <dc:creator>shubham1</dc:creator>
      <dc:date>2018-10-22T09:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: error on proc download</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/506376#M135737</link>
      <description>&lt;P&gt;Show your code, did you change both libnames to have different aliases like I showed?&amp;nbsp; What errors or warnings?&amp;nbsp; Do the libname paths exist, do you have rights to access them.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 09:44:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/506376#M135737</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-10-22T09:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: error on proc download</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/506378#M135739</link>
      <description>&lt;PRE&gt;%MACRO DOWNLOAD_BIB(DSN);

%chk_dir(dir=&amp;amp;path.\&amp;amp;DSN);

LIBNAME outme "&amp;amp;path.\&amp;amp;DSN";

OPTIONS VALIDVARNAME=any;

signon Rsysv user="&amp;amp;_host_user" password="&amp;amp;_host_pass" noscript;

%SYSLPUT DSN=&amp;amp;DSN;

RSUBMIT;

OPTIONS VALIDVARNAME=any;

LIBNAME getme "&amp;amp;DSN." DISP=SHR;

OPTIONS OBS=MAX;

 

PROC DOWNLOAD INLIB=getme OUTLIB=outme V6TRANSPORT;

RUN;

LIBNAME getme CLEAR;

ENDRSUBMIT;

%MEND DOWNLOAD_BIB;

ERROR: Cannot open data library GETME because it is uninitialized and user has  has only read access.&lt;/PRE&gt;&lt;P&gt;this is the code that i am running&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 09:49:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/506378#M135739</guid>
      <dc:creator>shubham1</dc:creator>
      <dc:date>2018-10-22T09:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: error on proc download</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/506381#M135742</link>
      <description>&lt;P&gt;And what does dsn resolve to?&lt;/P&gt;
&lt;PRE&gt;LIBNAME getme "&amp;amp;DSN." DISP=SHR;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Oct 2018 09:57:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/506381#M135742</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-10-22T09:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: error on proc download</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/506385#M135745</link>
      <description>&lt;P&gt;This DSN resolve to SAS dataset which resides in mainframe&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for ex-SXXX.FGH.DFG.SAS&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 10:07:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/506385#M135745</guid>
      <dc:creator>shubham1</dc:creator>
      <dc:date>2018-10-22T10:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: error on proc download</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/506387#M135746</link>
      <description>&lt;P&gt;You have answered your own question then.&amp;nbsp; Libname points to a path, not a dataset:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000214133.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000214133.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;E.g.&lt;/P&gt;
&lt;PRE&gt;%let path=c:/temp;
&lt;BR /&gt;%MACRO DOWNLOAD_BIB(DSN);

%chk_dir(dir=&amp;amp;path.\&amp;amp;DSN);

LIBNAME outme "&amp;amp;path.";  

OPTIONS VALIDVARNAME=any;

signon Rsysv user="&amp;amp;_host_user" password="&amp;amp;_host_pass" noscript;

%SYSLPUT DSN=&amp;amp;DSN;

RSUBMIT;

OPTIONS VALIDVARNAME=any;

LIBNAME getme "..." DISP=SHR;  &amp;lt;-- Put the path to the server here ...

OPTIONS OBS=MAX;

 

PROC DOWNLOAD INLIB=getme OUTLIB=outme V6TRANSPORT;

RUN;

LIBNAME getme CLEAR;

ENDRSUBMIT;

%MEND DOWNLOAD_BIB;&lt;/PRE&gt;
&lt;P&gt;From:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/connref/61908/HTML/default/viewer.htm#prcd.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/connref/61908/HTML/default/viewer.htm#prcd.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 10:17:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-on-proc-download/m-p/506387#M135746</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-10-22T10:17:48Z</dc:date>
    </item>
  </channel>
</rss>

