CLIST examples
Both DFSORT and ICETOOL can be called from a CLIST. They key is
to specify ALLOCATE statements for the data sets you need and then
use a CALL statement like this:
CALL *(name)
Here is an example of a CLIST to call DFSORT:
FREE FI(SYSOUT SORTIN SORTOUT SYSIN)
ALLOC FI(SYSOUT) DA(*)
ALLOC FI(SORTIN) DA('Y897797.INS1') REUSE
ALLOC FI(SORTOUT) DA('Y897797.OUTS1') REUSE
ALLOC FI(SYSIN) DA('Y897797.SORT.STMTS') SHR REUSE
CALL *(ICEMAN)
Here are the DFSORT control statements that might appear in the
Y897797.SORT.STMTS data set:
SORT FIELDS=(5,4,CH,A)
INCLUDE COND=(21,3,SS,EQ,C'L92,J82,M72')
Here is an example of a CLIST to call ICETOOL:
FREE FI(TOOLMSG DFSMSG VLR LENDIST TOOLIN)
ALLOC FI(TOOLMSG) DA(*)
ALLOC FI(DFSMSG) DUMMY
ALLOC FI(VLR) DA('Y897797.VARIN') REUSE
ALLOC FI(LENDIST) DA(*)
ALLOC FI(TOOLIN) DA('Y897797.TOOLIN.STMTS') SHR REUSE
CALL *(ICETOOL)
Here are the ICETOOL statements that might appear in the Y897797.TOOLIN.STMTS
data set:
OCCURS FROM(VLR) LIST(LENDIST) -
TITLE('LENGTH DISTRIBUTION REPORT') BLANK -
HEADER('LENGTH') HEADER('NUMBER OF RECORDS') -
ON(VLEN) ON(VALCNT)