Hello,

I'm using the Integrated Webservice Support (IWS) to provide a Webservice. The consumer of the service must provide a customer-number, an article-number and a quantity. The service calculates the price and delivers it in a XML, This XML is encoded in UTF-8 and base64 encoded. The service is serving a webshop.

The XML is created by a separate program using a template and functions from CGIDEV2 from Giovanni Perotti. The program gives a pointer and length of a buffer back to the calling program. In the calling program, I put the content of the buffer to a string. Then I the use ICONV to convert this string from EBCDIC MNCS (CCSID 500) to UTF-8 (CCSID 1208). The converted string is base64 encoded, using functions from the IBM-serviceprogram qsysdir/qaxis10ht.

This have been working fine for almost a year now. Typically the service was consumed 40'000 -- 70'000 times a day. During the nightly save-operation the service is down, it starts again after the save.

These last days, new functions have been added to the webshop. The result is, that the webservice is called more than 250'000 times a day. After some 12 hours and more than 175'000 calls, I have a problem with the api QtqIconvOpen, that generates the table for the ICONV conversion. The code snippet is:

from.CCSID = 500; // ebcdic MNCS
to.CCSID = 1208; // UTF-8

table = QtqIconvOpen(to: from);
if (table.return_value = -1);
err = errno;
msg = 'QtgIconvOpen: ' + %char(err) + '*';
dsply msg;
*inlr = *on;
return;
endif;

input_data2 = stringWithOutHex15;
%len(output_data2) = %size(output_data2) - 2;

p_input = %addr(input_data2) + 2;
inleft = %len(input_data2);

p_output = %addr(output_data2) + 2;
outleft = %len(output_data2);

if iconv( table
: p_input
: inleft
: p_output
: outleft ) = -1;
err = errno;
iconv_close(table);
msg = 'iconv: ' + %char(err) + '*';
dsply msg;
*inlr = *on;
return;
endif;

%len(output_data2) = %len(output_data2) - outleft;
len = %len(output_data2);

if iconv_close(table) = -1;
err = errno;
msg = 'iconv_close: ' + %char(err) + '*';
dsply msg;
*inlr = *on;
return;
endif;




The QtgIconvOpen fails and puts this on the log:

DSPLY QtgIconvOpen: 0*

I was hoping, that the errno would tell me the reason of the failure. The errno is defined in the prototypeb of the CGIDEV2.

After the conversion I release the storage used by the conversion-table (iconv_close).

I can't find the error. Can someone please help me?

As a temporary workaround, I stop the service (endtcpvr) after approx 10 hours, wait a few seconds and start it again (strtcpvr).

Thank you very much in advance.

Best regards

Jan









As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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

This mailing list archive is Copyright 1997-2022 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.