BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
juill
Calcite | Level 5

Hey everybody,

 

I'm writing my first post to ask for your help. Indeed, I have no problem using "proc" in all my exercises but with "PROC GLM", it never works. I tried with different files. It is always written: "ERROR: Invalid characters were present in the data.". I don't understand because  I'm a student and it's a file used by many other students and they don't have any problem. 

 

 

I send you a screenshot and my code.

 

Have a nice day,

Simon.

 

SAS version :9.04.01M5P09132017

 

My SAS code :

DATA entree ; 
INFILE '/folders/myfolders/sasuser.v94/Répétition 6/R6_01.csv' FIRSTOBS=2 DLM=";" DSD ; 
INPUT QI Age Score ; 
PROC PRINT DATA=entree ; 
RUN ; 
ODS GRAPHICS OFF ; 
PROC GLM DATA=entree ; 
MODEL Score = Age QI ; 
RUN ;
PROC REG DATA=entree ; 
MODEL Score = Age QI ; 
RUN ;
PROC GLM DATA=entree ; 
MODEL Score = QI Age ; 
RUN ;
 

Capture d’écran 2018-04-09 à 10.05.33.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

It's not the data, and it's not your code (I ran your code successfully against your data on SAS 9.4M5 on AIX from EG 7.15), but it might be a language problem between your SAS UE, your environment and your browser:

https://communities.sas.com/t5/SAS-Analytics-U/PROC-ANOVA-ERROR-invalid-characters-were-present-in-t...

This was the first hit of a search for

"sas ERROR: Invalid characters were present in the data."

View solution in original post

5 REPLIES 5
Kurt_Bremser
Super User

Please provide a sample of your file R6_01.csv, so we can test your code with your data.

As posted, I cannot see any problem.

And also post all log text, from the first data step that imports the csv down to the error. See https://communities.sas.com/t5/help/faqpage/faq-category-id/posting#posting for posting code & log text.

juill
Calcite | Level 5

 

here is the information you need :

 

 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 NOTE: les instructions ODS dans l'environnement SAS Studio risquent de désactiver certaines fonctionnalités de sortie.
 73         
 74         DATA entree ;
 75         INFILE '/folders/myfolders/sasuser.v94/Répétition 6/R6_01.csv' FIRSTOBS=2 DLM=";" DSD ;
 76         INPUT QI Age Score ;
 
 NOTE: The infile '/folders/myfolders/sasuser.v94/Répétition 6/R6_01.csv' is:
       Nom du fichier=/folders/myfolders/sasuser.v94/Répétition 6/R6_01.csv,
       Nom du propriétaire=sasdemo,Nom du groupe=sas,
       Autorisation d'accès=-rw-rw-r--,
       Modifié(e) le=29 mars 2018 16 h 18,
       Taille de fichier (octets)=410
 
 NOTE: 29 records were read from the infile '/folders/myfolders/sasuser.v94/Répétition 6/R6_01.csv'.
       The minimum record length was 11.
       The maximum record length was 12.
 NOTE: The data set WORK.ENTREE has 29 observations and 3 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 
 77         PROC PRINT DATA=entree ;
 78         RUN ;
 
 NOTE: There were 29 observations read from the data set WORK.ENTREE.
 NOTE: PROCEDURE PRINT used (Total process time):
       real time           0.06 seconds
       cpu time            0.07 seconds
       
 
 79         ODS GRAPHICS OFF ;
 80         PROC GLM DATA=entree ;
 81         MODEL Score = Age QI ;
 82         RUN ;
 
 ERROR: Invalid characters were present in the data.
 ERROR: Une erreur s'est produite lors du traitement des données texte.
 ERROR: Invalid characters were present in the data.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE GLM used (Total process time):
       real time           0.05 seconds
       cpu time            0.05 seconds
       
 83         
 
 
 84         PROC REG DATA=entree ;
 85         MODEL Score = Age QI ;
 86         RUN ;
 
 87         
 
 NOTE: PROCEDURE REG used (Total process time):
       real time           0.08 seconds
       cpu time            0.08 seconds
       
 
 88         PROC GLM DATA=entree ;
 89         MODEL Score = QI Age ;
 90         RUN ;
 
 ERROR: Invalid characters were present in the data.
 ERROR: Une erreur s'est produite lors du traitement des données texte.
 ERROR: Invalid characters were present in the data.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE GLM used (Total process time):
       real time           0.05 seconds
       cpu time            0.04 seconds
       
 91         
 92         
 93         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 106        
Kurt_Bremser
Super User

It's not the data, and it's not your code (I ran your code successfully against your data on SAS 9.4M5 on AIX from EG 7.15), but it might be a language problem between your SAS UE, your environment and your browser:

https://communities.sas.com/t5/SAS-Analytics-U/PROC-ANOVA-ERROR-invalid-characters-were-present-in-t...

This was the first hit of a search for

"sas ERROR: Invalid characters were present in the data."

juill
Calcite | Level 5

I changed my browser langage into English and it works great.

 

You made my day ! Thank you KurtBremser 

Kurt_Bremser
Super User

@juill wrote:

I changed my browser langage into English and it works great.

 

You made my day ! Thank you KurtBremser 


Mind that I did not know the solution, I just used Google. See my Maxim #6.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 5 replies
  • 2366 views
  • 1 like
  • 2 in conversation