67 lines
4.6 KiB
HTML
67 lines
4.6 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="topic" />
|
||
|
<meta name="DC.Title" content="Example: Find the queries that accessed a specific file" />
|
||
|
<meta name="abstract" content="This example illustrates how to find queries that accessed a specified file." />
|
||
|
<meta name="description" content="This example illustrates how to find queries that accessed a specified file." />
|
||
|
<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="examplefindingthequeriesthataccessedaspecificfile" />
|
||
|
<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>Example: Find the queries that accessed a specific file</title>
|
||
|
</head>
|
||
|
<body id="examplefindingthequeriesthataccessedaspecificfile"><a name="examplefindingthequeriesthataccessedaspecificfile"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Example: Find the queries that accessed a specific file</h1>
|
||
|
<div><p>This example illustrates how to find queries that accessed a specified file. </p>
|
||
|
<div class="note"><span class="notetitle">Note:</span> By using the code examples, you agree to the terms of the <a href="codedisclaimer.htm">Code license and disclaimer information</a>.</div>
|
||
|
<div class="p"><pre>GETQRY
|
||
|
PGM PARM(&LIBRARY &FILE)
|
||
|
DCL VAR(&LIBRARY) TYPE(*CHAR) LEN(10)
|
||
|
DCL VAR(&FILE) TYPE(*CHAR) LEN(10)
|
||
|
DCLF FILE(QTEMP/QRYOBJS)
|
||
|
DLTF FILE(QTEMP/QRYOBJS)
|
||
|
MONMSG CPF0000
|
||
|
DLTF FILE(QTEMP/&LIBRARY)
|
||
|
MONMSG CPF0000
|
||
|
CRTSRCPF FILE(QTEMP/&LIBRARY)
|
||
|
DSPOBJD OBJ(&LIBRARY/*ALL) OBJTYPE(*QRYDFN) +
|
||
|
DETAIL(*FULL) OUTPUT(*OUTFILE) +
|
||
|
OUTFILE(QTEMP/QRYOBJS)
|
||
|
BEGIN: RCVF /* GET QUERY NAME AND LIBRARY NAME */
|
||
|
/* IF END OF FILE REACHED, EXIT LOOP */
|
||
|
MONMSG CPF0864 EXEC(GOTO EOF)
|
||
|
RTVQMQRY QMQRY(&OLDBNM/&ODOBNM) +
|
||
|
SRCFILE(QTEMP/&LIBRARY) ALWQRYDFN(*ONLY)
|
||
|
GOTO CMDLBL(BEGIN)
|
||
|
EOF: FNDSTRPDM STRING(&FILE) FILE(QTEMP/&LIBRARY)
|
||
|
MBR(*ALL) OPTION(*NONE) PRTMBRLIST(*YES)
|
||
|
ENDPGM </pre>
|
||
|
<div class="note"><span class="notetitle">Note:</span> To create an output file in QTEMP, use the Display Object Description (DSPOBJD) command. While in programming development manager (PDM), press CMD18 to change defaults, and change the Compile in Batch option to N. Compile GETQRY. Then set the compile option default back to Y.<pre>GETQRYPRM
|
||
|
PGM PARM(&LIBRARY &FILE)
|
||
|
DCL VAR(&LIBRARY) TYPE(*CHAR) LEN(10)
|
||
|
DCL VAR(&FILE) TYPE(*CHAR) LEN(10)
|
||
|
SBMJOB CMD(CALL PGM(GETQRY) PARM(&LIBRARY &FILE))
|
||
|
ENDPGM
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
<p>Compile program GETQRYPRM.</p>
|
||
|
</div>
|
||
|
|
||
|
</body>
|
||
|
</html>
|