The following JCL will help you to create sort card dynamically.
//jobname job (acct info),’srinimf’,notify=
//*
//Joblib DD DSN=abcd.abc.abcd
//*
//step1 step exec pgm=IKJEFT01
//*
//output DD DSN=output dataset
//sysin DD *
select sort_cntl
from (cast(‘xxxxxxxxxxx’) as char(70)) as sort_cntl from sysibm.sysdummy1
union all
.
.
.
.
) x
with UR;
This way using CAST function we can create multiple sort cards into output file.





