$! ------------------ CUT HERE ----------------------- $ v='f$verify(f$trnlnm("SHARE_VERIFY"))' $! $! This archive created by VMS_SHARE Version 7.2-007 22-FEB-1990 $! On 4-APR-1991 17:40:19.93 By user BCHANDLE $! $! This VMS_SHARE Written by: $! Andy Harper, Kings College London UK $! $! Acknowledgements to: $! James Gray - Original VMS_SHARE $! Michael Bednarek - Original Concept and implementation $! $! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER $! AND EXECUTE AS A COMMAND PROCEDURE ( @name ) $! $! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING: $! 1. MAILBATCH.COM;8 $! $set="set" $set symbol/scope=(nolocal,noglobal) $f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID")) $e="write sys$error ""%UNPACK"", " $w="write sys$output ""%UNPACK"", " $ if f$trnlnm("SHARE_LOG") then $ w = "!" $ ve=f$getsyi("version") $ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto START $ e "-E-OLDVER, Must run at least VMS 4.4" $ v=f$verify(v) $ exit 44 $UNPACK: SUBROUTINE ! P1=filename, P2=checksum $ if f$search(P1) .eqs. "" then $ goto file_absent $ e "-W-EXISTS, File ''P1' exists. Skipped." $ delete 'f'* $ exit $file_absent: $ if f$parse(P1) .nes. "" then $ goto dirok $ dn=f$parse(P1,,,"DIRECTORY") $ w "-I-CREDIR, Creating directory ''dn'." $ create/dir 'dn' $ if $status then $ goto dirok $ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped." $ delete 'f'* $ exit $dirok: $ w "-I-PROCESS, Processing file ''P1'." $ if .not. f$verify() then $ define/user sys$output nl: $ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1' PROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET( SUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");b:= CREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(b)); LOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION( BEGINNING_OF(b));g:=0;LOOP EXITIF MARK(NONE)=END_OF(b);x:=ERASE_CHARACTER(1); IF g=0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x="V" THEN APPEND_LINE; MOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;IF x="+" THEN g:=1; ERASE_LINE;ENDIF;ELSE IF x="-" THEN IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+")= 1 THEN g:=0;ENDIF;ENDIF;ERASE_LINE;ENDIF;ENDLOOP;t:="0123456789ABCDEF"; POSITION(BEGINNING_OF(b));LOOP r:=SEARCH("`",FORWARD);EXITIF r=0;POSITION(r); ERASE(r);x1:=INDEX(t,ERASE_CHARACTER(1))-1;x2:=INDEX(t,ERASE_CHARACTER(1))-1; COPY_TEXT(ASCII(16*x1+x2));ENDLOOP;WRITE_FILE(b,GET_INFO(COMMAND_LINE, "output_file"));ENDPROCEDURE;Unpacker;QUIT; $ delete/nolog 'f'* $ CHECKSUM 'P1' $ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT $ e "-E-CHKSMFAIL, Checksum of ''P1' failed." $ ENDSUBROUTINE $START: $ create 'f' X$! MAIL-SORTING DAEMON X$!`20 X$!`20 X$! This sorts all of your new mail files according to X$! who owns the mail... X$! X$! use by saying X$! SUBMIT MAILBATCH X$! X$ define YOUR$MAILDIR "WKU$USER:`5BBCHANDLE.MAIL`5D" X$ set proc/name="BCs MAIL DAEMON" X$ set proc/prio=3 X$ startover: X$ OPEN/READ SORTLIST YOUR$MAILDIR:SORTLIST.DAT X$ OPEN/WRITE SORTCOMMAND YOUR$MAILDIR:SORTCMD.DAT X$ write SORTCOMMAND "SEL MAIL" X$ READLOOP: X$ READ/END=EXITOUT SORTLIST P2 X$ READ SORTLIST P3 X$ WRITE SORTCOMMAND "SEL/FROM=''P2'" X$ if P3 .EQS. "WASTEBASKET" then goto skipfile X$ WRITE SORTCOMMAND "FILE/ALL/NOCONFIRM ''P3'" X$ GOTO SKIPDELETE X$ SKIPFILE: X$ WRITE SORTCOMMAND "DEL/ALL" X$ SKIPDELETE: X$ GOTO READLOOP X$ EXITOUT:`20 X$ WRITE SORTCOMMAND "PURGE/RECLAIM" X$ write sortcommand "COMPRESS" X$ close sortcommand X$ close sortlist X$ define/user sys$input YOUR$MAILDIR:sortcmd.dat X$ define/user sys$command YOUR$MAILDIR:sortcmd.dat X$ mail X$ delete YOUR$MAILDIR:SORTCMD.DAT; X$ delete YOUR$MAILDIR:MAIL.OLD; X$ submit/q=slow$batch/AFTER=TOMORROW YOUR$MAILDIR:MAILBATCH.COM/print=tccw- X /nolog $ CALL UNPACK MAILBATCH.COM;8 119245447 $ v=f$verify(v) $ type sys$input This also uses a data file called SORTLIST.DAT... It has the simple format USERNAME FOLDERNAME ie.. INFO-VAX VAX_Stuff It is designed to submit itself over and over again into a SLOW BATCH queue... You should also change its process name and re-define YOUR$MAIL$DIR before using it. It operates every 24 hours... You can have it do this more often... I find that you can just say SET ENTRY/RELEASE to submit it if you get over-crowded in the MAIL folder... Hope it works okay for you, Baron L. Chandler