@echo off setlocal REM %1 == example program file name (without extension) REM Compile the example program given by %1 set COBCPY=..;%COBCPY% cobol %1 list() xmlgen(ws) noobj; REM To compile for .NET managed code comment out the above line and uncomment the following line REM cobol %1 list() xmlgen(ws) ilgen iltarget(x86) ilref(MicroFocus.COBOL.XmlExtensions) ilref(MicroFocus.COBOL.XmlExtensions.Interop); REM Run example program REM COBPATH needs to include the location of cobxmlext.dll. run %1 endlocal
このバッチ ファイルでは、バッチ ファイルの呼び出し元によって指定されたパラメーターを使用します。パラメーターは COBOL プログラムのファイル名です (.cbl 拡張子なし)。
このバッチ ファイルを使用して「例 1 ファイルのインポートおよびファイルのエクスポート」をビルドおよび実行するには、コマンド ラインで次のように入力します。
example example01