BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sas_td2016
Obsidian | Level 7

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

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

 

View solution in original post

4 REPLIES 4
Shmuel
Garnet | Level 18

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)').

 

Shmuel
Garnet | Level 18
otherwise, it may be that you have not submitted the last semicolon ';' - then sas in not running but waiting to close the RUN statement.
Reeza
Super User

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

 

sas_td2016
Obsidian | Level 7

Thanks everyone for the reply.  This problem is solved.  I restarted SAS and it works. 

 

Thanks again Friends

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 4 replies
  • 1525 views
  • 0 likes
  • 3 in conversation