$! CGICALLOUTSINGLEBYTE.COM $! demonstrate/test-bench single-byte output + callout $! 22-JAN-2003 MGD initial $! $ lf[0,8] = 10 $ open /read CgiPlusIn CGIPLUSIN $! $ call bout "Content-Type: text/plain" $ call bout "" $! $ call bout "ALL I/O WILL BE ONE BYTE AT A TIME" $ call bout "----------------------------------" $ call bout "(check this using WATCH)" $ call bout "" $! $ call bout "Map ''WWW_PATH_INFO' using the following callout request ..." $ call bout "" $ call bout "MAP-PATH: ''WWW_PATH_INFO'" $ call bout "" $! $ call bout "''f$trnlnm("CGIPLUSESC")'" $ call bout "MAP-PATH: ''WWW_PATH_INFO'" $ read CgiPlusIn /end=EndRequestLoop Response $ call bout "''f$trnlnm("CGIPLUSEOT")'" $! $ call bout "Server response was ..." $ call bout "" $ call bout " ""''Response'"" " $ call bout "" $ call bout "Yielding a file specification of ..." $ call bout "" $ call bout " ''f$extract(4,999,Response)'" $! $ exit $! $!(output the string supplied is P1 one byte/character at a time) $ bout: subroutine $ length = f$length(p1) $ count = 0 $ byteLoop: $ if count .eq. length $ then $! (indicate end-of-record) $ write sys$output "" $ exit $ endif $ write sys$output f$extract(count,1,p1) $ count = count + 1 $ goto byteLoop $ endsubroutine