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



UpdHtmlVar's third parameter controls clearing the substitution variables array. When you want to start over with a new set of values, specify '0' in the third parameter when using UpdHTMLVar for the first variable of the set.

The following is copied from QRPGLESRC member PROTOTYPEB:

 ******************************************************************
 * Prototype for updHTMLvar subprocedure
 ******************************************************************
 * Updates arrays containing variable names and values
 * Inputs
 *  - variable name
 *  - variable value
 *  - action (optional)
 *      - '1' = replace this variable in the arrays if it is already
 *              there. Otherwise add it to the arrays (default).
 *      - '0' = clear arrays and write variable as the first element.
 *  - trim instructions (optional)
 *    - %trim  - trim left and right (default)
 *    - %triml - trim left only
 *    - %trimr - trim right only
 *    - %trim0 - don't trim

D updHTMLvar      pr
D  name                         30    const varying options(*varsize)
D  value                      1000    const varying options(*varsize)
D  action                        1    value options(*nopass)
D  trim                          6    value varying options(*nopass)

Mel Rothman, CGIDEV2 Author
Mel Rothman, Inc.

Dave Vallis wrote:
Within CGIDEV2 is there an easy way to clear all substitution variable
information?

I have a scenario where different programs use the same section name.  If
a substitution variable is erroneously omitted from one of the programs,
the value the variable had in the previous program can be passed to the
HTML if the same server instance is used.

If there is a way to clear the substitution variables then the HTML would
contain ***** missing data ***** rather than an incorrect value.

Thanks





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.