07-10-2015 05:11 PM
I'm trying to create a temporary dataset from a permanent one using the following code:
However, the following errors and warning messages pop up on the log. How can I fix this? The permanent dataset and path to npcr library are fine. I can run a PROC CONTENTS or PROC FREQ and other analyses. It just won't let me create any new temporary datasets from the original.
58 DATA pei;
59 set npcr.peidb_2013;
NOTE: Data file NPCR.PEIDB_2013.DATA is in a format that is native to another host, or the file encoding does not match the session
encoding. Cross Environment Data Access will be used, which might require additional CPU resources and might reduce
ERROR: Some character data was lost during transcoding in the dataset NPCR.PEIDB_2013. Either the data contains characters that are
not representable in the new encoding or truncation occurred during transcoding.
NOTE: The DATA step has been abnormally terminated.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 5 observations read from the data set NPCR.PEIDB_2013.
WARNING: The data set WORK.PEI may be incomplete. When this step was stopped there were 5 observations and 421 variables.
NOTE: DATA statement used (Total process time):
real time 0.51 seconds
cpu time 0.49 seconds
63 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
07-10-2015 06:49 PM
Likely culprit is that the npcr.peidb_2013 was created with a different encoding than your current session, likely UTF-8 vs WLATIN1 or similar.
I don't believe the university edition is set up to handle different encoding nicely as it is a training product. If you have the source data where it is accessible to another SAS system either try creating a CSV file and importing or a transport data set.
You can also look at your source data set starting at observation 6 for culprit text. I would expect it to be something like accents, diacritics or other language specific characters.