Hello Friends
I have issue running this query. It keep running. Is there anything wrong with this script? Your help is highly appreciated.
data highlow;
infile 'C:\Users\Documents\My SAS Files(32)\democode\temperature.txt';
input city $ state $
/ NormalHigh NormalLow
#3 RecordHigh RecordLow;
run;
proc print data=highlow;
Title 'High and Low Temperatures for July';
run;
this is the date:
Nome AK
55 44
88 29
Miami FL
90 75
97 65
Releigh NC
88 68
105 50
Worked fine for me, so I suspect you have an issue elsewhere, or didn't submit the colon as suggested. I would end the process and restart SAS if necessary. A program like this should complete in less than a second. This of course, assumes, your text file isn't a few GB or something.
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 68 69 data highlow; 70 infile cards; 71 input city $ state $ 72 / NormalHigh NormalLow 73 #3 RecordHigh RecordLow; 74 75 cards; NOTE: The data set WORK.HIGHLOW has 3 observations and 6 variables. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.01 seconds 85 ;;;; 86 run; 87 proc print data=highlow; 88 Title 'High and Low Temperatures for July'; 89 run; NOTE: There were 3 observations read from the data set WORK.HIGHLOW. NOTE: PROCEDURE PRINT used (Total process time): real time 0.03 seconds cpu time 0.03 seconds
Please post your log when you have issues.
Are you sure it is in PROC PRINT and not at first step?
I suspect the special characters in the input path are causing the issue.
Try to rename the path into 'C:\Users\Documents\My SAS Files(32)\democode\' - (droping the '(32)').
Worked fine for me, so I suspect you have an issue elsewhere, or didn't submit the colon as suggested. I would end the process and restart SAS if necessary. A program like this should complete in less than a second. This of course, assumes, your text file isn't a few GB or something.
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 68 69 data highlow; 70 infile cards; 71 input city $ state $ 72 / NormalHigh NormalLow 73 #3 RecordHigh RecordLow; 74 75 cards; NOTE: The data set WORK.HIGHLOW has 3 observations and 6 variables. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.01 seconds 85 ;;;; 86 run; 87 proc print data=highlow; 88 Title 'High and Low Temperatures for July'; 89 run; NOTE: There were 3 observations read from the data set WORK.HIGHLOW. NOTE: PROCEDURE PRINT used (Total process time): real time 0.03 seconds cpu time 0.03 seconds
Thanks everyone for the reply. This problem is solved. I restarted SAS and it works.
Thanks again Friends
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.