Receive (Method)
Â
Â
Retrieve (download) a file from a connected host.
Â
Parameters
No | Name | Type | Optional | Default | Description |
---|---|---|---|---|---|
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 result as Long
myString = "C:\temp\sales.rpt E:SLS Report A (ASCII CRLF"
result = myFile.Receive(myString)
Â
QWS3270 Automation copyright © Jolly Giant Software Inc. All rights reserved.
Â