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
Dive into keynotes, announcements and breakthroughs on demand.
Explore Now →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.
Ready to level-up your skills? Choose your own adventure.