× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: RE: RPG Indicators
  • From: Rob Berendt <rob@xxxxxxxxx>
  • Date: Thu, 13 Apr 2000 11:06:13 -0500

RTM.  %FOUND is not supported on READC
http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/QB3AGZ03/4.1.1.15?ACTION=MATCHES&REQUEST=%25FOUND&TYPE=FUZZY&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK#FIRSTHIT

4.1.1.15 %FOUND (Return Found Condition)
     %FOUND{(file_name)} 
%FOUND returns '1' if the most recent relevant file operation found a record, a 
string operation found a match, or a search operation found an element. 
Otherwise, this function returns '0'. 
The operations that set %FOUND are: 
File operations: 
"CHAIN (Random Retrieval from a File)" in topic 4.4.15 
"DELETE (Delete Record)" in topic 4.4.24 
"SETGT (Set Greater Than)" in topic 4.4.85 
"SETLL (Set Lower Limit)" in topic 4.4.86 
String operations: 
"CHECK (Check Characters)" in topic 4.4.16 
"CHECKR (Check Reverse)" in topic 4.4.17 
"SCAN (Scan String)" in topic 4.4.83 
Note: Built-in function %SCAN does not change the value of %FOUND. 
Search operations: 
"LOOKUP (Look Up a Table or Array Element)" in topic 4.4.54 




asereda@HU.EEFT.COM on 04/13/2000 10:24:07 AM
Please respond to RPG400-L@midrange.com@Internet
To:     RPG400-L@midrange.com@Internet
cc:      
Fax to: 
Subject:        RE: RPG Indicators

I fell into a trap with "%Found" after readc of a subfile that was
in dow cycle.
 
dow field1=0
exfmt something
readc sfl
if %found
exsr ChkSubroutine
endif
enddo 

ChkSubroutine begsr
....
     key1     chain somefile
....
              endsr
If "chain" is not succes in subroutine  there was not %found after readc.
I come back to indicators.
What do you think about this?

Thanks,

Andrew Sereda
-----Original Message-----
From: boothm@earth.Goddard.edu [mailto:boothm@earth.Goddard.edu]
Sent: Tuesday, April 11, 2000 1:15 AM
To: RPG400-L@midrange.com
Subject: RE: RPG Indicators


Even better use RPGIV and do away with Chain indicators altogether. 
"%Found" is a handy bif.
_______________________
Booth Martin
boothm@earth.goddard.edu
http://www.spy.net/~booth
_______________________




"Tom Tufankjian" <Tom_Tufankjian@hbltd.com>
Sent by: owner-rpg400-l@midrange.com
04/10/2000 02:39 PM
Please respond to RPG400-L

 
        To:     RPG400-L@midrange.com
        cc: 
        Subject:        RE: RPG Indicators





Here's another thought:   combine 2 indicators into 1 if possible, freeing
up one.  Like maybe if you're doing 2 chains to two different files and 
you
use the resulting indicator right away and nowhere else in the program.
Use the same indicator for both chains.

key1   chain filea              10
10         write
n10      updat

/*  was:          */
key2   chain fileb             20
20        write
n20      updat


/*    changed to this to free up indicator 20    */
key2   chain fileb             10
10        write
n10      updat


Just a thought for when you're in a pinch.


+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2651.75">
<TITLE>RE: RPG Indicators</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>I fell into a trap with &quot;%Found&quot; after readc of a 
subfile that was</FONT>
<BR><FONT SIZE=2>in dow cycle.</FONT>
<BR><FONT SIZE=2>&nbsp;</FONT>
<BR><FONT SIZE=2>dow field1=0</FONT>
<BR><FONT SIZE=2>exfmt something</FONT>
<BR><FONT SIZE=2>readc sfl</FONT>
<BR><FONT SIZE=2>if %found</FONT>
<BR><FONT SIZE=2>exsr ChkSubroutine</FONT>
<BR><FONT SIZE=2>endif</FONT>
<BR><FONT SIZE=2>enddo </FONT>
</P>

<P><FONT SIZE=2>ChkSubroutine begsr</FONT>
<BR><FONT SIZE=2>...</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; key1&nbsp;&nbsp;&nbsp;&nbsp; chain 
somefile</FONT>
<BR><FONT SIZE=2>...</FONT>
<BR><FONT 
SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 endsr</FONT>
<BR><FONT SIZE=2>If &quot;chain&quot; is not succes in subroutine&nbsp; there 
was not %found after readc.</FONT>
<BR><FONT SIZE=2>I come back to indicators.</FONT>
<BR><FONT SIZE=2>What do you think about this?</FONT>
</P>

