02-08-2018 01:13 AM
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
02-08-2018 02:30 AM
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.
02-08-2018 04:01 AM
02-08-2018 10:46 AM - edited 02-08-2018 10:48 AM
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";
02-13-2018 04:00 AM
I found the answer from the following Knowledge Base(KB) and documentation.