BookmarkSubscribeRSS Feed
shubham1
Calcite | Level 5
%MACRO DOWNLOAD_BIB(DSN);

%chk_dir(dir=&path.\&DSN);

LIBNAME new "&path.\&DSN";

OPTIONS VALIDVARNAME=any;

signon Rsysv user="&_host_user" password="&_host_pass" noscript;

%SYSLPUT DSN=&DSN;

RSUBMIT;

OPTIONS VALIDVARNAME=any;

LIBNAME new "&DSN." DISP=SHR;

OPTIONS OBS=MAX;

 

PROC DOWNLOAD INLIB=new OUTLIB=new V6TRANSPORT;

RUN;

LIBNAME new CLEAR;

ENDRSUBMIT;

%MEND DOWNLOAD_BIB;

 

In this I am downloading SAS dataset from mainframe to windows

Macro variable path will have location where SAS dataset would be downloaded in windows

when I am ruuning the macro I am getting below error

ERROR: Cannot open data library new because it is uninitialized and user has has only read access.

 

can you help what is the error

1 REPLY 1
henning_munch
Calcite | Level 5

If you want to write to "libname new" you have to allocate it with

LIBNAME new "&DSN." DISP=OLD;

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

Discussion stats
  • 1 reply
  • 573 views
  • 0 likes
  • 2 in conversation