BookmarkSubscribeRSS Feed
Dennis_K
Obsidian | Level 7

Hi all,

 

I've SAS datasets in 64-bit but i'm using SAS 9.2 in 32-bit environment.

 

How do I use the PROC DATASETS to change the variable format?

 

I Encountered the following error :

 

1         + proc datasets library=test nolist;    modify AE (encoding = 'utf-8');
ERROR: File test.AE 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 WINDOWS_64.
1         +                                                                             format AEACN $A128608A.;  run;

NOTE: Statements not processed because of errors noted above.

 

Appreciate any advice given

 

Regards

DK

4 REPLIES 4
SASKiwi
PROC Star

Do you know for sure these are 64-bit datasets or are you assuming that from the error message? What happens if you report on the contents of the dataset? Does it work:

proc datasets library=test nolist;    
  contents AE;
run;
quit; 

If these are genuine 64-bit datasets I think you will have to find yourself a working version of 64-bit SAS to read them and write them out in 32-bit format so they will work on your 32-bit SAS. With SAS 9.2 PROC COPY using the XPORT engine might be your safest bet.

 

 

Dennis_K
Obsidian | Level 7
😞

i tried using the XPORT file but i'm hitting the folllowing error:

ERROR: the variable name is illegal for the version 6 file

I tried set the VALIDVARNAME =V6 but still the datasets could not be
saved onto the transport file.
ballardw
Super User

@Dennis_K wrote:
😞

i tried using the XPORT file but i'm hitting the folllowing error:

ERROR: the variable name is illegal for the version 6 file

I tried set the VALIDVARNAME =V6 but still the datasets could not be
saved onto the transport file.

 

VERSION 6 files have a variable name length of 8 characters. So you have more of an issue going on than "bitness", which would be 16 for these, not 64. The message you get is because that is the most common bit difference running around since SAS V7 was the first 32 bit version (IIRC) and that about 18(?) years ago

 

Can you show the libname statement you use to see the library that data set is in?

You may need to specify the data engine to access Version 6 files as

Libname mylib V6 "path";

 

 

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 4 replies
  • 873 views
  • 0 likes
  • 3 in conversation