ESP Workload Automation

 View Only
  • 1.  IF TODAY DATE AND TIME

    Posted 30 days ago

    I have a couple questions on IF TODAY

    1. What is the syntax for date is greater than or equal to a specific date? Simulation doesn't seem to respect this -
      IF TODAY('GE MAY 13 2025') THEN
    2. If more than one IF TODAY are true, which does ESP choose? The last one stated in the job? 

    I'm trying get logic to use a new argument after a specific date and time
    and then use a new argument beginning on a specified date

    LINUX_JOB NC_WNZC_DEV_LOREN_WF_DATE_SENSITVE                    
     RUN ANYDAY                                                     
       SCRIPTNAME /start_workflow.ksh 
       

        ARGS eElig wf_OLD_WORKFLOW                                   
       

    /* night of 5/14 start using new ARGS                                                            
       IF TODAY('MAY 14 2025') AND %ESPAHH.%ESPAMN. GT '2200' THEN +
       ARGS eElig wf_NEW_WORKFLOW                                   
                                                                    
       IF TODAY('GE MAY 15 2025') THEN +                            
       ARGS eElig wf_FUTURE_WORKFLOW                                
                                                                    
       USER user1
       AGENT MYAGENT1                                            
    ENDJOB                                                          



  • 2.  RE: IF TODAY DATE AND TIME

    Broadcom Employee
    Posted 30 days ago

    Hi Loren,

    Firstly you may use DAYS_FROM function instead of TODAY:
    IF DAYS_FROM('MAY 13 2025') > 0 THEN

    See more on the doc link below:
    https://techdocs.broadcom.com/us/en/ca-mainframe-software/automation/ca-workload-automation-esp-edition/12-0/using/use-procedures/use-built-in-functions/calendaring-functions.html

    Secondly for the UNIX JOB type, when there are more than one ARGS statements, the second one will overwrite the first one. See the related doc link below:
    https://techdocs.broadcom.com/us/en/ca-mainframe-software/automation/ca-workload-automation-esp-edition/12-0/reference/statements/args-statements.html

    Hope this helps,

    Lucy





  • 3.  RE: IF TODAY DATE AND TIME

    Posted 30 days ago

    Thank you for the help, Lucy.

    I have not used DAYS_FROM - I always enjoy learning a new trick.

    Your info about UNIX multiple ARGS not working sure helped. I thought I was going crazy seeing my testing results.

    Does the multiple ARGS based on DATE work for NT_JOB ?  I will test it to find out.

    I will add the helpful links to my favorites.

     



    ------------------------------
    Loren Watts
    Cigna Healthcare
    ------------------------------



  • 4.  RE: IF TODAY DATE AND TIME

    Broadcom Employee
    Posted 30 days ago

    Hi Loren,

    Glad to hear that.

    And the multiple ARGS based on DATE works similarly for NT_JOB and UNIX_JOB, see more on the second doc link under "ARGS Statement: Pass Arguments (UNIX, Windows, OpenVMS, or HP Integrity NonStop Jobs)".

    Regards,

    Lucy