BookmarkSubscribeRSS Feed
bberangere
Fluorite | Level 6

Hello,

 

I am teaching SAS to students and one of them has the following problem, which i have never seen.

We all use the same csv file to import and we all use SAS studio.

 

Importing the table is a success for everyone, and we can all look at our dataset.

But when the student wants to do

PROC FREQ Data = house;

By bathrooms / missing;

RUN;

The following message appears, just for her (For everyone else the code works) :

"Invalid statement due to first character being unprintable (hexadecimal representation [...]"

 

I don't know how to help her, could you help us?

She quit and restarted SAS, without success.

 

Thank you !

Bérangère

6 REPLIES 6
AMSAS
SAS Super FREQ

Hi Bérangère,

How did the student get the CSV file into SAS or onto the server?
My guess is they did something different from all the other students and the CSV file or SAS Dataset (house) that was created from it has some issues.

bberangere
Fluorite | Level 6
Thank you for your reply
We use SAS University / SAS Studio, so with the virtual machine that is incorporated into SAS
A slightly different version of SAS Base or SAS Guide

I checked with her and everything looked correct to me
Importing the same file as the other students, the table was showing the same
We tested several variables in the PROC FREQ, it did not work

This is the reason why I am quite helpless despite my 10 experiences with SAS
FreelanceReinh
Jade | Level 19

Hello @bberangere and welcome to the SAS Support Communities!

 

I had never seen this error either, but found it mentioned in the forum archives. Thanks to this 2020 post, which included the hex code, I was able to reproduce it in the Display Manager interface of SAS 9.4:

47   proc freq data=sashelp.class;
48   tables age / missing;
     -
     217
ERROR 217-322: Invalid statement due to first character being unprintable (hexadecimal representation: 9D).
49   run;

 

Showing the actual log (in a code window opened with the </> button) as above is helpful because the position of the unprintable character is underlined. (I had inserted it with Alt+157 before the "t" of "tables.")

 

To remove the unwanted character, just move the cursor to the underlined position and press the Del key (as if you wanted to delete the first visible character of the statement in question, i.e., the "t" in the example above). Repeat this a few times if more unprintable characters are found in the same place.

 

Alternatively, you may want to try the "auto-format code trick" mentioned in this 2018 thread or retype or copy and paste the code from a source which contains just plain text without unwanted characters.

 

 

bberangere
Fluorite | Level 6

Thank you !
Indeed, maybe it is an invisible special character that has slipped into the code
I will check this with her

Kurt_Bremser
Super User

Please post the complete log of that step, and post it by copy/pasting into a window opened with this button:

Bildschirmfoto 2020-04-07 um 08.32.59.jpg

You must do this directly from the log window of the student's computer. We need to see the position of the error marker, and the complete hexadecimal representation of the unprintable character(s).

Reeza
Super User
Couple of possible reasons this happens;
Copying and pasting code from HTML or systems that add symbols.
Using different language keyboard settings installed, Chinese is the one I think we're I've seen this issue before.
Browser Add ons that are modifying the code/system somehow is another one but not something I think is the cause in this case.

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
  • 6 replies
  • 1894 views
  • 5 likes
  • 5 in conversation