testcgierror

Les Cottrell. Last Update: 15 Mar 1996

#!/usr/local/bin/rxx
/* Test CGIerror, displays err msg plus environ*/
CALL PUTENV('REXXPATH=/afs/slac/www/slac/www/tool/cgi-rexx/')
ADDRESS 'COMMAND'
PARSE ARG Parms

SAY PrintHeader(); 
SAY '<html><head><title>Test CGIError</title></head>'
IF GETENV('QUERY_STRING')='' THEN DO
   IF Parms='' THEN Body='<pre>'
   ELSE Body='<pre>Parms='Parms'.'
   CALL POPEN('set') /* UNIX cmd to show env.*/ 
   DO Q=1 TO QUEUED(); 
      PARSE PULL Line; 
      Body=Body||Line||'0a'X
   END Q
   Body=Body||'</pre>'
   SAY '<body bgcolor="FFFFFF">'
   Fail=CGIerror('400: No input found!', Body)
END
EXIT