× 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 was hoping I could do this via SQL, but I agree a RPG program is simple.
Since it is a key field I want to be sure two people can can't pull the
same key.

I think I'll do the RPG, that way I KNOW it is locked until the next key is
set.

--
Mike Wills
http://mikewills.me


On Thu, Jul 12, 2012 at 9:23 AM, Vern Hamberg <vhamberg@xxxxxxxxxxx> wrote:

Luis

I read "external application" as anything that could touch the file. We
use data areas for things like "next value" - it seemed he is using this
file that way, But that is all assuming, and we know what that does.

Actually external (RPG) stored procedures are very easy to write, in my
experience - ODBC, etc., does not care what is in the black box. In
fact, any existing program can be used as a stored procedure - you don't
even really have to declare it as such - just call it from SQL. Now to
get a return value, you need a couple more things - still quite easy to do.

As a test, go to STRSQL and do a CALL there - parameters are
comma-separated - it works. There's an implicit SP for any program
object on the i.

Vern

On 7/12/2012 8:06 AM, Luis Rodriguez wrote:
Vern,

I believe that Mike needed to update this value from "an external
application" (his words). So I suppose that means something like a VB
program accessing the data thru ODBC or such. In this case, a Stored
Procedure (or a function) would be the best option and it is easier
(IMHO)
to write one in "pure" SQL than having to write one that calls a RPG
program.

Regards,


Luis Rodriguez
IBM Certified Systems Expert — eServer i5 iSeries


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