Web Techniques Magazine
May 1996 Volume 1, Issue 2 |
Writing CGI Scripts in REXX
Listing Eleven PARSE ARG Parms IF GETENV('QUERY_STRING')='' THEN DO CALL POPEN('/bin/sh/ -c set') /*set is a UNIX command to show all environment vars.*/ /*POPEN puts the results from the set command onto */ /*the REXX stack. */ IF Parms='' THEN Body='<pre>' ELSE Body='<pre>Parms='Parms'.' DO Q=1 TO QUEUED() PARSE PULL Line /*Pull the environment var. settings off the stack*/ Body=Body||Line||'0a'x /*and build the body of the diagnostic msg */ END Q Body=Body||''Fail=CGIerror('400: No input found!', Body)
END
Copyright Web Techniques. All rights reserved.