Skip to Main Content
IBM Power Ideas Portal


This portal is to open public enhancement requests against IBM Power Systems products, including IBM i. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).


Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:

Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,

Post your ideas
  1. Post an idea.

  2. Get feedback from the IBM team and other customers to refine your idea.

  3. Follow the idea through the IBM Ideas process.


Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

Status Delivered
Workspace IBM i
Categories Web Serving
Created by Guest
Created on May 18, 2017

IWS with Service Program conflicting PCML structs

I have a service program with multiple procedures.

Two of the exported procedures have a parameter "REQUEST" that is like a template qualified data structure "T_REQUEST".

"T_REQUEST" is not global. Each procedure has it's own version of "T_REQUEST" that is different.

The PCML that is generated has two conflicting structs for "T_REQUEST".

Each "program" in the PCML points "REQUEST" to "T_REQUEST".

Because the system cannot determine which "T_REQUEST" to use it appears to always utilize the last one found in the PCML.

So, the request for one procedure works but the other does not because the parameters I pass don't map correctly.

My workaround is to name each template differently instead of using just "T_REQUEST" have it unique across the whole module; even though it should be a localized structure.

Submitting as RFE...may need to be a PMR...


Use Case:

Create a service program with parameters that use likeds and then examine the PCML.
------
**FREE
ctl-opt nomain;
ctl-opt pgminfo(*pcml:*module);

dcl-proc refTestProcedure_one export;

dcl-pi *n;
request likeds(t_request) const;
http_status int(10);
result char(100);
end-pi;

dcl-ds t_request template qualified;
companyCode char(4);
userId char(10);
end-ds;

if request.companyCode = '01';
result = 'Ok';
http_status = 200;
else;
http_status = 204;
endif;

return;

end-proc;

dcl-proc rfeTestProcedure_two export;

dcl-pi *n;
request likeds(t_request) const;
http_status int(10);
result char(100);
end-pi;

dcl-ds t_request template qualified;
companyCode char(4);
userId char(10);
days int(10);
end-ds;

if request.companyCode = '01';
result = 'Ok';
http_status = 200;
else;
http_status = 204;
endif;

return;

end-proc;
---

PCML:
<pcml version="6.0">

<struct name="T_REQUEST">
<data name="COMPANYCODE" type="char" length="4" usage="inherit" />
<data name="USERID" type="char" length="10" usage="inherit" />
<data name="DAYS" type="int" length="4" precision="31" usage="inherit" />
</struct>

<struct name="T_REQUEST">
<data name="COMPANYCODE" type="char" length="4" usage="inherit" />
<data name="USERID" type="char" length="10" usage="inherit" />
</struct>

<program name="RFETESTPROCEDURE_TWO" entrypoint="RFETESTPROCEDURE_TWO">
<data name="REQUEST" type="struct" struct="T_REQUEST" usage="input" />
<data name="HTTP_STATUS" type="int" length="4" precision="31" usage="inputoutput" />
<data name="RESULT" type="char" length="100" usage="inputoutput" />
</program>

<program name="REFTESTPROCEDURE_ONE" entrypoint="REFTESTPROCEDURE_ONE">
<data name="REQUEST" type="struct" struct="T_REQUEST" usage="input" />
<data name="HTTP_STATUS" type="int" length="4" precision="31" usage="inputoutput" />
<data name="RESULT" type="char" length="100" usage="inputoutput" />
</program>

</pcml>


Idea priority Low
  • Guest
    Reply
    |
    Jan 30, 2019

    In 7.2 and above, RPG compiler ensures that structures in same source file that have same name but are defined differently are unique when generating the PCML,

    In addition, the integrated web services server has been improved to ensure structures in different modules are unique and handled correctly. You will need the following IWS PTFs:

    SI68894 V7R1M0
    SI68864 V7R2M0
    SI68865 V7R3M0

  • Guest
    Reply
    |
    May 21, 2017

    IBM agrees with the request and a solution appears to be desirable and feasible. IBM intends to provide a solution. However, IBM's plans may change and no commitment is made that a solution will be provided.

    In the meantime, how this currently works is working as designed.