Delete all instances of a specified $ command in the UJP


Inputs:  Parm1 = UJP pathname
         Parm2 = Command Name (with leading $)

Returns:  0 = success
         -1 = cannot lock UJP
         -2 = cannot open UJP
         -3 = cannot read UJP
         -4 = cannot write UJP
         -5 = UJP is an active job instance
         -6 = command does not start with $

This function deletes all instances of the specified $ command in the UJP.  It is not an error if no such commands are present.

The value in parm2 can have the following values:

$commandthe name of the command: all such commands will be deleted
$fs_template $commandthe $fs_template command should be followed by white space and then the appropriate next parameter to select specific template command instances for deletion.  If no specific second parameter is included, all $fs_template commands will be deleted.
$var_def varnamethe $var_def command should be followed by white space and then the variable name.  All $var_def commands with the variable name will be deleted.  If no specific second parameter is included, all $var_def commands will be deleted (this duplicates the DeleteAllVariables function).

Before processing, any $fs_template $var_def commands will be converted to normal $var_def commands.

Example:

Delete the fax header specification:

strcopy(parm1, "@FFJOBS\\00001234\\00000123\\JOBTYPE.UJP");

strcopy(parm2, "$fax_header");

res = JobDllEntry("DeleteCommands", parm1, parm2, 0);

Delete the fax send time:

strcopy(parm1, "@FFJOBS\\00001234\\00000123\\JOBTYPE.UJP");

strcopy(parm2, "$fs_template $fax_send_time");

res = JobDllEntry("DeleteCommands", parm1, parm2, 0);

Delete all retry delays:

strcopy(parm1, "@FFJOBS\\00001234\\00000123\\JOBTYPE.UJP");

strcopy(parm2, "$retry_delays");

res = JobDllEntry("DeleteCommands", parm1, parm2, 0);