⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch4_comp.htm

📁 Debian中文参考手册,系统介绍了Debian系统
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<pre><code>&#036; SHLIB&#095;PATH&#061;&#036;&#123;SHLIB&#095;PATH&#125;</code>:&#036;COBDIR&#047;coblib
&#036; export<code> SHLIB&#095;PATH</code>

</pre>
<p>If the LD&#095;LIBRARY&#095;PATH, LIBPATH, or SHLIB&#095;PATH environment variable setting does not include the <code>&#036;COBDIR&#047;coblib</code> directory, one of the following error messages appears when you compile a program:
</p>
<ul>
<li type="disc">
<p>On Tru64:
</p>
<pre>14783 rtsora: &#047;sbin&#047;loader: Fatal Error: cannot map libwtc9.so

</pre>
</li>
<li type="disc">
<p>On AIX, HP, and Solaris:
</p>
<pre>ld.so.1: rts32: fatal: libfhutil.so.2.0: can&#039;t open file: errno&#061;2

</pre>
</li>
</ul>
<br /><strong><font face="arial, helvetica, sans-serif">PATH
</font></strong><br />
<p>Set the PATH environment variable to include the <code>&#047;opt&#047;SUNWnsun&#047;bin</code> directory, as follows:
</p>
<pre>&#036; PATH &#036;&#123;PATH&#125;:<code>&#047;opt&#047;SUNWnsun&#047;bin </code>
&#036; export PATH

</pre>
<br /><strong><font face="arial, helvetica, sans-serif">LD&#095;LIBRARY&#095;PATH
</font></strong><br />
<p>Set the LD&#095;LIBRARY&#095;PATH environment variable to include the <code>&#047;opt&#047;SUNWnsun&#047;bin</code> directory, as follows:
</p>
<pre>&#036; LD&#095;LIBRARY&#095;PATH&#061;&#036;&#123;LD&#095;LIBRARY&#095;PATH&#125;:&#047;opt&#047;SUNWnsun&#047;bin
&#036; export LD&#095;LIBRARY&#095;PATH

</pre>
<p>If the LD&#095;LIBRARY&#095;PATH environment variable setting does not include the <code>&#047;opt&#047;SUNWnsun&#047;bin</code> directory, the following error message appears when you compile a program:
</p>
<pre>ld.so.1: cobol: fatal: liblicense.so: can&#039;t open file: errno&#061;2
</pre>
</div class="sect3">
</div class="sect2">
<div class="sect2">
<!--
infolevel=all
infotype=general
--><a id="sthref498" name="sthref498"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
Pro&#042;COBOL Oracle Runtime System <a id="sthref499" name="sthref499"></a><a id="sthref500" name="sthref500"></a><a id="sthref501" name="sthref501"></a><a id="sthref502" name="sthref502"></a>
</font>
</h3>
<p>Oracle provides its own complete runtime system, called <code>rtsora</code>, to run dynamically loadable Pro&#042;COBOL programs. Use the <code>rtsora</code> runtime system in place of the <code>cobrun</code> runtime system provided by Merant to run dynamically loadable Pro&#042;COBOL programs. If you attempt to run a Pro&#042;COBOL program with <code>cobrun</code>, you receive the following error:
</p>
<pre>&#036; cobrun sample1.gnt
Load error : file &#039;SQLADR&#039;
error code: 173, pc&#061;0, call&#061;1, seg&#061;0
173     Called program file not found in drive&#047;directory

</pre>
</div class="sect2">
<div class="sect2">
<!--
infolevel=all
infotype=general
--><a id="sthref503" name="sthref503"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
Pro&#042;COBOL Demonstration Programs
</font>
</h3>
<p>Demonstration programs are provided to show the features of the Pro&#042;COBOL precompiler. The demonstration programs are located in either the <code>&#036;ORACLE&#095;HOME&#047;precomp&#047;demo&#047;procob</code> directory or the <code>&#036;ORACLE&#095;HOME&#047;precomp&#047;demo&#047;procob2</code> directory, depending on the Pro&#042;COBOL version. By default, all programs are dynamically linked with the client shared library.
</p>
<p>The programs assume that the demonstration tables created by the <code>&#036;ORACLE&#095;HOME&#047;sqlplus&#047;demo&#047;demobld.sql</code> script exist in the SCOTT schema with the password TIGER. 
</p>
<p>Use the appropriate make file to create the demonstration programs:
</p>
<ul>
<li type="disc">
<p>For Pro&#042;COBOL release 9.2.0.1.0, use:
</p>
<pre>&#036;ORACLE&#095;HOME&#047;precomp&#047;demo&#047;procob&#047;demo&#095;procob.mk

</pre>
</li>
<li type="disc">
<p>For Pro&#042;COBOL release 1.8.77.0.0, use:
</p>
<pre>&#036;ORACLE&#095;HOME&#047;precomp&#047;demo&#047;procob&#047;demo&#095;procob18.mk

