jbase

Basic Programming Error in T24 Design Studio


Below is my code.

SUBROUTINE HELLO
*-----------------------------------------------------------------------------
*
*-----------------------------------------------------------------------------
* Modification History :
*-----------------------------------------------------------------------------
    $INSERT I_COMMON
    $INSERT I_EQUATE
*-----------------------------------------------------------------------------
    CRT "HELLOW WORLD"
END

I'm trying to compile above code in T24 Design Studio using TAFJ but it generates below error.

17/01/2019 10:50:47 Compiling HELLO...                          ERROR
     Error : (line 19) HELLO, Cannot find Insert 'I_EQUATE'
     Error : (line 12) HELLO.b, No component defined. $PACKAGE is mandatory !
Compilation completed for 1 file(s). 2 errors

Need to know how to resolve this issue.


Solution

  • The first error "Cannot find Insert 'I_EQUATE'" means the compiler cannot find the insert file which is usually located inside t24lib. You have to right click on your project and select "Toggle TAFJ project nature", then provide location to t24lib folder with the T24 core libraries (temn.tafj.directory.precompile parameter in TAFJ conf properties).

    Second error means that you should follow the TAFJ componentisation framework and you should have a .component and $PACKAGE keyword in routine indicating the package name. You can override this check by putting a "Dunce cup" on the folder where you have the routine.