Using a Data Area as a Control Specification

Use the CL command CRTDTAARA (Create Data Area) to create a data area defined as type *CHAR. (See the iSeries Information Center programming category for a description of the Create Data Area command.) Enter the keywords and their possible parameters that are to be used in the Initial Value field of the command.

For example, to create an RPGLEHSPEC data area that will specify a default date format of *YMD, and a default date separator /, you would enter:

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 from one of the classic tools, such as CODE or VARPG, on a program which uses the data area RPGLEHSPEC, you must create a file called ILEHSPEC.IRP and place it in the CODE base directory. The installation default for that directory is D:\WDSC. The file should contain the same specifications as are in the RPGLEHSPEC data area you would be using on the host.

If you are using the Program Verifier in this situation, but within the Eclipse workbench environment, and not one of the classic tools, then a file named RPGLEHSPEC.RPGLE under the same .metadata directory in their workspace will be used as the H-spec's data area.

If a control specification is not present, Program Verifier will search for the file ILEHSPEC.IRP in the CODE base directory. If that file is not found, a default blank H specification will be used.



[ Top of Page | Previous Page | Next Page | Contents | Index ]