Previous Topic: FILENAME Statement—Specify File to MonitorNext Topic: FILTER Statement—Specify a Filter Using Regular Expression Logic (Application Services/Web Service Jobs)


FILESYSTEM Statement—Verify File Space Required to Start a Job

The FILESYSTEM statement defines the minimum amount of file space that must be available on the specified UNIX file system or Windows drive before the job can start. Before the job is submitted, the agent checks whether the required space is available on all specified file systems or drives. If all of the requirements are met, the job starts. If any of the requirements are not met, the job fails.

If you do not specify this statement, the available file space is not checked.

Supported Job Types

This statement is optional for the following job types:

Syntax

This statement has the following format:

FILESYSTEM location SIZE(size [BYTES|KILOBYTES|MEGABYTES|GIGABYTES])
location

Specifies a Windows drive or the full path name to a UNIX file system where the file space is required.

Limits: Up to 255 characters

UNIX: You can specify the full path to a directory in a file system.

Windows: Only drives are checked. If directories are specified, they are ignored.

SIZE(size [BYTES|KILOBYTES|MEGABYTES|GIGABYTES])

Specifies the required amount of file space in bytes, kilobytes (default), megabytes, or gigabytes.

Limits: Up to 8 digits, followed by the unit of measure

Example: 200 MEGABYTES

Note: To specify multiple file systems or drives, define a separate FILESYSTEM statement for each file system or drive.

Example: Verify the Available File Space on UNIX

This example checks whether the file system named roots has 100 KB of available space. This example also checks whether the file system named auxfs1 has 120 KB of available space. The specified file space must be available before the job can start.

AGENT UNIXAGENT
SCRIPTNAME /u1/procrun.sh
FILESYSTEM /roots SIZE(100)
FILESYSTEM /auxfsl SIZE(120)

Example: Verify the Available File Space on Windows

This example checks whether the C: drive has 100 KB of available space and the D: drive has 120 KB of available space. The specified file space must be available before the job can start.

AGENT WINAGENT
CMDNAME C:\Programs\Payroll\pay.exe
FILESYSTEM C SIZE(100)
FILESYSTEM D SIZE(120)