PGMINFO(*PCML | *NO | *DCLCASE { : *MODULE | *V6 | *V7 ... } )

The PGMINFO keyword specifies how program-interface information is to be generated for the module or program.

*NO
Specifying *NO indicates that no program-interface information is to be generated.
*PCML
Specifying *PCML indicates that program-interface information is to be generated in the form of Program Call Markup Language.
*MODULE
Specifying *MODULE indicates that program-interface information is to be generated directly into the module. If the module is later used to create a program or service program, the program-interface information will also be placed in the program or service program. The information can then be retrieved using API QBNRPII.
*DCLCASE
Specifying *DCLCASE indicates that the names in the PCML will be generated in the declaration case of the name. See The declaration case of a name.
*V6 and *V7
Specifying *V6 indicates that the PCML version will be 6.0. Specifying *V7 indicates that the PCML version will be 7.0.

Version 7.0 handles varying-length fields differently from version 6.0. When PCML is generated for version 7.0, the restrictions on varying-length arrays and varying-length subfields do not apply.

Specify *V6 if you have external dependencies on the way varying-length fields are handled in the PCML. For example, if you have Java code using the ProgramCallDocument class, the Java code will depend on the PCML for varying-length fields being generated as structures. If you are unable to change the external dependency, then specify *V6 to ensure that the PCML for the module will be generated using version 6.0.

Note: Instead of coding the *V6 or *V7 parameter, you can also control the PCML version using the QIBM_RPG_PCML_VERSION environment variable.
Use the following command to request that PCML be generated with version 7.0 in your job.

ADDENVVAR QIBM_RPG_PCML_VERSION VALUE('7.0')
Use the following command to request that PCML be generated with version 7.0 in all jobs.

ADDENVVAR QIBM_RPG_PCML_VERSION VALUE('7.0') LEVEL(*JOB)

The default PCML version is 6.0 for programs compiled with target-release V7R2M0 or V7R3M0. For later target releases, the default will change to 7.0.

It is better to use the environment variable to change the default version to 7.0 than to code the *V7 parameter for the PGMINFO keyword. By coding the *V7 parameter, you will not be able to take advantage of possible PCML enhancements in later versions of PCML.

If you use the environment variable to change the default PCML version, you can add the *P6 parameter to the PGMINFO keyword for any modules that have external dependencies on the PCML being generated with version 6.0.

The first parameter must be one of *NO, *PCML, or *DCLCASE. Additional parameters are not allowed if the first parameter is *NO or *DCLCASE.

If the first parameter is *PCML, at least one additional parameter is required. The additional parameters can be any combination of *DCLCASE, *MODULE, or one of *V6 or *V7.

The PGMINFO setting defaults to the values specified on the PGMINFO and INFOSTMF parameters of the CRTRPGMOD or CRTBNDRPG command. If the PGMINFO keyword conflicts with the PGMINFO and INFOSTMF command parameters, the value of the Control specification keyword overrides the values specified on the command. However, if the requests from the command parameters and the PGMINFO keyword are different but not in conflict, the compiler will merge the values of the command parameters and the PGMINFO keyword.

The declaration case of a name

  • If a data structure, field, or subfield is defined by a definition statement, the case used for the definition statement is considered to be the declaration case of the name.
  • If a data structure is defined as a LIKEREC data structure, then the declaration case of the subfields is upper case.
  • If a data structure is defined as an externally-described data structure, then the declaration case of the subfields is upper case unless the subfield appears on an external subfield statement.
  • If a field is not defined by a definition statement, then the declaration case is the case used for the first occurrence of any of the following uses of the name in the source:
    • An input specification
    • A fixed-form calculation specification where the length entry is specified
    • A *LIKE DEFINE statement where the name appears in the Result field entry
  • If a data structure is defined using LIKEDS, then the subfields of the new data structure will have the same declaration case as the subfield of the parent data structure.
  • The declaration case of a procedure is the case of the name specified in the DCL-PROC or Procedure-Begin statement for the procedure.