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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1438 views
  • 5 likes
  • 5 in conversation