ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaiu_5.4.0.1/rzaiusavecomplete.htm

74 lines
4.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="concept" />
<meta name="DC.Title" content="Retrieve the device name from save completion messages" />
<meta name="DC.Relation" scheme="URI" content="rzaiuprogramming.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="savecomplete" />
<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>Retrieve the device name from save completion messages</title>
</head>
<body id="savecomplete"><a name="savecomplete"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Retrieve the device name from save completion messages</h1>
<div><p>The CL program retrieves the device name from the CPC3701 message (found
in positions 126 through 135 of the message data) and uses the information
to determine which device is used by the next save command.</p>
<pre>SEQNBR *... ... 1 ... ... 2 ... ... 3 ... ... 4 ... ... 5 ... ... 6 ... ... 7
1.00 PGM
2.00 DCL &amp;MSGDATA *CHAR LEN(250)
3.00 DCL &amp;MSGID *CHAR LEN(7)
4.00 DCL &amp;DEV *CHAR LEN(10)
5.00 DCL &amp;DEV1 *CHAR LEN(10) VALUE(TAP01)
6.00 DCL &amp;DEV2 *CHAR LEN(10) VALUE(TAP02)
7.00 SAVLIB LIB(LIB1) DEV(&amp;DEV1 &amp;DEV2) ENDOPT(*LEAVE)
8.00 L00P: RCVMSG RMV(*NO) MSGDTA(&amp;MSGDATA) MSGID(&amp;MSGID)
9.00 IF (&amp;MSGID *NE CPC3701) GOTO L00P /* Compltn */
10.00 CHGVAR &amp;DEV %SST(&amp;MSGDATA 126 10) /* Device name */
11.00 IF (&amp;DEV *EQ 'TAP01') DO /* Last was TAP01 */
12.00 CHGVAR &amp;DEV1 'TAP01' /* Set for first device */
13.00 CHGVAR &amp;DEV2 'TAP02' /* Set for second device */
14.00 ENDDO /* Last was TAP01 */
15.00 ELSE DO /* Last was not TAP01 */
16.00 CHGVAR &amp;DEV1 'TAP02' /* Set for first device */
17.00 CHGVAR &amp;DEV2 'TAP01' /* Set for second device */
18.00 ENDDO /* Last was not TAP01 */
19.00 SAVLIB LIB(LIB2) DEV(&amp;DEV1 &amp;DEV2) /* Save Lib 2 */
20.00 ENDPGM</pre>
<p>If any objects cannot be saved, the operation attempts to save remaining
objects and sends an escape message (CPF3771 for single libraries, CPF3751/CPF3778
for more than one library, and CPF3701 for save operations to save files)
stating how many objects were saved and how many were not. To continue with
the next library, the Monitor Message (MONMSG) command must be used to handle
the escape condition. The format of the message data for the CPF3771 message
is similar to the CPC3701 message and also identifies the last device used.</p>
<p>The SAVCHGOBJ command operates in a similar manner, but uses CPC3704 as
a completion message, CPF3774 as an escape message for single libraries, and
CPC3721 or CPF3751 for multiple libraries. For save operations to save files,
these messages are CPC3723 as a completion message and CPF3702 as an escape
message. These messages also contain the last device or save file used in
the message data.</p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaiuprogramming.htm">Backup programming techniques</a></div>
</div>
</div>
</body>
</html>