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
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
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.