@Christoph Rekers I was on the right path !!
I corrected my script with what you sent me, and I get a very weird error !!
First of all, I setup my workflow as you indicated. Here is my script...
!! GET PARENT OBJECT ID
:SET &PARENTID# = SYS_ACT_PARENT_NR()
:PRINT &PARENTID#
:PRINT &JOB_ACT_DATE#
:PRINT &$PHYS_DATE_YYYYMMDD#
!! COMPARE PARENT ACTIVATION DATE ASSIGNED IN JOBI.BR_GET_GENERIC_VARIABLES WITH ACTUAL DATE
:IF &JOB_ACT_DATE# > &$PHYS_DATE_YYYYMMDD#
: print "Execution of JOBS.WIN.BR_SI_SURVEY.PROC_EXPORT.DAILY.STATS.TO.SQLTABLE delayed until next day"
:ELSE
: print "Execution of JOBS.WIN.BR_SI_SURVEY.PROC_EXPORT.DAILY.STATS.TO.SQLTABLE will start now."
: SET &RETCODE# = MODIFY_UC_OBJECT(&PARENTID#, EARLIEST_STARTTIME, "JOBS.WIN.BR_SI_SURVEY.PROC_EXPORT.DAILY.STATS.TO.SQLTABLE","OFF")
:ENDIF
Please note that in this script, I wanted to test the "MODIFY_UC_OBJECT" command, so the condition is &JOB_ACT_DATE# > &$PHYS_DATE_YYYYMMDD#. It didn't work ! Here is the information that I get in the ACT report of the script:
2021-11-25 07:54:14 - U00020206 Variable '&JOB_ACT_DATE#' was stored with value '20211125'.
2021-11-25 07:54:14 - U00020408 0023937292
2021-11-25 07:54:14 - U00020408 20211125
2021-11-25 07:54:14 - U00020408 20211125
2021-11-25 07:54:14 - U00020408 Execution of JOBS.WIN.BR_SI_SURVEY.PROC_EXPORT.DAILY.STATS.TO.SQLTABLE will start now.
2021-11-25 07:54:14 - U00011112 Workflow 'JOBP.WIN.BR_UTILITY_EXPORT.DAILY.STATS.TO.SQLTABLE' (RunID: '0023937292') is not in an active status - no modifications allowed.
This doesn't make sense at all !! See for yourself...
Do you have any idea of why the report would say that the workflow is inactive ?