First of all there's a few things that can be going on firstly you could have been given the wrong PCM by mistake.
Secondly you could have gotten a faulty PCM.
To my knowledge there is no manual programing required for those so its pretty much plug and play..
With the old PCM how long are you driving it after taking it out..
They have a15 minute KAM or Keep alive memory in them..IF that is let to run out then it may still be running rough..
Also it takes 15 - 20 miles of driving with the reset PCM to allow it to relearn how to deliver the fuel.