Enabling a SIM PIN
sim pin
iPhone 4, iOS 5.1.1
sim pin
iPhone 4, iOS 5.1.1
You need to be clearer in your question. Do you mean you want to create a lock code for your SIM? Or a lock code for the phone? Or do you need to unlock a SIM that has a PIN already?
Why don't you get your data problem sorted out before you start messing about with things like that? You don't want to complicate the situation.
Enabling a SIM PIN