You can use DFSORT to sort or unload a VSAM data set.
CICS VT supports DFSORT programs, but you must specify additional JCL parameters in the DD statement that defines the VSAM data set you have migrated. The additional parameters are shown in the following JCL statement:
//SORTIN DD SUBSYS=(ssid,DB2id,dimname),
// RECFM=ff,LRECL=llll,BLKSIZE=bbbb
The value of ff should be either F or V. llll is the maximum VSAM record length value. If the VSAM records are fixed length, BLKSIZE bbbb is also the maximum VSAM record length value. If the VSAM records are varying length, the BLKSIZE value bbbb is llll + 4.