Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

9.21 COMPILE_COMPONENT

Note
titleNote: Built-In Function Rules     Usage Options

...

A user wants to control the compilation of components using their own version of the "Compile / Re-Compile a Component" facility.

     *********  Define arguments and lists
DEFINE     FIELD(#COMPNAME) TYPE(*CHAR) LENGTH(9)
DEFINE     FIELD(#RETCOD) TYPE(*CHAR) LENGTH(2)
DEF_LIST   NAME(#WKCOMP) FIELDS(#COMPNAME) TYPE(*WORKING)
DEF_LIST   NAME(#BWCOMP) FIELDS(#COMPNAME)
*********  Clear working and browse lists
BEGIN_LOOP
CLR_LIST   NAMED(#WKCOMP)
INZ_LIST   NAMED(#BWCOMP) NUM_ENTRYS(2) WITH_MODE(*CHANGE)
*********  Request component names
REQUEST    BROWSELIST(#BWCOMP)
*********  Move components from the browselist to the working list
SELECTLIST NAMED(#BWCOMP)
ADD_ENTRY  TO_LIST(#WKCOMP)
ENDSELECT
*********  Execute built-in-function - COMPILE_COMPONENT
USE        BUILTIN(COMPILE_COMPONENT) WITH_ARGS(#WKCOMP) TO_GET(#RETCOD)
*********  Check if submission was successful
IF         COND('#RETCOD *EQ ''OK''')
MESSAGE    MSGTXT('Compile Component submitted successfully')
ELSE
MESSAGE    MSGTXT('Compile Component submit failed with errors, refer to additional messages')
ENDIF
END_LOOP