BookmarkSubscribeRSS Feed
ivarenho
Fluorite | Level 6

My previous post relating to my issue with this activity related to the library error which I was able to fix! Now I'm having a different issue.

 

This is the warning: 

proc export data=pg1.storm_final
74 outfile="&outpath/storm_final.csv"
WARNING: Apparent symbolic reference OUTPATH not resolved.
75 dbms=csv replace;
76 run;

 

I also have an error: 

 

ERROR: Physical file does not exist, C:\Users\learnsas-16391\&outpath\storm_final.csv.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 1 observations read from the data set PG1.STORM_FINAL.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

11 REPLIES 11
Quentin
Super User

Immediately prior to this question, there is a prior activity "Create a Macro Variable (Required)".  That step has the instructions for creating the macro variable &outpath.

 

As mentioned there in one of the options, you will need write access to this directory.  If you don't know where you have write access, you could use:

%let outpath = %sysfunc(pathname(work));

That will write your output files to the temporary work directory used by your SAS session.

The Boston Area SAS Users Group is hosting free webinars!

Register now at https://www.basug.org/events.
dxiao2017
Lapis Lazuli | Level 10

Hi @ivarenho , could you try the code as follows and see what happen? The correct code should be this and there should be no problem, when I run this code before (for pg1 activity6.02) it works well.

libname pg1 "S:/workshop/EPG1V2/data";
%let outpath=s:/workshop/output;
proc export data=pg1.storm_final
   outfile="&outpath/storm_final.csv"
   dbms=csv replace;
run; 

Regarding the other two of your posts, I tried the code (which in fact is identical to the code above) I got similar problem (the csv file was created successfully though), I do not know that happened (got those odd message, I copied them here), hope there are experts who can help explain what happened (it looks like I got something odd when export dataset to csv files at the moment). The code and log message are as follows:

 

the code:

libname pg1 "~/LWPG1V2/data";
%let outpath=~/LWPG1V2;
proc export data=pg1.storm_final
   outfile="&outpath/storm_final.csv"
   dbms=csv replace;
run; 

the log message:

69         libname pg1 "~/LWPG1V2/data";
 NOTE: Libref PG1 was successfully assigned as follows: 
70         %let outpath=~/LWPG1V2;
 71         proc export data=pg1.storm_final
 72            outfile="&outpath/storm_final.csv"
 73            dbms=csv replace;
 74         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.
 75          /**********************************************************************
 76          *   PRODUCT:   SAS
 77          *   VERSION:   9.4
 78          *   CREATOR:   External File Interface
 79          *   DATE:      13MAY26
 80          *   DESC:      Generated SAS Datastep Code
 81          *   TEMPLATE SOURCE:  (None Specified.)
 82          ***********************************************************************/
 83             data _null_;
 84             %let _EFIERR_ = 0; /* set the ERROR detection macro variable */
 85             %let _EFIREC_ = 0;     /* clear export record count macro variable */
 86             file '~/LWPG1V2/storm_final.csv' delimiter=',' DSD DROPOVER lrecl=32767;
 87             if _n_ = 1 then        /* write column names or labels */
 88              do;
 89                put
 90                   "Season"
 91                ','
 92                   "Name"
 93                ','
 94                   "Basin"
 95                ','
 96                   "BasinName"
 97                ','
 98                   "OceanCode"
 99                ','
 100                  "Ocean"
 101               ','
 102                  "StormType"
 103               ','
 104                  "MaxWindMPH"
 105               ','
 106                  "MaxWindKM"
 107               ','
 108                  "MinPressure"
 109               ','
 110                  "StartDate"
 111               ','
 112                  "EndDate"
 113               ','
 114                  "StormLength"
 115               ','
 116                  "Lat"
 117               ','
 118                  "Lon"
 119               ;
 120             end;
 121           set  PG1.STORM_FINAL   end=EFIEOD;
 122               format Season best4. ;
 123               format Name $char57. ;
 124               format Basin $char2. ;
 125               format BasinName $14. ;
 126               format OceanCode $2. ;
 127               format Ocean $8. ;
 128               format StormType $13. ;
 129               format MaxWindMPH best12. ;
 130               format MaxWindKM 3. ;
 131               format MinPressure best12. ;
 132               format StartDate date9. ;
 133               format EndDate date9. ;
 134               format StormLength best12. ;
 135               format Lat best12. ;
 136               format Lon best12. ;
 137             do;
 138               EFIOUT + 1;
 139               put Season @;
 140               put Name $ @;
 141               put Basin $ @;
 142               put BasinName $ @;
 143               put OceanCode $ @;
 144               put Ocean $ @;
 145               put StormType $ @;
 146               put MaxWindMPH @;
 147               put MaxWindKM @;
 148               put MinPressure @;
 149               put StartDate @;
 150               put EndDate @;
 151               put StormLength @;
 152               put Lat @;
 153               put Lon ;
 154               ;
 155             end;
 156            if _ERROR_ then call symputx('_EFIERR_',1);  /* set ERROR detection macro variable */
 157            if EFIEOD then call symputx('_EFIREC_',EFIOUT);
 158            run;
 
