Versions Compared

Key

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

...


In a large suite, with hundreds of tasks, you would need to execute the same commands in each of them. Editing just a single (header) file is somewhat easier than editing them all.
E.g. file

Code Block
titlehead.h

...

code
 #!/bin/ksh
 ECF_NAME=%ECF_NAME%
 ECF_NODE=%ECF_NODE%
 ECF_PASS=%ECF_PASS%
 ECF_PORT=%ECF_PORT%
 ECF_TRYNO=%ECF_TRYNO%
 ECF_RID=$$
 export ECF_NAME ECF_NODE ECF_PASS ECF_TRYNO ECF_PORT ECF_RID
 ERROR() { echo ERROR ; ecflow_client --abort=trap; exit 1 ; }
 trap ERROR 0
 trap '{ echo "Killed by a signal"; ERROR ; }' 1 2 3 4 5 6 7 8 10 12 13 15 # list using kill -l or man kill
 set -e
 ecflow_client --init=$$

The same applies to the end of the task. You want to tell the ecFlow that the task is complete by using ecflow_client --complete(CLI) and un-trap the shell.
Anchorfile_endhfile_endhe.g. file

Code Block
titletail.h

...

code
 ecflow_client --complete
 trap 0
 exit

...