Hi Vikas, I have pasted mycode for Proc transpose and Proc transpose log.
Please fix my error.
/* First I am going to sort aedecod*/
proc sort data=
work.ae out=sub_aedecod nodupkey;
by subjid aebodsys aedecod trt01pn;
run;
/* then proc summary for aedecod*/
proc summary data=Sub_aedecod nway;
class subjid aebodsys aedecod trt01pn;
output out=sub_aedecod;
run;
/*Proc transpos for sub_aedecod*/
proc transpose data=sub_aedecod out=taedecod;
by aebodsys aedecod;
id trt01pn;
var _freq_;
run;
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
NOTE: ODS statements in the SAS Studio environment may disable some output features.
43 ;
44 /* First I am going to sort aedecod*/
45 proc sort data=
work.ae out=sub_aedecod nodupkey;
46 by subjid aebodsys aedecod trt01pn;
47 run;
NOTE: There were 195 observations read from the data set
WORK.AE.
NOTE: 33 observations with duplicate key values were deleted.
NOTE: The data set WORK.SUB_AEDECOD has 162 observations and 11 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.02 seconds
48
49
50
51 /* then proc summary for aedecod*/
52 proc summary data=Sub_aedecod nway;
53 class subjid aebodsys aedecod trt01pn;
54 output out=sub_aedecod;
55 run;
NOTE: There were 162 observations read from the data set WORK.SUB_AEDECOD.
NOTE: The data set WORK.SUB_AEDECOD has 162 observations and 6 variables.
NOTE: PROCEDURE SUMMARY used (Total process time):
real time 0.04 seconds
cpu time 0.04 seconds
56
57 /*Proc transpos for sub_aedecod*/
58 proc transpose data=sub_aedecod out=taedecod;
59 by aebodsys aedecod;
60 id trt01pn;
61 var _freq_;
62 run;
ERROR: Data set WORK.SUB_AEDECOD is not sorted in ascending sequence. The current BY group has AEBODSYS = Nervous system disorders
and the next BY group has AEBODSYS = Infections and infestations.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 7 observations read from the data set WORK.SUB_AEDECOD.
WARNING: The data set WORK.TAEDECOD may be incomplete. When this step was stopped there were 0 observations and 0 variables.
WARNING: Data set WORK.TAEDECOD was not replaced because this step was stopped.
NOTE: PROCEDURE TRANSPOSE used (Total process time):
real time 0.03 seconds
cpu time 0.04 seconds
63 ;
64 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
74 ;