NOTE: The file '~/LWPG1V2/storm_final.csv' is:
Access Permission=-rw-r--r--,
       Last Modified=13May2026:10:31:24
 
 NOTE: 3093 records were written to the file '~/LWPG1V2/storm_final.csv'.
       The minimum record length was 69.
       The maximum record length was 124.
 NOTE: There were 3092 observations read from the data set PG1.STORM_FINAL.
Quentin
Super User

Your log looks fine to me.  If you are concerned about:

 NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update mode. Temporary parameter values will be saved to 
 WORK.PARMS.PARMS.SLIST.

that note can be safely ignored.  See e.g. discussion it related posts:
https://communities.sas.com/t5/SAS-Programming/NOTE-Unable-to-open-parameter-catalog-SASUSER-PARMS-P...

https://communities.sas.com/t5/SAS-Programming/Supressing-specific-log-message-NOTE-Unable-to-open-p...

 

The Boston Area SAS Users Group is hosting free webinars!

Register now at https://www.basug.org/events.
Tom
Super User Tom
Super User

My suspicion is that the author of the EFI tool that PROC IMPORT/EXPORT uses has retired and SAS support is afraid to touch it and remove that useless NOTE for fear of breaking something. 

dxiao2017
Lapis Lazuli | Level 10
Thanks a lot Quentin, this is very helpful!
ivarenho
Fluorite | Level 6

I thought that I had posted this on Friday, so apologies. I had posted an issue with my library pathway that I have fixed in the new user community, but I'm still having issues with the code. Any help would be appreciated. 

 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         proc export data=pg1.storm_final
 74         outfile="&outpath/storm_final.csv"
 WARNING: Apparent symbolic reference OUTPATH not resolved.
 75         dbms=csv replace;
 76         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.
 77          /**********************************************************************
 78          *   PRODUCT:   SAS
 79          *   VERSION:   9.4
 80          *   CREATOR:   External File Interface
 81          *   DATE:      10MAY26
 82          *   DESC:      Generated SAS Datastep Code
 83          *   TEMPLATE SOURCE:  (None Specified.)
 84          ***********************************************************************/
 85             data _null_;
 86             %let _EFIERR_ = 0; /* set the ERROR detection macro variable */
 87             %let _EFIREC_ = 0;     /* clear export record count macro variable */
 88             file '&outpath/storm_final.csv' delimiter=',' DSD DROPOVER lrecl=32767;
 89             if _n_ = 1 then        /* write column names or labels */
 90              do;
 91                put
 92                   "Season"
 93                ','
 94                   "Name"
 95                ','
 96                   "Basin"
 97                ','
 98                   "BasinName"
 99                ','
 100                  "OceanCode"
 101               ','
 102                  "Ocean"
 103               ','
 104                  "StormType"
 105               ','
 106                  "MaxWindMPH"
 107               ','
 108                  "MaxWindKM"
 109               ','
 110                  "MinPressure"
 111               ','
 112                  "StartDate"
 113               ','
 114                  "EndDate"
 115               ','
 116                  "StormLength"
 117               ','
 118                  "Lat"
 119               ','
 120                  "Lon"
 121               ;
 122             end;
 123           set  PG1.STORM_FINAL   end=EFIEOD;
 124               format Season best4. ;
 125               format Name $char57. ;
 126               format Basin $char2. ;
 127               format BasinName $14. ;
 128               format OceanCode $2. ;
 129               format Ocean $8. ;
 130               format StormType $13. ;
 131               format MaxWindMPH best12. ;
 132               format MaxWindKM 3. ;
 133               format MinPressure best12. ;
 134               format StartDate date9. ;
 135               format EndDate date9. ;
 136               format StormLength best12. ;
 137               format Lat best12. ;
 138               format Lon best12. ;
 139             do;
 140               EFIOUT + 1;
 141               put Season @;
 142               put Name $ @;
 143               put Basin $ @;
 144               put BasinName $ @;
 145               put OceanCode $ @;
 146               put Ocean $ @;
 147               put StormType $ @;
 148               put MaxWindMPH @;
 149               put MaxWindKM @;
 150               put MinPressure @;
 151               put StartDate @;
 152               put EndDate @;
 153               put StormLength @;
 154               put Lat @;
 155               put Lon ;
 156               ;
 157             end;
 158            if _ERROR_ then call symputx('_EFIERR_',1);  /* set ERROR detection macro variable */
 159            if EFIEOD then call symputx('_EFIREC_',EFIOUT);
 160            run;
 
 ERROR: Physical file does not exist, C:\Users\learnsas-16391\&outpath\storm_final.csv.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: There were 1 observations read from the data set PG1.STORM_FINAL.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 0 records created in &outpath/storm_final.csv from PG1.STORM_FINAL.
   
   
 NOTE: "&outpath/storm_final.csv" file was successfully created.
 NOTE: PROCEDURE EXPORT used (Total process time):
       real time           0.09 seconds
       cpu time            0.01 seconds
       
 
 161        
 162        
 163        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 175        
