IBM Support

New for RPG in IBM i 7.1 and 7.2 - Enhancements for generated PCML

General Page

You are in: RPG Cafe > Enhancements for PCML in 7.1 and 7.2

Short URL: https://ibm.biz/rpgCafe_PCML_enhancements

RPG Cafe: Enhancements for PCML

Enhancements for PCML

  • PCML generated with mixed-case names
  • Prevent PCML from being generated for some procedures when a module is being created

PTFs

7.1:
  • ILE RPG compiler: SI55340
7.2:
  • ILE RPG compiler: SI55442
  • ILE RPG compiler TGTLRS(V7R1M0): SI55531

Documentation in the IBM Knowledge Center

The ILE RPG Reference for 7.2 is updated with information the PCML enhancements. Start at the "What's New Since 7.2".

Note: The 7.1 IBM Knowledge Center is not updated, but the information about the PGMINFO keywords in the 7.2 IBM Knowledge Center also applies to 7.1.

PCML generated with mixed-case names

Problem: By default, the PCML generated by the RPG compiler uses uppercase for the names in the PCML. If the PCML is used to generate WSDL, uses of the WSDL must use the same uppercase names.

<struct name="INFO_T">
   <data name="NAME" type="char" length="10" usage="inherit" />
   <data name="ADDRESS" type="char" length="25" usage="inherit" />
   <data name="IDNUMBER" type="int" length="4" precision="31" usage="inherit" />
</
struct>
<
program name="GETINFO" entrypoint="GETINFO">
   <data name="CUSTID" type="int" length="4" precision="31" passby="value" usage="input" />
   <data name="INFO" type="struct" struct="INFO_T" usage="inputoutput" />
</
program>

Solution: Code new parameter *DCLCASE in the PGMINFO keyword of your H spec to have the names in the PCML generated with the same case as you coded them in the RPG source.

  • If you already have the PGMINFO keyword in your H spec, add *DCLCASE as the last parameter.
  • If you don't already have the PGMINFO keyword in your H spec, add keyword PGMINFO(*DCLCASE).

<struct name="info_t">
   <data name="name" type="char" length="10" usage="inherit" />
   <data name="address" type="char" length="25" usage="inherit" />
   <data name="idNumber" type="int" length="4" precision="31" usage="inherit" />
</
struct>                                                                     
<program name="getInfo" entrypoint="GETINFO">
   <data name="custId" type="int" length="4" precision="31" passby="value" usage="input" />
   <data name="info" type="struct" struct="info_t" usage="inputoutput" />
</
program>

Prevent the compiler from generating PCML for some procedures when a module is being created

Problem: Some ILE RPG procedures have features that cannot be described by PCML. If the PCML is generated into your module, it is impossible to create the module if the PCML has errors due to unsupported features. See the list of restrictions here: href=" http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzasc/pcmlrestrict.htm

Solution: Use the new Procedure specification PGMINFO keyword to indicate which procedures need PCML to be generated. Either specify PGMINFO(*YES) on all the procedures that need PCML, or specify PGMINFO(*NO) on all the procedures that do not need PCML. http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzasd/ppgminfokw.htm

  • *YES: When PGMINFO(*YES) is specified for one or more procedures in the module, program-interface information is not generated for any procedure for which PGMINFO(*YES) is not specified. If the module has a cycle-main procedure, program-interface information is not generated for the main procedure.
  • *NO: When PGMINFO(*NO) is specified for one or more procedures in the module, program-interface information is only generated for the procedures that do not have the PGMINFO keyword. If the module has a cycle-main procedure, program-interface information is generated for the main procedure.

If you do not specify the PGMINFO keyword on the Procedure specification for any procedures, then when you create a module, program-interface information is generated for the main procedure and all exported subprocedures that are not Java native methods.

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SS69QP","label":"Rational Development Studio for i"},"Component":"ILE RPG Compiler","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
12 December 2019

UID

ibm11108137