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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.