ibm-information-center/dist/eclipse/plugins/i5OS.ic.dm_5.4.0.1/rbal3mcper.htm

106 lines
7.5 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="copyright" content="(C) Copyright IBM Corporation 2005" />
<meta name="DC.rights.owner" content="(C) Copyright IBM Corporation 2005" />
<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="Monitoring for copy errors" />
<meta name="abstract" content="When an error occurs, the escape message CPF2817 is sent to indicate many different error conditions." />
<meta name="description" content="When an error occurs, the escape message CPF2817 is sent to indicate many different error conditions." />
<meta name="DC.subject" content="copying file, monitoring, errors, copy command, Copy File (CPYF) command, CPYF (Copy File) command, escape message, copy errors, copy error, Copy from Query File (CPYFRMQRYF) command, closing, command, CL, CPYFRMQRYF (Copy from Query File), messages sent as tests, message, CPDxxxx, CPFxxxx, CPDxxxx message, CPFxxxx message, example, monitoring for from-file not found, error, copying files, for copy errors" />
<meta name="keywords" content="copying file, monitoring, errors, copy command, Copy File (CPYF) command, CPYF (Copy File) command, escape message, copy errors, copy error, Copy from Query File (CPYFRMQRYF) command, closing, command, CL, CPYFRMQRYF (Copy from Query File), messages sent as tests, message, CPDxxxx, CPFxxxx, CPDxxxx message, CPFxxxx message, example, monitoring for from-file not found, error, copying files, for copy errors" />
<meta name="DC.Relation" scheme="URI" content="rbal3bcfuc.htm" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbal3mcper" />
<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> Monitoring for copy errors</title>
</head>
<body id="rbal3mcper"><a name="rbal3mcper"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1"> Monitoring for copy errors</h1>
<div><p>When an error occurs, the escape message CPF2817 is sent to indicate
many different error conditions. </p>
<div class="p">Except for the empty from-file member case, which is described later, when
this message is sent: <ul><li>A physical file is not created (even if CRTFILE(*YES) was specified on
a copy command).</li>
<li>No members are added to a to-file that is a physical file.</li>
<li>No to-file member is cleared (even if MBROPT(*REPLACE) was specified).</li>
<li>The to-file is not opened, so no file is created on a diskette or tape
volume. If the to-file is spooled, no spooled file is created.</li>
<li>No records are copied.</li>
</ul>
</div>
<p><img src="./delta.gif" alt="Start of change" />The CPF2817 escape message is always preceded by at least
one diagnostic message that indicates the specific error condition. The message
identifier of the diagnostic message, which immediately precedes the CPF2817
escape message is used as message replacement data (MSGDTA parameter on the <a href="../cl/sndpgmmsg.htm">SNDPGMMSG</a> command)
for the CPF2817 escape message. This allows you to monitor for specific error
cases from the CPF2817 escape message by using the CMPDTA parameter on the <a href="../cl/monmsg.htm">MONMSG</a> command.<img src="./deltaend.gif" alt="End of change" /></p>
<div class="p">For example, message CPF2802 is a diagnostic message. It indicates that
the from-file cannot be found. You can monitor for just the <samp class="codeph">from-file
not found</samp> condition as follows: <pre>PGM
/* The replacement text of escape
CPF2817 contains the msg ID
CPF2802 for the 'from-file not
found' condition */
CPYF FROMFILE(NOLIB/NOFILE) TOFILE(D504/KEY) +
FROMMBR(NOMBR) TOMBR(MBR1) MBROPT(*ADD)
MONMSG MSGID(CPF2817) CMPDTA(CPF2802) +
EXEC(SNDPGMMSG TOPGMQ(*EXT) +
MSG('File NOFILE in NOLIB not found'))
ENDPGM</pre>
</div>
<p>Any error other than <samp class="codeph">from-file not found</samp>, including any
other error reported with a CPF2817 escape message, causes a check in this
program because the MONMSG command applies only to the CPF2817 escape message
when it has the compare data from message CPF2802.</p>
<p>If you are running the <a href="../cl/cpyfrmqryf.htm">CPYFRMQRYF</a> command, it does not normally close the open
query file after completing the copy. However, if you are running the CPYFRMQRYF
command from a command entry line, any error messages occurring after the <a href="../cl/opnqryf.htm">OPNQRYF</a> command
is successfully run will close the file unless you specified TYPE(*PERM) on
the OPNQRYF command. The server automatically runs a <a href="../cl/rclrsc.htm">Reclaim Resources (RCLRSC)</a> command if an error message
occurs. If the OPNQRYF command specified TYPE(*PERM), the server does not
automatically close the file.</p>
<p>The following messages can be sent as diagnostic messages, followed immediately
by a CPF2817 escape message. Some of these messages can also be sent as other
message types (such as an informational or escape message). When the message
is sent as a diagnostic message type, the message identifier appears in the
replacement text of the CPF2817 escape message. You can monitor the condition
by using the CMPDTA parameter on the <a href="../cl/monmsg.htm">MONMSG</a> command:</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="void" border="1" rules="rows"><tbody><tr><td align="left" valign="top" width="25%">CPD2807 CPD2808 CPD2809 CPD2810 CPD2811 CPD2812
CPD2825 CPD2968 CPD2969 CPD2970 CPD2971 CPD2972 CPD2973 CPD2974 CPD2975 CPD2976
CPD2979 CPD2980 CPD2981 CPF2801 CPF2802 CPF2803 CPF2804 CPF2805</td>
<td align="left" valign="top" width="25%">CPF2806 CPF2807 CPF2808 CPF2810 CPF2811 CPF2812
CPF2813 CPF2814 CPF2816 CPF2819 CPF2820 CPF2821 CPF2822 CPF2823 CPF2825 CPF2826
CPF2827 CPF2831 CPF2832 CPF2833 CPF2834 CPF2836 CPF2837 CPF2839</td>
<td align="left" valign="top" width="25%">CPF2840 CPF2841 CPF2842 CPF2843 CPF2844 CPF2847
CPF2848 CPF2849 CPF2851 CPF2853 CPF2854 CPF2855 CPF2856 CPF2857 CPF2860 CPF2861
CPF2862 CPF2863 CPF2864 CPF2865 CPF2868 CPF2869 CPF2870 CPF2871</td>
<td align="left" valign="top" width="25%">CPF2872 CPF2873 CPF2874 CPF2877 CPF2878 CPF2879
CPF2881 CPF2883 CPF2884 CPF2890 CPF2891 CPF2893 CPF2960 CPF2962 CPF2963 CPF2965
CPF2969 CPF9807 CPF9808 CPF9820 CPF9830</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal3bcfuc.htm" title="You can copy from a physical or logical database file, open query file, diskette file, tape file, or inline data file. The to-file can be a physical database file, diskette file, tape file, program-described printer file, or *PRINT.">Copy files: basic functions</a></div>
</div>
</div>
</body>
</html>