Really sample code for these sorts of things aren't going to help you, because it's pretty much as abstracted as you're going to get.
It's just a serial interface and the standard AT command set.
Whenever dealing with these sorts of things, I just get the AT command guide (a link is in that datasheet you listed), hook it up to a serial port on a PC, open a terminal application and start typing commands to it. It's all human readable ascii, so you should be able to work out pretty quick what series of commands you need to achieve what you need.
Then just write your software to handle those commands in a state machine (or separate thread if you're on a multithreaded environment.)