Send File (90)

Top  Previous  Next

This function transfers a file from the PC to the Host.

 

Prerequisite Functions

 

There are no prerequisite functions for this function.

 

 

Syntax

 

WinHLLAPIAsync (hWnd, lpwFunction, lpbyString, lpwLength, lpwReturnCode)

 

 

Call Parameters

 

Parameter

Description

Data String

SEND command parameters.

Data Length

Length of Data String. NA if session option EOT is specified.

PS Position

NA

 

 

Return Codes

 

Code

Description

WHLLOK

File transfer started successfully.

WHLLPARAMETERERROR

Parameter error or Data Length is zero or greater than 255.

WHLLFTXCOMPLETE

File transfer complete.

WHLLFTXSEGMENTED

Transfer is complete with segmented records.

WHLLSYSERROR

The function failed due to a system error.

WHLLTRANSABORTED

File transfer aborted, either due to the user clicking the cancel button or because the timeout period has elapsed.

WHLLFILENOTFOUND

PC file not found.

WHLLFTXCOMPLETECICS

File transfer was successful (transfer to CICS).

WHLLACCESSDENIED

Access denied to PC file.

WHLLMEMORY

Insufficient memory.

WHLLINVALIDENVIRONMENT

Invalid environment.

 

 

Remarks

 

Only one file transfer operation is supported per connected Host session.

 

The function initiates the file transfer and immediately returns control to your Windows HLLAPI application. This frees your application to perform other tasks while the file transfer is occurring. Once initiated the function will regularly post WinHLLAPIAsyncFileTransfer messages to the window specified by hWnd. These messages will notify the WinHLLAPI application of the status of the transfer and send a final message when the transfer is complete.

 

wParm

 

Is the status indicator: the high byte contains the Session ID, the low byte contains the status. If the low byte is zero, the file transfer is still in progress. If the low byte is one, the file transfer has completed.

 

lParm

 

If the low byte of wParm is zero (in progress), lParm is the number of bytes transferred. If the low byte

wParm is one (completed), lParm is the completion code.