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 V5R4 Generate Symmetric Key (QC3GENSK, Qc3GenSymmetricKey) API 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.