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

83 lines
6.6 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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="Secure files against overrides" />
<meta name="abstract" content="On occasion, you might want to prevent the person or program that calls your program from changing the file names or attributes you have specified. You can prevent additional file overrides by coding the SECURE(*YES) parameter on a file override command for each file that needs protection. This protects your file from overrides at lower call levels, the activation group level, and the job level." />
<meta name="description" content="On occasion, you might want to prevent the person or program that calls your program from changing the file names or attributes you have specified. You can prevent additional file overrides by coding the SECURE(*YES) parameter on a file override command for each file that needs protection. This protects your file from overrides at lower call levels, the activation group level, and the job level." />
<meta name="DC.subject" content="file, securing overrides, HLL (high-level language), programs, performing override, securing, file example (overrides), example, securing file, overriding file, preventing, parameter, SECURE(*YES), SECURE parameter, *YES value, override protection" />
<meta name="keywords" content="file, securing overrides, HLL (high-level language), programs, performing override, securing, file example (overrides), example, securing file, overriding file, preventing, parameter, SECURE(*YES), SECURE parameter, *YES value, override protection" />
<meta name="DC.Relation" scheme="URI" content="rbal3applyovr.htm" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbal3secrf" />
<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>Secure files against overrides</title>
</head>
<body id="rbal3secrf"><a name="rbal3secrf"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Secure files against overrides</h1>
<div><p>On occasion, you might want to prevent the person or program that
calls your program from changing the file names or attributes you have specified.
You can prevent additional file overrides by coding the SECURE(*YES) parameter
on a file override command for each file that needs protection. This protects
your file from overrides at lower call levels, the activation group level,
and the job level.</p>
<p><img src="./delta.gif" alt="Start of change" />The following example shows how to prevent
a person or program from changing the names or attributes of your file.<img src="./deltaend.gif" alt="End of change" /></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 a protected file</span>. <span class="figdesc">A protected file is
used to prevent a person or program from changing the file names or attributes
you have specified on that file.</span><p>Override 1    <samp class="codeph">OVRPRTF FILE(PRINT1) SPOOL(*NO)</samp><br />
<br />
Override 2    <samp class="codeph">OVRDBF FILE(NEWEMP) TOFILE(OLDEMP) +</samp><br />
                       <samp class="codeph">MBR(N67)</samp><br />
                  <samp class="codeph">CALL PGM(CHECK)</samp><br />
<br />
                       Program CHECK<br />
Override 3        <samp class="codeph">OVRDBF FILE(INPUT) +</samp><br />
                          <samp class="codeph">TOFILE(NEWEMP) MBR(N77) +</samp><br />
                          <samp class="codeph">SECURE(*YES)</samp><br />
                       <samp class="codeph">CALL PGM(EREPORT)</samp><br />
<br />
                              Program EREPORT<br />
                              (NEWEMP and PRINT1 are opened.)<br />
<br />
Override 4        <samp class="codeph">OVRDBF FILE(INPUT) +</samp><br />
                          <samp class="codeph">TOFILE(NEWEMP) MBR(N77)</samp><br />
                      <samp class="codeph">CALL PGM(ELIST)</samp><br />
<br />
                            Program ELIST<br />
                            (OLDEMP and PRINT1 are opened.)</p>
</div>
<p>When the example calls program EREPORT, it attempts to open the files INPUT
and PRINT1. EREPORT actually opens file NEWEMP, member N77. Because override
3 specifies SECURE(*YES), the server does not apply override 2. When the example
calls program ELIST, it also attempts to open the files INPUT and PRINT1.
ELIST actually opens files OLDEMP, member N67. Because override 4 has the
same name as override 3 and is at the same call level as override 3, it replaces
override 3. Thus, the file is no longer protected from overrides at lower
call levels, and the server applies override 2 for program ELIST.</p>
<p>PRINT1 is affected only by override 1, which is in effect for both programs
EREPORT and ELIST.</p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal3applyovr.htm" title="You can perform two general types of overrides, which are file overrides and overrides for program device entries.">Apply overrides</a></div>
</div>
</div>
</body>
</html>