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

I got a new computer but I used sas studio in chrome so everything should work the same. However, I am unable to read in files now, nothing works! Even the codes that worked before get a weird error, I honestly don't know what to do anymore. Need help.

 

I always get this error:

ERROR: Expected open parenthesis after macro function name not found.

 

I want to run this code: (and yes I know the path is correct and everything, but I still get an error)

FILENAME REFFILE '/home/u62488281/turu/proje.csv';
 
PROC IMPORT DATAFILE=REFFILE
DBMS=CSV
OUT=turu.andmed;
GETNAMES=YES;
RUN;
 
1 ACCEPTED SOLUTION

Accepted Solutions
Patrick
Opal | Level 21

1. Under Options/Preferences check box "Show custom code..."

Patrick_0-1701765099660.png

2. Create a new SAS session,

3. Add at the very beginning of the code that throws the error the following statement:

options msglevel=i mprint merror mlogic;

4. Run your code

5. Share the COMPLETE SAS log with us (please post it via menu </> to the forum)

NB: Before you share your SAS log browse through it and remove all PII data like your user name.

 

What you also could check under Options/Autoexec file is if you've got any code there. If so then please share this code here as well.

Patrick_1-1701764592607.png

 

 

 

 

View solution in original post

9 REPLIES 9
StellaPals
Obsidian | Level 7

Also, if that error sometimes goes away then I get this text and it still won't work:

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
68
69 FILENAME REFFILE '/home/u62488281/turu/proje.csv';
70
71 PROC IMPORT DATAFILE=REFFILE
72 DBMS=CSV
73 OUT=turu.andmed;
74 GETNAMES=YES;
75 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.
Number of names found is less than number of variables found.
Name PK��W�A!�~~Index/Document.iwaz�_�e84�" truncated to PK��W�A!�~~In.
Problems were detected with provided names. See LOG.
76 /**********************************************************************
77 * PRODUCT: SAS
78 * VERSION: 9.4
79 * CREATOR: External File Interface
80 * DATE: 04DEC23
81 * DESC: Generated SAS Datastep Code
82 * TEMPLATE SOURCE: (None Specified.)
83 ***********************************************************************/
84 data TURU.ANDMED ;
85 %let _EFIERR_ = 0; /* set the ERROR detection macro variable */
86 infile REFFILE delimiter = ',' MISSOVER DSD firstobs=2 ;
87 informat "PK��W�A!�~~In"N $166. ;
88 informat VAR2 $434. ;
89 informat VAR3 $43. ;
90 informat VAR4 $23. ;
91 format "PK��W�A!�~~In"N $166. ;
92 format VAR2 $434. ;
93 format VAR3 $43. ;
94 format VAR4 $23. ;
95 input
NOTE: The quoted string currently being processed has become more than 262 bytes long. You might have unbalanced quotation marks.
96 "PK��W�A!�~~In"N $
97 VAR2 $
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.01 seconds
system cpu time 0.00 seconds
memory 10425.93k
OS Memory 29724.00k
Timestamp 04/12/2023 04:13:28 PM
Step Count 30 Switch Count 2
Page Faults 0
Page Reclaims 333
Page Swaps 0
Voluntary Context Switches 29
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 64
 
NOTE: WORK.VERSION_1701706376866 data set was successfully created.
NOTE: PROCEDURE used (Total process time):
real time 0.04 seconds
user cpu time 0.03 seconds
system cpu time 0.01 seconds
memory 10425.93k
OS Memory 29724.00k
Timestamp 04/12/2023 04:13:28 PM
Step Count 30 Switch Count 11
Page Faults 0
Page Reclaims 3797
Page Swaps 0
Voluntary Context Switches 92
Involuntary Context Switches 1
Block Input Operations 0
Block Output Operations 104
 
 
98 VAR3 $
99 VAR4 $
100 ;
101 if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR detection macro variable */
102 run;
 
 
103
104 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
114
SASKiwi
PROC Star

Start by opening a new SAS session then open and run your program and post your complete SAS log if you still have problems.

Reeza
Super User
Your path seems to indicate you're using SAS on Demand, if that's the case, it should still work and the issue is something else entirely. Is your Chrome version up to date? Do you have any Chrome Add ons that may be adding things to the code?
StellaPals
Obsidian | Level 7

Yes I am using SAS OnDemand for academics. I just updated my chrome so yes it is up to date. Don't have any add ons, but it still won't work.

ballardw
Super User

I don't see a LIBNAME for a library named turu. Do you have some sort of other program or Studio environment setting for that?

 

 

StellaPals
Obsidian | Level 7

I created the libaname beforehand so it should be fine, but even when I try to just save it to the work one it still won't work:

Screenshot 2023-12-05 at 09.50.02.png

Also, I have some documents that worked before, but now even those don't work so there has to be some kind of problem (not in the code itself):

Screenshot 2023-12-05 at 09.51.21.png

Screenshot 2023-12-05 at 09.51.32.png

Patrick
Opal | Level 21

1. Under Options/Preferences check box "Show custom code..."

Patrick_0-1701765099660.png

2. Create a new SAS session,

3. Add at the very beginning of the code that throws the error the following statement:

options msglevel=i mprint merror mlogic;

4. Run your code

5. Share the COMPLETE SAS log with us (please post it via menu </> to the forum)

NB: Before you share your SAS log browse through it and remove all PII data like your user name.

 

What you also could check under Options/Autoexec file is if you've got any code there. If so then please share this code here as well.

Patrick_1-1701764592607.png

 

 

 

 

StellaPals
Obsidian | Level 7

I actually didn't change anything, but it magically just started working again. Thank you though!

ballardw
Super User

@StellaPals wrote:

I actually didn't change anything, but it magically just started working again. Thank you though!


Your initial message where it has this:

ERROR: Expected open parenthesis after macro function name not found.

would normally indicate to me that somewhere in your code SAS encountered something like

%something

that SAS interpretted as being a macro function code. At which point whatever followed that may have been treated as part of the macro code. Many macro related errors can cause SAS to become unstable and require restarting to clear the condition. Save code often.

 

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!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 9 replies
  • 1866 views
  • 4 likes
  • 5 in conversation