In many cases, a webmaster would like to know how many times a CGI page (program)
was accessed.
One way to obtain this piece of information is that of processing the HTTP log
(We provide an utility for that, named "SECTCP: Triple A Secured TCP Utility", that you can download at no charge
from the Easy400 site.
The other way is that of having the CGI maintaining the number of accesses through the following procedure:
QCountP - Count Page accesses
Use this procedure to update and retrieve the number of accesses to a given CGI program (page).
Access data are maintained on file CGICOUNT, in your CGI object library.
The following parameters are passed:
- updated number of accesses (numeric)
- page identifier (char 20)
Example:
... ... ...
* Variables for QCountp procedure
05 pageCount PIC S9(10) comp-3 value 0.
05 pageID PIC X(20) VALUE 'MYLIB MYCGIPGM '.
... ... ...
* Retrieve the number of accesses to MYLIB/MYCGIPGM
call procedure 'QCOUNTP' using pageCount PageID.
|
For a live example, see CGI program PAGECOUNT.
|