Getting error sp2-0310 when using "@@" (double "at" sign) command
<p>I have a folder structure similar to</p>

<pre><code>/Release_script/
  install.sql
/common_code/
  error_handling.sql
/Reporting/
  fancy_report1.sql
  fancy_report2.sql
  some_code_to_include.sql
</code></pre>

<p>The install.sql script includes the lines</p>

<pre><code>@../Reporting/fancy_report1.sql
@../Reporting/fancy_report2.sql
</code></pre>

<p>fancy_report1.sql and fancy_report2.sql both start with the line </p>

<pre><code>@@../common_code/error_handling.sql
</code></pre>

<p>They also both include other <code>/Reporting/</code> files, ie <code>@@some_code_to_include.sql</code></p>

<p>As documented within "SQL*Plus User's Guide and Reference", the <a href="https://docs.oracle.com/cd/B10501_01/server.920/a90842/ch13.htm#1006822" rel="nofollow">@@ (double "at" sign)</a></p>

<blockquote>
  <p>Runs a script. This command is almost identical to the @ ("at" sign)
  command. <strong>It is useful for running nested scripts because it has the
  additional functionality of looking for the specified script in the
  same path or url as the script from which it was called</strong>. Only the url
  form is supported in iSQL*Plus.</p>
</blockquote>

<p>When I open sqlplus in <code>/Release_script/</code> and attempt to run <code>install.sql</code>, I get the error </p>

<blockquote>
  <p>SP2-0310: unable to open file "../common_code/error_handling.sql"</p>
</blockquote>

<p>If I change fancy_report1.sql's reference to <code>@../common_code/error_handling.sql</code>, then execute fancy_report1.sql directly from the <code>/Reporting/</code> folder, it works.</p>

<p><strong>What commands should I use to run commands from the starting point of the calling file (ie <code>fancy_report1.sql</code>) and <em>not</em> from the starting point of the working directory (ie, <code>/Release_script/</code>)?</strong> Why does the <code>@@</code> command seem to behave exactly like the <code>@</code> command? </p>

<p>For what it's worth:</p>

<pre><code>sqlplus -S /nolog&lt;&lt;EOF
prompt &amp;_SQLPLUS_RELEASE
</code></pre>

<p>Yields:</p>

<pre><code>1102000100
</code></pre>