Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »



       




QWS3270 COM .NET Help
FileTransfer..::.Receive Method
FileTransfer Class  Example  See Also  Send Feedback



This method transfers a file from the mainframe host to the PC.

Namespace:  JollyGiant.Emulation
Assembly:  JGSComdotNet (in JGSComdotNet.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax


C#
public StatusCode Receive(
	string cmdline
)
Visual Basic (Declaration)
Public Function Receive ( _
	cmdline As String _
) As StatusCode
Visual C++
public:
virtual StatusCode Receive(
	String^ cmdline
) sealed
JavaScript
function Receive(cmdline);


Parameters

cmdline Type: System..::.StringRECEIVE command parameters (see remarks).

Return Value

The StatusCode indicating the result of the operation.

This can be one of the following values:


Status codeDescription
WHLLPARAMETERERRORParameter error or Data Length is zero or greater than 128.
WHLLFTXCOMPLETEThe file transfer completed (synchronous mode only).
WHLLFTXSEGMENTEDTransfer completed with one or more segmented records (synchronous mode only).
WHLLSYSERRORThe method failed due to a system error.
WHLLTRANSABORTEDThe file transfer was aborted either by the user, or (if a timeout was set with SetSessionOptions(String, Int32%)) because the timeout period expired.
WHLLINVALIDFUNCTIONNUMInvalid function number.
WHLLFILENOTFOUNDPC file not found.
WHLLACCESSDENIEDAccess denied to PC file.
WHLLMEMORYInsufficient memory.
WHLLINVALIDENVIRONMENTInvalid environment.


Implements

IFileTransfer..::.Receive(String)

Remarks

The 'cmdline' string should contain the RECEIVE command parameters that you would normally enter at the TSO 'ready' prompt.

For example, to send the file SLR REPORT from the CMS host to a file named 'sales.rpt' on your PC, using a session with the ID of "E:"

PC_FILE ID:HOST FILE NAME (OPTIONS

SALES.RPT E:SLS REPORT (ASCII CRLF

Examples

Transfer a file named 'sales.rpt' from the to a CMS file 'SLS REPORT', using a session with ID 'E':
CopyC#
string cmdline = @"sales.rpt E:SLS REPORT (ASCII CRLR";
StatusCode code = Receive(cmdline);
if (code == WHLLFTXCOMPLETE)
{
    // transfer completed successfully
}
else
{
    ReportError(code);
}

See Also


Send comments on this topic to Jolly Giant Software

Copyright 2009 by Jolly Giant Software, Inc.

  • No labels