ENDRCV (End Receive)

ENDRCV syntax diagram

 

Purpose

The End Receive (ENDRCV) command is used to end (cancel) a request for input made by a previously issued Receive File (RCVF) or Send/Receive File (SNDRCVF) command that had WAIT(*NO) specified. The ENDRCV command ends an input request even if the user enters the requested data at the display station at the same time that the command is processed. If the requested data is entered and is being sent to the program when the end receive operation is performed, the entered data is lost. If there is no outstanding input request, the command is ignored.

Restriction: This command is valid only for display files within CL programs. It cannot be used for database files.

 

Optional Parameters

DEV
Specifies the name of the display device for which the request for input is being ended.

*FILE: The name of the device having the response from it ended is contained in the device file that was declared in the FILE parameter of the Declare File (DCLF) command. If the device file has more than one device name specified in it, *FILE cannot be specified.

device-name: Specify the name of the display device from which a response is being ended.

Example for ENDRCV

ENDRCV   DEV(MYDISPLAY)

Assume that a RCVF command with WAIT(*NO) was issued earlier in the CL program to request input from the device file declared earlier in the DCLF command and from the display device MYDISPLAY. When this ENDRCV command is processed, that request for input from MYDISPLAY is ended.

Error messages for ENDRCV

*ESCAPE Messages

CPF0883
*FILE not valid in DEV parameter for file &1.
CPF4101
File &2 in library &3 not found or inline data file missing.