ユーザ・プログラムを BMS ファイルのプリコンパイラとして指定できるようにします。
working-storage section. 01. 05 install-flag pic x comp-x. 05 install-params. 10 exit-proc-ptr usage procedure-pointer. 10 pic x. 01 p-exit-block. 03 p-block-size pic x(4) comp-5 value 16. 03 p-return-code pic x(4) comp-5. 03 p-rts-error pic x(4) comp-5. 03 p-exit-flags pic x(4) comp-5. linkage section. 01 source-file pic x(256). procedure division using source-file. display source-file * On exit the file specified in source-file is the one * the compiler will actually compile move "EMPLOY.BMS" to source-file set exit-proc-ptr to entry "exitproc" move 0 to install-flag call "CBL_EXIT_PROC" using install-flag install-params end-call * Zero means continue, non-zero abort move 0 to return-code exit program . exitproc section. entry "exitproc". display "in exit proc" call "CBL_GET_EXIT_INFO" using p-exit-block exit program .
コメント:
ユーザ・プログラムは、内部ファイル名を返す必要があります。
userprog が見つからない場合、コンパイルは失敗します。
ユーザ・プログラムは、CBL_EXIT_PROC を使用してポストビルド処理を実行できます。