Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

 

Background Color
coloryellow
IFile::Receive

Retrieve (download) a file from a connected host.

 

Background Color
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.

...

 

Background Color
coloryellow
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.