I've done it by doing an insert into a global temp table, and then reading the global temp table before adding to my transaction file. But for some odd reason, i'm not getting a value coming across

Posted 15 April 2005 - 03:14 PM
Posted 15 April 2005 - 03:24 PM
Posted 15 April 2005 - 04:20 PM
Posted 16 April 2005 - 11:27 AM
Posted 18 April 2005 - 08:06 AM
Posted 18 April 2005 - 09:05 AM
Posted 18 April 2005 - 09:28 AM
Ouch, I guess that goes down in flames then.Uh Oh.
I'm not sure you're missing anything at all Neil.
As far as I can see, you'd have to have a separate Oracle Sequence per division. Which is pretty messy if divisions can be added by users/administrators of the app.
I'm not sure SQL DYNAMIC would help you as it would seem you need to vary the selected 'scalar expression' and my understanding is SQL DYNAMIC is intended for arbitrary variation of the WHERE clause only (I'm on 4.6 too mostly).
You might be able to do something with SYS-SQL(), maybe in a global logic that generates the SQL needed to select the number from the correct sequence and inserts it into some "table". Then after calling that GL (say in the BR logic?) read the "table" in ProIV in the usual way. I guess you'd have to key the table on process-ids or use temporary tables or something. Have to say I don't like the sound of this much.
You might be able to do something better with PL/SQL procedures. The problem there is returning data to ProIV is not officially supported (I think - although I believe some people use it). Maybe you could use triggers although it's often a bigger change to the application than one thinks.
I can't see a neat solution anywhere here, maybe someone else can provide a missing link
Incidentally, are you still using CO/DIV codes on your filedefs then? I didn't think that was supported.
PS. I'm sure you know, but Oracle Sequences are not intended to support allocation of numbers in "strict" sequence without "gaps". If a transaction rolls backs, any sequence numbers it acquired are lost for ever. Also, when a database instance goes down you normally lose a few sequence numbers that were "cached in the allocation mechanism". Further, if you run Real Application Clusters (RAC) then numbers are not necessarily allocated in ascending sequence across the multiple database instances in the cluster (you can actually force that but it damages performance and rather negates the point of having a cluster).
Posted 18 April 2005 - 12:31 PM
I've also created my sequence as a non cached sequence, so there should be less chance of sequence numbers going into thin air
0 members, 0 guests, 0 anonymous users