Where allowed to run:
|
Parameters Examples Error messages |
The End Receive (ENDRCV) command is used to end (cancel) a request for input made by a previously issued RCVF or 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.
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
DEV | Display device | Name, *FILE | Optional, Positional 1 |
OPNID | Open file identifier | Simple name, *NONE | Optional |
Top |
Specifies the name of the display device for which the request for input is to be ended.
Top |
Specifies the open file identifier that was declared on a preceding Declare File (DCLF) command in the same CL procedure. A CL variable cannot be specified for this parameter value.
Top |
Example 1: Ending Previous Receive
ENDRCV DEV(MYDISPLAY)
Assume that a RCVF command with WAIT(*NO) was issued earlier in the CL procedure 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.
Example 2: Using an Open File Identifier
DCLF FILE(MYLIB/MYDSPFILE) RCDFMT(FMT1) OPNID(DSPFILE1) : SNDRCVF DEV(DSP02) RCDFMT(FMT1) OPNID(DSPFILE1) WAIT(*YES) : ENDRCV DEV(DSP02) OPNID(DSPFILE1)
This command ends the previous SNDRCVF (Send/Receive File) command's request for input from a workstation display device DSP02.
Top |
*ESCAPE Messages
Top |