Compiler options

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.

Table 1. Compiler options
Aspect of your program Compiler option Default Option abbreviations
Source language APOST/QUOTE QUOTE APOST | Q
ARITH ARITH(COMPAT) AR(C | E)
CICS NOCICS None
CODEPAGE CODEPAGE(1140) CP(ccsid)
CURRENCY NOCURRENCY CURR | NOCURR
DBCS DBCS None
NSYMBOL NSYMBOL(NATIONAL) NS(DBCS | NAT)
NUMBER NONUMBER NUM | NONUM
QUALIFY QUALIFY(COMPAT) QUA(C | E)
SEQUENCE SEQUENCE SEQ | NOSEQ
SQL NOSQL None
SQLCCSID SQLCCSID SQLC | NOSQLC
SQLIMS NOSQLIMS None
SUPPRESS SUPPRESS SUPP
WORD NOWORD WD | NOWD
XMLPARSE XMLPARSE(XMLSS) XP(X) | XP(C)
Date processing INTDATE INTDATE(ANSI) None
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
COPYRIGHT NOCOPYRIGHT CPYR | NOCPYR
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)
SERVICE NOSERVICE SERV | NOSERV
Object code control ADV ADV None
AFP Start of changeAFP(NOVOLATILE)End of change None
ARCH ARCH(7) None
AWO NOAWO None
BLOCK0 NOBLOCK0 None
Start of changeDEFINEEnd of change Start of changeNODEFINEEnd of change Start of changeDEF | NODEFEnd of change
DISPSIGN DISPSIGN(COMPAT) DS(S | C)
DLL NODLL None
EXPORTALL NOEXPORTALL EXP | NOEXP
FASTSRT NOFASTSRT FSRT | NOFSRT
HGPR HGPR(PRESERVE) None
Start of changeINITIALEnd of change Start of changeNOINITIALEnd of change None
Start of changeINLINEEnd of change Start of changeINLINEEnd of change Start of changeINL | NOINLEnd of change
Start of changeINVDATAEnd of change Start of changeNOINVDATAEnd of change Start of changeNOINV | INVD(FNC | NOFNC,CS | NOCS)End of change
MAXPCF Start of changeMAXPCF(100000)End of change None
Start of changeNUMCHECKEnd of change Start of changeNONUMCHECKEnd of change Start of changeNC | NONCEnd of change
NUMPROC NUMPROC(NOPFD) None
OPTIMIZE OPTIMIZE(0) OPT(n)
OUTDD OUTDD(SYSOUT) OUT
Start of changePARMCHECKEnd of change Start of changeNOPARMCHECKEnd of change Start of changePC | NOPCEnd of change
TRUNC TRUNC(STD) None
VLR VLR(STD) VLR(C | S)
ZONECHECK NOZONECHECK NOZC | ZC(MSG) | ZC(ABD)
ZWB ZWB None
Virtual storage usage BUFSIZE 4096 BUF
DATA DATA(31) None
DYNAM NODYNAM DYN | NODYN
RENT RENT None
RMODE AUTO None
STGOPT NOSTGOPT SO | NOSO
Debugging and diagnostics DIAGTRUNC NODIAGTRUNC DTR | NODTR
DUMP NODUMP DU | NODU
FLAG FLAG(I,I) F | NOF
FLAGSTD NOFLAGSTD None
Start of changeINITCHECKEnd of change Start of changeNOINITCHECKEnd of change Start of changeIC | NOICEnd of change
RULES NORULES Start of changeRULES(ENDP,EVENP,LXPRF,SLCKB,OOM) | RULES(NOENDP,NOEVENP,NOLXPRF,NOSLCKB,NOOOM,NOUNRA | NOUNRS)End of change
SSRANGE NOSSRANGE Start of changeSSR(ZLEN | NOZLEN,MSG | ABD) | NOSSREnd of change
TEST NOTEST None
Other ADATA NOADATA None
Start of changeCOPYLOCEnd of change Start of changeNOCOPYLOCEnd of change Start of changeCPLCEnd of change
EXIT NOEXIT NOEX | EX(INX | NOINX, LIBX | NOLIBX, PRTX | NOPRTX, ADX | NOADX, MSGX | NOMSGX)
MDECK NOMDECK NOMD | MD | MD(C | NOC)
OPTFILE None None
THREAD NOTHREAD None
VSAMOPENFS VSAMOPENFS(COMPAT) VS(C | S)

Installation defaults: The default compiler options that were set up when your compiler was installed are in effect for your program unless you override those options. (In some installations, certain compiler options are fixed so that you cannot override them. If you have problems with the default options, contact your system administrator.) To determine which are the default options, run a test compilation without specifying any compiler options. The output listing lists the default options in effect at your site.

Nonoverridable options: In some installations, certain compiler options are fixed so that you cannot override them. If you have problems with those options, contact your system administrator.

Option specification: Compiler options and suboptions are not case sensitive.

Performance considerations: The AFP, ARCH, ARITH, AWO, BLOCK0, DYNAM, FASTSRT, HGPR, MAXPCF, Start of changeNUMCHECK, End of changeNUMPROC, OPTIMIZE, Start of changePARMCHECK, End of changeRENT, SQLCCSID, SSRANGE, STGOPT, TEST, THREAD, TRUNC, ZONECHECK, and Start of changeINVDATAEnd of change compiler options can affect runtime performance.