Full details of the session initialize and terminate calls are provided in the MQSeries Everyplace C Programming Guide. Both calls take an exception block.