22.09.2013 Views

NetCOBOL for SPARC Architecture SAF Subroutines User's Guide

NetCOBOL for SPARC Architecture SAF Subroutines User's Guide

NetCOBOL for SPARC Architecture SAF Subroutines User's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

92 Chapter 6. Samples<br />

000680* The access counter value is registered in conversion data.<br />

000690 per<strong>for</strong>m entryAccessCounterProc.<br />

000700 move “Access Count” to COBW3-CNV-NAME.<br />

000710 move AccessCounter to COBW3-CNV-VALUE.<br />

000720 per<strong>for</strong>m entryConversionDataProc.<br />

000730*<br />

000740* Get and register remote hostname.<br />

000750 set COBW3-REMOTE-HOST to true.<br />

000760 call "COBW3_GET_REQUEST_INFO" using COBW3.<br />

000770 if program-status not = zero then<br />

000780 move "<strong>SAF</strong>ERROR.htm" to HTMLFilename<br />

000790 per<strong>for</strong>m outputScreenProc<br />

000800 go to Finish-Pos<br />

000810 end-if.<br />

000820 move “Hostname” to COBW3-CNV-NAME.<br />

000830 move COBW3-REQUEST-INFO to COBW3-CNV-VALUE.<br />

000840 per<strong>for</strong>m entryConversionDataProc.<br />

000850*<br />

000860* Get and register the browser name.<br />

000870 move "User-Agent" to COBW3-HEADER-NAME.<br />

000880 call "COBW3_RECEIVE_HEADER" using COBW3.<br />

000890 if program-status not = zero then<br />

000900 move <strong>SAF</strong>ERROR.htm" to HTMLFilename<br />

000910 per<strong>for</strong>m outputscreenProc<br />

000920 go to Finish-Pos<br />

000930 end-if.<br />

000940 move “Browser Name” to COBW3-CNV-NAME.<br />

000950 move COBW3-HEADER-VALUE to COBW3-CNV-VALUE.<br />

000960 per<strong>for</strong>m entryConversionDataProc.<br />

000970*<br />

000980* Output the prototype HTML file.<br />

000990 move "<strong>SAF</strong>RPLY2.htm" to HTMLFilename.<br />

001000 per<strong>for</strong>m outputscreenProc.<br />

001010*<br />

001020 outputContinuousScreenProc-End.<br />

001030 exit<br />

001040*<br />

001050*<br />

001060 entryAccessCounterProc section.<br />

001070* After the browser exists the content of the access counter can be<br />

retained by setting<br />

001080* an expiration. However, if the browser is different, it is not<br />

significant.<br />

001090 call "COBW3_SET_COOKIE" using COBW3.<br />

001100 if program-status not = zero then<br />

001110 move "<strong>SAF</strong>ERROR.htm" to HTMLFilename<br />

001120 per<strong>for</strong>m outputScreenProc<br />

001130 go to Finish-Pos<br />

001140 end-if.<br />

001150 entryAccessCounterProc-End.<br />

001160 exit.<br />

001170*<br />

001180 entryConversionDataProc section.<br />

001190 call "COBW3_SET_CNV" using COBW3.<br />

001200 if program-status not = zero then<br />

001210 move '<strong>SAF</strong>ERROR.htm" to HTMLFilename<br />

001220 per<strong>for</strong>m outputScreenProc<br />

001230 go to Finish-Pos<br />

001240 end-if.<br />

001250 entryConversionDataProc-End.<br />

001260 exit.<br />

001270*<br />

001280 outputScreenProc section.<br />

001290* Get the physical path of the application and<br />

001300* edit the HTML document name.<br />

001310 if pathName = space then<br />

001320 per<strong>for</strong>m getPhysicalPath<br />

001330 end-if.<br />

001340 move space to COBW3-HTML-FILENAME.<br />

001350 move pathName(1:pathSize) to COBW3-HTML-FILENAME.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!