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



As Brad pointed out, the length parameter in your code might have been set to 0.

Anyway, here is the quick code sample you asked for, using your data. Because all of UpdHtmlVar2's parameters are passed by value, you can pass literals and expressions as well as varibles and you don't need to define the work field, a pointer to it, or the data's length. Therefore, I've removed all the D specs leaving only one calculation statement:

 updHtmlVar2('need': %addr(WREQNEED): %len(%trimr(WREQNEED));

Mel Rothman, CGIDEV2 Author
Mel Rothman, Inc.


Greg Weber wrote:
Right, the /%need%/ variable in the HTML page is blank.  Is the CGI/Web
list the one called WEB400, or is it another one?  I searched the WEB400
archives for updHtmlVar2 and came up empty.  Sorry if I'm asking the
wrong question in this list; I'm new here and have only been developing
on the iSeries for less than a year. Could someone provide a quick code
sample of using updHtmlVar2?

Greg Weber
Washington Corporations
Web & Application Development
E-mail: gweber@xxxxxxxxxxxx Phone: (406) 523-1687



-----Original Message-----
From: Bob Cozzi [mailto:cozzi@xxxxxxxxx] Sent: Wednesday, May 11, 2005 7:36 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Anyone know how to use updHtmlVar2?


This is best for the CGI/Web list, but
Is "NEED" supposed to be in lower case? 'need'???
Also UpdHtmlVar doesn't "return" values, so I'm assuming you mean the
data
in the HTML for the /%NEED%/ substitution variable is not getting the
data
you expect?

-Bob Cozzi
www.RPGxTools.com
If everything is under control, you are going too slow.
- Mario Andretti

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Greg Weber
Sent: Wednesday, May 11, 2005 7:23 PM
To: RPG400-L@xxxxxxxxxxxx
Subject: Anyone know how to use updHtmlVar2?

Here's what I tried. It doesn't fail, just returns blanks:
d prjneed s 2980a
d ptrlen s 10i 0
d ptrneed s *
then
prjneed = WREQNEED;
ptrneed = %addr(prjneed);
updHtmlVar2('need': ptrneed : ptrlen);
Greg Weber
Washington Corporations
Web & Application Development
E-mail: gweber@xxxxxxxxxxxx <mailto:gweber@xxxxxxxxxxxx> Phone: (406) 523-1687


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.