The following examples show how you can modify an existing script
using the common qualifiers.
1.
$ DEFRAGMENT MODIFY C/SCRIPT=A
This command changes the name of script C to A.
2.
$ DEFRAGMENT MODIFY */MAIL_NOTIFICATION
This command turns on mail notification for all scripts in the
database.
3.
$ DEFRAGMENT MODIFY myscript/LOG=new_log/NOPREDECESSOR
This command causes subsequent executions of myscript to generate
a log file called NEW_LOG.LOG, located in the user's default
directory. The NOPREDECESSOR qualifier disassociates myscript
from its predecessor. However, any script for which myscript is a
predecessor remains dependent upon the execution of myscript.
4.
$ DEFRAGMENT MODIFY */SCRIPT=*
This command renames all scripts to themselves.
5.
$ DEFRAGMENT MODIFY *C/SCRIPT=*D
This command changes the name of each script that ends in C to
end in D. For instance, DAILYC becomes DAILYCD.
6.
$ DEFRAGMENT MODIFY *C/SCRIPT=*D/PRED=*X
This command shows the potential pitfalls with using multiple
wildcards in a DEFRAGMENT command.
Consider the following scenario: Suppose you have four scripts
(ABC, ATLASX, ABCX, and DAILYC) and you enter this command.
The Disk File Optimizer first finds all scripts whose names
end in C (ABC and DAILYC). Then, according to what is written
on the command line, we would expect it to change their names to
end in D. Thus, ABC would become ABCD, and DAILYC would become
DAILYCD.
After renaming the files, we would expect the script ABCD to be
modified such that it has a predecessor of ABCX, and DAILYCD to
have a predecessor of DAILYCX. However, since there is no script
named DAILYCX in the database, the command fails.
Since this was entered on one command line, none of these changes
actually occur.