Programming the statistical procedures from SAS

PROC GLM Error message: Invalid characters

Reply
New User
Posts: 1

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

Grand Advisor
Posts: 10,026

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,305

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.

Ask a Question
Discussion stats
  • 2 replies
  • 127 views
  • 0 likes
  • 3 in conversation