I assume that you are talking about a procedure on a web server. That is the only way that the setcookie statement works.
I don’t know why you are having a problem with cookies. It shouldn’t have anything to do with the version of OS X you are using. Cookies are really a feature of the web browser. Whenever a URL request is sent from the browser to the web server, any cookie values for that domain are also sent to the web server (Apache). The web server has the option to modify the values and send them back to the browser, which then stores them until the next URL request to the server.
You talk about “files”, I assume you mean different Panorama databases. However, cookies don’t have anything to do with databases. The web browser has no idea that a Panorama database even exists. Cookie values are not stored in the database, or anywhere on the server, they are stored in the web browser on the client computer.