SUBROUTINE LISTCOOKIES
* List the cookies available to this RealWeb page.

* Include the RealWeb definitions.
INCLUDE #RW.INCLUDE.DEFS FROM /SYSFILES/REALWEB,BP

EQU AM TO CHAR(254)

* Start the HTML page.
CALL RW_START_HTML_PAGE("List Cookies", "", "", "", "")

* Insert a heading containing descriptive text.
CALL RW_HEADING(1, "Cookies")

* Get the list of cookies.
CLIST = ""
CALL RW_LIST_COOKIES(CLIST)

* Initialise variables.
VLIST = ""
VALUE = ""
* For each cookie in the list...
FOR I = 1 TO DCOUNT(CLIST, AM)
* Get its value.
CALL RW_GET_COOKIE(CLIST<I>, VALUE)
* Add to the value list.
VLIST<I> = VALUE
NEXT I

* Display the cookies as a definition list.
CALL RW_MAKE_DLIST(CLIST, VLIST, "")

* Complete the page.
CALL RW_END_PAGE
RETURN