- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you !
Indeed, maybe it is an invisible special character that has slipped into the code
I will check this with her
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Please post the complete log of that step, and post it by copy/pasting into a window opened with this button:
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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.