116 lines
7.4 KiB
HTML
116 lines
7.4 KiB
HTML
|
<?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="Receive request messages" />
|
||
|
<meta name="abstract" content="Receiving request messages is a method for your CL procedure or program to process CL commands." />
|
||
|
<meta name="description" content="Receiving request messages is a method for your CL procedure or program to process CL commands." />
|
||
|
<meta name="DC.subject" content="request message, message, request" />
|
||
|
<meta name="keywords" content="request message, message, request" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rmclp.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="msgcl.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="mlogg.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="rqmsg" />
|
||
|
<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>Receive request messages</title>
|
||
|
</head>
|
||
|
<body id="rqmsg"><a name="rqmsg"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Receive request messages</h1>
|
||
|
<div><p>Receiving request messages is a method for your CL procedure or
|
||
|
program to process CL commands.</p>
|
||
|
<div class="section"> <p>For example, your procedure or program can obtain input (commands)
|
||
|
from a display station and handle the messages that result from the analysis
|
||
|
and processing of the input. The commands are sent as request messages so
|
||
|
they can be processed. Usually, request messages are received from the external
|
||
|
message queue (*EXT) of the job. For batch jobs, the requests received are
|
||
|
those read from the input stream. For interactive jobs, the requests received
|
||
|
are those the display station user enters one at a time on the Command Entry
|
||
|
display. For example, CL commands are requests that are received by the IBM-supplied
|
||
|
CL processor QCMD.</p>
|
||
|
<p>Your procedure or program must define the syntax
|
||
|
of the data in the request message, interpret the request, and diagnose any
|
||
|
errors. While the request is being analyzed or the request function is being
|
||
|
run, any number of errors can be detected. As a result of these errors, messages
|
||
|
are sent to the call message queue for the procedure or program. The procedure
|
||
|
or program handles these messages and then receives the next request message.
|
||
|
Thus, a request processing cycle is defined; a request message is received,
|
||
|
the request is analyzed and run by your procedure or program with resulting
|
||
|
messages displayed, and the next request received. If there are no more request
|
||
|
messages to be received in a batch job, an escape message is sent to your
|
||
|
procedure or program to indicate this.</p>
|
||
|
<p>More than one OPM program or
|
||
|
ILE procedure of a job can receive request messages for processing. The requests
|
||
|
received by more recent program calls are considered to be nested within those
|
||
|
received by higher level program calls. The request processing cycles at
|
||
|
each nesting level are independent of each other. Within an ILE program, one
|
||
|
or more procedures within that program can be receiving request messages.
|
||
|
If more than one procedure is processing requests then the nesting occurs
|
||
|
within the same ILE program and the nesting levels remain independent.</p>
|
||
|
<p>The
|
||
|
following diagram shows how request messages are processed by QCMD:</p>
|
||
|
<div class="fignone"><br /><img src="rslf166.gif" alt="REQTEXT" /><br /></div>
|
||
|
<dl><dt class="dlterm"><span>1</span></dt>
|
||
|
<dd>The CL processor QCMD receives a request message from *EXT.</dd>
|
||
|
<dt class="dlterm"><span>2</span></dt>
|
||
|
<dd>If there is no request message on *EXT, the Command Entry display is displayed.
|
||
|
The display station user enters a command on the display. When the command
|
||
|
is entered, it is placed on *EXT as a request message.</dd>
|
||
|
<dt class="dlterm"><span>3</span></dt>
|
||
|
<dd>Since step 2 placed a request on *EXT, now the RCVMSG in step 1 can continue.
|
||
|
The command is then moved to the QCMD call message queue and
|
||
|
is passed from there to QCMD to complete step 1.</dd>
|
||
|
<dt class="dlterm"><span>4</span></dt>
|
||
|
<dd>The command is analyzed and its command processing program (CPP) is called.</dd>
|
||
|
<dt class="dlterm"><span>5</span></dt>
|
||
|
<dd>The command processing program sends diagnostic messages to the call message
|
||
|
queue for QCMD.</dd>
|
||
|
<dt class="dlterm"><span>6</span></dt>
|
||
|
<dd>Then the command processing program sends an escape message to the call
|
||
|
message queue for QCMD. The escape message notifies QCMD that diagnostic
|
||
|
messages are on the queue and that QCMD should end processing of the CPP.</dd>
|
||
|
<dt class="dlterm"><span>7</span></dt>
|
||
|
<dd>QCMD is monitoring for the arrival of a request-check (CPF9901) or function-check
|
||
|
(CPF9999) escape message. QCMD then tries to receive the next request message.
|
||
|
<div class="note"><span class="notetitle">Note:</span> If a request processor receives message CPF9901 or CPF9999, it should
|
||
|
run a Reclaim Resources (RCLRSC) command. The request processor should also
|
||
|
monitor for messages CPF1907 (end request) and CPF2415 (which indicates that
|
||
|
the user pressed F3 or F12 on the Command Entry display).</div>
|
||
|
</dd>
|
||
|
<dt class="dlterm"><span>8</span></dt>
|
||
|
<dd>Because a request message was being processed, all the messages on the
|
||
|
call message queue for QCMD are written to the Command Entry display, which
|
||
|
then prompts the display station user for another command.</dd>
|
||
|
<dt class="dlterm"><span>9</span></dt>
|
||
|
<dd>The previous request message (command) and its associated messages are
|
||
|
contained in the job log according to the message logging level specified
|
||
|
for the job.</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rmclp.htm" title="You can use the Receive Message (RCVMSG) command to obtain a message from a message queue for your procedure or program. This topic includes general information on receiving messages and the details on receiving request messages and request processing programs.">Receive messages into a CL procedure or program</a></div>
|
||
|
</div>
|
||
|
<div class="reltasks"><strong>Related tasks</strong><br />
|
||
|
<div><a href="msgcl.htm" title="Various message types are described in this topic. Use the Send Program Message (SNDPGMMSG) command or the Send User Message (SNDUSRMSG) command to send a message from a CL procedure or program.">Send messages from a CL program</a></div>
|
||
|
<div><a href="mlogg.htm" title="There are two types of logs for messages: job logs and history logs.">Log messages</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|