× 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.



You don't include a code extract so it is tough to be sure but ....

I would guess that you have specified that the array is an sequence (ascend
or descend) and that the data is not actually in sequence.

Under these circumstances, LOOKUP will find a match (because it does a slow
sequential search) whereas %Lookup does a faster binary search - it believes
what you tell it about the sequence!

See http://www.eservercomputing.com/iseries/articles/index.asp?id=498 for
more information.

Jon Paris
Partner400
www.Partner400.com

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of
rpg400-l-request@xxxxxxxxxxxx
Sent: Friday, September 10, 2004 1:01 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: RPG400-L Digest, Vol 3, Issue 693


Send RPG400-L mailing list submissions to
        rpg400-l@xxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.midrange.com/mailman/listinfo/rpg400-l
or, via email, send a message with subject or body 'help' to
        rpg400-l-request@xxxxxxxxxxxx

You can reach the person managing the list at
        rpg400-l-owner@xxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of RPG400-L digest..."


Today's Topics:

   1. RE: Indicators (JamesMorey@xxxxxxx)
   2. RE: Indicators (Tim Kredlo)
   3. Re: Indicators (Alan Cassidy)
   4. RE: Indicators (Tim Kredlo)
   5. RE: QAQQINI - Query options file and performance of SQL
      (rob@xxxxxxxxx)
   6. Re: %LOOKUP (RPower@xxxxxxxxxx)
   7. RE: Indicators (Dan Bale)


----------------------------------------------------------------------

message: 1
date: Thu, 9 Sep 2004 16:36:45 -0400
from: JamesMorey@xxxxxxx
subject: RE: Indicators


If you want to eliminate indicators to position the cursor, you can use the
retrieve file description API 'QDFRTVFD' to determine the starting position
(row and column) for a display file field, then use CSRLOC to position the
cursor to that location. I think you'll find a sample program in the
archives.

The closest I've come to "AUTOMATICALLY synchronizing the pair of variables
"  is  to  use  a  "validwhatever"  indicator  that  is set by the validity
checking logic, then this construct right before I write the format.

  c   eval InvalidWhatever = not ValidWhatever


____________________________________________________________________________
________
This message is intended only for the use of the individual or entity to
which it is addressed and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If the
reader of this message is not the intended recipient, or the employee or
agent responsible for delivering the message to the intended recipient, you
are hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.  If you have received this
communication in error, please delete it and notify us immediately.





------------------------------

message: 2
date: Thu, 9 Sep 2004 14:20:00 -0700
from: "Tim Kredlo" <TKredlo@xxxxxxxxxxxxxxxx>
subject: RE: Indicators

James wrote:

>If you want to eliminate indicators to position the cursor, you can use the
retrieve file description API 'QDFRTVFD' to determine the starting position
(row and column) for a >display file field, then use CSRLOC to position the
cursor to that location. I think you'll find a sample program in the
archives.

Thanks - I'll check it out. Sounds like just what I need.

Tim Kredlo
Exterior Wood, Inc.

_






------------------------------

message: 3
date: Thu, 09 Sep 2004 18:47:20 -0400
from: Alan Cassidy <steelville@xxxxxxxxxxx>
subject: Re: Indicators

Not a magic wand, but...

If the following "tradeoff" is okay for your purposes, you can use an
internal subprocedure to "emulate" an automatic way to work that way.

You could "hide" the "double negative", if the point is a more readable
and comprehensible source code flow.

So rather than code:
If PrtStatus = InValid;

I code (and find as readable):
If Prt#Invld;

Define your Prt#Invld overlaying *In23.

Then a procedure:
<source>
D   Prt#Valid      pi     n

C   Return Not Prt#invald
</source>

This way, you could use Prt#Valid, and it will "automatically" have the
expected value.

-- Alan










------------------------------

message: 4
date: Thu, 9 Sep 2004 16:16:08 -0700
from: "Tim Kredlo" <TKredlo@xxxxxxxxxxxxxxxx>
subject: RE: Indicators

Alan Cassidy wrote:

>Not a magic wand, but...

>If the following "tradeoff" is okay for your purposes, you can use an
>internal subprocedure to "emulate" an automatic way to work that way.

>You could "hide" the "double negative", if the point is a more readable
>and comprehensible source code flow.

>So rather than code:
>f PrtStatus = InValid;

>I code (and find as readable):
>If Prt#Invld;

>Define your Prt#Invld overlaying *In23.

>Then a procedure:
> <source>
>D   Prt#Valid      pi     n

>C   Return Not Prt#invald
> </source>

>This way, you could use Prt#Valid, and it will "automatically" have the
>expected value.

>-- Alan

Thanks Alan,

Looks like a method I will try.

Tim Kredlo
Exterior Wood, Inc








--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.








------------------------------

message: 5
date: Thu, 9 Sep 2004 18:15:22 -0500
from: rob@xxxxxxxxx
subject: RE: QAQQINI - Query options file and performance of SQL

Yes the job is finding QAQQINI.  And yes it is in QUSRSYS.  And I think
it's cool because we did the CRTDUPOBJ.  I forget what we changed.  I
suppose I could check but I don't think that's related as to why the job
is bogging down on the access of QAQQINI.

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"DeLong, Eric" <EDeLong@xxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
09/09/2004 03:02 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx>
cc

Fax to

Subject
RE: QAQQINI - Query options file and performance of SQL






