Using a Data Area as a Control Specification
If a control specification is not present in your source, the RPG compiler will search for a data area containing control specification keywords. If the data area is not found, a default blank control specification will be used.
Use the CL command CRTDTAARA (Create Data Area) to create a data area defined as type *CHAR. (See the IBM® i Information Center for a description of the Create Data Area command.) Enter the keywords in the Initial Value parameter of the command.
CRTDTAARA DTAARA(MYLIB/RPGLEHSPEC)
TYPE(*CHAR)
LEN(80)
VALUE('datfmt(*ymd) datedit(*ymd/)')
The data area can be whatever size is required to accommodate the keywords specified. The entire length of the data area can only contain keywords.
If you are using the Program Verifier in Rational® Developer for i, then a file named RPGLEHSPEC.RPGLE in the .metadata directory of your workspace will be used as the control specification data area. This file must contain valid RPG IV control statements.
H NOMAIN
D fld S 10A
/COPY QRPGLESRC,DFTCTLKW
H NOMAIN
D fld S 10A