$! Simple demonstration that even DCL procedures can be CGIplus scripts $! and use the CGIplus callout mechanism. This non-C-language example $! also demonstrates the essential elements of CGIplus processing. $! 06-SEP-1999 MGD initial $! $ say = "write sys$output" $ UsageCount = 0 $ FirstUsed = f$time() $ open /read CgiPlusIn CGIPLUSIN $! $ RequestLoop: $! $! (block waiting for request, this initial read is always discardable) $ read CgiPlusIn /end=EndRequestLoop Line $ UsageCount = UsageCount + 1 $! $ say "Content-Type: text/plain" $ say "" $ say "Number of times used: ''UsageCount'" $ say "First used: ''FirstUsed'" $ say "Now: ''f$time()'" $ say "" $ say "CGIplus variables:" $ say "" $! $! (read and display the CGIplus variable stream) $ CgiVarLoop: $ read CgiPlusIn /end=EndCgiVarLoop Line $ if Line .eqs. "" then goto EndCgiVarLoop $ say Line $ goto CgiVarLoop $ EndCgiVarLoop: $! $ say "" $ say "CGIplus callout example:" $ say "" $! $! (just a slightly different file name each time it's used) $ PathExample = "/wasd_root/src/httpd/file''UsageCount'.c" $ say "Map '" + PathExample + "' using the following callout request ..." $ say "" $ say " ""MAP-FILE: " + PathExample + """" $ say "" $! $! (this block is the actual callout) $ say f$trnlnm("CGIPLUSESC") $ say "MAP-PATH: " + PathExample $ read CgiPlusIn /end=EndRequestLoop Response $ say f$trnlnm("CGIPLUSEOT") $! $ say "Server response was ..." $ say "" $ say " """ + Response + """" $ say "" $ say "Yielding a file specification of ..." $ say "" $ say " " + f$extract(4,999,Response) $! $ say f$trnlnm("CGIPLUSEOF") $ goto RequestLoop $! $ EndRequestLoop: