Learning SAS? Welcome to the exclusive online community for all SAS learners.

Error when trying to create a temporary dataset

Reply
N/A
Posts: 1

Error when trying to create a temporary dataset

I'm trying to create a temporary dataset from a permanent one using the following code:

DATA pei;

     set npcr.peidb_2013;

run;

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.

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

57 

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

  performance.

60 run;

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

  

61 

62 

63 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

75 

Super User
Posts: 10,483

Re: Error when trying to create a temporary dataset

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.

Ask a Question
Discussion stats
  • 1 reply
  • 617 views
  • 0 likes
  • 2 in conversation