I would love to call an RPG program, but the program was written in the
late 90s in the early-mid 90s style. So they didn't break out logic or used
"good design". I figured at this point calling a stored procedure would be
best.

--
Mike Wills
http://mikewills.me


On Wed, Jul 11, 2012 at 5:12 PM, Vern Hamberg <vhamberg@xxxxxxxxxxx> wrote:

To add to my post just now - isn't it just so much easier to use a
native RPG READ, then store the value, then bump it and UPDATE the
record? This is where SQL seems to be the wrong approach - although
doable, it's rather cumbersome.

Maybe!!

Vern

On 7/11/2012 4:48 PM, Raul A. Jager W. wrote:
I think there is a "SECUENCE" type of object in SQL, that increments in
1 each time it is used.

Other option is to create a view as "select max(usedkey) + 1 from
your.file

Mike Wills wrote:

Stored procedures are not strong in this one.;-)

We have a "constant" file that holds the next sequence number for one of
our applications. I now need to access that from an external
application. I
am hoping I can write a stored procedure to essentially

SELECT nextkey from CONSTANT
UPDATE CONSTANT SET nextkey = nextkey + 1

How would I put this one stored procedure?


--
Mike Wills
http://mikewills.me




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