<div id="defining-the-first-task"> <span id="defining-a-task"></span><span id="index-0"></span> <div > <div >Next, we need to write the <a href="/wiki/display/ECFLOW/Glossary#term-ecf-script"><em >ecf script</em></a> for the task <strong>t1</strong>.</div> <div >By default ECF expects files to be in a directory structure below ECF_HOME</div> <div >that reflect the hierarchy of the suites. The <a href="/wiki/display/ECFLOW/Glossary#term-task"><em >task</em></a> <strong>t1</strong> being in the <a href="/wiki/display/ECFLOW/Glossary#term-suite"><em >suite</em></a> test,</div> <div >the <a href="/wiki/display/ECFLOW/Glossary#term-ecf-script"><em >ecf script</em></a> for the task <strong>t1</strong> must be in a sub-directory test.</div> </div> <ul> <li><p >In ECF_HOME, create a directory test:</p> <div ><pre>> mkdir test</pre> </div> </li> <li><p >In test, create a file name <tt ><span >t1.ecf</span></tt> with the following contents:</p> <div ><pre>%include "../head.h" echo "I am part of a suite that lives in %ECF_HOME%" %include "../tail.h"</pre> </div> </li> </ul> </div> <div id="job-creation"> <span id="id1"></span> <div > <div >Before submitting the task, the server will transform the <a href="/wiki/display/ECFLOW/Glossary#term-ecf-script"><em >ecf script</em></a> to a <a href="/wiki/display/ECFLOW/Glossary#term-job-file"><em >job file</em></a></div> <div >This process is known as <a href="/wiki/display/ECFLOW/Glossary#term-job-creation"><em >job creation</em></a>.</div> </div> <div > <div >This involves locating the <a href="/wiki/display/ECFLOW/Glossary#term-ecf-script"><em >ecf script</em></a> on disk, and then <a href="/wiki/display/ECFLOW/Glossary#term-pre-processing"><em >pre-processing</em></a> the</div> <div ><a href="/wiki/display/ECFLOW/Glossary#term-directives"><em >directives</em></a>. This process includes performing <a href="/wiki/display/ECFLOW/Glossary#term-variable-substitution"><em >variable substitution</em></a>.</div> </div> <div > <div >This will create a file with a ‘.job’ extension.</div> <div >This is the script that ECF will submit to your system.</div> </div> <p>In our case:</p> <ul> <li><p >%include ”../head.h” will be substituted by the content of the file <a href="/wiki/display/ECFLOW/Understanding+Includes#head-h"><em>head.h</em></a>.</p> <div > <div >Note that the file name is given relatively to the file <tt ><span >t1.ecf</span></tt>,</div> <div >i.e. in the directory above the one containing <tt ><span >t1.ecf</span></tt></div> </div> </li> <li><p >%ECF_HOME% will be substituted by the value of the variable ECF_HOME</p> </li> <li><p >%include <em>”../tail.h”</em> will be substituted by the content of the file <a href="/wiki/display/ECFLOW/Understanding+Includes#tail-h"><em>tail.h</em></a></p> </li> </ul> <p>What to do:</p> <ol > <li>Type in the <a href="/wiki/display/ECFLOW/Glossary#term-ecf-script"><em >ecf script</em></a> <tt ><span >t1.ecf</span></tt></li> </ol> </div> |