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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 6. Samples 93<br />

001360 compute copyStartPos = pathSize + 1.<br />

001370 move "\" to COBW3-HTML-FILENAME(copyStartPos:1).<br />

001380 compute copyStartPos = copyStartPos +1.<br />

001390 compute leftLength = 256 – copyStartPos.<br />

001400 move HTMLFilename to COBW3-HTML-FILENAME(copyStartPos:256).<br />

001410*<br />

001420* Output HTML document.<br />

001430 call "COBW3_PUT_HTML" using COBW3.<br />

001440*<br />

001450 outputScreenProc-End.<br />

001460 exit.<br />

001470*<br />

001480 getPhysicalPath section.<br />

001490 move space to pathName.<br />

001500 set COBW3-PHYSICALPATH to true.<br />

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

001520 if COBW3-STATUS = zero then<br />

001530 move COBW3-REQUEST-INFO to pahtName<br />

001540 move COBW3-REQUEST-INFO-LENGTH to pahtSize<br />

001550 end-if.<br />

001560*<br />

001570 getPhysicalPath-End.<br />

001580 exit.<br />

This sample program per<strong>for</strong>ms the following<br />

processing.<br />

• Get the Cookie data sent from the WWW browser.<br />

• Register the Cookie data.<br />

• Output the Web page <strong>for</strong> processing result.<br />

Select the output Web page<br />

according to the Cookie data contents. Register the<br />

conversion data and edit the output Web page<br />

if necessary.<br />

The following diagram shows the progress of the transaction:<br />

WWW Browser<br />

<strong>SAF</strong>START.htm<br />

WWW Browser<br />

<strong>SAF</strong>RPLY1.htm<br />

WWW Browser<br />

<strong>SAF</strong>RPLY2.htm<br />

Only the first<br />

time<br />

<strong>SAF</strong>SMPL1.dll<br />

Repeats after<br />

the first time<br />

The following outlines the purpose and application of each function.

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

Saved successfully!

Ooh no, something went wrong!