- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I am doing the programming 1 tutorial as shown below
so ran the code as instructed
libname out "/home/u62043935/EPG1V2/output"; data storm_cat5; set pg1.storm_summary; where maxwindmph >= 156 and startdate >="01jan2000"d; keep season basin name type maxwindmph; run;
From my understanding of the instruction, the storm_cat file should be inside the /home/u62043935/EPG1V2/output
However, it is in the WORK library, which is not permanent. And a library called "OUT" was created but is empty.
So my question is why isn't my output file in the expected place, or even in the OUT library but in the WORK library?
there is the log.
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;7071 libname out "/home/u62043935/EPG1V2/output";NOTE: Libref OUT was successfully assigned as follows:Engine: V9Physical Name: /home/u62043935/EPG1V2/output7273 data storm_cat5;74 set pg1.storm_summary;75 where maxwindmph >= 156 and startdate >="01jan2000"d;76 keep season basin name type maxwindmph;77 run;NOTE: There were 18 observations read from the data set PG1.STORM_SUMMARY.WHERE (maxwindmph>=156) and (startdate>='01JAN2000'D);NOTE: The data set WORK.STORM_CAT5 has 18 observations and 5 variables.NOTE: DATA statement used (Total process time):real time 0.00 secondsuser cpu time 0.00 secondssystem cpu time 0.00 secondsmemory 1242.21kOS Memory 29484.00kTimestamp 15/10/2022 11:17:12 PMStep Count 76 Switch Count 2Page Faults 0Page Reclaims 226Page Swaps 0Voluntary Context Switches 16Involuntary Context Switches 0Block Input Operations 0Block Output Operations 2647879 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;90User: u62043935Messages: 9
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Your issue in in line 73
You have the statement
data storm_cat5;
which is equivalent to
data work.storm_cat5;
Remember, a dataset specification in a data statement can have one component (just the dataset name) or two components (the desired library and the dataset name). That is the attribute that you have to utilize in your code.
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set
Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets
--------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Your issue in in line 73
You have the statement
data storm_cat5;
which is equivalent to
data work.storm_cat5;
Remember, a dataset specification in a data statement can have one component (just the dataset name) or two components (the desired library and the dataset name). That is the attribute that you have to utilize in your code.
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set
Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets
--------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You already posted the answer to your question.
Read the answer you posted starting the bold face NOTE.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content