running a persistents main block

jmac13

Member
Hi All,

I'm using open edge 10.2b.

if i make a program persistent how do i then just run the program rather than picking a procedure to run within that program? I.E. just running the main block or doing the same as you would if you did:

Code:
run gui_utils/RecordUsage.p. /*normal*/


run gui_utils/RecordUsage.p persistent set hanProgramLogging .

/*how from the handle?*/
run hanProgramLogging.


any ideas would be great cheers
 
The main block gets run whenever you run the .p -- regardless of whether or not you set a handle (you can run it persistently without setting a handle). If you run it persistently more than once you will have multiple copies of it in memory (unless you do something to clean them up). That can get confusing, it isn't for the faint of heart ;)

The main block of a persistent procedure is best thought of as an initialization block.

There is no way to run the main block after the first time the PP runs -- except by running another instance of it.
 
OK cool Took stuff out of the main now and put it in a procedure and I run that instead.. Another question how do i put handle in a widget-pool. i thought prob best to shove it into one of them and then delete the widget-pool after.. but progress doesnt seem to like when i try that im not sure of the syntax
 
Another question how do i put handle in a widget-pool. i thought prob best to shove it into one of them and then delete the widget-pool after.. but progress doesnt seem to like when i try that im not sure of the syntax

It does not look like you can put procedure-handles in the widget-pool. You could use CREATE CALL to perform dynamic runs instead of static runs, but it seems a bit over the top.
 
Back
Top