InfoConnect for Airlines VBA Guide
INDReceiveFile Method
Specifies a name for the PC file that receives host data. Provide complete path information.
Specifies a host file.
Specifies the type of file being transferred.
Specifies what to do if the file specified in the pcFile argument already exists.
Displays the file transfer in the Progress window if set to true.
Transfers a file from the host to the PC using the IND$FILE protocol.
Syntax
object.INDReceiveFile( _
   ByVal pcFile As String, _
   ByVal hostFile As String, _
   ByVal type As INDFileTransferType, _
   ByVal fileExistsOption As FileExistsOption, _
   ByVal showStatus As Boolean _
) 

Parameters

pcFile
Specifies a name for the PC file that receives host data. Provide complete path information.
hostFile
Specifies a host file.
type
Specifies the type of file being transferred.
fileExistsOption
Specifies what to do if the file specified in the pcFile 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 gets a file from the host. Before you run the sample, make sure the cursor is on a TSO command line.
Sub FileTransferReceiveSample()
 
    path = Environ$("USERPROFILE") & "\Documents\Micro Focus\InfoConnect\" & "fileName.txt"
    
    'Set the configuration to TSO
    ThisIbmTerminal.FileTransfer.XfrHostSys = HostSystem_Tso
    
    ThisIbmTerminal.FileTransfer.INDReceiveFile path, "count.txt", INDFileTransferType_Ascii, FileExistsOption_Append, True
         
End Sub
See Also