Specifying *DCLCASE as the External Name

In a free-form definition, you can specify *DCLCASE as the external name for the EXTPROC, EXPORT, and IMPORT keywords.

*DCLCASE with the EXPORT and IMPORT keywords

The external name of the item is the same as the name of the item, in the same case as the name is specified.

In the following example
  • the external name of exported field currentCity is 'currentCity'
  • the external name of imported data structure customerOptions is 'customerOptions'.

   DCL-S currentCity LIKE(name_T) EXPORT(*DCLCASE);

   DCL-DS customerOptions LIKEDS(custOpt_T) IMPORT(*DCLCASE);

*DCLCASE with the EXTPROC keyword

The external name of the procedure or method is the same as the name of the prototype or procedure interface containing the EXTPROC keyword, in the same case as the name is specified. If the EXTPROC keyword is specified in a procedure-interface definition, and the procedure interface has no name, the then the external name is the same as the name of the procedure, specified in the same case as the procedure name is specified on the DCL-PROC statement.

In the following example
  1. The external name for the getCustomerCity prototype is 'getCustomerCity'.
  2. The method name for the getBytes prototype is 'getBytes'.
  3. The external name for the getNextOrder procedure is 'getNextOrder', from the DCL-PROC statement ( 3a ) beginning the procedure, because the procedure name is not specified for the procedure interface ( 3b ).
  4. The external name for the addQuotes procedure is 'addQuotes', from the procedure interface statement ( 4b ), because the procedure name is specified for the procedure interface. The different case specified for the name in the DCL-PROC statement ( 4a ) is ignored.

   DCL-PR getCustomerCity EXTPROC(*DCLCASE);  1 
      ...

   DCL-PR getBytes EXTPROC(*JAVA : 'java.lang.String' : *DCLCASE);  2 
      ...

   DCL-PROC getNextOrder;  3a 
      DCL-PI *N EXTPROC(*DCLCASE);  3b 
        ...

   DCL-PROC ADDQUOTES  4a 
      DCL-PI addQuotes EXTPROC(*DCLCASE);  4b 
        ...