The following is a script to convert spoolfiles for a specific device to
html format, this makes the files available on an intra or inter net basis!
The script creates a menu of spoolfiles in /!LD/htindex.html, clicking on
the desired spoolfile opens it in the WWW browser.
BTW, this also allows indirect printing of the spoolfiles to network based
printers, and cut and pasting into pc based applications!
I am looking for sites to test the sf2html program. Any interested parties
can email me and I'll reply with a copy. I hope to have a general shareware
version out soon.
$WARN this script is a mix of mpe/ix, posix, and html (talk about open!)
PARM LD="lp",SERVER="WWW.BEECHGLEN.COM",LC=59,PRE="PRE",LT="<",GT=">"
COMMENT this script copies spoolfiles for a given ldev to
COMMENT HFS for access with a web browser.
COMMENT by Mike Hornsby, Beechglen Development Inc 4/18/96
SETVAR HEAD, "FILEDES RECS DATE TIME "
SETVAR HEAD, "!HEAD"+"SPOOLID JOBNUM JOBNAME USER"
ECHO !HEAD
SETVAR AREF, 'a href="http://'+"!SERVER"+"/"+"!LD"+"/h"
PURGE HTINDEX >$null
BUILD HTINDEX;REC=-132,,F,ASCII
FILE HTINDEX,OLD;DEV=DISC;ACC=APPEND
ECHO !!!LT!PRE!!!GT!HEAD >*HTINDEX
PURGE LSPFMSG,TEMP >$null
BUILD LSPFMSG;REC=-79,,F,ASCII;TEMP;MSG
FILE LSPFMSG=LSPFMSG,OLDTEMP
LISTSPF O@;SELEQ=[(STATE=READY) AND (DEV=!LD)];DETAIL >*LSPFMSG
WHILE FINFO("LSPFMSG",19) <> 0
INPUT L1 < LSPFMSG
IF POS("#O",L1) <> 0 THEN
SETVAR SPNUM, RTRIM(STR(L1,3,8))
INPUT L2 < LSPFMSG
SETVAR L3, STR(L1,21,9)+STR(L2,50,7)+STR(L2,63,18)
SETVAR L3, "!L3"+STR(L1,3,9)+STR(L1,12,9)+STR(L2,21,9)
SETVAR L3, "!L3"+STR(L1,63,17)
ECHO !L3
PURGE H!SPNUM >$null
FILE SFOUT=H!SPNUM,NEW;SAVE;REC=-132,,F,ASCII;DISC=100000
COMMENT SF2HTML;info=sf# ie 1827;parm=lines per page
SF2HTMLP "!SPNUM ",!LC
PURGE /usr/local/www/httpd/htdocs/!LD/h!SPNUM.html >$null
COPY H!SPNUM,/usr/local/www/httpd/htdocs/!LD/h!SPNUM.html
ECHO !!!LT!AREF!SPNUM.html"!!!GT!L3!!!LT/a!!!GT >*HTINDEX
ENDIF
ENDWHILE
COMMENT the final sequence sets up the index and releases the files
PURGE /usr/local/www/httpd/htdocs/!LD/htindex.html >$null
RENAME HTINDEX,/usr/local/www/httpd/htdocs/!LD/htindex.html
PURGE SHELLIN,TEMP >$null
ECHO chmod 777 /usr/local/www/httpd/htdocs/!LD/*.html >SHELLIN
SH.HPBIN.SYS < SHELLIN
PURGE SHELLIN,TEMP >$null
**************************************************************************
********* __ __ * * *********
******** / / / / ** ** Michael C. Hornsby ********
******* / / / / *** *** President *******
****** / /___ ______ ____/ / **** **** Beechglen Development Inc. ******
***** / __ // __ // __ / ***** ***** 5576 Glenway Avenue *****
**** / /_/ // /_/ // /_/ / ****** ****** Cincinnati, Ohio 45238 ****
*** /_____//___ //_____/ ******* ******* ***
** __ / / ******** ******** Phone: (513) 922-0509 **
* / /_/ / ********* ********* Fax: (513) 347-2834 *
/_____/ ********** ********** Net: [log in to unmask]
**************************************************************************
|