<html>
<body>
<font size=3>I've done it by reading a dummy key from a second file to
force the Find procedure to fail.&nbsp; The routine below skips
Emp-Security-Table records if they are already displayed by doing a Get
on Sub-Code-Dummy, a real code table in the application that hardly ever
is written to.&nbsp; The Get attempts to find a key that is not in the
code table, &quot;DUMMY&quot;, and&nbsp; when it's not found, everything
retrieved within the scope of the For Missing is abandoned, and the Find
procedure moves to the next record of Emp-Security-Table.<br><br>
<br><br>
</font><font face="Courier New, Courier" size=2>FILE EMP-SECURITY-TABLE
OCCURS 17 &amp;<br>
&nbsp;&nbsp; PRIMARY &amp;<br>
&nbsp;&nbsp; CACHE &amp;<br>
&nbsp;&nbsp; OPEN 1 READ CLOSE<br>
&nbsp;&nbsp; ACCESS VIAINDEX EMP-SECURITY-KEY USING TC-SURNAME<br>
&nbsp;&nbsp; SELECT IF WLOC-CODE OF EMP-SECURITY-TABLE = TC-WLOC-CODE
&amp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OR TC-WLOC-CODE = &quot;@&quot;<br><br>
FILE SUB_CODE_TBL ALIAS SUB_CODE_DUMMY &amp;<br>
&nbsp;&nbsp; DESIGNER &amp;<br>
&nbsp;&nbsp; OPEN 1 READ CLOSE<br><br>
</font><font size=3>====================================<br><br>
</font><font face="Courier New, Courier" size=2>PROCEDURE FIND<br>
BEGIN<br>
&nbsp;&nbsp; ; This temp is used to test for duplicates... we do not want
to<br>
&nbsp;&nbsp; ; display the same employee twice, even though they may have
more<br>
&nbsp;&nbsp; ; than one record in emp-security-table.<br>
&nbsp;&nbsp; LET TC-SV-EMP-NO = &quot;&quot;<br>
&nbsp;&nbsp; FOR MISSING EMP-SECURITY-TABLE<br>
&nbsp;&nbsp; BEGIN<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GET EMP-SECURITY-TABLE VIAINDEX
EMP-SECURITY-KEY USING TC-SURNAME OPT<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF ACCESSOK<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; THEN BEGIN<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Now test if this
record matches the passed employee type. If not the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; correct type, force
find to fail by doing a get we know will fail<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LET TB-EMP-TYPE-FOUND =
FALSE<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DO INTERNAL
G010-TEST-TYPE<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Do not display if
employee is not the correct type or they are<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; already
displayed.&nbsp; IF they meet this test and are displayed,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; save their emp-no to
test against the next possibility.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF TB-EMP-TYPE-FOUND =
FALSE &amp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
OR TC-SV-EMP-NO = EMP-NO OF EMP-SECURITY-TABLE<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; THEN
GET SUB_CODE_DUMMY VIAINDEX SUB_CODE_KEY USING &quot;DUMMY&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ELSE
LET TC-SV-EMP-NO = EMP-NO OF EMP-SECURITY-TABLE<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>
&nbsp;&nbsp; END<br>
END<br><br>
<br><br>
<br><br>
<br><br>
</font><font size=3>At 09:03 PM 08/20/2006, fernando.olmos@hpa.com.au
wrote:<br>
<blockquote type=cite class=cite cite="">Content-Class:
urn:content-classes:message<br>
Content-Type: multipart/alternative;<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>
boundary=&quot;----_=_NextPart_001_01C6C4D6.C416C580&quot;<br><br>
</font><font size=2>Hi everyone.</font><font size=3> <br><br>
</font><font size=2>How is it possible, with logic, to be able to ignore
the occurrence of a record being retrieved into a cluster, within a FIND
procedure?<br>
</font><font size=3><br>
</font><font size=2>Obviously the ACCESS and SELECT clauses at the FILE
definition level is the quick answer, but what if you require complex
logic to determine, based on details records, whether a record in a
cluster should be included or not ?<br>
</font><font size=3><br>
</font><font size=2>i.e. Here is the rows on my screen
...</font><font size=3> <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font size=2>Account
Number&nbsp; Name</font><font size=3> <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</font><font size=2>
1234&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Customer A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- this customer has 20 detail
records where all records are not invoiced<br>
</font><font size=3><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</font><font size=2>
1235&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Customer B&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- this customer has 10 detail
records (orders) where 9 of 10 are flagged as invoiced and the last rec
is not invoiced<br>
</font><font size=3><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</font><font size=2>
1236&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Customer C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- this customer has 5 detail
records where all records are invoiced.</font><font size=3> <br><br>
</font><font size=2>I want to use some logic to only display CUSTOMER B
in the cluster, on the screen.</font><font size=3> <br><br>
</font><font size=4 color="#0000FF"><i>Fernando
Olmos</i></font><font size=3> <br>
</font><font size=2><b>MIS</b></font><font size=3> <br>
</font><font size=2><b>Senior Analyst Programmer</b></font><font size=3>
<br><br>
</font><font size=2 color="#0000FF"><b>HPA</b></font><font size=3><br>
</font><font size=2>Direct:&nbsp; 03 9217 5411</font><font size=3><br>
</font><font size=2>Mobile: 0410 382 857</font><font size=3><br>
</font><font size=2>Fax:&nbsp;&nbsp;&nbsp;&nbsp; 03 9217
5716</font><font size=3> <br><br>
</font><font size=2 color="#0000FF"><b><u>
<a href="file:///H:/Appdata/Microsoft/Signatures/www.hpa.com.au">
www.hpa.com.au</a></u></b></font><font size=3> <br><br>
<br>
</font><pre>
**********************************************************************
IMPORTANT
The contents of this e-mail and its attachments are confidential and
intended
solely for the use of the individual or entity to whom they are
addressed.&nbsp; If
you received this e-mail in error, please notify the HPA Postmaster,
postmaster@hpa.com.au,
then delete&nbsp; the e-mail.
This footnote also confirms that this e-mail message has been swept for
the
presence of computer viruses by Ironport. Before opening or using any
attachments, check them for viruses and defects.
Our liability is limited to resupplying any affected attachments.
HPA collects personal information to provide and market our services. For
more
information about use, disclosure and access see our Privacy Policy at
<a href="http://www.hpa.com.au/" eudora="autourl">www.hpa.com.au</a>
**********************************************************************
</pre><font face="Courier New, Courier" size=3></font>-- <br>
= = = = = = = = = = = = = = = = = = = = = = = = = = = =<br>
Mailing list: powerh-l@lists.sowder.com<br>
Subscribe: &amp;quot;subscribe&amp;quot; in message body to
powerh-l-request@lists.sowder.com<br>
Unsubscribe: &amp;quot;unsubscribe &amp;lt;password&amp;gt;&amp;quot; in
message body to powerh-l-request@lists.sowder.com<br>
<a href="http://lists.sowder.com/mailman/listinfo/powerh-l" eudora="autourl">
http://lists.sowder.com/mailman/listinfo/powerh-l</a><br>
This list is closed, thus to post to the list you must be a
subscriber.<br>
Add 'site:lists.sowder.com powerh-l' to your search terms to search the
list archive at Google. </blockquote>
<x-sigsep><p></x-sigsep>
<br>
Mike<br>
.<br>
</body>
</html>