Answered Are Procedure Libraries Present In 10.2b?

JoseKreif

Member
I've stumbled across a feature while learning some OpenEdge ABL 11.x. One thing I liked was something they refer to as "Procedure Libraries"

You can have ProcLib.p . This procedure file will only have procedures in it. It will not have any code in the main block.

Now you can have Test_ProcLib.p . In this file, you can declare a Handle as add ProcLib.p to it. One done you should be able to call the internal procedures in ProcLib.p.

Here is an example:

Code:
def var hProc as handle no-undo.

run [dir]/ProcLib single-run set hProc.

run someProcedure in hProc (input someVariable).

I just end up getting this error when trying in 10.2B

"** Unknown Field or Variable name - single-run. (201) "
 

TomBascom

Curmudgeon
Procedure libraries have existed for a very long time. Even ancient and obsolete releases like 10.2b support them.

But they do not work the way that you apparently think that they work.

You use the command-line "prolib" utility to add or remove files (which can be .p files or anything else) to a procedure library. This combines many files into a single file whose name ends with ".pl". One advantage of this is that it simplifies deployment. You only need to copy a single (possibly large) file rather than hundreds (or thousands) of small files. Another advantage is that on large multi-user servers the prolibs can be "memory mapped" which means that only a single, shared, copy is loaded in the servers memory.

Your sample code does not appear to be at all related to the use of a procedure library.

The error message is saying that "single-run" is not something that the compiler knows about. It is not a field or a variable name declared in your program. Nor is it a keyword in any release of the 4gl that I am aware of.
 

JoseKreif

Member
Procedure libraries have existed for a very long time. Even ancient and obsolete releases like 10.2b support them.

But they do not work the way that you apparently think that they work.

You use the command-line "prolib" utility to add or remove files (which can be .p files or anything else) to a procedure library. This combines many files into a single file whose name ends with ".pl". One advantage of this is that it simplifies deployment. You only need to copy a single (possibly large) file rather than hundreds (or thousands) of small files. Another advantage is that on large multi-user servers the prolibs can be "memory mapped" which means that only a single, shared, copy is loaded in the servers memory.

Your sample code does not appear to be at all related to the use of a procedure library.

The error message is saying that "single-run" is not something that the compiler knows about. It is not a field or a variable name declared in your program. Nor is it a keyword in any release of the 4gl that I am aware of.

That is odd. I have got my example from 11.6, which I learned from Welcome to The Enterprise Knowledge Platform. My company uses 10.2B, so I was moving the sample code into our development environment, which is where is doesn't work as it does in My copy of OpenEdge Classroom edition.

Some stuff I've gotten

A library of internal procedures enables you to organize your procedures into a file that provides related functionality.



 
Last edited:

TomBascom

Curmudgeon
It turns out that SINGLE-RUN was added in 11.2 Progress KB - What are singleton and single-run procedures?

If you are trying to run that code in 10.2B it wouldn't know anything about an 11.2 feature.

It still has nothing to do with procedure libraries. OTOH there seems to some confusing mixing of terms going on -- a library of internal procedures is a different beast and your code does appear to be trying to implement something like that.

You can do that sort of thing all the way back to version 7.3 (which is when persistent procedures became available). But you cannot use SINGLE-RUN until 11.2 so you will need to understand how to manage a persistent procedure.
 

JoseKreif

Member
It turns out that SINGLE-RUN was added in 11.2 Progress KB - What are singleton and single-run procedures?

If you are trying to run that code in 10.2B it wouldn't know anything about an 11.2 feature.

It still has nothing to do with procedure libraries. OTOH there seems to some confusing mixing of terms going on -- a library of internal procedures is a different beast and your code does appear to be trying to implement something like that.

You can do that sort of thing all the way back to version 7.3 (which is when persistent procedures became available). But you cannot use SINGLE-RUN until 11.2 so you will need to understand how to manage a persistent procedure.

Thank you for the clarification.
 
Top