We have a large data with multiple observations in rows.
We wanted to transpose a column, CMMED_NEW (Variable) with several entries for same ID at different visits levels (visits is coded VISCODE_NEW, 1 to 12 visits codes. NOTE: number of visits for each ID differ. Maximum visits 10, minimum 1).
We used the syntax below to transpose the Column CMMED_NEW but always got error message that there was "no ID variable in the Data" even thought the ID variable in in the file.
Can anyone kindly advice.
Many thanks in advance.
Proc Sort Data=WORK.CLINICAL_test;
by ID RID VISCODE_NEW CMMED_NEW;
> "no ID variable in the Data" even thought the ID
> variable in in the file.
selected statements from your code
> Set WORK.CLINICALS_test;
> Set WORK.CLINICAL_RECCMEDS_testss;
> By ID;
You may not have posted the code which created the message, because I see the output from the sort statement "Proc Sort Data=WORK.CLINICAL_test;"
is not read by the data step causing trouble.
That is why we recommend posting the SASlog of the steps up to the point where the errors are reported.