108 lines
7.1 KiB
HTML
108 lines
7.1 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="reference" />
|
|
<meta name="DC.Title" content="Typical errors when using the Open Query File (OPNQRYF) command" />
|
|
<meta name="abstract" content="You must specify several functions correctly for the Open Query File (OPNQRYF) command and your program to get the correct results." />
|
|
<meta name="description" content="You must specify several functions correctly for the Open Query File (OPNQRYF) command and your program to get the correct results." />
|
|
<meta name="DC.subject" content="Open Query File (OPNQRYF) command, using, typical errors, OPNQRYF (Open Query File) command, typical errors" />
|
|
<meta name="keywords" content="Open Query File (OPNQRYF) command, using, typical errors, OPNQRYF (Open Query File) command, typical errors" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafoopnqf.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rbafoopnerr" />
|
|
<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>Typical errors when using the Open Query File (OPNQRYF) command</title>
|
|
</head>
|
|
<body id="rbafoopnerr"><a name="rbafoopnerr"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Typical errors when using the Open Query File (OPNQRYF) command</h1>
|
|
<div><p>You must specify several functions correctly for the Open Query
|
|
File (OPNQRYF) command and your program to get the correct results.</p>
|
|
<div class="section"><p>The Display Job (DSPJOB) command is your most useful tool if problems
|
|
occur. This command supports both the open files option and the file overrides
|
|
option. You can look at both options if you are having problems.</p>
|
|
<div class="p">Listed
|
|
here are the most common problems you might encounter when using
|
|
the OPNQRYF command and the ways to correct them: <ul><li>Shared open data path (ODP). The OPNQRYF command operates through a shared
|
|
ODP. In order for the file to process correctly, the member must be opened
|
|
for a shared ODP. If you are having problems, use the open files option on
|
|
the DSPJOB command to determine if the member is opened and has a shared ODP. <div class="p">There
|
|
are normally two reasons that the file is not open: <ul><li>The member to be processed must be SHARE(*YES). Either use an Override
|
|
with Database File (OVRDBF) command or permanently change the member.</li>
|
|
<li>The file is closed. You have run the OPNQRYF command with the OPNSCOPE(*ACTGRPDFN)
|
|
or TYPE(*NORMAL) parameter option from a program that was running in the default
|
|
activation group at a higher level in the call stack than the program that
|
|
is getting an error message or that is running the Reclaim Resources (RCLRSC)
|
|
command. This closes the open query file because it was opened from a program
|
|
at a higher level in the call stack than the program that ran the RCLRSC command.
|
|
If the open query file was closed, you must run the OPNQRYF command again.
|
|
Note that when using the OPNQRYF command with the TYPE(*NORMAL) parameter
|
|
option on releases prior to Version 2 Release 3, the open query file is closed
|
|
even if it was opened from the same program that reclaims the resources.</li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
<li>Level check. Level checking is normally used because it ensures that your
|
|
program is running against the same record format that the program was compiled
|
|
with. If you are experiencing level check problems, it is normally because
|
|
of one of the following reasons: <ul><li>The record format was changed since the program was created. Creating
|
|
the program again should correct the problem.</li>
|
|
<li>An override is directing the program to an incorrect file. Use the file
|
|
overrides option on the DSPJOB command to ensure that the overrides are correctly
|
|
specified.</li>
|
|
<li>The FORMAT parameter is needed but is either not specified or incorrectly
|
|
specified. When a file is processed with the FORMAT parameter, you must ensure: <ul><li>The OVRDBF command, used with the TOFILE parameter, describes the first
|
|
file on the FILE parameter of the OPNQRYF command.</li>
|
|
<li>The FORMAT parameter identifies the file that contains the format used
|
|
to create the program.</li>
|
|
</ul>
|
|
</li>
|
|
<li>The FORMAT parameter is used to process a format from a different file
|
|
(for example, for group processing), but SHARE(*YES) was not requested on
|
|
the OVRDBF command.</li>
|
|
</ul>
|
|
</li>
|
|
<li>The file to be processed is at end of file. The normal use of the OPNQRYF
|
|
command is to process a file sequentially where you can only process the file
|
|
once. At that point, the position of the file is at the end of the file and
|
|
you will not receive any records if you attempt to process it again. To process
|
|
the file again from the start, you must either run the OPNQRYF command again
|
|
or reposition the file before processing. You can reposition the file by using
|
|
the Position Database File (POSDBF) command, or through a high-level language
|
|
program statement.</li>
|
|
<li>No records exist. This can be caused when you use the FORMAT keyword,
|
|
but do not specify the OVRDBF command.</li>
|
|
<li>Syntax errors. The system found an error in the specification of the OPNQRYF
|
|
command.</li>
|
|
<li>Operation not valid. The definition of the query does not include the
|
|
KEYFLD parameter, but the high-level language program attempts to read the
|
|
query file using a key field.</li>
|
|
<li>Get option not valid. The high-level language program attempted to read
|
|
a record or set a record position before the current record position, and
|
|
the query file used either the group by option, the unique key option, or
|
|
the distinct option on the SQL statement.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafoopnqf.htm" title="The Open Query File (OPNQRYF) command is a control language (CL) command that allows you to perform many data processing functions on database files. These topics discuss how to create a query using the OPNQRYF command, how to specify parameters for its major functions, and how to use it with your high-level language program.">Use Open Query File (OPNQRYF) command</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |