× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Stephen, I work on IWS so I know inner workings. Other than the web
site[1] and links (e.g. technology updates and articles) on the web site
there is no additional information.

Just for the audience, we are talking about IWS support for varchar[2] (in
7.1 you must manually set the type in PCML, in 7.2 and above it is done
automatically by RPG compiler).

So I am not sure where your problem is. So I will go through steps.

Here is my program:
**free
Ctl-Opt MAIN(cactst );

dcl-ds rtnOrderInfo qualified;
order char(2) ;
desc char(150) ;
end-ds;


dcl-proc cactst;
dcl-pi *n;
rtnECommOrderNo varchar(50) const;
httpStatus int(10);
httpHeaders char(100) dim(10);
rtnOrder likeds(rtnOrderInfo);
end-pi;


return;
end-proc;

I compile and have compiler generate PCML file in /varchar.pcml:

CRTBNDRPG PGM(PMRS/cactst ) SRCSTMF('/CACTST.rpgle') PGMINFO(*PCML)
INFOSTMF('/cactst.pcml')

The PCML that is generated:

<pcml version="6.0">
<struct name="RTNORDERINFO">
<data name="ORDER" type="char" length="2" usage="inherit" />
<data name="DESC" type="char" length="150" usage="inherit" />
</struct>
<program name="CACTST">
<struct name="RTNECOMMORDERNO" usage="input">
<data name="length" type="int" length="2" precision="16"
usage="inherit" />
<data name="string" type="char" length="length" usage="inherit"
/>
</struct>
<data name="HTTPSTATUS" type="int" length="4" precision="31"
usage="inputoutput" />
<data name="HTTPHEADERS" type="char" length="100" count="10"
usage="inputoutput" />
<data name="RTNORDER" type="struct" struct="RTNORDERINFO"
usage="inputoutput" />
</program>
</pcml>

As you see, the RPG compiler generates 2 fields for varchar
RTNECOMMORDERNO. New support in the compiler in 7.2 and above will
generate one field with type of varchar. So replaced the 2-field
structure in the PCML so it looks like the following:

<data name="RTNECOMMORDERNO" type="varchar" length="50" usage="input" />


I then deploy the program successfully using the modified PCML file.


[1] http://www.ibm.com/support/docview.wss?uid=isg3T1026868

[2]
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/dW%20IBM%20Integrated%20Web%20Services%20for%20i/page/Support%20variable%20length%20fields


"WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx> wrote on 04/06/2019 12:59:29
PM:

From: Stephen Piland <Stephen@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
To: "web400@xxxxxxxxxxxxxxxxxx" <web400@xxxxxxxxxxxxxxxxxx>
Date: 04/06/2019 12:59 PM
Subject: Re: [WEB400] IWS REST GET Variable Length PATH_PARM Input
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx>

For clarity sake, I've reworked my procedures/srvpgm to be a stand
alone RPG pgm. I tried in the PCML both CACTST (object) and
RETRIEVE which is the MainProcedure. I'm still getting ZUI_53179.
Reference notes below...

Nadir.. Where are you getting your information from? Is there a
reference or white paper? I'd like to not have to bug the group so
much but I find documentation lacking from IBM. I appreciate your
help. My one wish would be for 7.3 but stuck on 7.1 for a while.

Modified PCML on IFS...
</struct>
<!-- 50 -->
<program name="CACTST" path="/QSYS.LIB/CCLIB.LIB/CACTST.PGM">
<data name="INECOMMORDERNO" type="varchar" length="50"
usage="input">
<data name="HTTPSTATUS" type="int" length="4" precision="31"
usage="inputoutput" />
<data name="HTTPHEADERS" type="char" length="100" count="10"
usage="inputoutput" />
<data name="RTNORDER" type="struct" struct="RTNORDERINFO"
usage="inputoutput" />
</program>
</pcml>

Prototype below...
dcl-pr retrieve extpgm('CACTST');
rtnECommOrderNo varchar(50) const;
httpStatus int(10);
httpHeaders char(100) dim(10);
rtnOrder likeds(rtnOrderInfo);
End-Pr;



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.