|
Do you have source some source that you want to share? Is there some source that you want to see posted here? If so, Contact Us and we'll be more than happy to help. |
****************************************************************
* Description.. Hello World Sample CGI program using RPG *
* Program Name. HELLOW *
* Author....... Bradley V. Stone *
* BVS/Tools - www.bvstools.com *
* *
* Compile Instructions: *
* 1. CRTRPGMOD MODULE(lib/HELLOW) + *
* SRCFILE(lib/QRPGLESRC) TGTRLS(V3R7M0) *
* *
* 2. CRTPGM PGM(lib/HELLOW) BNDSRVPGM(QTCP/QTMHCGI) *
* *
****************************************************************
D WPError DS
D EBytesP 1 4B 0 INZ(40)
D EBytesA 5 8B 0
D EMsgID 9 15
D EReserverd 16 16
D EData 17 56
*
D HTTPHeader C CONST('Content-type: text/html')
D NewLine C CONST(X'15')
*
D WrtDta S 1024
D WrtDtaLen S 9B 0
****************************************************************
C EXSR $Main
*
C eval *INLR = *On
****************************************************************
*
****************************************************************
C $Main BEGSR
*
C eval WrtDta = '<html><head>' +
C '<title>Hello World</title>' +
C '</head><body>' +
C 'Hello World!' +
C '</body></html>' +
C NewLine
C EXSR $WrStout
*
C ENDSR
****************************************************************
*
****************************************************************
C $WrStout BEGSR
*
C ' ' CHECKR WrtDta:1024 WrtDtaLen
*
C CALLB 'QtmhWrStout'
C PARM WrtDta
C PARM WrtDtaLen
C PARM WPError
*
C ENDSR
****************************************************************
*
****************************************************************
C *INZSR BEGSR
*
C eval WrtDta = %trim(HTTPHeader) +
C NewLine + NewLine
C EXSR $WrStout
*
C ENDSR
|