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


  • Subject: Re: CGI-RPG performance question
  • From: Loyd Goodbar <lgoodbar@xxxxxxxxxxxxxx>
  • Date: Mon, 19 Mar 2001 20:10:33 -0600

Well, my output response has improved tremendously! Thanks Chris and Buck for
suggesting replacing %trim* with eval. This resulted in a dramatic improvement
of formatting the HTML. Where before I was getting ~1KB/sec, now I'm getting
~80KB/sec writing to the IFS.

The last noticeable bottleneck is storing the information. I also suspect the
%trimr I have is again the problem, but I'm not sure how to fix it.

Here is the prototype for storing the data:
p HTMLOutData b export
d HTMLOutData pi n [returns indicator success/failure]
d  Handle 10a const [handle to data, generated by HTMLOutInit function]
d  Data01 32000a const [first data passed is required]
d  Data02 32000a const options(*nopass) [2nd-30th data is optional]
...
d  Data30 32000a const options(*nopass)

So the calling program can do this:
c eval status = HTMLOutData( handle : somedata : somedata )

Now the issue is, I have code like this...
d EOS c const(x'00')

d datads ds
d  nextpos 10i 0 inz
d  data 32767a inz varying

c if %parms >= 3
c eval data = data + %trimr(data02) + EOS
c endif
c if %parms >= 4
c eval data = data + %trimr(data03) + EOS
c endif
...

After I determine how many data* were passed, it's stored in the user space.

Anyway, I would like to do this (similar to what I did in the output
program)...

c if %parms >= 3
c eval data = data + data02 + EOS
c endif

...which would be valid if both data and data02 were varying. Variable data is
varying, and works without a problem. However, I can't seem to get data02 to
be varying from the prototype.

If I specify a prototype like this:
d data03 32000a const option(*nopass) varying

the data03 is not varying. Running under debug using "eval data03:x", it
appears that the 2 byte size indicator is overlaid on the data I sent. For
instance, if data03 is "*PAGETITLE:Test page", I would expect data03 in
varying form to be "..*PAGETITLE:Test page", where .. is the 2 byte size.
However, I see something like "*QAGETITLE:Test page". When I execute the line
c eval data = data + %trimr(data03) + EOS
I get a runtime error RNX0115 (Length of varying length variable is out of
range.) with no statement (the statement is blacked out).

The same occurs when I try a prototype like
d data03 32000a option(*nopass) varying

Note that once I move it to "data", it is varying, and it is stored and
retrieved correctly from the user space. It is getting the prototyped
parameters in varying length that stymies me.

Am I missing something simple? Note that the data passed in DATA01-DATA30 may
not necessarily be varying, but I thought that using CONST and VARYING, I
would get a varying length string anyway. Shouldn't that work?

Thanks,
Loyd

On Sun, 18 Mar 2001 14:19:06 -0600, Loyd Goodbar <lgoodbar@ispchannel.com>
wrote:

>I've almost completed a utility to help our shop create web pages for regular
>tabular data. It is optimized for creating tables-based reports (i.e., convert
>existing reports for intranet browsing). However, I have some performance
>questions.

<snip>
--
Loyd Goodbar
lgoodbar@ispchannel.com  ICQ#504581
+---
| This is the WEB400 Mailing List!
| To submit a new message, send your mail to WEB400@midrange.com.
| To subscribe to this list send email to WEB400-SUB@midrange.com.
| To unsubscribe from this list send email to WEB400-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.