Consider splitting your file by CASE into separate files, prior to using PROC TRANSPOSE, and use a new PREFIX= value for each transpose execution, and lastly bring your files back together with SET (interleave) after ensuring you have unique SAS variables for each set of CASE observations. I do expect that a macro-driven process would apply here, creating a macro variable with the count of unique CASE values to drive the incrementing processing to build your PROC TRANSPOSE execution code.
Scott Barry
SBBWorks, Inc.