Markram completes the job for clinical South Africa after strong show from bowlers.
Rashid finished with figures of 4 for 2 as West Indies were bowled out for 55.
Ravi Rampaul earns recall as defending champions West Indies name T20 World Cup squad.
Pakistan beat West Indies by 109 runs to draw the two-match series at 1-1.
Pakistan set West Indies 329 To win second Test as hosts close on 49-1 on fourth day.
The Test has sprung to life despite four sessions being taken away by weather and poor ground conditions.