Versions Compared

Key

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

9.20 COMPILE_PROCESS

Note
titleNote: Built-In Function Rules     Usage Options

...

A user wants to control the compilation of processes and functions using their own version of the "Compile / Re-Compile a Process" facility.

     *********  Define arguments and lists
DEFINE     FIELD(#PROCES) TYPE(*CHAR) LENGTH(10)
DEFINE     FIELD(#FUNCTN) TYPE(*CHAR) LENGTH(7)
DEFINE     FIELD(#RETCOD) TYPE(*CHAR) LENGTH(2)
DEF_LIST   NAME(#WKFUNL) FIELDS((#FUNCTN)) TYPE(*WORKING)
DEF_LIST   NAME(#BWFUNL) FIELDS((#FUNCTN))
*********  Clear working and browse lists
BEGIN_

...

LOOP    
CLR_LIST   NAMED(#WKFUNL)
INZ_LIST   NAMED(#BWFUNL) NUM_ENTRYS(10) WITH_MODE(*CHANGE)
*********  Request Process and Functions
REQUEST    FIELDS(#PROCES) BROWSELIST(#BWFUNL)
*********  Move Functions from the browselist to the working list
SELECTLIST NAMED(#BWFUNL)
ADD_ENTRY  TO_LIST(#WKFUNL)

ENDSELECT    

     ENDSELECT    
*********  Execute built-in-function - COMPILE_PROCESS
USE        BUILTIN(COMPILE_PROCESS) WITH_ARGS(#PROCES #WKFUNL) TO_GET(#RETCOD)
*********  Check if submission was successful
IF         COND('#RETCOD *EQ ''OK''')
MESSAGE    MSGTXT('Compile Process submitted successfully')
CHANGE     FIELD(#PROCES) TO(*BLANK)

ELSE    

...

     ELSE    
MESSAGE    MSGTXT('Compile Process submit failed with errors, refer to additional messages')

ENDIF    

     ENDIF    
END_

...

LOOP