Hello,
i have two SAS Viya modules which are SAS® Visual Data Mining and Machine Learning and SAS® Visual Analytics and my storage is at 'my folder'. I unable to import csv file from my local disk and i checked that the csv file that i want to import is in the path that i write in the code. I able to upload it in SAS University Edition but i enable to upload it with the use of SAS Viya. Here is the log,
@Tom's answer made me go searching, and I found this: https://documentation.sas.com/?docsetId=lestmtsglobal&docsetTarget=p0qapul7pyz9hmn0zfoefj0c278a.htm&...
One thing is certain:
The file
/opt/sas/viya/config/var/run/compsrv/default/a06c76f7-1bec-4f6e-aa80-12f984a485f1/C:\Users\user\Desktop\SASUniversityEdition\myfolders\Testing2.csv.
does not exist.
You are mixing a unix path (in blue) and a windows path (in red).
Where is your file?
Note that this evidence is also what the log reads unambiguously:
WARNING: Physical file does not exist
Your Viya runs on a UNIX system, using Windows names will not work.
You need to upload your file to the Viya system first, so the SAS process running there has access to it.
Doesn't the interface provide a means for uploading?
Yes, there is an upload button between the three dots and the delete button. I uploaded the file and insert the file path into the codes below
FILENAME CSV "/Users/MY035/My Folder/Testing1.csv" TERMSTR=LF;
/** Import the CSV file. **/
PROC IMPORT DATAFILE=CSV
OUT=WORK.MYCSV
DBMS=CSV
REPLACE;
RUN;
/** Print the results. **/
PROC PRINT DATA=WORK.MYCSV; RUN;
/** Unassign the file reference. **/
FILENAME CSV;
and
FILENAME CSV "/Users/MY035/My Folder/Testing1.csv" TERMSTR=CRLF;
PROC IMPORT DATAFILE=CSV
OUT=WORK.MYCSV
DBMS=CSV
REPLACE;
RUN;
/** Print the results. **/
PROC PRINT DATA=WORK.MYCSV; RUN;
/** Unassign the file reference. **/
FILENAME CSV;
But both codes showed the same results, it still cannot.
Please post the log from one of these import steps; use the </> button for posting log text.
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 75 76 FILENAME CSV "/Users/MY035/My Folder/Testing1.csv" TERMSTR=CRLF; 77 78 79 PROC IMPORT DATAFILE=CSV 80 OUT=WORK.MYCSV 81 DBMS=CSV 82 REPLACE; 83 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. WARNING: Physical file does not exist, /Users/MY035/My Folder/Testing1.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.06 seconds cpu time 0.10 seconds 84 85 /** Print the results. **/ 86 87 PROC PRINT DATA=WORK.MYCSV; RUN; ERROR: File WORK.MYCSV.DATA does not exist. NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE PRINT used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 88 89 /** Unassign the file reference. **/ 90 91 FILENAME CSV; NOTE: Fileref CSV has been deassigned. 92 93 94 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 107
@Tom's answer made me go searching, and I found this: https://documentation.sas.com/?docsetId=lestmtsglobal&docsetTarget=p0qapul7pyz9hmn0zfoefj0c278a.htm&...
@ChrisHemedinger Should there be a Viya programming community? The SAS language is different.
Hi @ChrisNZ - it's true that there are new elements in SAS Viya (especially with CAS actions and specific procedures in CAS). But most existing SAS code (including PROC IMPORT) can work in a SAS Viya environment. This is especially true in SAS Viya 3.5 and later.
So, I'm not opposed to a SAS Viya (or CAS) board...but I don't want to fragment discussions if we don't need to. New users who are working in SAS Viya can benefit from the expertise of all of those contributing general SAS programming solutions.
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!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.