Technically, SHA-2 (SHA=Secure Hash Algorithm) doesn’t do encryption — it does one-way hashing. But that’s a nit about terminology.
See the <a href=”http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/apis/qc3gensk.htm”>V5R4 Generate Symmetric Key (QC3GENSK, Qc3GenSymmetricKey) API</a> for technical info. This is one of the Cryptographic Services API under Key Generation.
SHA-2 is a little unusual, but it should be about as easy as SHA-1 with the same API.