DB2 SQL has a very easy way to perform data encryption on individual fields. Assuming that your encryption needs are well defined and limited to a few specific instances, you could generate your required DB io function as SQLRPG400, or even better, SQLRPGIV. You then replace the db action diagram instructions with source code objects that perform the required SQL. Your biggest hassle is finding a secure way of dealing with the encryption "passwords". The "password" is used to derive an encryption key, which then is used in RC2 or triple DES algorithms .