All,
According to the documentation, running a procedure persistent and setting the handle to a class property is legal.
class Foo:
define public static property hProc as handle.
end class.
test.p
run myproc.p persistent set Foo:hProc.
end test.p
A compile error is thrown when compiling test.p
**Unknown Field or Variable name - Foo. (201)
Am I misunderstanding the documentation or is the documentation wrong or is it a bug?
This is on OpenEdge 11.7.5
Thanks Peter, that is not the answer I was looking for. We are replacing Global Shared Variables and the thought is a static class with public properties or variables equivalent to the GSVs.
This might be helpful: pugchallenge.org/.../930_ooshrvar.pptx
Thanks Tom,
What you describe is essentially what I'm attempting. The issues appears that one cannot use a class property as the persistent procedure handle with the SET syntax option. So a simple replace the GSVs with an equivalent class property is not going to be possible. It looks like more complex refactoring is going to be needed.
Also appears that a class property/variable cannot be used as an output parameter for a run procedure statement.
run test.p (output foo.hProc) gives a syntax error: Cannot use object reference qualified variable name as an INPUT-OUTPUT or OUTPUT parameter. (13458)