いくつかの条件は、ユーザーの代わりに RPG コンパイラーが定義します。これらの条件は、/DEFINE または /UNDEFINE とともに使用することはできません。これらは、/IF および /ELSEIF とともにのみ、使用できます。
* This module is to be defined on different platforms. With * the ILE RPG compiler, the BNDDIR keyword is used to * indicate where procedures can be found. With a different * compiler, the BNDDIR keyword might not be valid. /IF DEFINED(*ILERPG) H BNDDIR('QC2LE') /ENDIFRPG IV コンパイラーの他のバージョンでどの条件が使用可能であるかについては、 そのコンパイラーの解説書を参照してください。たとえば、VisualAge RPG であれば「VisualAge RPG Language Reference」を参照してください。
/IF DEFINED(*CRTBNDRPG) H DFTACTGRP(*NO) /ENDIF
* This code might appear in a generic Control specification * contained in a /COPY file. The module that contains the * main procedure would define condition THIS_IS_MAIN before * coding the /COPY directive. * If the CRTRPGMOD command is not being used, or if * THIS_IS_MAIN is defined, the NOMAIN keyword will not * be used in this Control specification. /IF DEFINED(*CRTRPGMOD) /IF NOT DEFINED(THIS_IS_MAIN) H NOMAIN /ENDIF /ENDIF
この条件は、ユーザーが同一のプログラムを異なるターゲット・リリースで実行し、かつすべてのリリースにおいて使用可能ではない機能の利点を利用したい場合に使用します。 この条件に対するサポートは、適切な PTF がインストールされている *V4R4M0 システムから始まっています。
/IF DEFINED(*V5R1M0) * V5R1M0 およびそれ以降のリリースで有効なコードを指定します。 I/INCLUDE SRCFIL,MBR2 /ELSE * V4R4M0 で有効なコードを指定します。 I/COPY SRCFIL,MBR2 /ENDIF
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.