ESP Workload Automation

 View Only
  • 1.  TASK SELFCOMPLETING - what is benefit of SELFCOMPLETING

    Posted Feb 07, 2023 11:06 AM
    When and Why is SELFCOMPLETING useful for a TASK?

    I have old code using SELFCOMPLETING, but in reading the documentation, I don't see the benefit. It seems to me my task is going to finish anyway, once the task has performed its purpose, such as adding or releasing a RESOURCE.

    Thank you for your help understanding this concept more fully.


    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    DOCUMENTATION - 

    If you want a task to complete automatically when its dependencies are met, add the SELFCOMPLETING operand to the TASK operand on the JOB statement.


    JOB WAIT4.LOWPRIO TASK SELFCOMPLETING RUN ANY RELEASE NEXTJOB RESOURCE (1,LOWPRIO) ENDJOB

    Define Tasks and Links
    Broadcom remove preview
    Define Tasks and Links
    Tasks and links in represent both manual and automatic processes and help you simplify job relationships. You can define tasks and links to handle processes other than executing workload. Tasks and links are scheduled like workload, but they do not submit a job. You can establish dependencies between tasks, links, and jobs.
    View this on Broadcom >


  • 2.  RE: TASK SELFCOMPLETING - what is benefit of SELFCOMPLETING

    Broadcom Employee
    Posted Feb 07, 2023 11:11 AM

    I use a self-completing task when I do not want to execute any ZOS/UNIX job etc, but I do need to execute some ESP language to control and manipulate the schedule i.e. where I have ESP or ESPNOMSG commands (maybe even REXX) to execute.

    I could also use a LINK job for this purpose, but old habits die hard




  • 3.  RE: TASK SELFCOMPLETING - what is benefit of SELFCOMPLETING

    Posted Feb 07, 2023 01:13 PM

    @Chris_Elvin  thank you for your help. You are using a TASK.  My specific question around TASK is when and why should we use SELFCOMPLETING operand with a task definition? 

    If we do not include the optional SELFCOMPLETING operand, the TASK still performs. Or it does for me in my use for distributed appls. I use a task when I only need ESP to do ESPish things such as consume a resource, complete an ESP job or appl. I do not need any code on a server to execute.

    I'm not declaring anything in this discussion but rather talking through the concept of TASK, and the use of the optional SELFCOMPLETING​ operand with a TASK.




  • 4.  RE: TASK SELFCOMPLETING - what is benefit of SELFCOMPLETING
    Best Answer

    Broadcom Employee
    Posted Feb 07, 2023 01:42 PM

    Hi Loren,

    Without SELFCOMPLETING on TASK, the TASK will not complete automatically, it needs to be force completed by an ESP command. 

    See below, the CHECK is a TASK without SELFCOMPLETING, it will be in "REQUIRES MANUAL COMPLETION" after it's readied and issued some commands:

    Job Name ApplName Gen# AvgRT P Node Job Status
    ___ CHECK ADHOCLNK 1    -          TASK      REQUIRES MANUAL COMPLETION

    To compare, if it has SELFCOMPLETING specified. it will show as:

    Job Name ApplName Gen# AvgRT P Node Job Status
    ___ CHECK ADHOCLNK 2 - COMPLETE COMPLETED AT 13.42 07 FEB

    Hope this make it clear,

    Lucy




  • 5.  RE: TASK SELFCOMPLETING - what is benefit of SELFCOMPLETING

    Posted Feb 07, 2023 01:52 PM
    Thank you @Lucy Zhang   Now I understand the need for SELFCOMPLETING operand with TASK. What I read in ESP documentation did not explain it as you just did for me.    Thanks again @Chris_Elvin for your input.​​


  • 6.  RE: TASK SELFCOMPLETING - what is benefit of SELFCOMPLETING

    Broadcom Employee
    Posted Feb 07, 2023 01:46 PM

    Hi Chris,

    I would recommend SELFCOMPLETING TASK than LINK PROCESS in most cases, since the TASK will complete AFTER the commands being issued, while the LINK PROCESS will complete without waiting the commands being issued. And many times, the sequence of the commands and next JOB matter.

    Just my two cents.

    Lucy