Sorry to hear that the problem persists. I've just checked the "What's new" documentation of various SAS/STAT versions and, yes, it's plausible that your too old SAS release is the reason:
In SAS/STAT 13.1 the EVENTCODE= option was introduced, but only since SAS/STAT 14.3 the syntax EVENTCODE(COX)= has been valid. This would explain the error messages if the mark in the log (see my earlier post) is under the open parenthesis after the keyword "EVENTCODE" because SAS releases using SAS/STAT 13.1 - 14.2 would expect the "=" sign there.
To confirm this, I'd run
proc product_status;
run;
to display the SAS/STAT version information in the log (as well as the Base SAS maintenance release), e.g.
For Base SAS Software ... Custom version information: 9.4_M5 Image version information: 9.04.01M5P090617 For SAS/STAT ... Custom version information: 14.3
Your release is probably <"M5" and the SAS/STAT version <14.3. I upgraded to release 9.4M5, which includes SAS/STAT 14.3, in 2018 (was easy for my single-user system). The upgrade made various newer features available and was worth the effort. See last week's post Best Practices for Upgrading to the Latest Version of SAS®9 for most recent recommendations.
Hello @alberto93 and welcome to the SAS Support Communities!
Your code looks good and it works on my computer with suitable input data. The error messages indicate that the code in your SAS session contained some invalid character(s) which were not recognized. But these characters didn't survive the copy/paste process into the message box. So, chances are that by copying the code back from your post into SAS it will be ready to run.
If that doesn't help: The original log message should contain a mark (e.g. a dash with the error numbers 73 and 200) where an invalid character was found. I would retype the marked characters (most likely equals signs or blanks) to overwrite them with valid characters. They were probably copied from a PDF, Word or other file format using "fancy" characters the SAS compiler doesn't like.
First, Thank you so much for your kind answer.
Tried everything you told but it doesn't work...
Is there any chance that the cause is my SAS program being an older version?
I performed the code with SAS Enterprise guide 7.1 and SAS 9.4.
Sorry to hear that the problem persists. I've just checked the "What's new" documentation of various SAS/STAT versions and, yes, it's plausible that your too old SAS release is the reason:
In SAS/STAT 13.1 the EVENTCODE= option was introduced, but only since SAS/STAT 14.3 the syntax EVENTCODE(COX)= has been valid. This would explain the error messages if the mark in the log (see my earlier post) is under the open parenthesis after the keyword "EVENTCODE" because SAS releases using SAS/STAT 13.1 - 14.2 would expect the "=" sign there.
To confirm this, I'd run
proc product_status;
run;
to display the SAS/STAT version information in the log (as well as the Base SAS maintenance release), e.g.
For Base SAS Software ... Custom version information: 9.4_M5 Image version information: 9.04.01M5P090617 For SAS/STAT ... Custom version information: 14.3
Your release is probably <"M5" and the SAS/STAT version <14.3. I upgraded to release 9.4M5, which includes SAS/STAT 14.3, in 2018 (was easy for my single-user system). The upgrade made various newer features available and was worth the effort. See last week's post Best Practices for Upgrading to the Latest Version of SAS®9 for most recent recommendations.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.