hi ,
If you're using export/import command in order to migrate data from prod to test systems, you can use any sql function you like.
For example:
db2 export to file.ixf of ixf messages file.msg select a,b,substr(c,1,4)||'****'||substr(c,8,4) from table_name
will create a file which has only first and last 4 chars of c columns and stars(*) in between them.
then you can import this file into the test system as
db2 IMPORT FROM file.ixfl OF ixf MESSAGES mes.msg
CREATE INTO table_name IN tablespace_name;
this will create a new table.But there are also other options in import which you can find from the db documentation.