Desktop productivity for business analysts and programmers

Importing csv file but get error: Library name is not assigned

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 104
Accepted Solution

Importing csv file but get error: Library name is not assigned

1                                                          The SAS System                                 20:35 Monday, May 28, 2018

1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='HEDIS_Diabetes - Copy';
4          %LET _CLIENTPROCESSFLOWNAME='Process Flow';
5          %LET _CLIENTPROJECTPATH='';
6          %LET _CLIENTPROJECTNAME='';
7          %LET _SASPROGRAMFILE=;
8          
9          ODS _ALL_ CLOSE;
10         OPTIONS DEV=ACTIVEX;
11         GOPTIONS XPIXELS=0 YPIXELS=0;
12         FILENAME EGSR TEMP;
13         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
14             STYLE=HtmlBlue
15             STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css")
16             NOGTITLE
17             NOGFOOTNOTE
18             GPATH=&sasworklocation
19             ENCODING=UTF8
20             options(rolap="on")
21         ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
22         
23         GOPTIONS ACCESSIBLE;
24         LIBNAME diabexc "&cOrgNameDataAnalytics./users/fs115055/HEDIS/Tapes.";
NOTE: Libref DIABEXC was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: /opt/t7iw/sasdata/users/fs115055/HEDIS/Tapes.


25         proc import out =  HEDIS.diabexc
26         datafile= '&cOrgNameDataAnalytics./users/fs115055/HEDIS/Tapes./diabexc.csv'
27         DBMS=CSV;
28         getnames=yes;
29         run;

ERROR: Library name is not assigned.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      
30         
31         
32         GOPTIONS NOACCESSIBLE;
33         %LET _CLIENTTASKLABEL=;
34         %LET _CLIENTPROCESSFLOWNAME=;
35         %LET _CLIENTPROJECTPATH=;
36         %LET _CLIENTPROJECTNAME=;
37         %LET _SASPROGRAMFILE=;
38         
39         ;*';*";*/;quit;run;
40         ODS _ALL_ CLOSE;
41         
42         
43         QUIT; RUN;
44         

Accepted Solutions
Solution
3 weeks ago
Respected Advisor
Posts: 2,794

Re: Importing csv file but get error: Library name is not assigned

Your program never assigns HEDIS to a libname.

--
Paige Miller

View solution in original post


All Replies
Solution
3 weeks ago
Respected Advisor
Posts: 2,794

Re: Importing csv file but get error: Library name is not assigned

Your program never assigns HEDIS to a libname.

--
Paige Miller
Frequent Contributor
Posts: 104

Re: Importing csv file but get error: Library name is not assigned

Posted in reply to PaigeMiller
I see what I did, I only ran that portion and not the stuff in the beginning. Thanks
Frequent Contributor
Posts: 104

Re: Importing csv file but get error: Library name is not assigned

Now I get this error:

1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='HEDIS_Diabetes - Copy';
4          %LET _CLIENTPROCESSFLOWNAME='Process Flow';
5          %LET _CLIENTPROJECTPATH='';
6          %LET _CLIENTPROJECTNAME='';
7          %LET _SASPROGRAMFILE=;
8          
9          ODS _ALL_ CLOSE;
10         OPTIONS DEV=ACTIVEX;
11         GOPTIONS XPIXELS=0 YPIXELS=0;
12         FILENAME EGSR TEMP;
13         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
14             STYLE=HtmlBlue
15             STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css")
16             NOGTITLE
17             NOGFOOTNOTE
18             GPATH=&sasworklocation
19             ENCODING=UTF8
20             options(rolap="on")
21         ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
22         
23         GOPTIONS ACCESSIBLE;
24         %GLOBAL FileNameUserID;
25         %GLOBAL FileNameDate;
26         %GLOBAL FileNameMailing;
27         
28         %LET FileNameUserID =fs115055;
29         /* %LET FileNameDate = %sysfunc(today(),YYMMDD.); */
30         %LET FileNameHEDIS = HEDIS;
31         
32         %LET TEST = &cOrgNameDataAnalytics./users/&FileNameUserID./&FileNameHEDIS.;
33         /* %LET TEST = &cOrgNameDataAnalytics./users/&FileNameUserID./&FileNameDate.; */
34         %PUT &TEST;
/opt/t7iw/sasdata/users/fs115055/HEDIS
35         
36         LIBNAME Rx "&cOrgNameDataAnalytics./shared/AK_West_Data/Data_Sets/2018-03";
NOTE: Libref RX was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: /opt/t7iw/sasdata/shared/AK_West_Data/Data_Sets/2018-03
37         FILENAME ndcdiab "&cOrgNameDataAnalytics./users/fs115055/HEDIS/NDCDIAB.TXT";
38         LIBNAME ndc_diab "&cOrgNameDataAnalytics./users/fs115055/HEDIS";
NOTE: Libref NDC_DIAB was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: /opt/t7iw/sasdata/users/fs115055/HEDIS
39         LIBNAME HEDIS "&cOrgNameDataAnalytics./users/&FileNameUserID./&FileNameHEDIS./Tapes.";
NOTE: Libref HEDIS was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: /opt/t7iw/sasdata/users/fs115055/HEDIS/Tapes.
40         
41         /*LIBNAME HEDIS "&cOrgNameDataAnalytics./users/&FileNameUserID./&FileNameDate./&FileNameHEDIS."; */
42         
43         LIBNAME diabexc "&cOrgNameDataAnalytics./users/fs115055/HEDIS/Tapes.";
NOTE: Libref DIABEXC refers to the same physical library as HEDIS.
NOTE: Libref DIABEXC was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: /opt/t7iw/sasdata/users/fs115055/HEDIS/Tapes.
2                                                          The SAS System                                 20:35 Monday, May 28, 2018



44         proc import out =  HEDIS.diabexc
45         datafile= '&cOrgNameDataAnalytics./users/fs115055/HEDIS/Tapes./diabexc.csv'
46         DBMS=CSV;
47         getnames=yes;
48         run;

NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update mode. Temporary parameter values will be saved to 
WORK.PARMS.PARMS.SLIST.
ERROR: Physical file does not exist, 
/opt/t7iw/sas94/Config/Lev1/SASApp/&cOrgNameDataAnalytics./users/fs115055/HEDIS/Tapes./diabexc.csv. 
ERROR: Import unsuccessful.  See SAS Log for details.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
      real time           0.24 seconds
      cpu time            0.05 seconds
      
49         
50         GOPTIONS NOACCESSIBLE;
51         %LET _CLIENTTASKLABEL=;
52         %LET _CLIENTPROCESSFLOWNAME=;
53         %LET _CLIENTPROJECTPATH=;
54         %LET _CLIENTPROJECTNAME=;
55         %LET _SASPROGRAMFILE=;
56         
57         ;*';*";*/;quit;run;
58         ODS _ALL_ CLOSE;
59         
60         
61         QUIT; RUN;
Respected Advisor
Posts: 2,794

Re: Importing csv file but get error: Library name is not assigned

Use double quotes in the PROC IMPORT code

--
Paige Miller
Frequent Contributor
Posts: 104

Re: Importing csv file but get error: Library name is not assigned

Posted in reply to PaigeMiller
Thanks! That worked
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 105 views
  • 1 like
  • 2 in conversation