Top
NetCOBOL V11.0 ISAPI Subroutines User's Guide
FUJITSU Software

6.7.1 Retrieving Cookie Data

A Cookie used in this sample has the name "Your Access Counter". Thus, to retrieve this Cookie data, edit the above Cookie name in COBW3-COOKIE-NAME and invoke "COBW3_GET_COOKIE" (Lines 370 through 380).

This sample uses the existence of Cookie data to determine the first time (whether this is the first-time startup from ISASTART.htm) and to keep the access count. The first-time processing is performed by utilizing the fact that no Cookie data exists and thus invoking COBW3_GET_COOKIE finds no Cookie data (Lines 420 through 460). On the other hand, the second time and later it is determined by utilizing the fact that Cookie data is always sent for the second time and later (Lines 470 through 480). Note that, in the first-time processing, the counter value is set to 1 and, for the second time and later, incremented by 1 every time.