Help using Base SAS procedures

Why the errors were coming with data values?

Accepted Solution Solved
Reply
Contributor
Posts: 49
Accepted Solution

Why the errors were coming with data values?

Reference IDArm.IDCharacter
25381%ALK+
25381%ALK-
25381%ALK(Unknown)
25381%T790M+
25381%T790M-
25381%T790M(unkown)
25381%CMET+
25381%CMET-
25381%CMET(unknown)
25382%ALK+
25382%ALK-
25382%ALK(Unknown)
25382%T790M+
25382%T790M-
25382%T790M(unkown)
25382%CMET+
25382%CMET-
25382%CMET(unknown)

proc transpose data=transpose_New out=one;

by Reference_ID Arm_id;

Id character;

var value;

run;

ERROR: The ID value "_ALK_" occurs twice in the same BY group.

ERROR: The ID value "_T790M_" occurs twice in the same BY group.

ERROR: The ID value "_CMET_" occurs twice in the same BY group.

NOTE: The above message was for the following by-group:

      Reference ID=2538 Arm.ID=1

ERROR: The ID value "_ALK_" occurs twice in the same BY group.

ERROR: The ID value "_T790M_" occurs twice in the same BY group.

ERROR: The ID value "_CMET_" occurs twice in the same BY group.

NOTE: The above message was for the following by-group:

      Reference ID=2538 Arm.ID=2

ERROR: All BY groups were bad.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: There were 18 observations read from the data set WORK.TRANSPOSE_NEW.

WARNING: The data set WORK.ONE may be incomplete.  When this step was stopped there were 0

         observations and 0 variables.

WARNING: Data set WORK.ONE was not replaced because this step was stopped.

NOTE: PROCEDURE TRANSPOSE used (Total process time):

      real time           0.00 seconds

      cpu time            0.00 seconds


Accepted Solutions
Solution
‎11-30-2012 03:35 AM
SAS Employee
Posts: 23

Re: Why the errors were coming with data values?

In Proc Transpose, the values in the ID variable will be interpreted as variable names in the output data set. Invalid characters will be replaced with underscore. For example, the values %ALK+ and %ALK- will both be transformed into the valid variable name _ALK_. So, this value occurs twice in the same by group.

View solution in original post


All Replies
Solution
‎11-30-2012 03:35 AM
SAS Employee
Posts: 23

Re: Why the errors were coming with data values?

In Proc Transpose, the values in the ID variable will be interpreted as variable names in the output data set. Invalid characters will be replaced with underscore. For example, the values %ALK+ and %ALK- will both be transformed into the valid variable name _ALK_. So, this value occurs twice in the same by group.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 170 views
  • 0 likes
  • 2 in conversation