05-05-2015 04:53 AM
I have to import numerous files into SAS on multiple times during the month. I would really like to automate this process, but to date have failed to do so. I have to work in a SAS EG 5.1 server environment, which it seems just gives dead-ends with everything I try. The code that I have at the moment follows below. Everything seels to work fine until I try to do the actual import. I have tried importing without using macros, which works fine, but that doesn't solve my problem The macro variable datafile="&FolderPath/&&File&i" resolves to the right values, but when I run the macro, I get the following error (I have tried using PIPE to import the files, but that also doesn't seem to work in the server environment):
NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update mode. Temporary parameter values will be saved to
ERROR: Physical file does not exist, /sasdata/prototype/card_markerting_analytics/mart/ABMH684/CAMPAIGN
ERROR: Import unsuccessful. See SAS Log for details.
DO i=1 TO memcnt;
IF LOWCASE(SCAN(filevar,-1,".")) EQ LOWCASE("&extension") THEN
call symputx('File'||left(put(Count , 3.)), filevar, 'l' );
call symputx('Count', Count , 'l' );
select count(*) into: numfiles
%do i = 1 %to &numfiles;
Any help solving this will be greatly appreciated!
09-11-2015 10:41 AM
09-11-2015 09:32 PM
The most likely cause of your error is that the directory and file you are trying to import is not accessible from your SAS server.
Where is /sasdata/prototype etc located? Is it on your SAS server or not? If you are not sure about this ask your SAS administrator.
BTW you can ignore the NOTE: Unable to open etc. That is a consequence of your SASUSER library being set to read-only, which is the default setup for SAS 9.4.