110 lines
6.5 KiB
HTML
110 lines
6.5 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 xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="dc.language" scheme="rfc1766" 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. -->
|
||
|
<meta name="dc.date" scheme="iso8601" content="2005-09-06" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<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))' />
|
||
|
<title>Printer file overrides</title>
|
||
|
<link rel="stylesheet" type="text/css" href="ibmidwb.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="ic.css" />
|
||
|
</head>
|
||
|
<body>
|
||
|
<a id="Top_Of_Page" name="Top_Of_Page"></a><!-- Java sync-link -->
|
||
|
<script language = "Javascript" src = "../rzahg/synch.js" type="text/javascript"></script>
|
||
|
|
||
|
|
||
|
<a name="rzaluoverride"></a>
|
||
|
<h4 id="rzaluoverride">Printer file overrides</h4>
|
||
|
<p>Overriding files (printer files, display files, diskette files, database
|
||
|
files, and tape files) can be done by commands, from CL programs, or from
|
||
|
high-level language programs. Overrides can be called from different levels
|
||
|
(programs calling another program). This page discusses overriding printer
|
||
|
files.</p>
|
||
|
<p>Overrides are used to temporarily specify a different printer file or temporarily
|
||
|
change some of the attributes of a file. An override is only active for the
|
||
|
current sign on session. As soon as you end your session or use the Delete
|
||
|
Override (DLTOVR) command, the override is no longer active.</p>
|
||
|
<p>Override commands can be entered interactively from a display station or
|
||
|
as part of a batch job. They might be included in a control language (CL)
|
||
|
program, or they might be issued from other programs through a call to the
|
||
|
program QCMDEXC. Regardless of how they are issued, overrides remain in effect
|
||
|
only for the job, program, or sign on session in which they are issued. Overrides
|
||
|
have no effect on other jobs that might be running at the same time.</p>
|
||
|
<p>Overrides are particularly useful for making minor changes to the way a
|
||
|
program functions or for selecting the data on which it operates, without
|
||
|
having to recompile the program. Their principal value is in allowing you
|
||
|
to use general purpose programs in a wider variety of circumstances. Examples
|
||
|
of items where overrides can be used are:</p>
|
||
|
<ul>
|
||
|
<li>Changing the name of the file to be processed</li>
|
||
|
<li>Indicating whether output is to be spooled</li>
|
||
|
<li>Changing printer characteristics such as lines per inch and number of
|
||
|
copies</li></ul>
|
||
|
<p>It is also possible to use overrides to direct data input or data that
|
||
|
is sent to a device of a different type. For example, sending data that is
|
||
|
intended for a diskette to a printer instead. This use of overrides requires
|
||
|
somewhat more foresight than the override applications listed above. The program
|
||
|
must be able to accommodate the different characteristics of the two devices
|
||
|
involved. For information about the special considerations that are required
|
||
|
for overrides that change the file type or redirect files, see the <a href="../dds/rbafpddsmain.htm">Distributed Data Management</a> topic.</p>
|
||
|
<p>Files are associated with an application program by the file names specified
|
||
|
in the program when it is created. You can override these file names or attributes
|
||
|
of a specified file when you compile a program or run a program. The system
|
||
|
supplies three override functions: applying overrides, deleting overrides,
|
||
|
and displaying overrides. You can process override functions for files using
|
||
|
the following CL commands:</p>
|
||
|
<ul>
|
||
|
<li><a href="../cl/ovrprtf.htm">OVRPRTF</a> (Override with Printer File)</li>
|
||
|
<li><a href="../cl/dltovr.htm">DLTOVR</a> (Delete Override)</li>
|
||
|
<li><a href="../cl/dspovr.htm">DSPOVR</a> (Display Override)</li></ul>
|
||
|
<p>You can use overrides to change most, but not all, of the file attributes
|
||
|
that are specified when the file is created. In some cases, you can specify
|
||
|
attributes in overrides that are not part of the original file definition.
|
||
|
Refer to the command descriptions for more information.</p>
|
||
|
<p>Overriding a file is different from changing a file in that an override
|
||
|
does not permanently change the attributes of a file. For example, if you
|
||
|
override the number of copies specified in a printer file by requesting six
|
||
|
copies instead of two, the file description for the printer file still specifies
|
||
|
two copies, but six copies are printed. The override command tells the system
|
||
|
which file to open and what its file attributes are.</p>
|
||
|
<p><span class="bold">CL program override considerations</span></p>
|
||
|
<p></p><blockquote>If a CL program overrides a file and then calls a high-level language
|
||
|
program, the override remains in effect for the high-level language program.
|
||
|
However, if a high-level language program calls a CL program that overrides
|
||
|
a file, the override is deleted automatically when control returns to the
|
||
|
high-level language program.
|
||
|
<p><span class="bold">High-level language program:</span></p>
|
||
|
<p></p>
|
||
|
<pre class="xmp">CALL CLPGM1</pre>
|
||
|
<p><span class="bold">CL program:</span></p>
|
||
|
<p></p>
|
||
|
<pre class="xmp">OVRPRTF FILE(PRTF1) TOFILE(MSTOUT)
|
||
|
.
|
||
|
.
|
||
|
.
|
||
|
ENDPGM</pre>
|
||
|
<p><span class="bold">High-level language program:</span></p>
|
||
|
<p></p>
|
||
|
<pre class="xmp">OPEN PRTF1</pre>
|
||
|
<p>The file opened is PRTF1, not MSTOUT. This is because
|
||
|
the override in the CL program is deleted when the CL program ends.</p></blockquote>
|
||
|
<p><span class="bold">Securing printer files</span></p>
|
||
|
<p></p><blockquote>You might want to prevent the person or program that calls your program
|
||
|
from changing the printer file names or parameters you have specified.
|
||
|
<p>You can prevent additional printer file overrides by specifying SECURE(*YES)
|
||
|
on the printer file override command for each printer file you want to protect
|
||
|
from overrides.</p></blockquote>
|
||
|
<a id="Bot_Of_Page" name="Bot_Of_Page"></a>
|
||
|
</body>
|
||
|
</html>
|