Purpose

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

Object Type

Client

Syntax

variable = CLIENT.GET(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 file to be sent from the kernel. If a full path name is not provided the kernel's working directory is used.

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

Remarks

CLIENT.GET() is a synonym or alias for CLIENT.SEND(). 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 send the file 6_2spec.doc residing in /temp/specification.doc on the kernel machine, and store it in c:\docs\6.2spec.doc on the Windows Client machine:

#RC = CLIENT.GET(“/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: When using the Open Client, if a file is sent to the client machine, the action may be prevented if the pop-ups are blocked by your browser. Ensure that pop-up blockers are configured to include Open Client in the exceptions list or disabled completely. Refer to your browser's documentation for more information about pop-up blockers.


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

Comment on this topic

Topic ID: 510105