InputFileIgnored

Top  Previous  Next

Object: EHL7.CommandoProcessor

FileName: EHL7.dll

 

EVENT

 

Name: InputFileIgnored

Parameters:

1.strFileName (String) the full path and file name of the file that is in the InboundPath but is not going to be processed.
2.nReason (Enumerator: EHL7IgnoreFileReasons) the reason the processor is ignoring the file
3.bCancel (boolean).  Read/Write, can be set to True to cancel processing.

 

Description: When a file is detected in the InboundPath that has the file extension (HL7FileExtension) it may be ignored if, for example:

1.The file contains 0 bytes

2.    The file is currently open or in use by another program.

 

*When responding to this event you can perform cleanup actions if the file is aged etc.

 

Example:

'Declare the object

Private WithEvents oProcessor As EHL7.CommandoProcessor

 

Private Sub oProcessor_InputFileIgnored(strFileName As String, nReason As EHL7.EHL7IgnoreFileReasons, bCancel As Boolean)

If nReason = enFileLocked Then

  'Do Nothing

ElseIf nReason = enFileIsEmpty Then

  If FileDateTime(strFileName) < DateAdd("d",-1,Now) Then

       'This file is more than 1 day old and contains 0 bytes

      Kill strFileName

  End If

End If

End Sub

 

 

 

Related Items: EasyHL7 Events in VB