ballardw
Super User

To use a macro variable such as &outpath, the & meaning the following is the name of a macro variable, then prior to the use of the variable you should have a statement similar to :

%let outpath = d:\thisfolder; (for Windows) or

%let outpuath= drivemountpointname/thisfolder; 

Or possibly other code that does similar with data step and the CALL SYMPUTX option or Proc SQL code with and INTO instruction to write results into a variable named Outpath.

 

In the case of canned programs from a SAS course this is usually done in either a set  up program or there is an instruction to uncomment a bit of code and replace some example text with the path on your system. I would look in your instructions for a %let statement to modify.

 

dxiao2017
Lapis Lazuli | Level 10

Hi @ivarenho please see my reply to the other of your post regarding the problem.

 

ivarenho
Fluorite | Level 6
1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         proc export data=pg1.storm_final
 74         outfile="&outpath/storm_final.csv"
 WARNING: Apparent symbolic reference OUTPATH not resolved.
 75         dbms=csv replace;
 76         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.
 77          /**********************************************************************
 78          *   PRODUCT:   SAS
 79          *   VERSION:   9.4
 80          *   CREATOR:   External File Interface
 81          *   DATE:      09MAY26
 82          *   DESC:      Generated SAS Datastep Code
 83          *   TEMPLATE SOURCE:  (None Specified.)
 84          ***********************************************************************/
 85             data _null_;
 86             %let _EFIERR_ = 0; /* set the ERROR detection macro variable */
 87             %let _EFIREC_ = 0;     /* clear export record count macro variable */
 88             file '&outpath/storm_final.csv' delimiter=',' DSD DROPOVER lrecl=32767;
 89             if _n_ = 1 then        /* write column names or labels */
 90              do;
 91                put
 92                   "Season"
 93                ','
 94                   "Name"
 95                ','
 96                   "Basin"
 97                ','
 98                   "BasinName"
 99                ','
 100                  "OceanCode"
 101               ','
 102                  "Ocean"
 103               ','
 104                  "StormType"
 105               ','
 106                  "MaxWindMPH"
 107               ','
 108                  "MaxWindKM"
 109               ','
 110                  "MinPressure"
 111               ','
 112                  "StartDate"
 113               ','
 114                  "EndDate"
 115               ','
 116                  "StormLength"
 117               ','
 118                  "Lat"
 119               ','
 120                  "Lon"
 121               ;
 122             end;
 123           set  PG1.STORM_FINAL   end=EFIEOD;
 124               format Season best4. ;
 125               format Name $char57. ;
 126               format Basin $char2. ;
 127               format BasinName $14. ;
 128               format OceanCode $2. ;
 129               format Ocean $8. ;
 130               format StormType $13. ;
 131               format MaxWindMPH best12. ;
 132               format MaxWindKM 3. ;
 133               format MinPressure best12. ;
 134               format StartDate date9. ;
 135               format EndDate date9. ;
 136               format StormLength best12. ;
 137               format Lat best12. ;
 138               format Lon best12. ;
 139             do;
 140               EFIOUT + 1;
 141               put Season @;
 142               put Name $ @;
 143               put Basin $ @;
 144               put BasinName $ @;
 145               put OceanCode $ @;
 146               put Ocean $ @;
 147               put StormType $ @;
 148               put MaxWindMPH @;
 149               put MaxWindKM @;
 150               put MinPressure @;
 151               put StartDate @;
 152               put EndDate @;
 153               put StormLength @;
 154               put Lat @;
 155               put Lon ;
 156               ;
 157             end;
 158            if _ERROR_ then call symputx('_EFIERR_',1);  /* set ERROR detection macro variable */
 159            if EFIEOD then call symputx('_EFIREC_',EFIOUT);
 160            run;
 
 ERROR: Physical file does not exist, C:\Users\learnsas-16391\&outpath\storm_final.csv.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: There were 1 observations read from the data set PG1.STORM_FINAL.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 0 records created in &outpath/storm_final.csv from PG1.STORM_FINAL.
   
   
 NOTE: "&outpath/storm_final.csv" file was successfully created.
 NOTE: PROCEDURE EXPORT used (Total process time):
       real time           0.16 seconds
       cpu time            0.12 seconds
       
 
 161        
 162        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 174        
dxiao2017
Lapis Lazuli | Level 10
Hi please see my reply to the other of your post regarding the problem.

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 11 replies
  • 275 views
  • 5 likes
  • 6 in conversation