Purpose

.Receive() sends a file from the Windows Client to the kernel and stores it on the kernel machine.

Object Type

Client

Syntax

Variable = CLIENT.RECEIVE(ServerStorage, ClientStorage)

Elements:

Variable is a numeric variable that captures the return code.

ServerStorage is an alpha literal or variable. It refers to the path and name of the incoming file on the kernel. If a full path name is not provided the kernel's working directory is use.

ClientStorage is an alpha literal or variable. It refers to the path and name of the file to be sent from the client. If a full path name is not provided the client's working directory is used.

Remarks

CLIENT.RECEIVE() is a synonym or alias for CLIENT.PUT(). The methods have the same functionality.

The execution is always synchronous. The kernel sends the file to the Windows Client. The client receives the file in chunks and stores it in the specified location. After the file transfer has completed, execution continues.

The file is transferred byte by byte, without any codeset or line termination translation. This is similar to a binary mode FTP transfer, although the FTP protocol is not used.

Logical file names can be used for both kernel-side and client-side file names. Kernel-side logical file names are defined in the master pro4v[n].ini file. Client-side logical file names are defined in the Application Definitions File.

The return code indicates success or failure. All errors are reported as PROIV errors and are written in @ERR (the error number) and @ERRTEXT. The name of the file that caused the error is written into @ERRARGS.

Examples

To receive the file 6_2spec.doc residing in c:\docs on the Windows Client machine, and store it in /temp/specification.doc on the kernel machine:

#RC = CLIENT.RECEIVE("/temp/specification.doc", "c:\docs\6.2spec.doc")


Warning: There is no safeguard against sending, receiving or overwriting system files or other critical files.

Note: Note: The CLIENT.RECEIVE() method works differently when using PROIV Open Client. Click here for more information.

 

Comment on this topic

Topic ID: 510024

Table of Contents

Index

Glossary

-Search-

Back