State tax filing

So under my federal form, it splits it out between states. You are saying to put all earnings under PA and claim the full PA tax for total amount (which includes MD as well).  When filing for MD, put "0" for earnings and claim full amount that MD took out. This is correct?