BookmarkSubscribeRSS Feed
Sarra-Matri
Obsidian | Level 7

in my Sas studio i imported csv files into a new folder and i created from csv tables of other SAS by using proc procedure .

now i have to create library that is assigned automatically. When i type libname mylib "path of folder" it works but the library is empty

any help please?

3 REPLIES 3
SASKiwi
PROC Star

Please post the code you are using to create the library and to add tables to it.

Sarra-Matri
Obsidian | Level 7
The following code is to import csv files :
PROC IMPORT DATAFILE="/home/u58228061/my_project/country_classification.csv"
DBMS=CSV
OUT=country_classification;
RUN;

PROC IMPORT DATAFILE="/home/u58228061/my_project/goods_classification.csv"
DBMS=CSV
OUT=goods_classification;
RUN;
PROC IMPORT DATAFILE="/home/u58228061/my_project/gsquarterly_december-2020-revised.csv"
DBMS=CSV
OUT=gsquarterly_december_revised;
RUN;

For creating librabry i tried this :
Libname mylib "/home/u58228061/my_project";
SASKiwi
PROC Star

Try this:

 

Libname mylib "/home/u58228061/my_project";

PROC IMPORT DATAFILE="/home/u58228061/my_project/country_classification.csv"
DBMS=CSV
OUT= mylib.country_classification;
RUN;

PROC IMPORT DATAFILE="/home/u58228061/my_project/goods_classification.csv"
DBMS=CSV
OUT= mylib.goods_classification;
RUN;
PROC IMPORT DATAFILE="/home/u58228061/my_project/gsquarterly_december-2020-revised.csv"
DBMS=CSV
OUT= mylib.gsquarterly_december_revised;
RUN;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 894 views
  • 2 likes
  • 2 in conversation