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



Thank you Charles, for a very good list.

1) Wrong file is not very likely due to the way our warehouse application works: users can only select outlets for processing from
a particular menu option that restricts them to a particular warehouse location and delivery date.

2) I'm not familiar with "SKIP LOCKED DATA" so I will investigate further . . .

3) I have confirmed wk_OutNum from a "Status Report" printed for each "batch" which showing SQL State 02000 for outlets that
>are< defined for ASN delivery (see #4 below). Because the same code is running for five other warehouse locations, I'm not
clear on how/where the memory corruption would occur ?

4) I do have last update user, date and time data from our warehouse application and all six "problem" outlets show last march or april
as last update. Further, we keep records of all ASN documents transmitted and show prior ASN documents for these outlets.
Your comment about journals is valid but because of the number of ASN documents previously created for these outlets (75 - 93),
I don't see value in reviewing journals.

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Charles Wilt
Sent: Wednesday, July 15, 2015 12:13 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: Unexpected SQLSTATE returned from embedded SQL

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.


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

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.