Hi everybody,
I have en encoding error in SAS Enterprise Guide 4.1.
When I try to create a dataset encoded in latin9 (it’s an exemple, but it’s the same for other encodings values), I can’t modify this dataset using the DATASETS procedure, even if I precise to access the table in encoding latin9.
Code |
---|
data class (encoding = latin9); set sashelp.class; run;
proc datasets lib = work nolist; modify class (encoding = latin9); quit; |
Log |
---|
14 data class (encoding = latin9); 15 set sashelp.class; 16 run;
NOTE: Data file WORK.CLASS.DATA is in a format native to another host or the file encoding does not match the session encoding. Cross Environment Data Access will be used, which may require additional CPU resources and reduce performance. NOTE: There were 19 observations read from the data set SASHELP.CLASS. NOTE: The data set WORK.CLASS has 19 observations and 5 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.01 seconds
17 18 proc datasets lib = work nolist; 19 modify class (encoding = latin9); ERROR: File WORK.CLASS cannot be updated because its encoding does not match the session encoding or the file is in a format native to another host, such as HP_UX_64, RS_6000_AIX_64, SOLARIS_64, HP_IA64. 20 quit;
NOTE: Statements not processed because of errors noted above. NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE DATASETS used (Total process time): real time 0.00 seconds cpu time 0.00 seconds |
When I use encoding = wlatin1 or encoding = any in the DATASETS procedure, strangely it works, but I’m afraid it corrupts my dataset.
Code |
---|
proc datasets lib = work nolist; modify class (encoding = wlatin1); quit; |
Log |
---|
14 proc datasets lib = work nolist; 15 modify class (encoding = wlatin1); 16 quit;
NOTE: MODIFY was successful for WORK.CLASS.DATA. NOTE: PROCEDURE DATASETS used (Total process time): real time 0.00 seconds cpu time 0.01 seconds |
For information, the session encoding option is valued as latin1.
Can somebody explain me what’s wrong with using the same encoding as the one used to create the dataset ?
Thanks
Sincerely
Silbad
I think that in this case, the processing is going through CEDA (Cross Environment Data Access), because the encoding is not "native" to the SAS session in which you are running. Learn more about CEDA and how it works here:
http://blogs.sas.com/content/sasdummy/2010/05/24/finding-the-foreigners-in-your-sas-environment/
Chris
Thank you Chris.
I found this in the SAS Documentation :
CEDA does not support update processing for any SAS files.
Actually, I can modify my dataset with the DATASETS procedure, but only if I use the same encoding as the one defined in the session (here 'latin1') or the encoding 'any'.
Log |
---|
14 proc datasets lib = work; 15 modify class(encoding = any); 16 quit;
NOTE: MODIFY was successful for WORK.CLASS.DATA. NOTE: PROCEDURE DATASETS used (Total process time): real time 0.00 seconds cpu time 0.00 seconds |
I just want to be sure that the dataset encoding will remain 'latin9' and won't turn into 'latin1' after the modification. It seems to be okay, according to the result of the CONTENTS procedure :
Output | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
i am aslo facing the same issue which mentioned above and i found dataset which i m trying to modify is FOREIGN and running below code :-
proc datasets library=test;
repair dataset_xyz;
run;
and i found that dataset_xyz is foreign how to repair this dataset as it got damaged ? many thanks in adavnce
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.