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



Good idea, Paul. I was thinking somewhat along the same lines. The only
downside I see is that the POS vendor may want to charge us extra, as they
did for the upload implementation, of course.

Jerry C. Adams
IBM i Programmer/Analyst
When you play this game 20 years, go to bat 10,000 times and get 3,00 hits,
do you know what that means? You've gone 0 for 7,000. -Pete Rose
--
A&K Wholesale
Murfreesboro, TN
615-867-5070


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

Jerry,

I'd suggest you add a DTOHEADER table which stores just the order number.
At the end of the order upload have OLE DB writes the uploaded order
number/ID to this table. If the order number isn't a global unique value
maybe DTOHEADER also needs the store number. If you modify your process to
only work with orders found in DTOHEADER you won't work incomplete orders.
No need to ALCOBJ on DTODETAIL.

Paul Morgan

Principal Programmer Analyst
IT Supply Chain/Replenishment

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

Ah ha, I didn't know that, and it fits the scenario that we have been
experiencing. I thought that the OLE DB connection itself would lock me out
of the file until it ended the connection.

As Ron and Chris suggested, I may have to re-think this process. For the
moment there is a clumsy workaround since the stores themselves are not
actually submitting the order but rather by a staff person on-site.
Eventually though our plan is to allow some (or all) of the stores do the
submissions.

Jerry C. Adams
IBM i Programmer/Analyst
He's an intellectual from Yale, but he's very intelligent. -Pete Rose on
Bart Giamatti, Baseball Commissioner
--
A&K Wholesale
Murfreesboro, TN
615-867-5070


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Morgan, Paul
Sent: Tuesday, February 21, 2012 9:59 AM
To: Midrange Systems Technical Discussion
Subject: RE: Object Allocation Problem - or Something Else?

Jerry,

Does OLE DB use a separate SQL INSERT statement for each row added to
DTOORDERS? I believe SQL will only lock a table while a statement is
running. If each row is a separate SQL statement your ALCOBJ can lock the
file in the middle of an order upload.

Paul Morgan

Principal Programmer Analyst
IT Supply Chain/Replenishment


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jerry C. Adams
Sent: Tuesday, February 21, 2012 10: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.



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.