</pre>
<br /><table summary="This is a layout table to format a note" title="This is a layout table to format a note" dir="ltr" border="1" width="80%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"><tbody>
<tr>
<td align="left" colspan="1" rowspan="1">
<p>
<font face="arial, helvetica, sans-serif">
<strong>Note:</strong>
</font>
</p>The following examples assume that you are using the make file for Pro&#042;COBOL release 9.2.0.1.0.
</td>
</tr></tbody>
</table><br />
</li>
</ul>
<p>To precompile, compile, and link the <code>sample1</code> demonstration program for Pro&#042;COBOL, enter:
</p>
<pre>&#036; make -f demo&#095;procob.mk sample1

</pre>
<p>To create all of the Pro&#042;COBOL demonstration programs, enter:
</p>
<pre>&#036; make -f demo&#095;procob.mk samples

</pre>
<p>To create and run a dynamically loadable <code>sample1.gnt</code> program to be used with the <code>rtsora</code> runtime system, enter:
</p>
<pre>&#036; make -f demo&#095;procob.mk sample1.gnt
&#036; rtsora sample1.gnt

</pre>
<p>Some demonstration programs require you to run a SQL script, located in the <code>&#036;ORACLE&#095;HOME&#047;precomp&#047;demo&#047;sql</code> directory. If you do not run the script, a message displays requesting you to run it. To build a demonstration program and run the corresponding SQL script, include the <code>make</code> macro argument <code>RUNSQL&#061;run</code> on the command line. For example, to create the <code>sample9</code> demonstration program and run the required <code>&#036;ORACLE&#095;HOME&#047;precomp&#047;demo&#047;sql</code>&#047;<code>sample9.sql</code> script, enter:
</p>
<pre>&#036; make -f demo&#095;procob.mk sample9 RUNSQL&#061;run

</pre>
<p>To create all of the Pro&#042;COBOL demonstration programs and run all corresponding required SQL scripts, enter:
</p>
<pre>&#036; make -f demo&#095;procob.mk samples RUNSQL&#061;run
</pre>
</div class="sect2">
<div class="sect2">
<!--
infolevel=all
infotype=general
--><a id="sthref504" name="sthref504"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
Pro&#042;COBOL User Programs<a id="sthref505" name="sthref505"></a><a id="sthref506" name="sthref506"></a><a id="sthref507" name="sthref507"></a><a id="sthref508" name="sthref508"></a>
</font>
</h3>
<p>You can use the appropriate demonstration make file to create user programs, depending on the version of Pro&#042;COBOL you are using. The syntax for creating a program with the demonstration make file is:
</p>
<ul>
<li type="disc">
<p>For Pro&#042;COBOL release 9.2.0.1.0, enter:
</p>
<pre>&#036; make -f demo&#095;procob.mk <em>target</em> COBS&#061;"<em>cobfile1</em> <em>cobile2</em> ..." EXE&#061;<em>exename</em>

</pre>
</li>
<li type="disc">
<p>For Pro&#042;COBOL release 1.8.77.0.0, enter: 
</p>
<pre>&#036; make -f demo&#095;procob18.mk <em>target</em> COBS&#061;"<em>cobfile1</em> <em>cobfile2</em> ..." EXE&#061;<em>exename</em>

</pre>
</li>
</ul>
<p>In the preceding examples:
</p>
<ul>
<li type="disc">
<p><em><code>target</code></em> is the make file target that you want to use
</p>
</li>
<li type="disc">
<p><em><code>cobfilen</code></em> is the COBOL source file for the program
</p>
</li>
<li type="disc">
<p><em><code>exename</code></em> is the executable program
</p>
</li>
</ul>
<p>For example, to create the program <code>myprog</code>, enter one of the following commands, depending on the source and type of executable you want to create:
</p>
<ul>
<li type="disc">
<p>For COBOL source, dynamically linked with the client shared library, enter:
</p>
<pre>&#036; make -f demo&#095;procob.mk build COBS&#061;myprog.cob EXE&#061;myprog

</pre>
</li>
<li type="disc">
<p>For COBOL source, statically linked, enter:
</p>
<pre>&#036; make -f demo&#095;procob.mk build&#095;static COBS&#061;myprog.cob EXE&#061;myprog

</pre>
</li>
<li type="disc">
<p>For COBOL source, dynamically loadable for use with <code>rtsora</code>, enter:
</p>
<pre>&#036; make -f demo&#095;procob.mk myprog.gnt