<P><FONT SIZE=2>Thanks,</FONT>
</P>

<P><FONT SIZE=2>Andrew Sereda</FONT>
<BR><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: boothm@earth.Goddard.edu [<A 
HREF="mailto:boothm@earth.Goddard.edu">mailto:boothm@earth.Goddard.edu</A>]</FONT>
<BR><FONT SIZE=2>Sent: Tuesday, April 11, 2000 1:15 AM</FONT>
<BR><FONT SIZE=2>To: RPG400-L@midrange.com</FONT>
<BR><FONT SIZE=2>Subject: RE: RPG Indicators</FONT>
</P>
<BR>

<P><FONT SIZE=2>Even better use RPGIV and do away with Chain indicators 
altogether. </FONT>
<BR><FONT SIZE=2>&quot;%Found&quot; is a handy bif.</FONT>
<BR><FONT SIZE=2>_______________________</FONT>
<BR><FONT SIZE=2>Booth Martin</FONT>
<BR><FONT SIZE=2>boothm@earth.goddard.edu</FONT>
<BR><FONT SIZE=2><A HREF="http://www.spy.net/~booth" 
TARGET="_blank">http://www.spy.net/~booth</A></FONT>
<BR><FONT SIZE=2>_______________________</FONT>
</P>
<BR>
<BR>
<BR>

<P><FONT SIZE=2>&quot;Tom Tufankjian&quot; 
&lt;Tom_Tufankjian@hbltd.com&gt;</FONT>
<BR><FONT SIZE=2>Sent by: owner-rpg400-l@midrange.com</FONT>
<BR><FONT SIZE=2>04/10/2000 02:39 PM</FONT>
<BR><FONT SIZE=2>Please respond to RPG400-L</FONT>
</P>

<P><FONT SIZE=2>&nbsp;</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
To:&nbsp;&nbsp;&nbsp;&nbsp; RPG400-L@midrange.com</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cc: </FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Subject:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RE: RPG Indicators</FONT>
</P>
<BR>
<BR>
<BR>
<BR>

<P><FONT SIZE=2>Here's another thought:&nbsp;&nbsp; combine 2 indicators into 1 
if possible, freeing</FONT>
<BR><FONT SIZE=2>up one.&nbsp; Like maybe if you're doing 2 chains to two 
different files and </FONT>
<BR><FONT SIZE=2>you</FONT>
<BR><FONT SIZE=2>use the resulting indicator right away and nowhere else in the 
program.</FONT>
<BR><FONT SIZE=2>Use the same indicator for both chains.</FONT>
</P>

<P><FONT SIZE=2>key1&nbsp;&nbsp; chain 
filea&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 10</FONT>
<BR><FONT SIZE=2>10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; write</FONT>
<BR><FONT SIZE=2>n10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; updat</FONT>
</P>

<P><FONT SIZE=2>/*&nbsp; 
was:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; */</FONT>
<BR><FONT SIZE=2>key2&nbsp;&nbsp; chain 
fileb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
20</FONT>
<BR><FONT SIZE=2>20&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; write</FONT>
<BR><FONT SIZE=2>n20&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; updat</FONT>
</P>
<BR>

<P><FONT SIZE=2>/*&nbsp;&nbsp;&nbsp; changed to this to free up indicator 
20&nbsp;&nbsp;&nbsp; */</FONT>
<BR><FONT SIZE=2>key2&nbsp;&nbsp; chain 
fileb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
10</FONT>
<BR><FONT SIZE=2>10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; write</FONT>
<BR><FONT SIZE=2>n10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; updat</FONT>
</P>
<BR>

<P><FONT SIZE=2>Just a thought for when you're in a pinch.</FONT>
</P>
<BR>

<P><FONT SIZE=2>+---</FONT>
<BR><FONT SIZE=2>| This is the RPG/400 Mailing List!</FONT>
<BR><FONT SIZE=2>| To submit a new message, send your mail to 
RPG400-L@midrange.com.</FONT>
<BR><FONT SIZE=2>| To subscribe to this list send email to 
RPG400-L-SUB@midrange.com.</FONT>
<BR><FONT SIZE=2>| To unsubscribe from this list send email to 
RPG400-L-UNSUB@midrange.com.</FONT>
<BR><FONT SIZE=2>| Questions should be directed to the list owner/operator: 
david@midrange.com</FONT>
<BR><FONT SIZE=2>+---</FONT>
</P>

</BODY>
</HTML>

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.