Receive File (91)

Top  Previous  Next

The Receive File function is used to transfer a file from the host session to the workstation session. It is used the same way as the RECEIVE command is used in the PC/3270. The Receive File function can be called by an EHLLAPI application program.

 

3270

5250

Yes

Yes

 

 

Prerequisite Calls

 

There are no prerequisite calls for this function.

 

 

Call Parameters

 

 

Standard Interface

Enhanced Interface

Function Number

Must be 91.

 

Data String

Refer to the examples.

 

Length

Length, in number of bytes, of the data string. Overridden if in EOT mode.

 

 

Following are examples of the data strings for a single-byte character set (SBSC):

 

3270 Session

 

To receive the file from the VM/CMS host system:

 

pc_filename [id:]fn ft [fm] [(option]

 

To receive the file from the MVS(TM)/TSO host system:

 

pc_filename[id:]dataset[(member)] [/password] [option]

 

To receive the file from the CICS(R) host system:

 

pc_filename [id:]host_filename [(option]

 

5250 Session

 

To receive the file from the eServer i5 or iSeries host system:

 

pc_filename [id:]library file member [option]

 

Following are examples of the data strings for a double-byte character set (DBCS):

 

3270 Session

 

To receive the file from the VM/CMS host system:

 

pc_filename [id:]fn ft [fm]  [(option]

 

To receive the file from the MVS/TSO host system:

 

pc_filename [id:]dataset[(member)] [/password]  [(option]

 

To receive the file from the CICS host system:

 

pc_filename [id:]host_filename [(option]

 

5250 Session

 

To receive the file from the eServer i5 or iSeries host system:

 

pc_filename [id:]library file member [option]

 

Note:

Parameters within [ ] are optional. Available options are listed below.

 

Host System

Common Options

VM/CMS

ASCII, JISCII, CRLF, APPEND, TIME n, CLEAR, NOCLEAR, PROGRESS, QUIET

MVS/TSO

ASCII, JISCII, CRLF, APPEND, TIME (n), CLEAR, NOCLEAR, PROGRESS, QUIET, AVBLOCK|TRACKS|CYLINDERS

CICS

ASCII, JISCII, CRLF, NOCRLF, BINARY, TIME n, CLEAR, NOCLEAR, PROGRESS, QUIET

i5/OS(TM) or OS/400(R)

ASCII, JISCII, CRLF, APPEND, TIME n, CLEAR, NOCLEAR, PROGRESS, QUIET

 

Note:  JISCII is valid in a DBCS session for Japan only and ASCII is valid for all other SBCS and DBCS sessions. Other options specified will be passed to the host transfer program. The file transfer program on the host side either uses them, ignores them, or returns an error. Consult the host transfer program documentation to see a complete list of the options supported.                

 

 

Return Parameters

 

Return Code

Explanation

2

Parameter error or you have specified a length that is too long (more than 255 bytes) for the EHLLAPI buffer. The file transfer was unsuccessful.

3

File transfer complete.

4

File transfer complete with segmented records.

9

A system error was encountered.

27

File transfer terminated because of either a Cancel button or the timeout set by the Set Session Parameter (9) function.

101

File transfer was successful (transfer to/from CICS).

 

If you receive return code 2 or 9, there is a problem with the system or with the way you specified your data string.

 

Other return codes can also be received, which relate to message numbers generated by the host transfer program. For transfers to a CICS host transfer program, subtract 100 from the return code to give you the numeric portion of the message. For example, a return code of 101 would mean that the message number INW0001 was issued by the host. For other host transfer programs, just use the return code as the numerical part of the message. For example, a return of 34 would mean that message TRANS34 was issued by the host transfer program. The documentation for your host transfer program should give more information about the meanings of the specific messages.

Operating system error codes reported by EHLLAPI are greater than 300. To determine the error code, subtract 300 and refer to the operating system documentation for return codes.

 

 

Remarks

 

1.Four sets of parameters under the Set Session Parameters (9) function are related to this function. They are the STRLEN/STREOT, EOT=c, QUIET/NOQUIET and the TIMEOUT=c/TIMEOUT=0 session options.
2.If no path is specified when the Receive File function is executed, the received file is stored in the current subdirectory, which is the directory in which your application is running.