ibm-information-center/dist/eclipse/plugins/i5OS.ic.rbam6_5.4.0.1/wmddf.htm

180 lines
12 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="task" />
<meta name="DC.Title" content="Work with multiple device display files" />
<meta name="abstract" content="The normal mode of operation on a system is for the workstation user to sign on and become the requester for an interactive job. Many users can do this at the same time, because each will use a logical copy of the procedure, including the display file in the procedure. Each requester calls a separate job in this kind of use. This is not considered to be multiple device display use." />
<meta name="description" content="The normal mode of operation on a system is for the workstation user to sign on and become the requester for an interactive job. Many users can do this at the same time, because each will use a logical copy of the procedure, including the display file in the procedure. Each requester calls a separate job in this kind of use. This is not considered to be multiple device display use." />
<meta name="DC.subject" content="display file, using multiple device displays, ENDRCV (End Receive) command, multiple device display files, End Receive (ENDRCV) command, multiple device display files, command, CL, ENDRCV (End Receive), End Receive (ENDRCV), receive, ending, WAIT (Wait) command, Wait (WAIT) command, command, CL, WAIT (Wait) command, RCVF (Receive File) command, Receive File (RCVF) command, RCVF (Receive File), Receive File (RCVF), file, receiving, data, example, SNDF (Send File) command, canceling request for input, Send File (SNDF) command, SNDF (Send File), Send File (SNDF), sending, ENDRCV (End Receive) command, multiple device display files, ENDRCV (End Receive), End Receive (ENDRCV)" />
<meta name="keywords" content="display file, using multiple device displays, ENDRCV (End Receive) command, multiple device display files, End Receive (ENDRCV) command, multiple device display files, command, CL, ENDRCV (End Receive), End Receive (ENDRCV), receive, ending, WAIT (Wait) command, Wait (WAIT) command, command, CL, WAIT (Wait) command, RCVF (Receive File) command, Receive File (RCVF) command, RCVF (Receive File), Receive File (RCVF), file, receiving, data, example, SNDF (Send File) command, canceling request for input, Send File (SNDF) command, SNDF (Send File), Send File (SNDF), sending, ENDRCV (End Receive) command, multiple device display files, ENDRCV (End Receive), End Receive (ENDRCV)" />
<meta name="DC.Relation" scheme="URI" content="wfile.htm" />
<meta name="DC.Relation" scheme="URI" content="workv.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/wait.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/endrcv.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/sndf.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/rcvf.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/sndrcvf.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="wmddf" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Work with multiple device display files</title>
</head>
<body id="wmddf"><a name="wmddf"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Work with multiple device display files</h1>
<div><p>The normal mode of operation on a system is for the workstation
user to sign on and become the requester for an interactive job. Many users
can do this at the same time, because each will use a logical copy of the
procedure, including the display file in the procedure. Each requester calls
a separate job in this kind of use. This is not considered to be multiple
device display use.</p>
<div class="section"> <p>A multiple device display configuration occurs when a single
job called by one requester communicates with multiple display stations through
one display file. While only one display file can be handled by a CL procedure,
the display file, or different record formats within it, can be sent to several
device displays. Commands used primarily with multiple device display files
are:</p>
<dl><dt class="dlterm"><span class="cmdname">End Receive (ENDRCV)</span></dt>
<dd>This command cancels requests for input that have not been satisfied.</dd>
<dt class="dlterm"><span class="cmdname">Wait (WAIT)</span></dt>
<dd>Accepts input from any device display from which user data was requested
by one or more previous <span class="cmdname">Receive File (RCVF)</span> or SNDRCVF
commands when WAIT(*NO) was specified on the command, or by one or more previous <span class="cmdname">Send
File (SNDF)</span> commands to a record format containing the INVITE DDS
keyword.</dd>
</dl>
<p>If you use a multiple device display file, the device names
must be specified on the DEV parameter on the CRTDSPF command when the display
file is created, on the CHGDSPF command when the display file is changed,
or on an override command, and the number of devices must be less than or
equal to the number specified on the MAXDEV parameter on the CRTDSPF command.</p>
<p>Multiple
device display configurations affect the <span class="cmdname">Send/Receive File (SNDRCVF)</span> and
the RCVF commands and you may need to use the <span class="cmdname">Wait (WAIT)</span> or <span class="cmdname">End
Receive (ENDRCV)</span> commands. When an <span class="cmdname">Receive File (RCVF)</span> or <span class="cmdname">Send/Receive
File (SNDRCVF)</span> command is used with multiple display devices, the
default value WAIT(*YES) prevents further processing until an input-capable
field is returned to the program from the device named on the DEV parameter.
Because the response may be delayed, it is sometimes useful
to specify WAIT(*NO), thus letting your procedure or program continue running
other commands before the receive operation is satisfied.</p>
<p>If you use
an RCVF or <span class="cmdname">Send/Receive File (SNDRCVF)</span> command and specify
WAIT(*NO), the CL procedure or program continues running until a <span class="cmdname">Wait
(WAIT)</span> command is processed.</p>
<p>Using a <span class="cmdname">Send File (SNDF)</span> command
with a record format which has the DDS INVITE keyword is equivalent to using
a <span class="cmdname">Send/Receive File (SNDRCVF)</span> command with WAIT(*NO) specified.
The DDS INVITE keyword is ignored for <span class="cmdname">Send/Receive File (SNDRCVF)</span> and <span class="cmdname">Receive
File (RCVF)</span> commands.</p>
<p>The <span class="cmdname">Wait (WAIT)</span> command
must be issued to access a data record. If no data is available, processing
is suspended until data is received from a device display or until the time
limit specified in the WAITRCD parameter for the display file on the CRTDSPF,
CHGDSPF, or OVRDSPF commands has passed. If the time limit passes, message
CPF0889 is issued.</p>
<p>The <span class="cmdname">Wait (WAIT)</span> will also be satisfied
by the job being canceled with the controlled option on the ENDJOB, ENDSYS,
PWRDWNSYS, and ENDSBS commands. In this case, message CPF0888 is issued and
no data is returned. If a WAIT command is issued without a preceding receive
request (such as RCVF . . . WAIT(*NO)), a processing error occurs.</p>
<p>A
typical multiple device display configuration (with code) might look like
this:</p>
<br /><img src="rbafn506.gif" alt="Example of a typical multiple device display configuration (with code)." /><br /><p>In the above example, the
first two commands show a typical sequence in which the default is taken;
processing waits for the receive operation from WS2 to complete. Because
WS2 is specified on the DEV parameter, the RCVF command does not run until
WS2 responds, even if prior outstanding requests (not shown) from other stations
are satisfied.</p>
<p>The SNDRCVF command, however, has WAIT(*NO) specified
and so does not wait for a response from WS1. Instead, processing continues
and PROGA is called. Processing then stops at the WAIT command until an outstanding
request is satisfied by a workstation, or until the function reaches time-out.</p>
<p>The
WAIT command has the following format: </p>
<pre>WAIT DEV(CL-variable-name)</pre>
<p>If the DEV parameter is specified, the CL variable name is
the name of the device that responded. (The default is *NONE.) If there are
several receive requests (such as RCVF. . . WAIT(*NO)), this variable takes
the name of the first device to respond after the <span class="cmdname">Wait (WAIT)</span> command
is encountered and processing continues. The data received is placed in the
variable associated with the field in the device display.</p>
<p>A RCVF command
with WAIT(*YES) specified can be used to wait for data from a specific device.
The same record format name must be specified for both the operation that
started the receive request and the RCVF command.</p>
<p>In some cases, several
receive requests are outstanding, but processing cannot proceed further without
a reply from a specific device display. In the following example, three commands
specify WAIT(*NO), but processing cannot continue at label LOOP until WS3
replies: </p>
<pre> PGM
.
.
.
SNDF DEV(WS1) RCDFMT(ONE)
SNDF DEV(WS2) RCDFMT(TWO)
SNDRCVF DEV(WS3) RCDFMT(THREE) WAIT(*NO)
RCVF DEV(WS2) RCDFMT(TWO) WAIT(*NO)
RCVF DEV(WS1) RCDFMT(ONE) WAIT(*NO)
CALL...
CALL...
.
.
RCVF DEV(WS3) RCDFMT(THREE) WAIT(*YES)
LOOP: WAIT DEV(&amp;WSNAME)
MONMSG CPF0882 EXEC(GOTO REPLY)
.
.
.
GOTO LOOP
REPLY: CALL...
.
.
.
ENDPGM</pre>
<p>CL procedures and programs also support the <span class="cmdname">End Receive
(ENDRCV)</span> command, which lets you cancel a request for input that
has not yet been satisfied. A <span class="cmdname">Send File (SNDF)</span> or <span class="cmdname">Send/Receive
File (SNDRCVF)</span> command will also cancel a request for input that
has not yet been satisfied. However, if the data was available at the time
the <span class="cmdname">Send File (SNDF)</span> or <span class="cmdname">Send/Receive File (SNDRCVF)</span> command
was processed, message CPF0887 is sent. In this case the data must be received
with the WAIT command or <span class="cmdname">Receive File (RCVF)</span> command, or
the request must be explicitly canceled with a <span class="cmdname">End Receive (ENDRCV)</span> command
before the <span class="cmdname">Send File (SNDF)</span> or <span class="cmdname">Send/Receive File
(SNDRCVF)</span> command can be processed.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="wfile.htm" title="Two types of files are supported in CL procedures and programs: display files and database files.">Work with files in CL procedures</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="workv.htm" title="CL procedures consist of CL commands, and the commands themselves consist of the command statement, parameters, and parameter values.">Use variables</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../cl/wait.htm">Wait (WAIT) command</a></div>
<div><a href="../cl/endrcv.htm">End Receive (ENDRCV) command</a></div>
<div><a href="../cl/sndf.htm">Send File (SNDF) command</a></div>
<div><a href="../cl/rcvf.htm">Receive File (RCVF) command</a></div>
<div><a href="../cl/sndrcvf.htm">Send/Receive File (SNDRCVF) command</a></div>
</div>
</div>
</body>
</html>