271 lines
13 KiB
HTML
271 lines
13 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="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="Comprehensive example: Display overrides" />
|
||
<meta name="DC.subject" content="Display Override (DSPOVR) command, functions example, DSPOVR (Display Override) command" />
|
||
<meta name="keywords" content="Display Override (DSPOVR) command, functions example, DSPOVR (Display Override) command" />
|
||
<meta name="DC.Relation" scheme="URI" content="rbal3diover.htm" />
|
||
<meta name="DC.Format" content="XHTML" />
|
||
<meta name="DC.Identifier" content="rbal3ovrds5" />
|
||
<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>Comprehensive example: Display overrides</title>
|
||
</head>
|
||
<body id="rbal3ovrds5"><a name="rbal3ovrds5"><!-- --></a>
|
||
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
<h1 class="topictitle1">Comprehensive example: Display overrides</h1>
|
||
<div><p>The following example is intended only to illustrate what the various forms
|
||
of the display override command can do. The <a href="../cl/dspovr.htm">DSPOVR</a> command is typically entered interactively or
|
||
added temporarily to a CL program, or to any high-level language program via
|
||
QCMDEXC, to verify that the proper overrides are in effect at the time a program
|
||
is called or a file is opened. Assume that commands 1, 2, 3, and 18 are entered
|
||
at call level 1.</p>
|
||
<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>
|
||
<div class="fignone"><span class="figcap">Figure 1. An example of displaying overrides</span>. <span class="figdesc">The example outlines
|
||
how to display overrides.</span><pre> Program A (in the user default activation group)
|
||
Command 1 OVRPRTF FILE(PRTA) COPIES(3)
|
||
Command 2 OVRDBF FILE(DBC) WAITFILE(*IMMED)
|
||
Command 3 CALL PGM(B)
|
||
|
||
Program B (in activation group 5)
|
||
Command 4 OVRPRTF FILE(PRTB) TOFILE(PRTA) COPIES(6) +
|
||
OVRSCOPE(*CALLLVL)
|
||
Command 5 OVRDBF FILE(DBC) WAITFILE(60) OVRSCOPE(*CALLLVL)
|
||
Command 6 OVRDBF FILE(DBE) TOFILE(DBF) OVRSCOPE(*JOB)
|
||
Command 7 DSPOVR FILE(PRTB) MRGOVR(*YES)
|
||
Command 8 CALL PGM(C)
|
||
|
||
Program C (in activation group 5)
|
||
Command 9 CALL PGM(QCMDEXC) PARM('OVRDSPF FILE(DSPE) +
|
||
TOFILE(DSPF) OVRSCOPE(*CALLLVL)' 50)
|
||
Command 10 OVRDBF FILE(DBC) TOFILE(DBD) OVRSCOPE(*CALLLVL)
|
||
Command 11 DSPOVR FILE(DBC) MRGOVR(*NO) LVL(3)
|
||
Command 12 DSPOVR FILE(DBD) MRGOVR(*NO) LVL(2)
|
||
Command 13 MONMSG MSGID(CPF9842)
|
||
Command 14 OVRDSPF FILE(CREDITS) TOFILE(DEBITS)
|
||
Command 15 CALL PGM(QCMDEXC) PARM('DSPOVR FILE(*ALL) MRGOVR(*YES) +
|
||
LVL(*) OUTPUT(*)' 47)
|
||
Command 16 RETURN
|
||
|
||
Command 17 DSPOVR FILE(*ALL) MRGOVR(*NO)
|
||
Command 18 RETURN
|
||
Command 19 DSPOVR FILE(*ALL) MRGOVR(*NO) LVL(2) OUTPUT(*)</pre>
|
||
</div>
|
||
<p>Command 1 overrides the value of the COPIES attribute of file PRTA at level
|
||
1 to 3.</p>
|
||
<p>Command 2 overrides the value of the WAITFILE attribute of file DBC at
|
||
level 1 to *IMMED.</p>
|
||
<p>Command 3 calls program A and creates a new call level, 2.</p>
|
||
<p>Command 4 causes an override at level 2 from file PRTB to file PRTA. Also,
|
||
the command overrides the value of the COPIES attribute to 6.</p>
|
||
<p>Command 5 overrides the the value of the WAITFILE attribute for file DBC
|
||
at level 2 to 60.</p>
|
||
<p>Command 6 causes an override of file DBE to file DBF and scopes the override
|
||
to the job level.</p>
|
||
<p>Command 7 displays a merged override for file PRTB at level 2 with text
|
||
descriptions of each keyword and parameter, as shown in <a href="#rbal3ovrds5__rbal3oprt">Figure 2</a>.
|
||
The to-file is PRTA because of command 4, and the COPIES attribute is 3 because
|
||
of command 1.</p>
|
||
<div class="fignone" id="rbal3ovrds5__rbal3oprt"><a name="rbal3ovrds5__rbal3oprt"><!-- --></a><span class="figcap">Figure 2. Override with printer file display</span>. <span class="figdesc">The
|
||
example describes the Display Override with Printer File command.</span><pre class="screen"> Display Override with Printer File
|
||
|
||
File . . . . . . . . . . . . . . : PRTB
|
||
Call level . . . . . . . . . . . : *
|
||
Merged . . . . . . . . . . . . . : *YES
|
||
|
||
Keyword Value
|
||
Name of file being overridden . . : FILE PRTB
|
||
Overriding to printer file . . . : TOFILE PRTA
|
||
Library . . . . . . . . . . . . . : *LIBL
|
||
Number of copies . . . . . . . . : COPIES 3
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
Press Enter to continue.
|
||
|
||
F3=Exit F12=Cancel
|
||
</pre>
|
||
</div>
|
||
<p>Command 8 calls program B and creates the new call level 3.</p>
|
||
<p>Command 9 causes an override at level 3 from file DSPE to file DSPF. An
|
||
override done via a call to the QCMDEXC program takes the call level of the
|
||
program that called the QCMDEXC program.</p>
|
||
<p>Command 10 causes an override of file DBC to file DBD.</p>
|
||
<p>Command 11 displays all overrides for file DBC from the job level to level
|
||
3, as shown in <a href="#rbal3ovrds5__rbal3allovr">Figure 3</a>. The overrides
|
||
specified by commands 10, 5, and 2 are displayed in keyword-parameter form.
|
||
Observe that this form of the DSPOVR command shows all the overrides for the
|
||
selected file, regardless of redirection. The three overrides that are shown
|
||
would not be merged because of the name change at level 3.</p>
|
||
<div class="fignone" id="rbal3ovrds5__rbal3allovr"><a name="rbal3ovrds5__rbal3allovr"><!-- --></a><span class="figcap">Figure 3. All file overrides display (one file)</span>. <span class="figdesc">The example describes the All File Overrides Display.</span><pre class="screen"> Display All File Overrides
|
||
|
||
Call level . . . . . . . . . . . : 3
|
||
|
||
Type options, press Enter.
|
||
5=Display override details
|
||
|
||
Opt File Level Type Keyword Specifications
|
||
_ DBC 3 DB TOFILE(*LIBL/DBD)
|
||
_ 2 DB WAITFILE(60)
|
||
_ 1 DB WAITFILE(*IMMED)
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
F3=Exit F5=Refresh F12=Cancel
|
||
</pre>
|
||
</div>
|
||
<p>Command 12 attempts to display all file overrides for file DBD from the
|
||
job level to level 2. Because no overrides for file DBD exist at levels 1
|
||
or 2, no overrides are displayed, and the override-not-found escape message
|
||
(<samp class="codeph">CPF9842</samp>) is sent.</p>
|
||
<p>Command 13 monitors for message <samp class="codeph">CPF9842</samp> on the preceding
|
||
command. The monitor specifies no action to be taken, but will prevent a function
|
||
check if the message is sent.</p>
|
||
<p>Command 14 causes an override of the display file CREDITS to the display
|
||
file DEBITS. The override is scoped to the activation group level of activation
|
||
group 5. OVRSCOPE(*ACTGRPDFN) is the default.</p>
|
||
<p>Command 15 displays the merged overrides at the job level to call level
|
||
3 for all files in keyword-parameter form, as shown in <a href="#rbal3ovrds5__rbal3allmrg">Figure 4</a>.
|
||
File DBC is overridden to file DBD because of command 10 (commands 5 and 2
|
||
are therefore not effective). File DSPE is overridden to file DSPF because
|
||
of command 9. File PRTB is overridden to file PRTA and COPIES(3) because of
|
||
commands 4 and 1. File DBE is overridden to file DBF because of command 6.
|
||
The file DEBITS overrides the file CREDITS because of command 14.</p>
|
||
<div class="fignone" id="rbal3ovrds5__rbal3allmrg"><a name="rbal3ovrds5__rbal3allmrg"><!-- --></a><span class="figcap">Figure 4. All merged file overrides display</span>. <span class="figdesc">The
|
||
example describes the All Merged File Overrides Display.</span><pre class="screen"> Display All Merged File Overrides
|
||
|
||
Call level . . . . . . . . . . . : *
|
||
|
||
Type options, press Enter.
|
||
5=Display override details 8=Display contributing file overrides
|
||
|
||
|
||
Opt File Type Keyword Specifications
|
||
_ DSPE DSP TOFILE(*LIBL/DSPF)
|
||
8 PRTB PRT TOFILE(*LIBL/PRTA) COPIES(3)
|
||
_ DBC DB TOFILE(*LIBL/DBD)
|
||
_ PRTA PRT COPIES(3)
|
||
_ DBE DB TOFILE(*LIBL/DBF)
|
||
_ CREDITS DSPF TOFILE(*LIBL/DEBITS)
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
F3=Exit F5=Refresh F11=All file overrides F12=Cancel
|
||
</pre>
|
||
</div>
|
||
<p>If you enter a 5 on the line for PRTB, you get a detail display like the
|
||
one shown in <a href="#rbal3ovrds5__rbal3oprt">Figure 2</a>. If you enter an
|
||
8 on this same line, you get a display showing commands 4 and 1 on separate
|
||
lines, as shown in <a href="#rbal3ovrds5__rbal3ovrcnt">Figure 5</a>. These are
|
||
the overrides that were merged to form the PRTB override.</p>
|
||
<div class="fignone" id="rbal3ovrds5__rbal3ovrcnt"><a name="rbal3ovrds5__rbal3ovrcnt"><!-- --></a><span class="figcap">Figure 5. Contribute file overrides display</span>. <span class="figdesc">The
|
||
example describes the Contributing File Overrides Display.</span><pre class="screen"> Display Contributing File Overrides
|
||
|
||
File . . . . . . . . . . . . . . : PRTB
|
||
Call level . . . . . . . . . . . : *
|
||
|
||
Type options, press Enter.
|
||
5=Display override details
|
||
|
||
Opt Level Type Keyword Specifications
|
||
_ 2 PRT TOFILE(*LIBL/PRTA) COPIES(6)
|
||
_ 1 PRT COPIES(3)
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
F3=Exit F5=Refresh F12=Cancel F14=Display previous override
|
||
</pre>
|
||
</div>
|
||
<p>Command 16 causes a return to level 2, and level 3 is deleted. The overrides
|
||
issued at level 3 that are scoped to the call level are implicitly deleted.
|
||
The override issued by command 14 is not deleted because it is scoped to the
|
||
activation group level.</p>
|
||
<p>Command 17 displays all overrides issued for the job level to the current
|
||
call level (level 2), as shown in <a href="#rbal3ovrds5__rbal3allovr1">Figure 6</a>.
|
||
The overrides specified in commands 1, 2, 4, 5, 6, and 14 display in keyword-parameter
|
||
form. The override issued in command 10 is not displayed because call level
|
||
3 is no longer active. Pressing F11 on this display allows you to see a display
|
||
that is similar to the one shown in <a href="#rbal3ovrds5__rbal3allmrg">Figure 4</a>.</p>
|
||
<div class="fignone" id="rbal3ovrds5__rbal3allovr1"><a name="rbal3ovrds5__rbal3allovr1"><!-- --></a><span class="figcap">Figure 6. All file overrides display (all files)</span>. <span class="figdesc">The example describes the All File Overrides Display.</span><pre class="screen"> Display All File Overrides
|
||
|
||
Call level . . . . . . . . . . . : *
|
||
|
||
Type options, press Enter.
|
||
5=Display override details
|
||
|
||
Opt File Level Type Keyword Specifications
|
||
_ CREDITS *ACTGRP PRT TOFILE(*LIBL/DEBITS)
|
||
_ PRTB 2 PRT TOFILE(*LIBL/PRTA) COPIES(6)
|
||
_ DBC 2 DB WAITFILE(60)
|
||
_ 1 DB WAITFILE(*IMMED)
|
||
_ PRTA 1 PRT COPIES(3)
|
||
_ DBE *JOB DB TOFILE(*LIBL/DBF)
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
F3=Exit F5=Refresh F11=All merged file overrides F12=Cancel
|
||
</pre>
|
||
</div>
|
||
<p>Command 18 causes a return to level 1, and level 2 is deleted. The overrides
|
||
issued at level 2 that are scoped to the call level are implicitly deleted.
|
||
The override that is caused by command 14 (scoped to the activation group
|
||
level) is implicitly deleted when activation group 5 ends. In this example,
|
||
assume that activation group 5 is a nonpersistent activation group and that
|
||
ends when command 18 processes. The override caused by command 6 is not deleted.</p>
|
||
<p>Command 19 displays all overrides for the job level to call level 2 in
|
||
keyword-parameter form. Because level 2 is no longer active, only the overrides
|
||
scoped to the job level (command 6) and those specified at level 1 in commands
|
||
1 and 2 are displayed.</p>
|
||
</div>
|
||
<div>
|
||
<div class="familylinks">
|
||
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal3diover.htm" title="You can use the Display Override (DSPOVR) command to display file overrides at the job level, the activation group level, and at multiple call levels for a job. You can display all file overrides or overrides for a specific file.">Display overrides</a></div>
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html> |