You can direct and control your compilation by using compiler options or by using compiler-directing statements (compiler directives).
Compiler options affect the aspects of your program that are listed in the table below. The linked-to information for each option provides the syntax for specifying the option and describes the option, its parameters, and its interaction with other parameters.
| Aspect of your program | Compiler option | Default | Option abbreviations |
|---|---|---|---|
| Source language | ARITH | ARITH(COMPAT) | AR(C|E) |
| CICS | NOCICS | None | |
| CODEPAGE | CODEPAGE(01140) | CP(ccsid) | |
| CURRENCY | NOCURRENCY | CURR|NOCURR | |
| DBCS | DBCS | None | |
| LIB | LIB | None | |
| NSYMBOL | NSYMBOL(NATIONAL) | NS(DBCS|NAT) | |
| NUMBER | NONUMBER | NUM|NONUM | |
| QUOTE/APOST | QUOTE | Q|APOST | |
| SEQUENCE | SEQUENCE | SEQ|NOSEQ | |
| SQL | NOSQL | None | |
| SQLCCSID | SQLCCSID | SQLC|NOSQLC | |
| WORD | NOWORD | WD|NOWD | |
| XMLPARSE | XMLPARSE(XMLSS) | XP(X)|XP(C) | |
| Date processing | DATEPROC | NODATEPROC, or DATEPROC(FLAG,NOTRIG) if only DATEPROC is specified | DP|NODP |
| INTDATE | INTDATE(ANSI) | None | |
| YEARWINDOW | YEARWINDOW(1900) | YW | |
| Maps and listings | LANGUAGE | LANGUAGE(ENGLISH) | LANG(EN|UE|JA|JP) |
| LINECOUNT | LINECOUNT(60) | LC | |
| LIST | NOLIST | None | |
| MAP | NOMAP | None | |
| OFFSET | NOOFFSET | OFF|NOOFF | |
| SOURCE | SOURCE | S|NOS | |
| SPACE | SPACE(1) | None | |
| TERMINAL | NOTERMINAL | TERM|NOTERM | |
| VBREF | NOVBREF | None | |
| XREF | XREF(FULL) | X|NOX | |
| Object deck generation | COMPILE | NOCOMPILE(S) | C|NOC |
| DECK | NODECK | D|NOD | |
| NAME | NONAME, or NAME(NOALIAS) if only NAME is specified | None | |
| OBJECT | OBJECT | OBJ|NOOBJ | |
| PGMNAME | PGMNAME(COMPAT) | PGMN(CO|LU|LM) | |
| Object code control | ADV | ADV | None |
| AWO | NOAWO | None | |
| DLL | NODLL | None | |
| EXPORTALL | NOEXPORTALL | EXP|NOEXP | |
| FASTSRT | NOFASTSRT | FSRT|NOFSRT | |
| NUMPROC | NUMPROC(NOPFD) | None | |
| OPTIMIZE | NOOPTIMIZE | OPT|NOOPT | |
| OUTDD | OUTDD(SYSOUT) | OUT | |
| TRUNC | TRUNC(STD) | None | |
| ZWB | ZWB | None | |
| Virtual storage usage | BUFSIZE | 4096 | BUF |
| DATA | DATA(31) | None | |
| DYNAM | NODYNAM | DYN|NODYN | |
| RENT | RENT | None | |
| RMODE | AUTO | None | |
| SIZE | SIZE(MAX) | SZ | |
| Debugging and diagnostics | DIAGTRUNC | NODIAGTRUNC | DTR|NODTR |
| DUMP | NODUMP | DU|NODU | |
| FLAG | FLAG(I,I) | F|NOF | |
| FLAGSTD | NOFLAGSTD | None | |
| SSRANGE | NOSSRANGE | SSR|NOSSR | |
| TEST | NOTEST | None | |
| Other | ADATA | NOADATA | None |
| EXIT | NOEXIT | EX(INX,LIBX,PRTX,ADX) | |
| MDECK | NOMDECK | NOMD|MD|MD(C)|MD(NOC) | |
| OPTFILE | None | None | |
| THREAD | NOTHREAD | None |
Installation defaults: The default options that were set up when your compiler was installed are in effect for your program unless you override them with other options. (In some installations, certain compiler options are set up as fixed so that you cannot override them. If you have problems, see your system administrator.) To find out the default compiler options in effect, run a test compilation without specifying any options. The output listing lists the default options specified by your installation.
Nonoverridable options: In some installations, certain compiler options are set up so that you cannot override them. If you have problems, see your system administrator.
Performance considerations: The ARITH, AWO, DYNAM, FASTSRT, NUMPROC, OPTIMIZE, RENT, SQLCCSID, SSRANGE, TEST, THREAD, and TRUNC compiler options can affect runtime performance.