Compiling is required or not

Posted by ankitshukla on 16-May-2016 05:32

Hi,

Do we always required a .r to be created to run any .p/.w? Or is there any way to run a .p/.w directly without compiling again and again?

Any help will be highly appreciated.

Thanks,
Ankit

All Replies

Posted by Mike Fechner on 16-May-2016 05:34

A development license can run .p/.w/.cls from source code (doing session compile JIT).

A runtime license does not have this capability.

Posted by ankitshukla on 16-May-2016 06:17

Thanks Mike.

But how can I check that which type of licence I have?

Posted by Mike Fechner on 16-May-2016 06:57

Ask the one who installed OpenEdge for youi. Or just try to execute uncompiled code and see if it runs or errors.

We use the following code to test for it at runtime.

    /*------------------------------------------------------------------------------
        Purpose: Returns if the current session allows compilation of ABL source code
        Notes:   Compiles a non existing .p file (random file name) and tests the
                 error message.
                 ** Compiler is not available in this version of PROGRESS. (494)
        @return Logical value indicating if the current session allows compilation
    ------------------------------------------------------------------------------*/
    METHOD PUBLIC STATIC LOGICAL AllowsCompile ():

        COMPILE VALUE (SUBSTITUTE ("&1.p":U, GUID)) .

        RETURN TRUE .

        CATCH e AS Progress.Lang.Error :
            IF e:GetMessageNum (1) = 494 THEN
                RETURN FALSE .
            ELSE
                RETURN TRUE .
        END CATCH.

    END METHOD.

Posted by Marco Mendoza on 16-May-2016 08:29

DISPLAY PROGRESS.

Returns one of the following character values which identifies the ABL product that is running:

Full, Query or Run-time. Can also return COMPILE if you use the Developer’s Toolkit, or

COMPILE-ENCRYPT if you use the run-time Compiler.

Posted by ankitshukla on 16-May-2016 10:12

Hi Marco,

It displays "Full". Is it means it have the capability to run the source code directly without generating the .r? Am I correct?

Posted by Laura Stern on 16-May-2016 10:51

Yes.  Of course you could always just try it!

This thread is closed