</pre>
</li>
</ul>
</div class="sect2">
<div class="sect2">
<!--
infolevel=all
infotype=general
--><a id="sthref509" name="sthref509"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
FORMAT Precompiler <a id="sthref510" name="sthref510"></a><a id="sthref511" name="sthref511"></a>Option
</font>
</h3>
<p>The <code>FORMAT</code> precompiler option specifies the format of input lines for COBOL. If you specify the default <code>FORMAT&#061;ANSI</code>, columns 1 to 6 contain an optional sequence number, column 7 indicates comments or continuation lines, paragraph names begin in columns 8 to 11, and statements begin in columns 12 to 72. 
</p>
<p>If you specify <code>FORMAT&#061;TERMINAL</code>, columns 1 to 6 are dropped, making column 7 the left-most column.
</p>
</div class="sect2">
</div class="sect1"><a id="i28565" name="i28565"></a>
<div class="sect1">
<!--
infolevel=all
infotype=general
--><a id="sthref512" name="sthref512"></a>
<h2>
<font face="arial, helvetica, sans-serif" color="#330099">Pro&#042;FORTRAN Precompiler (AIX, HP, Solaris, and Tru64 Only)
</font>
</h2>
<p>Before you use the Pro&#042;FORTRAN precompiler, verify that the correct version of the compiler is installed.
</p>
<div align="center">
<br /><table summary="This is a layout table to format a tip" title="This is a layout table to format a tip" dir="ltr" border="1" width="80%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"><tbody>
<tr>
<td align="left" colspan="1" rowspan="1">
<p>
<font face="arial, helvetica, sans-serif">
<strong>See Also:</strong>
</font>
</p><em>Oracle9i Installation Guide Release 2 (9.2.0.1.0) for UNIX Systems</em><em></em> for information on the required compiler versions on each platform, and the <em>Pro&#042;FORTRAN Precompiler Programmer&#039;s Guide for additional information on the Pro&#042;FORTRAN precompiler and interface features.</em>
</td>
</tr></tbody>
</table><br />
</div><a id="i28568" name="i28568"></a>
<div class="sect2">
<!--
infolevel=all
infotype=general
--><a id="sthref513" name="sthref513"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
Pro&#042;FORTRAN Demonstration Programs<a id="sthref514" name="sthref514"></a>
</font>
</h3>
<p>Demonstration programs are provided to show the features of the Pro&#042;FORTRAN precompiler. All of the demonstration programs are located in the <code>&#036;ORACLE&#095;HOME&#047;precomp&#047;demo&#047;profor</code> directory. By default, all programs are dynamically linked with the client shared library.
</p>
<p>The programs assume that the demonstration tables created by the <code>&#036;ORACLE&#095;HOME&#047;sqlplus&#047;demo&#047;demobld.sql</code> script exist in the SCOTT schema with the password TIGER. 
</p>
<p>Use the <code>demo&#095;profor.mk</code> make file, located in the <code>&#036;ORACLE&#095;HOME&#047;precomp&#047;demo&#047;profor</code> directory, to create the demonstration programs. For example, to precompile, compile, and link the <code>sample1</code> demonstration program, enter:
</p>
<pre>&#036; make -f demo&#095;profor.mk sample1

</pre>
<p>To create all of the Pro&#042;FORTRAN demonstration programs, enter:
</p>
<pre>&#036; make -f demo&#095;profor.mk samples

</pre>
<p>Some demonstration programs require you to run a SQL script, located in the <code>&#036;ORACLE&#095;HOME&#047;precomp&#047;demo&#047;sql</code> directory. If you do not run the script, a message displays requesting you to run it. To build a demonstration program and run the corresponding SQL script, include the <code>make</code> macro argument <code>RUNSQL&#061;run</code> on the command line. For example, to create the <code>sample11</code> demonstration program and run the required <code>&#036;ORACLE&#095;HOME&#047;precomp&#047;demo&#047;sql&#047;sample11.sql</code> script, enter:
</p>
<pre>&#036; make -f demo&#095;profor.mk sample11 RUNSQL&#061;run

</pre>
<p>To create all of the Pro&#042;FORTRAN demonstration programs and run all corresponding required SQL scripts, enter:
</p>
<pre>&#036; make -f demo&#095;profor.mk samples RUNSQL&#061;run
</pre>
</div class="sect2"><a id="i28599" name="i28599"></a>
<div class="sect2">
<!--
infolevel=all
infotype=general
--><a id="sthref515" name="sthref515"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
Pro&#042;FORTRAN User Programs
</font>
</h3>
<p>You can use the <code>&#036;ORACLE&#095;HOME&#047;precomp&#047;demo&#047;profor&#047;demo&#095;profor.mk</code> make file to create user programs. The syntax for creating a program with the <code>demo&#095;proc.mk</code> make file is:
</p>
<pre>&#036; make -f demo&#095;profor.mk <em>target</em> FORS&#061;"<em>forfile1</em> <em>forfile2</em> ..." EXE&#061;<em>exename</em>

</pre>
<p>In the preceding example:
</p>
<ul>
<li type="disc">
<p><em><code>target</code></em> is the make file target that you want to use
</p>
</li>
<li type="disc">
<p><em><code>forfilen</code></em> is the FORTRAN source for the program
</p>
</li>
<li type="disc">
<p><em><code>exename</code></em> is the executable program
</p>
</li>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -