× 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.



Alan,

I don't see why the identifier name matters?

To test this, I put together a quick program like this (I know the return values aren't useful in a business context, it was just to see if the web service worked)

**free

ctl-opt nomain option(*srcstmt) pgminfo(*pcml:*module);

dcl-proc GetStringForDivCust export;

   dcl-pi *n;
     division packed(2: 0) const;
     customer packed(9: 0) const;
     Result   char(100);
   end-pi;

   select;
   when division=1 and customer=1000;
      result = 'Data to test result here';
   when division=2 and customer=2000;
      result = 'Other test data here';
   other;
      result = 'Customer/Division not found';
   endsl;

end-proc;

Then, I deployed this web service by setting "division" and "customer" as input, and "result" as output.

resource name: divcust
path template: /{incstdiv:\d+}/{incstnbr:\d+}

Division is *PATH_PARAM and identifier INCSTDIV
Customer is *PATH_PARAM and identifier INCSTNBR

Worked perfectly for me, no errors.   The only thing I can think of is that you're using RTNPARM and a return value rather than parameters, which seems like an odd thing to do.  Remember, the input/output of a web service comes via the URL or from a document such as JSON or XML.   Why would you use a feature like RTNPARM saying "use a return value but make it really be a parameter under the covers".  That's really confusing, and there's no real notion of that concept in other programming languages, which makes this a real headache.

Just use parameters, as I have above, and this should work fine.  It did for me.



On 12/11/2018 12:33 PM, Alan Shore wrote:
Hi Scott
Apologies - first of all - misspelt it - it should be RTNPARM
Which has nothing to do with IWS
I was just having an exasperated moment trying to go past the problem I was having where the identifier name being swapped out




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.