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



Hi Tony,
First, I suggest moving to my CGILIB in RPG xTools, as it does the same
thing but does not have such limits. 

If you want to stay with CGIDEV2, then the answer is to use the built-ing
"Tag" API that they provide to build a list like yours, or even easier,
simply insert a section and output that section each time you change the
WF_SITES variable.  That of course, may not be practical if you have other
variable above or below this one.
I output all 50 states like this:

  <OPTION value="IL">Illinois</OPTION>

The original code is similar to what you have in your template.
-Bob Cozzi


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Tony Carolla
Sent: Thursday, October 28, 2004 11:57 AM
To: RPG programming on the AS400 / iSeries
Subject: Using CGIDEV2 - UpdHTMLVar proc

I am trying to populate a <select> list with <option> values.  Within
the HTML template, I have the following:

<select size="1" name="WF_SiteID">
     /%WF_Sites%/
</select>

Inside the pgm, I set up a VARYING variable, and I am populating it
with each selection item using a DS:

D OptLn           DS                  Qualified
D  Chunk1                       15A   Inz('<option value="')
D  Site                          3A   Inz(*Blanks)
D  Chunk2                        2A   Inz('">')
D  SiteS                         3A   Inz(*Blanks)
D  Chunk4                        9A   Inz('</option>')

Each record in the file populates the two site fields in the DS, and
the DS gets added to the VARYING variable.

I then use UpdHTMLVar with the VARYING variable:

CallP updHTMLvar('WF_SITES':SelectOpts:InitHTMLVars);

The problem is that apparently, there is a max of 999 on a variable
length that gets sent to the web server.  The statement that replaces
the /%WF_Sites%/ variable always gets cut at 999.

Other solutions I have thought of:
  -Create 100 or so separate variables in the template, and within
the RPG, use a horrendously large select op to pin each successive
record into one of the templates (yukkk)
  -Use some other CGIDEV2 proc.

Has anybody else run into this?


-- 
"Enter any 11-digit prime number to continue..."
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




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.