testcgidie

Les Cottrell. Last Update: 15 Mar 1996

#!/usr/local/bin/rxx
/* Test CGIdie */
CALL PUTENV 'REXXPATH=/afs/slac/www/slac/www/tool/cgi-rexx/'
SAY PrintHeader(); SAY '<body bgcolor="FFFFFF">'
SIGNAL ON NOVALUE
A=Junk /*Force a NOVALUE error*/
EXIT
/* 
REXX will jump to this error exit if a variable is  
encountered that has not been initialized. It will 
display an error together with the filename of the 
script, the line number, and the contents of the 
line in which the error was found.
*/
NoValue:
   PARSE SOURCE . . Fn .
   LineNb=SIGL
   Line=SOURCELINE(LineNb)
   CALL CGIdie ,'Undef var ref on line' LineNb, 
                'of' Fn||'0a'x||'<br>'Line