InfoConnect for Airlines VBA Guide
INDSendFile Method
Specifies a local file. Unless you provide complete path information, only files in the current directory will be found. You cannot use wildcard characters to send multiple files the way you can by using the Transfer screen.
Specifies a name for the transferred file that complies with host file-naming conventions. You cannot use an empty string.
Specifies the type of file being transferred.
Specifies what to do if the file specified in the HostFile argument already exists.
Displays the file transfer in the Progress window if set to true.
Transfers a file from the PC to the host using the IND$FILE protocol.
Syntax
object.INDSendFile( _
   ByVal pcFile As String, _
   ByVal hostFile As String, _
   ByVal type As INDFileTransferType, _
   ByVal fileExistsOption As FileExistsOption, _
   ByVal showStatus As Boolean _
) 

Parameters

pcFile
Specifies a local file. Unless you provide complete path information, only files in the current directory will be found. You cannot use wildcard characters to send multiple files the way you can by using the Transfer screen.
hostFile
Specifies a name for the transferred file that complies with host file-naming conventions. You cannot use an empty string.
type
Specifies the type of file being transferred.
fileExistsOption
Specifies what to do if the file specified in the HostFile argument already exists.
showStatus
Displays the file transfer in the Progress window if set to true.
Exceptions
ExceptionDescription
System.InvalidOperationExceptionThe exception that is thrown when a method call is invalid for the object's current state.
Remarks
If you're having trouble getting a transfer to work, make sure the XfrHostSys property is set to the appropriate value.
Example
This sample sends a file to the host. Before you run the sample, make sure the cursor is on a TSO command line.
Sub FileTransferSendSample()
 
    path = Environ$("USERPROFILE") & "\Documents\Micro Focus\InfoConnect\" & "test.txt"
    
    'Set the configuration to TSO
    ThisIbmTerminal.FileTransfer.XfrHostSys = HostSystem_Tso
    
    ThisIbmTerminal.FileTransfer.INDSendFile path, "bvtst02.test7.txt", INDFileTransferType_Ascii, FileExistsOption_Overwrite, True
    
End Sub
See Also