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



Jim,
? status was not '5' ?
I think we're behind PTF 8 - 12 months (iSeries to be de-commissioned within 12 months so ops mgr not motivated)

Outlet records definitely there and data looks good and last update date/time fields show relevant values in place
for several months, matching the ASN Documents created for each of the Outlets in question.
Outlet data is also heavily used for many other business transactions which have processed normally.

One guess is temporary record locking, but having six different sets Outlet records locked at about same time on
two different days is a stretch for me . . .

Another guess is running at 130% cpu and + is causing time-out

Starting now to look at journal records . . .

Thank you.

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

If you know the records are there, and sql02000 (do you keep a log of these, along with the other sql values?) and when run again it works - I would Verify DB2 ptfs Check your indexes to see if some recommended, and it's taking too long as you hinted at Verify no corruption of the other columns referenced (like when you looked they were fine but at point of execution your status was not '5'....
Jim


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

Any SQL0911 messages in the job log?

- Dan

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

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.