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



Another good idea. I'll have to pull out my session handout on data queues
(not one of the tools in the drawer that I use too often).

Jerry C. Adams
IBM i Programmer/Analyst
Each 24 hours the world turns over on someone who is sitting on top of it.
-Sign in Sparky Anderson's office
--
A&K Wholesale
Murfreesboro, TN
615-867-5070


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Monnier, Gary
Sent: Tuesday, February 21, 2012 1:01 PM
To: Midrange Systems Technical Discussion
Subject: RE: Object Allocation Problem - or Something Else?

I was thinking more of a commit issue on the client side.

But someone suggested a bit of redesign which might not be a bad idea.

So how about the client write an entry to a data queue once the PO is
completed? The queue entry would uniquely identify the PO. It could even
tell you how many lines to expect. Your program sits on the data queue and
only runs when entries are written to it. If an entry is in the queue you
can assume the PO is ready to process and that any needed database commits
have completed. If no order exists in your file, or a different number of
lines are there, you generate your notification error and put the PO into
quarantine.

Gary Monnier


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jerry C. Adams
Sent: Tuesday, February 21, 2012 10:44 AM
To: 'Midrange Systems Technical Discussion'
Subject: RE: Object Allocation Problem - or Something Else?

All of this stuff about commitment control reminds me that I created the
file with COMMIT(*NONE). So, would changing the file to COMMIT(*CS) and
then changing my program, which reads the file and deletes records it used,
to COMMIT the deletes be sufficient, or would the vendor, also, need to use
COMMIT? Sounds like belt and suspenders, but no harm in that.

Jerry C. Adams
IBM i Programmer/Analyst
Mathewson pitched against Cincinnati yesterday. Another way of putting it
is that Cincinnati lost a game of baseball. The first statement means that
same as the second. -Damon Runyon [not really Damon, but we know what you
mean.]
--
A&K Wholesale
Murfreesboro, TN
615-867-5070


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Monnier, Gary
Sent: Tuesday, February 21, 2012 12:26 PM
To: Midrange Systems Technical Discussion
Subject: RE: Object Allocation Problem - or Something Else?

Hi Jerry,

Maybe a commit not being done as expected or not completed before your
program runs?

Gary Monnier

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jerry C. Adams
Sent: Tuesday, February 21, 2012 7:37 AM
To: Midrange-L
Subject: Object Allocation Problem - or Something Else?

Our company has 20+ retail outlets. Until recently, they were sending
replenishment orders to us in a rather convoluted manner (which I'd rather
not get into).



The company that provides our Point-of-Sales applications and I teamed up so
that the stores could send an order directly to the System i. I don't know
much about the POS side, but the programmer there said he used OLE DB to
connect, which we both thought was great because I could create an SQL DDL
file on the System i into which the orders would be dumped.



On my end I wrote a process that runs continuously from about 0700 - 1600
and checks for new orders. The actual order processing takes only about a
minute or less, and then goes to sleep for 10 minutes.



Before my process starts processing the order bucket file, it ALCOBJ the
file. I know that, if I allocate the file *before* a store tries to send me
an order, the POS errors out because I once had the program in debug and
forgot to hold the process on the job queue. The actual command is:



ALCOBJ OBJ((DTOORDERS *FILE *EXCL)) WAIT(60) SCOPE(*JOB)



The problem that we have been experiencing is that, occasionally, I will get
only part of the order, say 10 lines out of 100 (it varies). I have a check
at my end (the store's purchase order number) to be sure that the store
managers (not the sharpest knives in the drawer) don't try to send the same
order a second (or more) time. But on the next cycle the rest of the order
is there and, naturally, my program rejects it as being a duplicate.



What I don't know, and have been unable to test, is whether or not the
ALCOBJ actually works if the store has already made the connection to my
bucket file when I allocate the file and start processing. This seems to be
what is happening, but is it possible? I do know that the orders are not
being submitted twice.



Thanks.



Jerry C. Adams

IBM i Programmer/Analyst

Brooks Robinson belongs in a higher league. -Pete Rose

--

A&K Wholesale

Murfreesboro, TN

615-867-5070



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-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.