The cgiLoadHtml procedures loads an HTML document into an internal work buffer and readies it for processing.
The cgiLoadHtml procedure loads HTML from a source file member into an internal work buffer and readies it for processing by the cgiSetHtmlVar and cgiWrtSection procedures.
section-count cgiLoadHtml( szSrcFileLib 21A Const szSrcMbr 10A Const bReplace N Const OPTIONS(*NOPASS) ) |
|
See also: cgiLoadHtmlIFS, cgiWrtSection, cgiSetHtmlProp cgiSetHtmlVar cgiInit |
*...v....1....v....2
'MYHTML QTEMP '
An alternative syntax is also supported for the szSrcFileLib parameter. The alternate syntax allows you to specify the source file name in qualified syntax. This is similar to that of an OS/400 CL command. The source file may be qualified using qualified name syntax, as follows:
*...v....1....v....2
'QGPL/QHTMLSRC '
If the function succeeds, the return value is the number of CGILIB Sections that were loaded. If the function fails, 0 is returned and a message is written to the joblog.
Call cgiLoadHtml to load HTML from a source file member. Specify a qualified source file name or an unqualified source file name and a source member name. To load HTML from the IFS, use the cgiLoadHtmlIFS() procedure.
/INCLUDE XTOOLS/QCPYSRC,CGI
.....DName+++++++++++EUDS.......Length+TDc.Functions+++++++++++++++++++++++++
D CONTACT S 20A
D CMPNAME S 30A
D PHONE S 11P 0
D szSrcMbr S 10A Inz('ORDERFORM')
.....C..n01..............OpCode(ex)Extended-factor2++++++++++++++++++++++++++++
C callp cgiInit()
C eval CONTACT = cgiGetVar('CONTACT')
C eval CMPNAME = cgiGetVar('COMPANY')
C eval PHONE = cgiGetVarI('PHONE')
C if cgiLoadHtml('CGILIB/QHTMLSRC':szSrcMbr) <= 0
C callp wrtjoblog('Could not load HTML mbr %s.':szSrcMbr)
C endif