Sorry, found out how to do it myself. GSLgen inherits the cgi environment, so all the variables passed to the script are in the environment variables FORM_xxx (xxx being the name of the variable), and these can just be used 'as is'. Need to make sure I've got enough environment space for it all now.... Angus