CMS EXEC File

You can create a special EXEC file, called CMS EXEC, by using the LISTFILE command with the EXEC option.

Suppose you have a series of files on your disk with file names beginning with the characters PAY and file types beginning with the character D. If you enter:
listfile pay* d* a (exec
the usual LISTFILE display is placed in a file CMS EXEC. It has the format:
&1 &2 filename filetype filemode
Assume that after you entered the LISTFILE command shown, the CMS EXEC file contains:
&1 &2 PAYROLL   DATA       A
&1 &2 PAYDATE   DOCUMENT   A
&1 &2 PAYSLIP   DETAIL     A
&1 &2 PAY23UPD  D831102    A
If you now enter:
cms disk dump
CMS executes the following commands:
DISK DUMP PAYROLL DATA A
DISK DUMP PAYDATE DOCUMENT A
DISK DUMP PAYSLIP DETAIL A
DISK DUMP PAY23UPD D831102 A
The arguments DISK and DUMP replace &1 and &2 when the file is executed.
If only one argument is passed to an exec, the succeeding variables are set to nulls. For example, if you enter:
cms erase
CMS executes the following commands:
ERASE PAYROLL DATA A
ERASE PAYDATE DOCUMENT A
ERASE PAYSLIP DETAIL A
ERASE PAY23UPD D831102 A
The CMS EXEC file is like any other CMS file. You can edit it, print it, sort it, and rename it. Each time you use LISTFILE with the EXEC option, a new CMS EXEC is created and the old one is erased. You can add to an existing CMS exec file using LISTFILE with the APPEND option.