Lucy_zhang

CA Tuesday Tip: (CA ESP) FILE_TRIGGER Completes Before Entire File Created

Discussion created by Lucy_zhang Employee on Jan 8, 2013
CA Tuesday Tip by Lucy Zhang, Principal Support Engineer for 01/08/2013

When FILE_TRIGGER with CREATE is used to monitor a big file that's created by FTP process on Windows system, the FILE_TRIGGER will mark as complete right after the FTP process starts without waiting for the entire file being FTPed. The reason is, when the FTP starts, Windows system will create the related file descriptor which makes agent file monitor think the file is created.

Workaround
Use two FILE_TRIGGERs, one with CREATE which will fire when the FTP starts, one with UPDATE and NOCHANGE(1) which will fire one minutes after the FTP completes.

Example
APPL FILETRIG
FILE_TRIGGER filetr1
AGENT LUCY
FILENAME 'C:\lza' create
RUN DAILY
rel filetr2
ENDJOB
FILE_TRIGGER filetr2
AGENT LUCY
FILENAME 'C:\lza' update nochange(1)
RUN DAILY
ENDJOB

filetr1 fired when the FTP starts, and it will release filetr2; filetr2 stays in "Monitor" status until one minute after the FTP process completes.

Outcomes