Enterprise Developer に付属している複数の SQL プリプロセッサから選択し、アプリケーションをコンパイルします。
 
 
	  
		 
		  - OpenESQL
- Enterprise Developer 内からコンパイルする前に、次を実行します。 
			  
				- プロジェクト プロパティを開き、[Micro Focus > プロジェクト設定 > COBOL > SQL プリプロセッサ] の順に展開します。 
				  注: [ Micro Focus > ビルド構成 > COBOL > SQL プリプロセッサ] の下でコンパイラ指令オプションを設定することもできます。この方法では、設定はビルド構成がアクティブになっている場合のみ適用され、コンパイラ指令オプションが [プロジェクト設定] 内のまたはプログラム レベルの設定に設定されることはありません。 
				   
 
- [Enable configuration specific settings] と [Use SQL Preprocessor] チェック ボックスがオフの場合は、これらをオンにします。 
				
- [プリプロセッサ タイプ] ドロップダウンの一覧から、[OpenESQL] を選択します。 
				
- データベースの名前を DB 設定の "Value" フィールドに入力します。 
		  
- 任意のデータベース アクセスのタイプを指定するには、グリッドを使用して DBMAN 指令の値を ODBC または JDBC に設定します。 
		  
- [Apply] をクリックします。 
		  
- グリッドを使用して追加する指令オプションを選択し、値を設定します。設定ごとに [Apply] をクリックします。 
		  
 または、プリプロセッサの仕様とオプションを追加の指令として入力できます。 
		    
			 - プロジェクトのプロパティを開き、[Micro Focus > Project Settings > COBOL] の順に展開します。 
				注: または [ Micro Focus > ビルド構成 > COBOL] の順に選択してもプリプロセッサを設定できます。この方法では、設定はビルド構成がアクティブになっている場合のみ適用され、[プロジェクト設定] 内またはプログラム レベルでプリプロセッサが他のプリプロセッサに設定されることはありません。 
				 
 
- "追加指令" フィールドをクリックして、次を入力します。 
				SQL(DBMAN=dbaType [SQLdirOpt]) dbaType は ODBC または JDBC で、SQLdirOpts は 1 つまたは複数の追加指令オプションです。 
				 
 
- DB2 ECM
-  
				 
				  - Open your project properties and 
					 expand 
						Micro Focus > Project Settings > COBOL > SQL Preprocessor. 
					 注: You can also set the preprocessor under 
						 Micro Focus > Build Configurations > COBOL > SQL Preprocessor. If you do this, the setting applies only when the build configuration is active, and the preprocessor is not set to something else in the Project Settings or on the program level. 
					  
 
- Check 
					 Enable configuration specific settings and 
					 Use SQL Preprocessor. 
				  
- From the 
					 Preprocessor Type drop-down list, select 
					 HCO for DB2 LUW. 
				  
- Type the name of your database into the 
						Value field of the DB setting. 
					 注: If you leave the value for DB blank, the compiler uses the database specified by the value of the DB2DBDFT environment variable. 
					  
 
- Click 
					 Apply. 
				  
 Alternatively, you can enter the preprocessor specification and options as additional directives: 
				  
				  - Open your project properties and expand 
					 Micro Focus > Project Settings > COBOL. 
					 注: You can also set the preprocessor under 
						 Micro Focus > Build Configurations > COBOL. If you do this, the setting applies only when the build configuration is active, and the preprocessor is not set to something else in the Project Settings or on the program level. 
					  
 
- Click in the 
					 Additional directives field and type: 
					 DB2[(DB=dbName [DB2dirOpts])] Where 
						dbName is the name of your DB2 database, and 
						DB2dirOpts is one or more additional directive options. 
					  注: If you do not specify the DB option, the compiler uses the database specified as the value of the DB2DBDFT environment variable. 
					  
 
 
- COBSQL
- Before compiling from within 
			 Enterprise Developer: 
			 
				注: You can also set the preprocessor under 
				   Micro Focus > Build Configurations > COBOL > SQL Preprocessor. If you do this, the setting applies only when the build configuration is active, and the preprocessor is not set to something else in the project settings or at the program level. 
				 
 
 For Oracle Pro*COBOL, you can set the COBSQL preprocessor and compiler directives from the project's properties: 
			   
			  
				- Expand 
				  Micro Focus > Project Settings > COBOL > SQL Preprocessor. 
				
- Check 
				  Use SQL Preprocessor. 
				
- From the 
				  Preprocessor Type list, select 
				  Oracle Pro*COBOL(COBSQL). 
				
- Under 
				  Setting choose a directive and specify its value under 
				  Value. 
				
- Repeat the previous step to add additional directives. 
				
- Click 
				  Apply, then click 
				  OK. 
				
 注: Ensure that no conflicting preprocessor directives are set in 
				 Additional Directives. 
			  
 
 
注: Adding the 
		  
Oracle Pro*COBOL (COBSQL) preprocessor to the 
		  
SQL Preprocessor file
, build configuration or project property page automatically adds a read-only entry to the top of the preprocessors list in the 
		  
Additional Preprocessors property page. If you have multiple preprocessors in the preprocessors list, you can change the sequence of execution by moving preprocessors up and down the list. See section 
		  
Additional Preprocessors for more information.