The outputHeader procedure has a section to look over, it's like a mini tutorial on cookies.
/*
* Output additional cookie information here before running outputContentType.
* For more information about the Netscape Cookie Specification, see
*
http://home.netscape.com/newsref/std/cookie_spec.html
*
* Name - name of the cookie
* Value - value of the cookie
* Expires date - Date to expire (optional). See TODAY function.
* Expires time - Time to expire (optional). See TIME function.
* Path - Override default URL path (optional)
* Domain - Override default domain (optional)
* Secure - "secure" or unknown (optional)
*
* The following example sets cust-num=23 and expires tomorrow at (about) the
* same time but only for secure (https) connections.
*
* RUN SetCookie IN web-utilities-hdl
* ("custNum":U, "23":U, TODAY + 1, TIME, ?, ?, "secure":U).
*/