/
Receive (Method)

Receive (Method)

 

 

IFile::Receive

Retrieve (download) a file from a connected host.

 

Function Receive(params As String) As Long
 


Parameters

NoNameTypeOptionalDefaultDescription

1

params

String

No

-

 

Return Code

Description

JGS_PARAMETERERROR

Missing or invalid parameter

JGS_FTXCOMPLETE

File transfer completed successfully

JGS_FTXSEGMENTED

File transfer completed with one or more segmented records

JGS_SYSERROR

The function failed due to a system error

JGS_FTXABORTED

The transfer was aborted, either by the user or by a timeout

JGS_FILENOTFOUND

The specified PC file was not found

JGS_ACCESSDENIED

Access to specified PC file was denied

JGS_MEMORY

Insufficient memory

JGS_INVALIDENVIRONMENT

Invalid environment

JGS_INVALIDFORMAT

Invalid format

Remarks

The parameter format depends on the host type you are connected to. In general format must follow this example:
PC.File E:Host File Name (Options

where PC.File is the fully qualified path to the PC file, E: is the session ID followed by a colon, Host File Name is the name of the file on the mainframe, followed by optional parameters. Here is an example string to transfer the file SLS Report A from the host to the file sales.rpt to the PC, the session is G, and the options to translate between ASCII and EBCDIC and convert carriage return/linefeeds are specified:
c:\temp\sales.rpt G:SLS Report A (ASCII CRLF

You must be at a place on the host screen where you would normally enter the IND$FILE command manually. The host must support the IND$FILE transfer protocol for this function to succeed.

Sample Code


 

Dim myString as String
Dim result as Long
myString = "C:\temp\sales.rpt E:SLS Report A (ASCII CRLF"
result = myFile.Receive(myString)

 


Back to IFile members

 


QWS3270 Automation copyright © Jolly Giant Software Inc. All rights reserved.

 

Related content

Receive (Method).
Receive (Method).
More like this
Send (Method)
More like this
Send (Method).
Send (Method).
More like this
IFile Transfer.Receive Method
IFile Transfer.Receive Method
More like this
IFileTransfer_Receive Method
IFileTransfer_Receive Method
More like this
IFile Transfer.Send Method
IFile Transfer.Send Method
More like this