EXTPGM{(name)}

Start of changeThe EXTPGM keyword indicates that the prototype represents a dynamic call to a program.End of change

Start of changeThe parameter specifies the external name of the program whose prototype is being defined. The name can be a character constant or a character variable.End of change

Start of changeThe parameter is optional if the prototype name is not longer than 10 characters. If the parameter is not specified, the external program name is the same as the upper-case form of the prototype name. The following example defines a prototype for program 'QCMDEXC'.
  DCL-PR qcmdExc EXTPGM;
     ...
End of change

Start of changeIf neither EXTPGM or EXTPROC is specified for a prototype, then the compiler assumes that you are defining a prototype for a procedure, and assigns the external procedure name to be the upper-case form of the prototype name.End of change

Any parameters defined by a prototype or procedure interface with EXTPGM must be passed by reference. In addition, you cannot define a return value.