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



P.S. Maybe this would work. I can't getl _LENGTH as a _separate_ parm to work.

DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++
D WSCASEINQ PR ExtPgm('WSCASEINQ')
D CASE# 13A
D court case_data LikeDS(court case_T);

D court case_data_T DS Temp[late
D courtcase_LENGTH...
D 10i 0
D courtcase 500000a

This reminds me how much I hate fixed form D specs!



On Aug 13, 2019, at 12:10 PM, Ric Turner <rturner@xxxxxxxxxxxxxxx> wrote:

Here is the parameter list that is being interpreted incorrectly. The reason for not using the varchar is that a byte appears at the beginning of the field that I assume is the length of the varchar field in hex or binary and it becomes part of the output parameter which in my case the end-user does not want.

DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++
D WSCASEINQ PR ExtPgm('WSCASEINQ')
D CASE# 13A
D courtcase_LENGTH...
D 10i 0
D courtcase 500000a
D WSCASEINQ PI
D CASE# 13A
D courtcase_LENGTH...
D 10i 0
D courtcase 500000a

This simple program accepts the CASE# parm and simply creates XML in the courtcase parameter. But since I don't know how large the XML will be at any given time I want to make the courtcase parameter large enough to store all XML that will be created.



Thanks,
Ric Turner
JANO Technologies, Inc.
601.362.7601 ext. 224
800.250.9884 ext.224

The preceding e-mail is privileged and confidential and is intended only for the named addressee. If you received this message in error, please delete it and notify the sender by return e-mail or by phone at the numbers noted above.

-----Original Message-----
From: WEB400 <web400-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Nadir Amra
Sent: Tuesday, August 13, 2019 10:42 AM
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxxxxxxxx>
Subject: Re: [WEB400] IWS Large Character output support

Jon, you could use length fields for character fields. Some applications have character fields with large lengths, and IWS trims trailing blanks, and thus for these types of fields it could degrade performance.

However, I do agree that varchar would be much cleaner.




"WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx> wrote on 08/13/2019 10:29:06
AM:

From: Jon Paris <jon.paris@xxxxxxxxxxxxxx>
To: "Web Enabling the IBM i (AS/400 and iSeries)"
<web400@xxxxxxxxxxxxxxxxxx>
Date: 08/13/2019 10:37 AM
Subject: [EXTERNAL] Re: [WEB400] IWS Large Character output support
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx>

If you are not using an array how can the parameter vary in length?
If it is a character field and you want to restrict the output length
why not use a varying length field?



On Aug 13, 2019, at 11:18 AM, Ric Turner <rturner@xxxxxxxxxxxxxxx>
wrote:

Thanks Jon, I will try to resolve this using your suggestion but I
am not using an array so this may be tricky. Thx

Thanks,
Ric Turner
JANO Technologies, Inc.
601.362.7601 ext. 224
800.250.9884 ext.224

The preceding e-mail is privileged and confidential and is
intended only for the named addressee. If you received this message
in error, please delete it and notify the sender by return e-mail or
by phone at the numbers noted above.

-----Original Message-----
From: WEB400 <web400-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Jon
Paris
Sent: Tuesday, August 13, 2019 10:13 AM
To: Web Enabling the IBM i (AS/400 and iSeries)
<web400@xxxxxxxxxxxxxxxxxx>
Subject: Re: [WEB400] IWS Large Character output support

You may have the same problem I did Ric. Take a look at these two
interfaces:

This one works and the _LENGTH field is omitted from the output.

dcl-pi RestSrv5 ExtPgm;
requestedCat Like(catcod);
result char(20);
productList LikeDS(productList_T);
end-pi;

Dcl-ds product ExtName('PRODUCT') End-ds;

Dcl-ds productList_T Qualified Template;
products_LENGTH int(5);
products LikeDS(product) Dim(20);
End-Ds;

I think my original attempt looked like this - and it does as you
describe and includes the _LENGTH in the output;

dcl-pi RestSrv5 ExtPgm;
requestedCat Like(catcod);
result char(20);
products_LENGTH int(5);
products LikeDS(product) Dim(20);
end-pi;

Dcl-ds product ExtName('PRODUCT') End-ds;

To men the documentation implied that the _LENGTH had to be
_among_ the parameters whereas in fact it has to be _within_ the
parameter to which it relates.



On Aug 13, 2019, at 11:01 AM, Ric Turner <rturner@xxxxxxxxxxxxxxx>
wrote:

Yes, I have the detect fields box clicked and my IT folks tell me
the latest PTF's are installed. For some reason it displays the
_LENGTH parm when redeploying the service and I was not expecting
that. My understanding is that it should not appear in the list of
parms but be detected by the IWS as a field only to define the length
to speed things up.

Thanks,
Ric Turner
JANO Technologies, Inc.
601.362.7601 ext. 224
800.250.9884 ext.224

The preceding e-mail is privileged and confidential and is
intended only for the named addressee. If you received this message
in error, please delete it and notify the sender by return e-mail or
by phone at the numbers noted above.

-----Original Message-----
From: WEB400 <web400-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Nadir
Amra
Sent: Friday, August 9, 2019 9:26 AM
To: Web Enabling the IBM i (AS/400 and iSeries)
<web400@xxxxxxxxxxxxxxxxxx>
Subject: Re: [WEB400] IWS Large Character output support

Have you enable "detect field lengths" option? Do you have
latest HTTP group PTF?

FYI, the article was written prior to varchar[1] support.
varchar would also work in this case as well.

[1]

https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki

/dW%20IBM%20Integrated%20Web%20Services%20for%20i/page/Support%20varia
ble%20length%20fields

"WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx> wrote on 08/09/2019
07:42:43
AM:

From: Ric Turner <rturner@xxxxxxxxxxxxxxx>
To: "WEB400@xxxxxxxxxxxxxxxxxx" <WEB400@xxxxxxxxxxxxxxxxxx>
Date: 08/09/2019 07:42 AM
Subject: [EXTERNAL] Re: [WEB400] IWS Large Character output
support Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx>


Hi All,

We have found an article that addresses speeding up the SOAP web
service when large character fields are used to return data to the
consumer (titled: Integrated web services server for IBM i updates
at
website: https://www.ibm.com/developerworks/ibmi/library/i-
integrated-web-services-server/index.html ).

Below is an excerpt from the article:

Enable improved processing of very large output character fields
Length field support has been extended to character fields. Output
character fields that are very large (I am talking about 1000s of
bytes) take time to process because the determination of the size
of

the string to return is done by traversing the field a byte at a
time, from right to left, looking for the first non-blank character.
To improve the processing of these large character fields, you can
specify an integer (int) field length that immediately precedes
the character field with the same name as the character field
appended with _LENGTH (similar to what is done when processing
output arrays with field lengths). If the field length exists and
Detect length fields is selected, the traversing of the field to
determine the
size
is not performed, improving performance. In addition, the length
field is hidden from the client and is not returned in the
client response.




My question to the group is - Has anyone tried using this approach?

I have coded my SOAP web service (I am the provider) using this
approach only to find that it does not work as outlined in the
article. I am running this on a v7.2 machine and it is written in
RPGLE as a program (not a service program).

When I perform the redeploy of the service all 3 parameters are
displayed (including the _LENGTH parm), but I was expecting only 2
parameters to appear (excluding the _LENGTH parm).


Here is the RPGLE code from my program:

D WSCASEINQ PR ExtPgm('WSCASEINQ')
D CASE# 13A
D courtcase_LENGTH...
D 10i 0
D courtcase 500000a
D WSCASEINQ PI
D CASE# 13A
D courtcase_LENGTH...
D 10i 0
D courtcase 500000a


The whole idea is to not return the _LENGTH parm to the consumer.
There is no example in the article, it just states that this
approach
works like the approach used for the array.66

Does anyone know what I am doing wrong to not be able to take
advantage of this approach? Any assistance is greatly appreciated.




--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing list To post a message email: WEB400@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: https://urldefense.proofpoint.com/v2/url?

u=https-3A__lists.midrange.com_mailman_listinfo_web400&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-

ew&m=38ya6nkvajlWRuP3OQo9OvMQlpx3xq4dDfAnl4cG39w&s=k5kp_pdFOMdmaCEV9E2W8cmyTJoJ5CYw2OiqXZsRgNI&e=
or email: WEB400-request@xxxxxxxxxxxxxxxxxx Before posting,
please take a moment to review the archives at https://
urldefense.proofpoint.com/v2/url?
u=https-3A__archive.midrange.com_web400&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-
ew&m=38ya6nkvajlWRuP3OQo9OvMQlpx3xq4dDfAnl4cG39w&s=a2khhCU3kLJ0F19M_zs
-
oSd4iLpodEDW_2n0sJaBORE&e= .

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing list To post a message email: WEB400@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: https://urldefense.proofpoint.com/v2/url?

u=https-3A__lists.midrange.com_mailman_listinfo_web400&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-

ew&m=38ya6nkvajlWRuP3OQo9OvMQlpx3xq4dDfAnl4cG39w&s=k5kp_pdFOMdmaCEV9E2W8cmyTJoJ5CYw2OiqXZsRgNI&e=
or email: WEB400-request@xxxxxxxxxxxxxxxxxx Before posting, please
take a moment to review the archives at
https://urldefense.proofpoint.com/v2/url?
u=https-3A__archive.midrange.com_web400&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-
ew&m=38ya6nkvajlWRuP3OQo9OvMQlpx3xq4dDfAnl4cG39w&s=a2khhCU3kLJ0F19M_zs
-
oSd4iLpodEDW_2n0sJaBORE&e= .


--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing list To post a message email: WEB400@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: https://urldefense.proofpoint.com/v2/url?

u=https-3A__lists.midrange.com_mailman_listinfo_web400&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-

ew&m=38ya6nkvajlWRuP3OQo9OvMQlpx3xq4dDfAnl4cG39w&s=k5kp_pdFOMdmaCEV9E2W8cmyTJoJ5CYw2OiqXZsRgNI&e=
or email: WEB400-request@xxxxxxxxxxxxxxxxxx Before posting, please
take a moment to review the archives at https://
urldefense.proofpoint.com/v2/url?
u=https-3A__archive.midrange.com_web400&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-
ew&m=38ya6nkvajlWRuP3OQo9OvMQlpx3xq4dDfAnl4cG39w&s=a2khhCU3kLJ0F19M_zs
-
oSd4iLpodEDW_2n0sJaBORE&e= .

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://urldefense.proofpoint.com/v2/url?

u=https-3A__lists.midrange.com_mailman_listinfo_web400&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-

ew&m=38ya6nkvajlWRuP3OQo9OvMQlpx3xq4dDfAnl4cG39w&s=k5kp_pdFOMdmaCEV9E2W8cmyTJoJ5CYw2OiqXZsRgNI&e=
or email: WEB400-request@xxxxxxxxxxxxxxxxxx Before posting, please
take a moment to review the archives at
https://urldefense.proofpoint.com/v2/url?
u=https-3A__archive.midrange.com_web400&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-
ew&m=38ya6nkvajlWRuP3OQo9OvMQlpx3xq4dDfAnl4cG39w&s=a2khhCU3kLJ0F19M_zs
-
oSd4iLpodEDW_2n0sJaBORE&e= .


--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing
list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://urldefense.proofpoint.com/v2/url?

u=https-3A__lists.midrange.com_mailman_listinfo_web400&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-

ew&m=38ya6nkvajlWRuP3OQo9OvMQlpx3xq4dDfAnl4cG39w&s=k5kp_pdFOMdmaCEV9E2W8cmyTJoJ5CYw2OiqXZsRgNI&e=
or email: WEB400-request@xxxxxxxxxxxxxxxxxx Before posting, please
take a moment to review the archives at
https://urldefense.proofpoint.com/v2/url?
u=https-3A__archive.midrange.com_web400&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-
ew&m=38ya6nkvajlWRuP3OQo9OvMQlpx3xq4dDfAnl4cG39w&s=a2khhCU3kLJ0F19M_zs
-
oSd4iLpodEDW_2n0sJaBORE&e= .




--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxxxxxxxx Before posting, please take a moment to review the archives at https://archive.midrange.com/web400.

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.



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.