ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzakj_5.4.0.1/rzakjdeciderestart.htm

87 lines
5.9 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="concept" />
<meta name="DC.Title" content="Example: Use a standard processing program to decide whether to restart the application" />
<meta name="abstract" content="This example is about a sample CL code for using a standard processing program to decide whether to restart an application after an abnormal IPL." />
<meta name="description" content="This example is about a sample CL code for using a standard processing program to decide whether to restart an application after an abnormal IPL." />
<meta name="DC.Relation" scheme="URI" content="rzakjproccprog.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakjstndcommit.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2004, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2004, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzakjdeciderestart" />
<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>Example: Use a standard processing program to decide whether to restart
the application</title>
</head>
<body id="rzakjdeciderestart"><a name="rzakjdeciderestart"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Example: Use a standard processing program to decide whether to restart
the application</h1>
<div><p>This example is about a sample CL code for using a standard processing
program to decide whether to restart an application after an abnormal IPL.</p>
<p>The initial program can call the standard commit processing program to
determine if it is necessary to start again. The workstation user can than
decide whether to start again.</p>
<p>The initial program passes a request code of S (search) to the standard
program, which searches for any record for the user. If a record exists, the
information for starting again is passed to the initial program and the information
is displayed to the workstation user.</p>
<p>The commit identification in the notify object contains information that
the initial program can display identifying what program needs to be started
again. For example, the last 50 characters of the commit identification can
be reserved to contain this information. In the application program, this
information can be in a compile time array and moved to the data structure
in an initialization step. Example: Code for a standard commit processing
program shows how to include this in the application program.</p>
<p>The following example shows an initial program, which determines
if a record exists in the notify object.</p>
<div class="section" id="rzakjdeciderestart__initialprgmexample"><a name="rzakjdeciderestart__initialprgmexample"><!-- --></a><h4 class="sectiontitle">Example: Initial program</h4><div class="note"><span class="notetitle">Note:</span> By
using the code example, you agree to the terms of the <a href="codedisclaimer.htm">Code license and disclaimer information</a>.</div>
<pre>SEQNBR *... ... 1 ... ... 2 ... ... 3 ... ... 4 ... ... 5 ... ... 6 ... ... 7
1.00 PGM
2.00 DCLF CMTINLD
3.00 DCL &amp;RQSCOD *CHAR LEN(1) VALUE(S) /* Search */
4.00 DCL &amp;RTNCOD *CHAR LEN(1)
5.00 DCL &amp;CMTID *CHAR LEN(220)
6.00 DCL &amp;USER *CHAR LEN(10)
7.00 DCL &amp;INFO *CHAR LEN(50)
8.00 RTVJOBA USER(&amp;USER)
9.00 CHGVAR &amp;CMTID (&amp;USER *CAT XX)
10.00 /* The XX is required to prevent a blank Pgm nam */
11.00 CALL STDCMT PARM(&amp;RQSCOD &amp;RTNCOD &amp;CMTID)
12.00 IF (&amp;RTNCOD *EQ '1') DO /* RESTART REQD */
13.00 CHGVAR &amp;INFO %SST(&amp;CMTID 171 50)
14.00 SNDRCVF RCDFMT(RESTART)
15.00 ENDDO
16.00 /* */
17.00 /* Enter normal initial program statements */
18.00 /* or -TFRCTL- to first menu program */
19.00 /* */
20.00 ENDPGM</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakjproccprog.htm" title="A standard processing program is one way to start your application again using one database file as the notify object for all applications. This approach assumes that user profile names are unique by user for all applications using the standard program.">Example: Use a standard processing program to start an application</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="rzakjstndcommit.htm" title="The standard commit (STDCMT) processing program performs the functions required to communicate with a single notify object used by all applications.">Example: Code for a standard commit processing program</a></div>
</div>
</div>
</body>
</html>