*=====================================================================
* RPG ILE MODULE CGIDEV2/TEXTAREA
*
* After compiling this RPG MODULE,
* create the related program with the following command:
*
* CRTPGM CGIDEV2/TEXTAREA MODULE(CGIDEV2/TEXTAREA)
* ACTGRP(CGI) AUT(*USE)
*
* To execute this program,
* enter the following in your WEB browser command line:
* http://.../cgidev2p/textarea.pgm
*
*=====================================================================
/copy CGIDEV2/qrpglesrc,hspecs
/copy CGIDEV2/qrpglesrc,hspecsbnd
*=====================================================================
* Includes to be used in CGIs
*=====================================================================
/copy CGIDEV2/qrpglesrc,prototypeb
/copy CGIDEV2/qrpglesrc,usec
/copy CGIDEV2/qrpglesrc,variables3
*=====================================================================
* Variables specific to this module
*=====================================================================
* Name of this program
D PgmName c 'TEXTAREA'
* Client input variables
D mytextarea s 1000a
*=====================================================================
* Read remote browser request via "zhbGetInput" procedure
*=====================================================================
/copy CGIDEV2/qrpglesrc,prolog3
*=====================================================================
* Main line
*=====================================================================
* Write qualified job name to debug file. The *on
* parameter forces output even if debugging is off.
* Remove this parameter or change it to *off if you
* want the output only if debugging is on.
C* callp wrtjobdbg(*on)
C callp wrtjobdbg
* Use "zhbGetVar" procedure
* to parse the input string into program variables
C eval mytextarea = zhbgetvar('mytextarea')
*------------------
* Ask the service program to load into core
* html member TEXTAREA
* from source file HTMLSRC in library CGIDEV2
C callp gethtml('DEMOHTML':
C 'CGIDEV2':'TEXTAREA':
C '«as400»')
*------------------
* Resend the form
C callp updHtmlVar('T1':mytextarea)
C callp wrtsection('all')
* Send the response html buffer and exit
C exsr Exit
*=====================================================================
* Send response html and quit
*=====================================================================
C Exit begsr
* Do not delete the call to wrtsection with section name *fini. It is needed
* to ensure that all output html that has been buffered gets output.
C callp wrtsection('*fini')
* Quit
C return
C endsr
|