BookmarkSubscribeRSS Feed
Silbad
Calcite | Level 5

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

3 REPLIES 3
ChrisHemedinger
Community Manager

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

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
Silbad
Calcite | Level 5

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

Data Set NameWORK.CLASSObservations19
Member TypeDATAVariables5
EngineV9Indexes0
Createdvendredi 09 septembre 2011 15 h 23Observation Length40
Last Modifiedvendredi 09 septembre 2011 15 h 23Deleted Observations0
ProtectionCompressedNO
Data Set TypeSortedNO
Label
Data RepresentationHP_UX_64, RS_6000_AIX_64, SOLARIS_64, HP_IA64
Encodinglatin9 European (ISO)
MG18
Lapis Lazuli | Level 10

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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 7821 views
  • 1 like
  • 3 in conversation