Programming the statistical procedures from SAS

PROC GLM Error message: Invalid characters

Reply
New Contributor
Posts: 2

PROC GLM Error message: Invalid characters

 

Hi,

 

The following code produced the desired results using SAS 9.4.

 

PROC GLM DATA=IMPORT;
CLASS v1 v2;
MODEL v3= v1 v2;
MEANS v2/TUKEY;
TITLE 'Repeated Measures ANOVA FOR v3 with Tukey POSTHOC';
RUN;

 

However, running it with SASUniversity (Studio) produces the following error message: 

ERROR: Invalid characters were present in the data.

 

I tried converting my dataset to excel and SPSS before importing back to SAS. All variables are numeric. Nothing worked.

 

Thank you for your help,

 

Jeff

Super User
Posts: 10,843

Re: PROC GLM Error message: Invalid characters

Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.

 

You can create data step code from your existing SAS data set following these instructions: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... That will create code that you can post in a code box using the forum {i} icon or attach as a data step.

 

 

SAS Super FREQ
Posts: 3,543

Re: PROC GLM Error message: Invalid characters

I suspect the data are corrupted. If you do a PROC CONTENTS and PROC PRINT data=Have(obs=5)

PROC PRINT data=Have(obs=5); run;

I suspect you will see the problem.

 

The different behavior might be because the import step on the virtual machine (which uses UTF-8 encoding) is transcoding character variables differently than your local machine.

SAS Employee
Posts: 76

Re: PROC GLM Error message: Invalid characters

Hi @Jeff11

 

This is an "old" post but if the issue remains, can you try to change the User locale and set it to English

 

Preferences.JPG

 

Then when you rerun your GLM procedure, what is the outcome?

 

Cheers,

Damo

SAS Employee
Posts: 76

Re: PROC GLM Error message: Invalid characters

Hi All,

 

Just in case of...

The actual solution consists in updating your browser language as it my night be possible to access SASPreferences with SAS University Edition.

If you use English, it should work.


Cheers,
Damien

New Contributor
Posts: 2

Re: PROC GLM Error message: Invalid characters

Hi Damien,



Our research group actually decided to purchase a SAS license, so I no longer use SAS University. Thanks anyways for answering my question.



Cheers,



Jeff


Ask a Question
Discussion stats
  • 5 replies
  • 258 views
  • 0 likes
  • 4 in conversation