filewatch.sh syntax

Technote (FAQ)


Question

What is the proper filewatch.sh syntax?

Cause

You need to configure filewatch to run in your environment.

Answer

###################################################################

### This script uses the "test" UNIX command to find files or directories.
### If the file is found, it can run an additional task which RC will
### become this script RC. It is possible customizing the search setting a dead
### line and a search rate time. The file will be searched immediately
### at the script start and at the end of every search rate time.
### Using a parameter it is possible forcing this script RC if dead line is
### reached without finding the file. Any way, it is possible suppressing the
### dead line. Doing so the script ends only if the file if found.
### The parameters this script need are distinguished using couples of
### keywords. The first value is the option that is a constant identifying the
### parameter, the second value is its argument that the script uses.
### Here follows the list of all the option keyword:
###
### -kd (mandatory) it specify the option of the test UNIX command. See
### UNIX manuals to check all the allowed values.
###
### -fl (mandatory) it identify the searched file (or directory) path.
###
### -dl (mandatory) it identify the deadline period (in seconds).
###
### -nd (mandatory) this option (having no argument) suppress the dead line.
### If using it the -dl option cannot be used (and vice
### versa).
###
### -int (mandatory) it identify the search interval period (in seconds).
###
### -rc (optional) it identify the script RC when the dead line is reached
### without finding the file (ignored if -nd is used).
###
### -tsk (optional) It identify the path of the task launched if the file
### is found.
###
### The couples option-argument can be passed in the order you want.
### This script execute check about the presence of the mandatory options,
### unknown options, options duplication, but NO VALIDATION checks are made on
### the arguments values. Here are reported two examples of the parameters
### usage:
###
### -kd f fl /music/angie -dl 30 -int 5 -rc 2527 -tsk /tools/kill
###
### the script will check /music/angie path every 5 secs for a time of 30
### secs. If this time will end without finding the file, then the script RC
### will be 2527. if the file will be found the task /tools/kill will be
### executed and its RC will become this script RC.
###
### -kd w -nd -int 5 -fl /music/angie
###
### with those parameters a writable file /music/angie will be searched every
### 5 secs incessantly.
### This script captures the scheduler variables, so when running using TWS:
### >>>>> SET THE $MAESTRO VARIABLE WITH THE TWS Home Directory Path <<<<<
### The script provides a table reporting the passed options and information on
### the job and occurrence running it. If submitting it outside the scheduler,
### an automatic check is executed and the table is congruently modified.
### When running it with the scheduler it is possible executing (with the -tsk
### option) single commands via <maestrohome>/jobmanrc.cmd, an example is:
###
### -kd f nd int 10 fl /data/input.dat -tsk jobmanrc ls- l
###
### If using this script with NT/2K OS note that:
### - to run this script it is necessary using a BASH shell (or an equivalent
### tool), so it is necessary adding to the PATH system variable the BASH
### libraries path.
### - If a BASH shell is needed to execute the additional task then it is
### necessary enclosing the -tsk argument in single quotas, an example is:
###
### -kd f nd int 10 fl /data/input.dat -tsk bash task.bsh
###
### The bash prefix can be added automatically (see the script code).
### - To make an optional task executing multiple Windows commands, it is
### necessary including them in a .cmd file, an example is:
###
### -kd f nd int 10 fl /data/input.dat -tsk command.cmd
###
### - When the optional task is not found, the script end with a RC=127.
###

For further information regarding filewatch utilities, see the "Related information" section below.


Related information

filewatch(.sh) error
filewatch vs filewatch.sh
filewatch syntax
Defining file dependencies to check for file changes

Product Alias/Synonym

Maestro
ITWS
TWS

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Tivoli Workload Scheduler for z/OS

Software version:

8.3, 8.4, 8.5, 8.5.1, 8.6.0

Operating system(s):

Platform Independent

Reference #:

1600226

Modified date:

2012-12-27

Translate my page

Machine Translation

Content navigation