gprs connection example socket mode
If you have separate AT commands for attaching to the GPRS context (and get an IP address from the network) and for "dialing" a TCP socket, you can do this. Otherwise it's imposible, dialing a TCP socket means attach to GPRS context then establishing TCP connection, and closing the TCP connection means also detaching from GPRS context. Simcom and Telit has this feature, I don't know about M22. Older implementation of TCP/IP stacks inside of GpRS modems have this problem.
/pisoiu