- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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 ;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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:
This was the first hit of a search for
"sas ERROR: Invalid characters were present in the data."
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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:
This was the first hit of a search for
"sas ERROR: Invalid characters were present in the data."
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I changed my browser langage into English and it works great.
You made my day ! Thank you KurtBremser
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@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.