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.

94 Chapter 6. Samples<br />

Getting Cookie Data<br />

Thi s sample uses a Cookie name of “Your access counter.” To get the Cookie data,<br />

enter this Cookie name in the COBW3-COOKIE-NAME and call<br />

“COBW3_GET_COOKIE” (lines 370 to 380).<br />

This sample uses the Cookie data to detect the first access (from “<strong>SAF</strong>START.htm”)<br />

and to hold the access count data. There is no Cookie data in the first access.<br />

There<strong>for</strong>e, the Cookie data is not found when COBW3_GET_COOKIE is called. In<br />

such case, initial processing is executed (lines 4 20 to 460).<br />

In the second or subsequent access, the Cookie data is always sent (lines 470 to<br />

480). The counter is set to one (1) during initial processing, and it is incremented by<br />

1 during subsequent processing.<br />

Registering Cookie Data<br />

Set the desired Cookie name in the COBW3-COOKIE-NAME, and set its contents in<br />

the COBW3-COOKIE-VALUE. Then, call COBW3_SET_COOKIE. The registered<br />

Cookie data is sent to the WWW browser during HTML file output.

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

Saved successfully!

Ooh no, something went wrong!