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



I can think of only four scenarios..
1) The wrong file is being accessed under certain circumstances
2) Somehow "SKIP LOCKED DATA" is in effect and the rows are currently being
updated
3) wk_OutNum doesn't have the value it should..
4) The records really weren't there the first time around.

#3 could be caused by memory corruption due to mismatched parameters
somewhere.

#4 could be ruled out if the files are journalled and you can confirm that
the records were written (and commited) prior to the original run of the
job.

Charles

On Wed, Jul 15, 2015 at 1:07 PM, Gary Thompson <gthompson@xxxxxxxxxxx>
wrote:

I have the following SQL that has been working as expected for about 2
years:

SELECT COALESCE(om8.suptyp,' ')
INTO :wk_OutAsnSts
FROM om01 om1
LEFT JOIN om08 om8
ON om8.outnum = om1.outnum
AND om8.suptyp = 'AS'
AND om8.recsta = '5'
WHERE om1.outnum = :wk_OutNum

The query is intended to return the EDI 856 ASN status of the "Sales
Outlet" specified by "wk_OutNum".

This week we received a problem report from one of our seven warehouse
locations that six outlets did
not receive the expected ASN pallet labels and Document.

This happened on Monday and Tuesday of this week at that one location, but
has yet to be reported by
any other warehouse location. We send 70-90 ASN documents daily.

All location data is processed by one RPGLE program which has the SQL
shown above.

I reviewed all status reports created by this program yesterday and found
six examples where the
program reported SQL State = 02000 (no rows)for an outlet that >IS<
defined.

Late yesterday, we identified this problem in time to repeat the procedure
that runs the query,
and then successfully created and transmitted the required ASN documents.

Repeating the query now also returns the expected "row found" condition.

My question is what, other than an actual "no row" could cause SQL State =
02000 ?

Because I often see CPU well above 100%, I suspect that some kind of
"time-out" may cause this ?
--
This is the RPG programming on the IBM i (AS/400 and 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.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.