I can't comment on the time it takes to access the QAQQINI file, but by
default, the query optimizer will always look for a QAQQINI.  Within a
job,
you can CHGQRYA QRYOPTLIB('Library that contains your custom QAQQINI
file')
to force the optimizer to use your pre-designed options file for this
rogue
job.  I'd bet that the optimizer might have some performance issues if it
can't find a QAQQINI, since it has to determine the default values the it
needs to use.

Is the job finding a QAQQINI file?  I think that it looks in QUSRSYS by
default.  We generally have to CRTDUPOBJ from QSYS/QAQQINI into QUSRSYS
after each release update.  I believe the OS explicitely deletes these
when
found.  If versions of QAQQINI from prior releases were restored back into
QUSRSYS after the upgrade, then you may need to delete these and then
CRTDUPOBJ to rebuild them.

Eric DeLong
Sally Beauty Company
MIS-Project Manager (BSG)
940-898-7863 or ext. 1863



-----Original Message-----
From: rob@xxxxxxxxx [mailto:rob@xxxxxxxxx]
Sent: Thursday, September 09, 2004 1:34 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: QAQQINI - Query options file and performance of SQL


Thanks for the references.  Most of the performance concerns raised in
those articles seem to be that usage of some of the parameters may affect
performance.  Which makes sense.  There is nothing there that says that
just having the file there will cause a performance hit.  Or what you can
do to minimize the hit.

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"DeLong, Eric" <EDeLong@xxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
09/09/2004 01:10 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx>
cc

Fax to

Subject
RE: QAQQINI - Query options file and performance of SQL






Rob,

Here's a pretty detailed coverage of QAQQINI.
http://www-912.ibm.com/s_dir/slkbase.nsf/1ac66549a21402188625680b0002037e/9f


bb11f1725466578625694c007511a1?OpenDocument&Highlight=0,QAQQINI

Here's a short (but useful) document from the terraplex...
http://www-1.ibm.com/servers/enable/site/bi/teraplex/lessons.html

hth,

Eric DeLong
Sally Beauty Company
MIS-Project Manager (BSG)
940-898-7863 or ext. 1863



-----Original Message-----
From: rob@xxxxxxxxx [mailto:rob@xxxxxxxxx]
Sent: Thursday, September 09, 2004 11:33 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: QAQQINI - Query options file and performance of SQL


Developer here is trying to shave some time off of a SQL operation in an
imbedded rpg program.  Bulk of the time in the joblog based on the debug
is spent in various CPI4339 - Query options retrieved file QAQQINI in
library QUSRSYS.  Sure calls this alot.  Spends more time reading this
file than access path considerations, OPEN's, PREPARE's, etc.  I can't
think of anything to do, on my end, to reduce the CPI4339 times.  I
suppose I need to point this out to IBM as 'an area of concentration of
effort'.

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




------------------------------

message: 6
date: Fri, 10 Sep 2004 08:58:08 -0230
from: RPower@xxxxxxxxxx
subject: Re: %LOOKUP

By fail do you mean it doesn't find it or bombs out?  If it doesn't find
it, are you repositioning the %lookup index to the very start before you
do the lookup?  Is the lookup field and the array field left or right
justified the same way?

Ron Power
Programmer
Information Services
City Of St. John's, NL
P.O. Box 908
St. John's, NL
A1C 5M2
Tel: 709-576-8132
Email: rpower@xxxxxxxxxx
Website: http://www.stjohns.ca/
___________________________________________________________________________
Success is going from failure to failure without a loss of enthusiasm. -
Sir Winston Churchill




"Deepak Deshpande" <deepak.deshpande@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
09/09/2004 05:56 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
%LOOKUP






Hi group

I am trying to use %LOOKUP.
I am reading 2 files.
File-1 has PO # which has 2 Finished Goods.
File-2 has 2 Finished Goods and each with 3 and 2 Raw items respectively.

I read File-1, get FG1, chain to File-2 and move Item to an array. This
goes on for 3 items of FG1. Here I use %LOOKUP to check if the item is
already in he array. Since the FG1 does not have duplicate items, LOOKUP
is ignored. When I read FG2, there may be an item which was also in FG1.
So I have to %LOOKUP in the array. Here LOOKUP works but %LOOKUP fails. I
use %LOOKUP because I want the posn in the array where item is found.

I have defined array as char 6 dim 99.

Any idea why %LOOKUP fails?

TIA
Deepak
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




This e-mail communication and accompanying documents is intended only for
the individual or entity to which it is addressed and may contain
information that is confidential, privileged or exempt from disclosure under
applicable law.  Any use of this information by individuals or entities
other than the intended recipient is strictly prohibited.  If you have
received this in error, please notify the sender and delete all the copies
(electronic or otherwise) immediately.


------------------------------

message: 7
date: Fri, 10 Sep 2004 09:16:37 -0400
from: "Dan Bale" <dbale@xxxxxxxxxxxxx>
subject: RE: Indicators

> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx / Tim Kredlo
> Sent: Thursday, September 09, 2004 7:16 PM
Thanks Alan,
>
> Looks like a method I will try.
>
> Tim Kredlo
> Exterior Wood, Inc

Just don't call it more than once after you've set the value!

I would have warning signs all over that code.

I think you've already gotten all the ammo you need to reduce the indicator
usage in your DDS with the DSPATR(p-fields) and CSRLOC w/ the API mentioned
yesterday.

Just a thought.

db



------------------------------

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) digest list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



End of RPG400-L Digest, Vol 3, Issue 693
****************************************



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.