Here's one way. Note that I'm changing your CLUSTER_ID values (101, 102, 103, instead of 11, 12, 13) because I think it's likely you will have 10+ trials for some IDs and that would cause a conflict between the CLUSTER_ID values:
data want;
set thesis;
cluster_id = 100 * id;
do j = 1 to trial;
cluster_id + 1;
if j <= success then status=1;
else status=0;
output;
end;
keep id cluster_id status;
run;