From:	SMTP%"mark@INFOCOMM.COM"  7-JUL-1995 09:31:35.60
To:	EVERHART
CC:	
Subj:	Re: ANU News V6.1beta10 and DECUS UUCP 2.0

Message-ID:  <1995Jul6.151151.25875@infopiz>
Newsgroups:   news.software.anu-news
Date:         Thu, 6 Jul 1995 15:11:51 PST
Reply-To: mark@INFOCOMM.COM
Sender: ANU-NEWS Discussion <ANU-NEWS@VM1.NoDak.EDU>
From: mark@INFOCOMM.COM
Organization: INFO COMM - Computer Consulting, Danville, Ca
Subject:      Re: ANU News V6.1beta10 and DECUS UUCP 2.0
To: Multiple recipients of list ANU-NEWS <ANU-NEWS@VM1.NoDak.EDU>

In article <1995Jun28.211130.12234@giant>, del@giant.intranet.com (G. Del Merrit
t) writes:
> I have downloaded, SMG-patched, and built News V6.1beta10 from
> NEWS_V61-BETA10_SRC.ZIP.  Hurray.  Now I find myself in a bit of a mental
> quandry.
>
> I use DECUS UUCP as my external news and email transport.  NewsBuild.com
> created a bunch of .EXE's and an .HLB, but no .COM's.  Should I also pick up
> the _DIST zipfile, extract the .COM's, and do some diff's?  Should I just copy
> the .EXE's to UUCP_BIN and not worry?  Should I do a little of both?  Should I
> get a latest-and-greatest version of UUCP 2.x that (perhaps) includes the new
> News?
>
> SETUP.MEM is helpful, but it doesn't have the word "upgrade" anywhere, and the
> reference to uucp is to just go "read the section on News setup in their
> installation manual".  Since News development has progressed more recently
> than DECUS UUCP's, however, I don't want to get stuck with old stuff.
>
> This is cross posted to news.software.anu-news and vmsnet.uucp.  Please feel
> free to REPLY to me, and I will summarize.
>
> Thanks.
>
> Del Merritt                                                  del@IntraNet.com
> IntraNet, Inc., One Gateway Center #700, Newton, MA  02158
> Voice: 617-527-7020; FAX: 617-527-6779
> All my opinions.                                      Just say no to Clipper.

If you are running UUCP 2.0, then you can:

Merely take the existing executables that get compiled from NEWSBUILD, and move
them to your UUCP_BIN directory, and make sure that the installed images get
reinstalled by:

        $ @UUCP_BIN:UUCP_SYSTARTUP INSTALL

That will work just fine with no other changes.

If you want the "latest" operational procedures, attached are the latest
NEWSSKIM.COM and NEWS_RNEWS.COM files that can be put into your UUCP_BIN:
directory.

You should not need anything else.  If you have any problems or questions, let
me know.

--
Mark Pizzolato - INFO COMM Computer Consulting, Danville, Ca
PHONE:  (510)837-5600   UUCP:  decwrl!infopiz!mark
DOMAIN: mark@infocomm.com
$! ------------------ CUT HERE -----------------------
$ v='f$verify(f$trnlnm("SHARE_UNPACK_VERIFY"))'
$!
$! This archive created:
$!  Name : NEWS_UUCP
$!  By   : mark@infocomm.com
$!  Date :  6-JUL-1995 15:05:33.84
$!  Using: VMS_SHARE 8.5-1, (C) 1993 Andy Harper, Kings College London UK
$!
$! Credit is due to these people for their original ideas:
$!    James Gray, Michael Bednarek
$!
$! To unpack this archive:
$!    Minimum of VMS 4.4 (VAX) / OpenVMS 1.0 (Alpha) is required.
$!    Remove the headers of the first part, up to `cut here' line.
$!    Execute file as a command procedure.
$!
$! The following file(s) will be created after unpacking:
$!       1. NEWSSKIM.COM;211
$!       2. NEWS_RNEWS.COM;54
$!
$ set="set"
$ set symbol/scope=(nolocal,noglobal)
$ f="SYS$SCRATCH:."+f$getjpi("","PID")+";"
$ if f$trnlnm("SHARE_UNPACK") .nes. "" then $ -
 f=f$parse("SHARE_UNPACK_TEMP",f)
$ e="write sys$error  ""%UNPACK"", "
$ w="write sys$output ""%UNPACK"", "
$ if .not. f$trnlnm("SHARE_UNPACK_LOG") then $ w = "!"
$ if f$getsyi("CPU") .gt. 127 then $ goto start
$ 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=file,P2=chksum,P3=attrib,P4=size,P5=fileno,P6=filetotal
$ 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:
$ x=f$search(P1)
$ if x .eqs. "" then $ goto file_absent
$ e "-W-EXISTS, File ''P1' exists. Skipped"
$ delete 'f'*
$ exit
$file_absent:
$ w "-I-UNPACK, Unpacking ", P5, " of ", P6, " - ", P1, " - ", P4, " Blocks"
$ n=P1
$ if P3 .nes. "" then $ n=f
$ if .not. f$verify() then $ define/user sys$output nl:
$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT/NOJOURNAL 'f'/OUT='n'
PROCEDURE GetHex(s,p)LOCAL x1,x2;x1:=INDEX(t,SUBSTR(s,p,1))-1;x2:=INDEX(t,
SUBSTR(s,p+1,1))-1;RETURN 16*x1+x2;ENDPROCEDURE;PROCEDURE SkipPartsep LOCAL m;
LOOP m:=MARK(NONE);EXITIF m=END_OF(CURRENT_BUFFER);DELETE(m);EXITIF INDEX(
ERASE_LINE,"-+-+-+-+-+-+-+-+")=1;ENDLOOP;ENDPROCEDURE;
PROCEDURE ProcessLine LOCAL c,s,l,b,n,p;s := ERASE_LINE;c := SUBSTR(s,1,1);s :=
 s-c;IF c = "X" THEN SPLIT_LINE; ENDIF;MOVE_HORIZONTAL(-1);l := LENGTH(s);p :=
 1;LOOP EXITIF p > l;c := SUBSTR(s,p,1);p := p+1;CASE c FROM ' ' TO '`' ['`']
: COPY_TEXT(ASCII(GetHex(s,p))); p:=p+2;[' ']: p:=p+1;[INRANGE,OUTRANGE]
: COPY_TEXT(c);ENDCASE;ENDLOOP;ENDPROCEDURE;PROCEDURE Decode(b)LOCAL m;
POSITION(BEGINNING_OF(b));LOOP m:=MARK(NONE);EXITIF m=END_OF(b);DELETE(m);
IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+-")=1 THEN SkipPartSep;ELSE ProcessLine;
MOVE_HORIZONTAL(1);ENDIF;ENDLOOP;ENDPROCEDURE;SET(FACILITY_NAME,"UNPACK");SET(
SUCCESS,OFF);SET(INFORMATIONAL,OFF);t:="0123456789ABCDEF";f:=GET_INFO(
COMMAND_LINE,"file_name");o:=CREATE_BUFFER(f,f);Decode(o);WRITE_FILE(o,
GET_INFO(COMMAND_LINE,"output_file"));QUIT;
$ if p3 .eqs. "" then $ goto dl
$ open/write fdl &f
$ write fdl "RECORD"
$ write fdl P3
$ close fdl
$ w "-I-CONVRFM, Converting record format to ", P3
$ convert/fdl='f' 'f'-1 'f'
$ fa=f$getdvi(f$parse(f),"ALLDEVNAM")
$ Pa=f$getdvi(f$parse(P1),"ALLDEVNAM")
$ if fa .eqs. Pa then $ rename &f 'f$parse(P1)'
$ if fa .nes. Pa then $ copy &f 'f$parse(P1)'
$dl: delete 'f'*
$ checksum 'P1'
$ if checksum$checksum .nes. P2 then $ -
  e "-E-CHKSMFAIL, Checksum of ''P1' failed."
$ exit
$ endsubroutine
$start:
$!
$ create 'f'
X$`20!`09`09N`20E`20W`20S`20S`20K`20I`20M`20.`20C`20O`20M`20-`20DECUS`20UUCP`20
VDistribution`20version
X$`20GOTO`20START`09`09!'f$verify(f$integer(f$trnlnm("NEWS_NEWSSKIM_VERIFY")))'
V
X$`20!
X$`20!`20NEWSSKIM`20-`20the`20daily`20news`20management`20code.`20This`20code
V`20is`20submitted`20into
X$`20!`20the`20batch`20queues`20under`20the`20"news`20manager"'s`20account`20by
V`20news_systartup.com,
X$`20!`20and`20resubmits`20itself.`20`20The`20current`20code`20is`20expected`20
Vto`20run`20hourly.`20`20This
X$`20!`20frequency`20should`20probably`20not`20be`20modified,`20since`20all`20t
Vhat`20is`20done`20at`20NON
X$`20!`20midnight`20runs`20is`20to`20forward`20down`20stream`20news`20and`20to
V`20process`20any`20news`20that`20
X$`20!`20arrived`20by`20mail.`20`20This`20processing`20is`20minimal,`20and`20if
V`20particular`20efforts
X$`20!`20at`20regulating`20flow`20are`20desired,`20this`20should`20be`20managed
V`20by`20restricting`20
X$`20!`20uucp`20calling`20times`20to`20adjacent`20nodes.`20`20Doing`20things`20
Vthis`20way,`20will`20end`20up
X$`20!`20with`20a`20savings`20in`20the`20max`20disk`20space`20used`20since`20on
Vce`20batches`20are`20"forwarded"
X$`20!`20they`20are`20usually`20compressed,`20hence`20less`20space`20used.`20
V`20
X$`20!
X$`20!`20The`20code`20performs`20the`20following`20actions:
X$`20!`20`201`20-`20read`20all`20items`20MAILED`20to`20RNEWS`20or`20NEWSMAIL,
V`20and`20submit`20them`20for
X$`20!`20`20`20`20`20`20processing`20by`20NEWS_RNEWS
X$`20!`20`202`20-`20locate`20any`20NNTP`20or`20other`20method`20batches`20and
V`20submit`20them`20for`20processing
X$`20!`09`20by`20NEWS_RNEWS
X$`20!`20`203`20-`20delete`20(skim)`20all`20expired`20news`20items`20and`20expi
Vred`20newsgroups`20(daily)
X$`20!`20`204`20-`20Generate`20IHAVE`20control`20messages`20to`20down`20stream
V`20sites`20as`20appropriate
X$`20!`20`205`20-`20Distribute`20posted`20items`20to`20remote`20sites
X$`20!`20`20`20`20`20`20`20a)`20COPY`20post`20items`20to`20NEWSMGR`20proxies`20
Von`20remote`20DECNET`20nodes
X$`20!`09`20`20b)`20UUX_RNEWS`20via`20UUCP`20to`20send`20post`20items`20to`20ad
Vjacent`20UUCP`20sites
X$`20!`20`206`20-`20If`20new`20UUCP`20maps`20have`20arrived,`20process`20them
V`20into`20a`20new`20paths
X$`20!`09`20database`20for`20proper`20mail`20routing`20(daily)
X$`20!`20`207`20-`20Arbitron`20and`20Inpaths`20reports`20are`20generated`20(onc
Ve`20a`20month)
X$`20!`20`208`20-`20Log`20file`20analysis/reporting,`20and`20cleanup
X$`20!`20`209`20-`20rebuilds`20the`20news`20index`20files`20on`20Sunday`20night
Vs.`20(mornings)
X$`20!`2010`20-`20resubmit`20for`20next`20run
X$`20!
X$`20!`20Author:
X$`20!`20`20`20`20`20G`20Huston
X$`20!`20`20`20`20`20`20`20Computer`20Services`20Centre
X$`20!`20`20`20`20`20`20`20Australian`20National`20University
X$`20!
X$`20!`20Version:
X$`20!`20`20`20`20`20V1.0`20`20`20`2017-Jul-1986
X$`20!`20`20`20`20`20V2.0`20`20`20`2016-Jul-1987
X$`20!`20`20`20`20`20V4.3`20`20`20`2012-Jan-1987`20`20`20`20`20GIH
X$`20!`20`20`20`20`20V5.2`20`20`20`2026-Apr-1988`20`20`20`20`20GIH
X$`20!`20`20`20`20`20V5.6`20`20`20`20`203-Nov-1988`20`20`20`20`20GIH
X$`20!`09V5.7`0912-Feb-1989`09Mark`20Pizzolato`20-`20mark@infopiz.UUCP
X$`20!`09V5.7A`20`0915-Apr-1989`09Jamie`20Hanrahan`20-`20jeh@simpact.UUCP
X$`20!`09V5.7A-1`0931-May-1989`09Mark`20Pizzolato`20-`20mark@infopiz.UUCP
X$`20!`09V5.8`091-Jul-1989`09Mark`20Pizzolato`20-`20mark@infopiz.UUCP
X$`20!`09V5.9`0915-Oct-1989`09Mark`20Pizzolato`20-`20mark@infopiz.UUCP
X$`20!`09V5.9B`092-Dec-1989`09Mark`20Pizzolato`20-`20mark@infopiz.UUCP
X$`20!`09V5.9C`0920-Dec-1989`09Mark`20Pizzolato`20-`20mark@infopiz.UUCP
X$`20!`09`09`09`09Jamie`20Hanrahan`20-`20jeh@simpact.com
X$`20!`09`09`09`09Terry`20Poot`20-`20tp@mccall.com
X$`20!`09`09`09`09Earle`20Ake`20-`20fac2@dayton.saic.com
X$`20!`09V6.0`0930-Mar-1990`09Geoff`20Huston`20`20`20-`20gih900@sao.aarnet.edu.
Vau
X$`20!`09(note,`20this`20also`20works`20with`20V5.9C`20--`20jeh)
X$`20!`20`20`20`20`20V6.1-A4`2029-Mar-1992`09Mark`20Pizzolato`20-`20mark@infoco
Vmm.com
X$`20!`20`20`20`20`20V6.1-B5`2019-Sep-1992`09Mark`20Pizzolato`20-`20mark@infoco
Vmm.com
X$`20!`20`20`20`20`20V6.1-B8`2011-Nov-1993`09Mark`20Pizzolato`20-`20mark@infoco
Vmm.com
X$`20!`09`09`09`09Tom`20Allebrandi`20-`20allebrandi@inland.com
X$`20!
X$`20!**********************************************************************
X$`20!
X$`20!`09Control`20Logicals:`09`09`09Units:`09`09Default:
X$`20!`09================================================================
X$`20!`09NEWS_NEWSSKIM_LOG_LIFETIME`09`09days`09`094
X$`20!`09NEWS_NEWSSKIM_SET_ITEMHOLD`09`09boolean`09`09false
X$`20!`09NEWS_NEWSSKIM_ARBITRON`09`09`09boolean`09`09false
X$`20!`09NEWS_NEWSSKIM_INPATHS`09`09`09boolean`09`09false
X$`20!`09NEWS_NEWSSKIM_FEEDCHECK`09`09`09boolean`09`09true
X$`20!`09NEWS_NEWSSKIM_SKIM_HISTORY`09`09days`09`0945
X$`20!`09NEWS_NEWSSKIM_SKIM_QUALIFIERS`09`09string`09`09""
X$`20!`09NEWS_NEWSSKIM_NIGHTLY_BUCKET_RECLAIM`09boolean`09`09true
X$`20!`20`20`20`20`20NEWS_NEWSSKIM_SKIM_JOB_DELTA`09`09delta-time`20`20`20`20+0
V1:00:00`20(1`20hour)
X$`20!
X$`20!`20start`20code
X$
X$START:
X$`20`20`20say`20=`20"write`20sys$output"
X$`20`20`20set`20protection=(S:RWED,O:RWED,G:R,W:R)/default
X$`20`20`20start_time`20=`20f$time()
X$`20`20`20SS$_DEADLOCK`20=`20"%X10000E0A"
X$`20`20`20rnews_job_prio`20=`20f$getsyi("MAXQUEPRI")-1
X$`20`20`20say`20"''f$time()'`09NEWSSKIM`20starting`20-`20PID:`20''f$getjpi("",
V"PID")'"
X$`20`20`20news_batch_queue`20=`20f$getqui("DISPLAY_QUEUE","QUEUE_NAME","*","TH
VIS_JOB")
X$`20`20`20define/nolog`20newsrc`20nla0:
X$`20`20`20if`20f$trnlnm("NEWS_BIN").eqs.""`20then`20define`20news_bin`20'f$trn
Vlnm("UUCP_BIN")'
X$
X$`20`20`20`20old_prcnam`20=`20f$getjpi("","PRCNAM")
X$`20`20`20`20if`20f$mode().eqs."BATCH"`20then`20set`20process/name="NEWSSKIM_'
V'f$element(1,"_",old_prcnam)'"
X$
X$`20`20`20`20if`20f$search("news_manager:last_skim.time").eqs.""
X$`09then
X$`09`20`20`20`20new_day`20=`20"Y"`09!`20file`20missing,`20assume`20first`20run
V`20ever
X$`09else
X$`09`20`20`20`20last_time`20=`20""
X$`09`20`20`20`20define/user`20sys$output`20nla0:
X$`09`20`20`20`20define/user`20sys$error`20nla0:
X$`09`20`20`20`20last_time`20=`20f$cvtime(f$file("news_manager:last_skim.time",
V"CDT"),"ABSOLUTE")
X$`09`20`20`20`20create`20NLA0:
X$`09`20`20`20`20new_day`20=`20f$element(0,`20"`20",`20last_time)`20.nes.`20f$e
Vlement(0,`20"`20",`20f$cvtime(start_time,"ABSOLUTE"))
X$`20`20`20endif
X$`20`20`20if`20(f$mode().eqs."BATCH").and.(f$environment("DEPTH").eq.1).and.(p
V1.eqs."")
X$`20`20`20`20`20`20then
X$`09!
X$`09!`20To`20avoid`20clutter`20in`20other`20guys`20log`20(output)`20files,`20a
Vnd`20also`20to`20
X$`09!`20provide`20a`20consistent`20place`20to`20look`20for`20the`20information
V`20reported`20by
X$`09!`20this`20procedure,`20namely`20NEWS_LOG:NEWSSKIM.LOG,`20we`20recurse`20w
Vith`20output
X$`09!`20directed`20to`20NEWS_LOG:NEWSSKIM.LOG`20(Note,`20we`20rename`20to`20a
V`20file`20of`20the
X$`09!`20form`20NEWSSKIM.LOG_mmdd-hh`20at`20the`20end`20of`20this`20procedure
V`20(after`20all
X$`09!`20useful`20work`20has`20been`20done).
X$`09!
X$`09set`20noon
X$`09log`20=`20f$cvtime(,,"MONTH")+f$cvtime(,,"DAY")+"-"+f$cvtime(,,"HOUR")`20
V
X$`09say`20"''f$time()'`09Redirecting`20NEWSSKIM`20output`20to`20NEWS_LOG:NEWSS
VKIM.LOG."
X$`09open/write/share=read`20LOGFILE`20NEWS_LOG:NEWSSKIM.LOG
X$`09@'f$environment("PROCEDURE")'/output=LOGFILE
X$`09close`20LOGFILE
X$`09!
X$`09!`20Rename`20our`20log`20file`20to`20NEWSSKIM.LOG_mmdd-hh`20to`20avoid`20l
Varge`20version`20numbers
X$`09!
X$`09rename`20news_log:newsskim.log;0`20news_log:newsskim.log_'log';0
X$`09say`20"''f$time()'`09NEWSSKIM`20Complete."
X$`09goto`20all_done
X$`20`20`20endif
X$`20`20`20if`20p3.nes.""`20then`20new_day`20=`20p3`09!`20Override`20for`20inte
Vractive`20testing
X$`20`20`20if`20p1.nes.""`20then`20goto`20'p1'`09`09!`20Option`20for`20interact
Vive`20testing
X$`20!
X$`20!`20Make`20sure`20the`20disks`20are`20there
X$`20!
X$`20`20`20if`20f$search("news_root:news.items")`20.eqs.`20""`09.or.`20-
X`20`20`20`20`20`20`20f$search("news_root:news.groups")`20.eqs.`20""`09.or.`20-
V
X`20`20`20`20`20`20`20f$search("news_device:`5B*...`5D*.itm")`20.eqs.`20"")`20
V
X$`20`20`20then`20
X$`09say`20"Aborting,`20can't`20see`20required`20files"
X$`09goto`20abort
X$`20`20`20endif
X$
X$`20!
X$`20!`20Log`20the`20time`20...
X$`20!
X$record_skim:
X$`20`20`20open/read/write/Error=skim_conflict`20last_skim`20news_manager:last_
Vskim.time;1
X$`20`20`20create`20news_manager:last_skim.time
X$`20`20`20goto`20time_logged`20!`20Note:`20this`20file`20is`20kept`20open`20to
V`20serialize`20SKIM`20operations
X$skim_conflict:
X$`20`20`20if`20$status.eqs."%X10018292"`09`09!`20File`20Not`20Found
X$`20`20`20then
X$`20`20`20`20`20create`20news_manager:last_skim.time;1
X$`20`20`20`20`20goto`20record_skim
X$`20`20`20endif
X$`20`20`20say`20"''f$time()'`09Skim`20Processing`20already`20in`20progress,`20
VExiting."
X$`20`20`20goto`20fin
X$
X$time_logged:
X$`20`20`20IF`20"''NEWS'".EQS.""`20THEN`20NEWS`20=`20"$NEWS_BIN:NEWS"
X$`20`20`20execqual`20=`20""
X$`20`20`20IF`20(f$logi("NEWS_EXECUTE_CONTROL"))`20THEN`20execqual`20=`20"/EXEC
VUTE"
X$`09cregrpqual`20=`20""
X$`09IF`20(f$logi("NEWS_AUTO_CREGRP"))`20THEN`20cregrpqual`20=`20"/CREGRP"
X$
X$`20`20`20on`20error`20then`20goto`20abort
X$`20`20`20oldprv`20=`20f$setprv("SYSPRV")
X$`20`20`20if`20.not.`20f$privilege("SYSPRV")`20then`20exit
X$`20`20`20set`20output_rate`20=`20:00:15`09`09!`20`20Allow`20a`20close`20watch
V`20to`20be`20kept
X$
X$`20!
X$`20!`09Read`20all`20and`20remove`20locally`20addressed`20mail`20to`20NEWSMGR
V
X$`20!
X$`20`20`20set`20noon
X$`20`20`20say`20"''f$time()'`09Looking`20for`20items`20mailed`20to`20RNEWS`20o
Vr`20NEWSMAIL"
X$`20`20`20mail
Xselect`20newmail
Xextract/all`20news_manager:newmail.mail
Xdelete/all
Xexit
X$`20!
X$`20!`20`20`20`20`20Decode`20extracted`20UUENCODEd`20mail
X$`20!
X$`20`20`20if`20f$search("news_bin:newsuud.exe").eqs.""`20then`20goto`20mail_ad
Vd
X$`20`20`20newsuud`20`20=`20"$news_bin:newsuud"
X$decode_uue:
X$`20`20`20ufile`20=`20f$search("news_manager:newmail.mail;*",1)
X$`20`20`20if`20ufile`20.nes.`20""
X$`20`20`20then
X$`20`20`20`20`20`20`20newsuud`20'ufile'
X$`20`20`20`20`20`20`20goto`20decode_uue
X$`20`20`20endif
X$`20!
X$`20!`09Place`20all`20extracted`20mail`20into`20the`20news`20data`20base
X$`20!
X$mail_add:
X$`20`20`20if`20(f$search("news_manager:newmail.mail").eqs."")`20then`20goto`20
Vuuemail_add
X$`20`20`20rename`20news_manager:newmail.mail`20news_manager:newmail.mail_batch
Ved
X$`20`20`20batch`20=`20f$search("news_manager:newmail.mail_batched")
X$`20`20`20batch_log`20=`20"NEWS_LOG:RNEWS_MAIL_''f$cvtime(,"COMPARISON","MONTH
V")'-''f$cvtime(,,"DAY")'-''f$cvtime(,,"HOUR")'-''f$cvtime(,,"MINUTE")'-''f$cvt
Vime(,,"SECOND")'"
X$`20`20`20submit/noprint/log='batch_log'`09`09-
X`09/parameter=('batch',"mail")`09`09-
X`09/queue='news_batch_queue'`09`09-
X`09/priority='rnews_job_prio'`09`09-
X`09/restart`20NEWS_BIN:NEWS_RNEWS
X$`20`20`20goto`20mail_add
X$uuemail_add:
X$`20`20`20if`20(f$search("news_manager:uudnews.batch").eqs."")`20then`20goto
V`20done_mail
X$`20`20`20rename`20news_manager:uudnews.batch`20news_manager:uudnews.batch_bat
Vched
X$`20`20`20batch`20=`20f$search("news_manager:uudnews.batch_batched")
X$`20`20`20batch_log`20=`20"NEWS_LOG:RNEWS_MAIL_''f$cvtime(,"COMPARISON","MONTH
V")'-''f$cvtime(,,"DAY")'-''f$cvtime(,,"HOUR")'-''f$cvtime(,,"MINUTE")'-''f$cvt
Vime(,,"SECOND")'"
X$`20`20`20submit/noprint/log='batch_log'`09`09-
X`09/parameter=('batch',"uuemail")`09`09-
X`09/queue='news_batch_queue'`09`09-
X`09/priority='rnews_job_prio'`09`09-
X`09/restart`20NEWS_BIN:NEWS_RNEWS
X$`20`20`20goto`20uuemail_add
X$done_mail:
X$`20`20`20say`20"''f$time()'`09Looking`20for`20batches`20which`20arrived`20via
V`20NNTP"
X$`20!
X$`20!`20`20Find`20any`20.INCOMING_BATCH`20files`20which`20are`20older`20than
V`20a`20day,`20and`20rename`20them
X$`20!`20`20for`20processing.`20`20They`20somehow`20got`20left`20around`20from
V`20a`20NNTP_SERVER`20session`20
X$`20!`20`20which`20terminated`20abnormally.`20`20Such`20files`20older`20than
V`201`20day`20most`20likely`20meet
X$`20!`20`20this`20criteria.
X$`20!
X$incoming_loop:
X$`20`20`20`20`20incoming_file`20=`20f$search("news_manager:nntp_*.incoming_bat
Vch;*")
X$`20`20`20`20`20if`20incoming_file.nes.""
X$`20`20`20`20`20then
X$`09`20`20if`20(f$cvtime(f$file_attributes(incoming_file,"CDT")).les.`09-
X`09`20`20`20`20`20`20f$cvtime("-1-00:00:00"))
X$`09`20`20then`20
X$`09`09rename/log`20'incoming_file'`20news_manager:*.batch
X$`09`20`20endif
X$`09`20`20goto`20incoming_loop
X$`20`20`20`20`20endif
X$`20`20`20pid`20=`20f$getjpi("","PID")
X$`20`20`20nntp_batches`20=`200
X$`20`20`20nntp_batch_size`20=`200
X$`20`20`20nntp_empty_batches`20=`200
X$`20`20`20nntp_batch_group`20=`201
X$`20`20`20nntp_max_batch_size`20=`201024`09!`20(default`20to`20.5MB`20batch`20
Vgroupings)
X$`20`20`20nntp_max_batches`20=`2020`09!`20(default`20to`20group`2020`20batches
V`20together)
X$nntp_add:
X$`20`20`20batch`20=`20f$search("news_manager:nntp_*.batch")
X$`20`20`20if`20(batch.eqs."")`20then`20goto`20done_nntp
X$`20`20`20rename`20'batch'`20news_manager:*.batch_batched_'pid'-'nntp_batch_gr
Voup'/new_version
X$`20`20`20batch`20=`20f$parse(batch,,,"NAME")
X$`20`20`20batch`20=`20f$search("news_manager:''batch'.batch_batched_''pid'-''n
Vntp_batch_group'")
X$`20`20`20batch_log`20=`20"NEWS_LOG:RNEWS_NNTP_''f$cvtime(,"COMPARISON","MONTH
V")'-''f$cvtime(,,"DAY")'-''f$cvtime(,,"HOUR")'-''f$cvtime(,,"MINUTE")'-''f$cvt
Vime(,,"SECOND")'"
X$`20`20`20if`20f$file_attributes(batch,`20"ALQ").eq.0
X$`20`20`20then
X$`09delete`20'batch'
X$`09nntp_empty_batches`20=`20nntp_empty_batches`20+`201
X$`20`20`20else
X$`09nntp_batch_size`20=`20nntp_batch_size`20+`20f$file_attributes(batch,`20"AL
VQ")
X$`09nntp_batches`20=`20nntp_batches`20+`201
X$`20`20`20endif
X$`20`20`20if`20(nntp_batches.ge.nntp_max_batches).or.(nntp_batch_size.ge.nntp_
Vmax_batch_size)
X$`20`20`20then
X$`09submit/noprint/log='batch_log'`09`09-
X`09`09/parameter=("news_manager:nntp_*.batch_batched_''pid'-''nntp_batch_group
V'","nntp")`09-
X`09`09/queue='news_batch_queue'`09`09-
X`09`09/priority='rnews_job_prio'`09`09-
X`09`09/restart`20NEWS_BIN:NEWS_RNEWS
X$`09say`20"''f$time()'`09''nntp_batches'`20NNTP`20batches`20queued`20for`20pro
Vcessing"
X$`09nntp_batch_group`20=`20nntp_batch_group`20+`201
X$`09nntp_batches`20=`200
X$`09nntp_batch_size`20=`200
X$`20`20`20endif
X$`20`20`20goto`20nntp_add
X$done_nntp:
X$`20`20`20if`20nntp_empty_batches.gt.0
X$`20`20`20then
X$`09say`20"''f$time()'`09''nntp_empty_batches'`20Empty`20NNTP`20batches`20dele
Vted"
X$`20`20`20endif
X$`20`20`20if`20nntp_batches.gt.0
X$`20`20`20then
X$`09submit/noprint/log='batch_log'`09`09-
X`09`09/parameter=("news_manager:nntp_*.batch_batched_''pid'-''nntp_batch_group
V'","nntp")`09-
X`09`09/queue='news_batch_queue'`09`09-
X`09`09/priority='rnews_job_prio'`09`09-
X`09`09/restart`20NEWS_BIN:NEWS_RNEWS
X$`09say`20"''f$time()'`09''nntp_batches'`20NNTP`20batches`20queued`20for`20pro
Vcessing"
X$`09nntp_batch_group`20=`20nntp_batch_group`20+`201
X$`09nntp_batches`20=`200
X$`09nntp_batch_size`20=`200
X$`20`20`20endif
X$`20`20`20say`20"''f$time()'`09Looking`20for`20batches`20which`20arrived`20via
V`20NEWSGATE"
X$`20`20`20pid`20=`20f$getjpi("","PID")
X$`20`20`20gate_batches`20=`200
X$`20`20`20gate_batch_size`20=`200
X$`20`20`20gate_empty_batches`20=`200
X$`20`20`20gate_batch_group`20=`201
X$`20`20`20gate_max_batch_size`20=`201024`09!`20(default`20to`20.5MB`20batch`20
Vgroupings)
X$`20`20`20gate_max_batches`20=`2020`09!`20(default`20to`20group`2020`20batches
V`20together)
X$gate_add:
X$`20`20`20batch`20=`20f$search("news_manager:newsgate*.batch")
X$`20`20`20if`20(batch.eqs."")`20then`20goto`20done_gate
X$`20`20`20rename`20'batch'`20news_manager:*.batch_batched_'pid'-'gate_batch_gr
Voup'/new_version
X$`20`20`20batch`20=`20f$parse(batch,,,"NAME")
X$`20`20`20batch`20=`20f$search("news_manager:''batch'.batch_batched_''pid'-''g
Vate_batch_group'")
X$`20`20`20batch_log`20=`20"NEWS_LOG:RNEWS_NEWSGATE_''f$cvtime(,"COMPARISON","M
VONTH")'-''f$cvtime(,,"DAY")'-''f$cvtime(,,"HOUR")'-''f$cvtime(,,"MINUTE")'-''f
V$cvtime(,,"SECOND")'"
X$`20`20`20if`20f$file_attributes(batch,`20"ALQ").eq.0
X$`20`20`20then
X$`09delete`20'batch'
X$`09gate_empty_batches`20=`20gate_empty_batches`20+`201
X$`20`20`20else
X$`09gate_batch_size`20=`20gate_batch_size`20+`20f$file_attributes(batch,`20"AL
VQ")
X$`09gate_batches`20=`20gate_batches`20+`201
X$`20`20`20endif
X$`20`20`20if`20(gate_batches.ge.gate_max_batches).or.(gate_batch_size.ge.gate_
Vmax_batch_size)
X$`20`20`20then
X$`09submit/noprint/log='batch_log'`09`09-
X`09`09/parameter=("news_manager:newsgate*.batch_batched_''pid'-''gate_batch_gr
Voup'","newsgate")`09-
X`09`09/queue='news_batch_queue'`09`09-
X`09`09/priority='rnews_job_prio'`09`09-
X`09`09/restart`20NEWS_BIN:NEWS_RNEWS
X$`09say`20"''f$time()'`09''gate_batches'`20NEWSGATE`20batches`20queued`20for
V`20processing"
X$`09gate_batch_group`20=`20gate_batch_group`20+`201
X$`09gate_batches`20=`200
X$`09gate_batch_size`20=`200
X$`20`20`20endif
X$`20`20`20goto`20gate_add
X$done_gate:
X$`20`20`20if`20gate_empty_batches.gt.0
X$`20`20`20then
X$`09say`20"''f$time()'`09''gate_empty_batches'`20Empty`20NEWSGATE`20batches`20
Vdeleted"
X$`20`20`20endif
X$`20`20`20if`20gate_batches.gt.0
X$`20`20`20then
X$`09submit/noprint/log='batch_log'`09`09-
X`09`09/parameter=("news_manager:newsgate_*.batch_batched_''pid'-''gate_batch_g
Vroup'","newsgate")`09-
X`09`09/queue='news_batch_queue'`09`09-
X`09`09/priority='rnews_job_prio'`09`09-
X`09`09/restart`20NEWS_BIN:NEWS_RNEWS
X$`09say`20"''f$time()'`09''gate_batches'`20NEWSGATE`20batches`20queued`20for
V`20processing"
X$`09gate_batch_group`20=`20gate_batch_group`20+`201
X$`09gate_batches`20=`200
X$`09gate_batch_size`20=`200
X$`20`20`20endif
X$`20`20`20say`20"''f$time()'`09Looking`20for`20batches`20which`20arrived`20via
V`20other`20means"
X$other_add:
X$`20`20`20if`20(f$search("news_manager:news.batch").eqs."")`20then`20goto`20lo
Vcal_add
X$`20`20`20rename`20news_manager:news.batch`20news_manager:news.batch_batched
X$`20`20`20batch`20=`20f$search("news_manager:news.batch_batched")
X$`20`20`20batch_log`20=`20"NEWS_LOG:RNEWS_OTHER_''f$cvtime(,"COMPARISON","MONT
VH")'-''f$cvtime(,,"DAY")'-''f$cvtime(,,"HOUR")'-''f$cvtime(,,"MINUTE")'-''f$cv
Vtime(,,"SECOND")'"
X$`20`20`20submit/noprint/log='batch_log'`09`09-
X`09/parameter=('batch',"other")`09`09-
X`09/queue='news_batch_queue'`09`09-
X`09/priority='rnews_job_prio'`09`09-
X`09/restart`20NEWS_BIN:NEWS_RNEWS
X$`20`20`20goto`20other_add
X$local_add:
X$`20`20`20if`20f$search("NEWS_BIN:NEWS_LOCAL_RECEIVE.COM").nes.""
X$`20`20`20then
X$`09!
X$`09!`20This`20callout`20allows`20for`20a`20site`20specific`20"other"`20method
V`20for`20arrival`20
X$`09!`20of`20news`20batches.`20`20It`20is`20recommended`20that`20a`20technique
V`20similar`20to`20the`20
X$`09!`20above`20examples`20for`20"mail_add",`20"uuemail_add",`20and`20"other_a
Vdd"`20be`20
X$`09!`20employed`20within`20such`20a`20procedure`20to`20actually`20process`20a
Vny`20inbound`20
X$`09!`20batches`20(i.e.`20passing`20them`20to`20NEWS_BIN:NEWS_RNEWS).`20`20Thi
Vs`20will`20allow
X$`09!`20for`20as`20much`20parallelism`20as`20possible`20and`20also`20avoids`20
Vduplication`20of`20
X$`09!`20resource`20checking`20code,`20and`20keeps`20skim`20and`20forwarding`20
Vseparate`20from`20
X$`09!`20the`20actual`20inbound`20processing.
X$`09!
X$`09say`20"''f$time()'`09Invoking`20the`20site`20specific`20recieve`20mechanis
Vm`20to`20receive`20arriving`20batches"
X$`09@NEWS_BIN:NEWS_LOCAL_RECEIVE
X$`20`20`20endif
X$local_done:
X$`20`20`20say`20"''f$time()'`09Processing`20of`20mailed/forwarded`20items`20co
Vmplete"
X$
X$`20!`20-------------------
X$`20!`20This`20section`20optionally`20invokes`20a`20procedure`20that`20sets`20
Vthe`20default`20
X$`20!`20newsgroup`20itemhold`20according`20an`20appropriate`20site`20specific
V`20policy.
X$`20!
X$`20`20`20enable_this`20=`20f$trnlnm("NEWS_NEWSSKIM_SET_ITEMHOLD")
X$`20`20`20if`20(enable_this`20.and.`20new_day`20.and.`20(f$search("NEWS_BIN:NE
VWS_SET_ITEMHOLD.COM")`20.nes.`20""))
X$`20`20`20then
X$`09set`20noon
X$`20`20`20`20`20`20`20@NEWS_BIN:NEWS_SET_ITEMHOLD
X$`20`20`20endif
X$
X$skim:
X$`20!`20---------------------
X$`20!`20Skim`20--`20remove`20expired`20items`20(the`20function`20for`20which
V`20this`20proc`20was
X$`20!`20originally`20named).`20`20
X$`20!`20It`20is`20a`20waste`20of`20time`20to`20perform`20more`20than`201`20ski
Vm`20of`20the`20NEWS`20files`20per
X$`20!`20day`20(since`20the`20skim`20operation`20is`20solely`20concerned`20with
V`20deleting`20expired
X$`20!`20items,`20and`20items`20only`20expire`20based`20on`20time`20kept`20in
V`20whole`20days).`20`20
X$
X$`20`20`20`20if`20(.not.`20new_day)`20then`20goto`20skim_done
X$`20`20`20`20if`20f$search("NEWS_NNTP_LOG").nes.""
X$`20`20`20`20then
X$`09`20`20`20`20!`20Rename`20the`20NEWS_NNTP_LOG`20log`20file`20to`20NEWS_LOG
V`20to`20recycle`20it,`20
X$`09`20`20`20`20!`20and`20to`20allow`20possible`20analysis`20of`20it's`20conte
Vnts.
X$`09`20`20`20`20log`20=`20f$cvtime(,,"MONTH")+f$cvtime(,,"DAY")
X$`09`20`20`20`20rename`20NEWS_NNTP_LOG`20news_log:nntp_processing.log_'log'
X$`20`20`20`20endif
X$`20!
X$`20!`09Skim`20off`20all`20expired`20news`20
X$`20!
X$`20`20`20`20say`20"''f$time()'`09Nightly`20SKIM`20Starting"
X$`20`20`20`20history`20=`20f$trnlnm("NEWS_NEWSSKIM_SKIM_HISTORY")
X$`20`20`20`20if`20history.eqs.""`20then`20history`20=`20"45"
X$`20`20`20`20skimquals`20=`20f$trnlnm("NEWS_NEWSSKIM_SKIM_QUALIFIERS")
X$`20`20`20`20news/noscreen`20skim/history='history'`20'skimquals'
X$`20`20`20`20say`20"''f$time()'`09Nightly`20SKIM`20Completed"
X$`20!
X$`20!`09Daily`20recovery`20of`20buckets`20in`20the`20history`20and`20newsitems
V`20files`20tends`20to`20
X$`20!`09smooth`20the`20variance`20in`20the`20size`20of`20these`20files,`20sinc
Ve`20these`20freed
X$`20!`09buckets`20can`20be`20reused`20immediately.`20`20This`20done`20with`20o
Vther`20news
X$`20!`09processing`20locked`20out`20if`20the`20necessary`20facility`20(NEWSSHU
VTDOWN)`20is
X$`20!`09available.`20`20(Note`20SYSLCK`20priv`20is`20required`20by`20the`20NEW
VSMANAGER`20account)
X$`20!
X$`20`20`20`20newsshutdown`20=`20f$search("NEWS_BIN:NEWSSHUTDOWN.EXE")
X$`20`20`20`20if`20newsshutdown.nes.""
X$`20`20`20`20`20`20then
X$`09`20old_privs`20=`20f$setprv("SYSLCK")
X$`09`20if`20.not.f$privilege("SYSLCK")
X$`09`20then
X$`09`20`20`20say`20"''f$time()'`09SYSLCK`20privilege`20required`20to`20ensure
V`20database`20consistency
X$`09`20`20`20say`20"''f$time()'`09Continuing`20anyway`20.`20.`20."
X$`09`20`20`20goto`20do_reclaim
X$`20`20`20`20`20`20`20`20endif
X$`09`20say`20"''f$time()'`09Shutting`20Down`20the`20NEWS`20system`20for`20file
V`20maintenance."
X$`09`20define/user`20NEWS_LOCKED_COMMAND`20"@''f$environment("PROCEDURE")'`20d
Vo_reclaim`20''f$verify()'"
X$`09`20run`20'newsshutdown
X$`09`20old_privs`20=`20f$setprv(old_privs)
X$`20`20`20`20`20`20`20`20goto`20reclaim_done
X$`20`20`20`20endif
X$do_reclaim:
X$`20`20`20`20convert`20=`20"convert"
X$`20`20`20`20do_convert`20=`20f$trnlnm("NEWS_NEWSSKIM_NIGHTLY_BUCKET_RECLAIM")
V
X$`20`20`20`20if`20do_convert.eqs.""`20then`20do_convert`20=`20"TRUE"
X$`20`20`20`20if`20.not.do_convert`20then`20goto`20reclaim_done
X$`20`20`20`20say`20"''f$time()'`09Reclaiming`20Free`20Space`20in`20News`20Item
Vs`20file"
X$`20`20`20`20convert/reclaim/statistics`20news_root:news.items
X$`20`20`20`20if`20(f$search("news_root:history.v60").nes."")
X$`20`20`20`20then
X$`09say`20"''f$time()'`09Reclaiming`20Free`20Space`20in`20News`20History`20fil
Ve"
X$`09convert/reclaim/statistics`20news_root:history.v60
X$`20`20`20`20endif
X$`20`20`20`20if`20p1.nes.""`20then`20goto`20fin
X$reclaim_done:
X$`20`20`20`20junk`20=`20f$getqui("CANCEL_OPERATION")
X$qloop:
X$`20`20`20`20qname`20=`20f$getqui("DISPLAY_QUEUE","QUEUE_NAME","*","BATCH")
X$`20`20`20`20if`20qname.eqs.""`20then`20goto`20release_done
X$`20`20`20`20if`20qname.nes.news_batch_queue`20then`20goto`20qloop
X$jloop:
X$`20`20`20`20jname`20=`20f$getqui("DISPLAY_JOB","JOB_NAME",,"ALL_JOBS")
X$`20`20`20`20if`20jname.eqs.""`20then`20goto`20release_done
X$`20`20`20`20if`20jname.nes."NEWS_RNEWS"`20then`20goto`20jloop
X$`20`20`20`20if`20.not.f$getqui("DISPLAY_JOB","JOB_HOLDING",,"ALL_JOBS,FREEZE_
VCONTEXT")`20then`20goto`20jloop
X$`20`20`20`20jentry`20=`20F$GETQUI("DISPLAY_JOB","ENTRY_NUMBER",,"ALL_JOBS,FRE
VEZE_CONTEXT")
X$`20`20`20`20say`20"''f$time()'`20Releasing`20Job`20Entry`20#`20''jentry'"
X$`20`20`20`20set`20entry`20'jentry'/release
X$`20`20`20`20goto`20jloop
X$release_done:
X$`20`20`20`20if`20p1.nes.""`20then`20goto`20fin
X$`20`20`20`20say`20"''f$time()'`09Skim`20Completed"
X$`20!
X$skim_done:
X$
X$`20!**********************************************************************
X$`20!`09Post`20IHAVE,`20SENDME`20Control`20messages`20to`20other`20sites
X$`20!
X$`20`20`20`20say`20"''f$time()'`09Looking`20for`20IHAVE`20control`20messages
V`20to`20send`20to`20other`20sites"
X$`20`20`20`20mynode`20=`20f$trnlnm("NEWS_NODE")
X$isearch_1:
X$`20`20`20`20sayit`20=`20say
X$`20`20`20`20nodedir`20=`20f$search("news_manager:ihave_*.dir",2)
X$`20`20`20`20if`20nodedir`20.eqs.`20""`20then`20goto`20ihave_done
X$`20`20`20`20node`20=`20f$parse(nodedir,,,"NAME","SYNTAX_ONLY")`20-`20"IHAVE_"
V
X$`20`20`20`20savedfiles`20=`20"news_manager_dev:`5Bihave_"`20+`20node`20+`20"
V`5D*.*;*"
X$isearch_2:
X$`20`20`20`20`20`20`20`20file`20=`20f$search(savedfiles,4)
X$`20`20`20`20`20`20`20`20if`20file`20.eqs.`20""`20then`20goto`20isearch_1
X$`20`20`20`20`20`20`20`20`20`20`20`20cfile`20=`20f$element(0,";",file)
X$`09`20`20`20`20`20sayit`20"''f$time()'`09...Posting`20'ihave'`20messages`20to
V`20newsgroup`20to.''node'"
X$`09`20`20`20`20`20sayit`20=`20"!"
X$`20`20`20`20`20`20`20`20`20`20`20`20on`20error`20then`20goto`20isearch_2
X$`20`20`20`20`20`20`20`20`20`20`20`20on`20error`20then`20goto`20ino_copy_2
X$`09`20`20`20`20`20open/read/error=ino_copy_2`20access_check`20'file'
X$iadd_file:`20`20NEWS/NOSCREEN`20POST/NEWS=to.'node'/SUBJ="ihave`20''mynode'"
V`20`20`09-
X`09`09/NOEDIT/CONTROL="ihave`20''mynode'"`20'file
XYES
XYES
X$`09`20`20`20`20`20if`20$status.eqs.SS$_DEADLOCK
X$`09`20`20`20`20`20then
X$`09`20`20`20`20`20`20`20say`20"''f$time()'`09NEWS`20Processing`20is`20LOCKED
V`20-`20Waiting`2010`20minutes
X$`09`20`20`20`20`20`20`20wait`2000:10:00
X$`09`20`20`20`20`20`20`20goto`20iadd_file
X$`20`20`20`20`20`20`20`20`20`20`20`20endif
X$`20`20`20`20`20`20`20`20`20`20`20`20delete`20'file
X$ino_copy_2:
X$`09`20close/nolog`20access_check
X$`20`20`20`20`20`20`20`20goto`20isearch_2
X$ihave_done:
X$`20`20`20`20say`20"''f$time()'`09IHAVE`20scan`20complete"
X$`20!
X$`20!**********************************************************************
X$`20!`09Copy`20news`20items`20to`20other`20sites
X$`20!
X$`20!`20Search`20for`20all`20directories`20of`20the`20form:
X$`20!`09`20news_manager:post_<transmission_mode_><node>.dir
X$`20!`20Copy`20all`20items`20in`20the`20node`20specific`20directory`20to`20the
V`20remote`20node
X$`20!`20Once`20all`20post`20directories`20have`20been`20found,`20delete`20all
V`20items`20in`20the
X$`20!`20post`20directory.`20this`20code`20assumes`20that`20for`20DECnet`20copi
Ves,`20proxies`20exist
X$`20!`20on`20remote`20nodes.
X$`20!
X$`20!`09`20news_manager:post_<`5Bprio-`5D`5BFILELIST`5B$st$et`5D-`5Dtransmissi
Von_mode_><node>.dir
X$`20!
X$`20!`20NOTE:`20The`20transmission`20mode`20may`20optionally`20be`20prepended
V`20with`20a`20"scan
X$`20!`09`20`20priority",`20which`20is`20specified`20as:`20prio-transmission.
V`20`20(Note`20the`20"-"
X$`20!`09`20`20being`20lexically`20significant).`20`20The`20ONLY`20purpose`20of
V`20this`20priority
X$`20!`09`20`20is`20to`20reorder`20which`20POST`20directories`20get`20flushed
V`20first.`20`20For`20example,
X$`20!`09`20`20if`20you`20feed`20two`20sites:`20AAAA`20and`20ZZZZ,`20and`20it
V`20is`20more`20important`20that
X$`20!`09`20`20outbound`20traffic`20for`20size`20ZZZZ`20gets`20sent`20before`20
Vthat`20for`20AAAA,`20then`20
X$`20!`09`20`20using`20the`20priority`20mechanism`20is`20appropriate.
X$`20!`09`20`20The`20transmission`20mode,`20can`20be`20prefixed`20by`20a`20stor
Vage`20methodology.
X$`20!`09`20`20This`20storage`20methodology`20defaults`20to`20traditional`20bat
Vch`20files,
X$`20!`09`20`20but`20it`20can`20also`20be`20specified`20as`20"FILELIST",`20whic
Vh`20indicates`20that
X$`20!`09`20`20the`20file`20in`20the`20posting`20directory`20actually`20contain
Vs`20a`20list`20of`20
X$`20!`09`20`20file`20names`20of`20the`20items`20which`20are`20to`20be`20batche
Vd`20only`20at`20the
X$`20!`09`20`20time`20of`20transmission.
X$`20!`09`20`20The`20FILELIST`20specification,`20may`20optionally`20be`20follow
Ved`20by`20a`20flush
X$`20!`09`20`20time`20specification.`20`20The`20"flush`20time"`20specification
V`20is`20a`20time`20range
X$`20!`09`20`20which`20indicates`20the`20$st`20(start`20hour),`20and`20$et`20(e
Vnd`20hour).`20`20If`20a
X$`20!`09`20`20flush`20time`20range`20is`20specified,`20then`20the`20FILELIST
V`20will`20only`20be`20batched
X$`20!`09`20`20for`20transmission`20when`20NEWSSKIM`20is`20run`20between`20the
V`20start`20hour`20and
X$`20!`09`20`20the`20end`20hour.
X$`20!
X$`20!`20The`20currently`20supported`20transmission`20modes`20are:
X$`20!`09a)`20Default`20`20`20`20`20`09-`20DECNET`20ala`20Base`20ANU`20NEWS`20d
Vistribution
X$`20!`09b)`20DECNET`20`20`20`20`20`20`09-`20Same`20as`20above,`20but`20explici
Vtly`20stated.
X$`20!`09`09in`20both`20of`20the`20above`20cases,`20'node'`20is`20the`20DECnet
V`20nodename.
X$`20!`09c)`20UUCP`09`09-`20UUCP`20copies`20to`20'rnews'`20on`20the`20remote`20
Vsite.
X$`20!`09d)`20UUCP$CMPRS`09-`20Compressed`20batch`20UUCP`20copies`20to`20'rnews
V'`20on`20the
X$`20!`09`09`09`20`20remote`20site.
X$`20!`09e)`20UUCP$GZIP`09-`20Gzip`20compressed`20batch`20UUCP`20copies`20to`20
V'rnews'`20on`20the
X$`20!`09`09`09`20`20remote`20site.
X$`20!`09`09in`20the`20above`20three`20cases,`20'node'`20is`20the`20uucp`20host
Vname.
X$`20!`09f)`20NNTP`09`09-`20NNTP`20transport`20to`20'node',`20where`20node`20is
V`20either`20the
X$`20!`20`20`20`20`20`20`20`20NNTP$TCP`09`20`20explicit`20nodename`20or`20a`20l
Vogical`20name`20(defined`20in
X$`20!`09`20`20`20NNTP$DECNET`20`20`20`20NEWSSKIM_LOGICALS.COM)`20that`20transl
Vates`20to`20the`20DECNET
X$`20!`09`09`09`20`20or`20TCP`20name`20to`20tranamit`20the`20batch`20to.`20`20T
Vhe`20Default
X$`20!`09`09`09`20`20transmission`20method`20will`20use`20TCP,`20but`20this`20c
Van`20be
X$`20!`09`09`09`20`20explicitly`20specified`20by`20the`20transport`20type`20of
V
X$`20!`09`09`09`20`20NNTP$TCP`20or`20NNTP$DECNET`20or`20via`20a`20logical`20nam
Ve
X$`20!`09`09`09`20`20NEWS_NNTP_PROTOCOL`20or`20NEWS_NNTP_PROTOCOL_node.
X$`20!`20`20`20`20`20g)`20COMMAND`09-`20Local`20site`20provided`20transport`20i
Vmplemented`20by`20the
X$`20!`09`09`09`20`20file`20NEWS_TRANSPORT.COM`20in`20the`20directory`20
X$`20!`09`09`09`20`20NEWS_MANAGER_DEV:`5BPOST_COMMAND_node`5D.`20`20This
X$`20!`09`09`09`20`20procedure`20is`20invoked`20with`20two`20arguments:
X$`20!`09`09`09`09P1`20=`20node
X$`20!`09`09`09`09P2`20=`20file`20to`20transport
X$`20!`20`20`20`20`20h)`20MAIL`20`20`20`20`20`20`20`20`20-`20Used`20for`20mail
V`20based`20feeds.`20The`20appropriate`20logical
X$`20!`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20name
V`20must`20be`20defined`20in`20NEWSSKIM_LOGICALS.COM
X$`20!`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20for
V`20the`20mail`20address`20of`20the`20news_manager`20account`20on
X$`20!`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20the
V`20remote`20system.
X$`20!`20`20`20`20`20i)`20MLIST`20`20`20`20`20`20`20`20-`20Used`20for`20mailing
V`20list`20gateways.`20The`20appropriate
X$`20!`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20logi
Vcal`20name`20must`20be`20defined`20in`20NEWSSKIM_LOGICALS.COM
X$`20!`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20for
V`20the`20mail`20address`20of`20the`20mailing`20list.
X$`20!`20`20`20`20`20j)`20UUEMAIL`20`20`20`20`20`20-`20Used`20for`20mail`20base
Vd`20feeds`20with`20EMBL-UUEn/Decoding.
X$`20!`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20The
V`20appropriate`20logical`20name`20must`20be`20defined`20in
X$`20!`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20NEWS
VSKIM_LOGICALS.COM`20for`20the`20mail`20address`20of`20the
X$`20!`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20news
V_manager`20account`20on`20the`20remote`20system.
X$`20!
X$`20`20`20`20say`20"''f$time()'`09Searching`20for`20items`20to`20forward`20to
V`20other`20sites"
X$`20`20`20`20set`20on
X$`20`20`20`20compress`20=`20"$news_bin:compress"
X$`20`20`20`20gcompress`20=`20"$news_bin:gzip"
X$`20`20`20`20uux_rnews`20=`20"$news_bin:uux_rnews"
X$`20`20`20`20batchnews`20=`20"$news_bin:batchnews"
X$`20`20`20`20if`20f$search("news_bin:gatenews.exe").nes.""
X$`20`20`20`20then
X$`09gatenews`20=`20"$news_bin:gatenews"
X$`20`20`20`20else
X$`09if`20f$search("mx_exe:gatenews.exe").nes.""
X$`09then`20gatenews`20=`20"$mx_exe:gatenews"
X$`09else`20gatenews`20=`20""
X$`09endif
X$`20`20`20`20endif
X$`20`20`20`20newsuue`20=`20"$news_bin:newsuue"
X$`20`20`20`20nntp_xmit`20=`20"$news_bin:nntp_xmit"
X$`20`20`20`20if`20f$search("news_bin:newsskim_logicals.com").nes.""`20then`20-
V
X`20`20`20`20`20`20`20`20@news_bin:newsskim_logicals
X$`20`20`20`20start_prccnt`20=`20f$getjpi("","PRCCNT")
X$search_1:
X$`20`20`20`20sayit`20=`20say
X$`20`20`20`20nodedir`20=`20f$search("news_manager:post_*.dir",2)
X$`20`20`20`20if`20nodedir`20.eqs.`20""`20then`20goto`20transport_done
X$`20`20`20`20node`20=`20f$parse(nodedir,,,"NAME","SYNTAX_ONLY")`20-`20"POST_"
V
X$`20`20`20`20savedfiles`20=`20"news_manager_dev:`5Bpost_"`20+`20node`20+`20"
V`5D*.*;"
X$`20`20`20`20method`20=`20f$element(0,"_",node)`20+`20"_"
X$`20`20`20`20node`20=`20node`20-`20method
X$`20`20`20`20compressed`20=`20"NO"
X$`20`20`20`20gzip_compressed`20=`20"NO"
X$`20`20`20`20prio`20=`20f$string(f$integer(f$element(0,"-",method)))
X$`20`20`20`20if`20(prio.eqs.f$element(0,"-",method))`20then`20method`20=`20(me
Vthod`20-`20prio)`20-`20"-"
X$`20`20`20`20if`20f$search(savedfiles).eqs.""`20then`20goto`20search_1
X$`20`20`20`20if`20f$element(1,"-",method).nes."-"
X$`09then
X$`09`20`20`20storage_class`20=`20f$element(0,"-",method)
X$`09`20`20`20method`20=`20(method`20-`20storage_class)`20-`20"-"
X$`09`20`20`20start_hour`20=`20f$element(1,"$",storage_class)
X$`09`20`20`20end_hour`20=`20f$element(2,"$",storage_class)
X$`09`20`20`20storage_class`20=`20f$element(0,"$",storage_class)
X$`09`20`20`20if`20(start_hour.nes."$").and.(end_hour.nes."$")
X$`09`20`20`20`20`20`20then
X$`09`09hour`20=`20f$integer(f$cvtime(,,"HOUR"))
X$`09`09start_hour`20=`20f$integer(start_hour)
X$`09`09end_hour`20=`20f$integer(end_hour)
X$`09`09if`20(((start_hour.gt.end_hour).and.`09`09`09-
X`09`09`20`20`20`20`20((hour.lt.start_hour).and.(hour.gt.end_hour))).or.`09-
X`09`09`20`20`20`20((start_hour.le.end_hour).and.`09`09`09-
X`09`09`20`20`20`20`20((hour.gt.end_hour).or.(hour.lt.start_hour))))
X$`09`09`20`20`20`20then
X$`09`09`09say`20"''f$time()'`09Deferring`20''storage_class'`20batching`20for
V`20''node'`20due`20to`20time`20restrictions`20''start_hour'-''end_hour'"
X$`09`09`09goto`20search_1
X$`09`09endif
X$`09`20`20`20endif
X$`09else
X$`09`20`20`20storage_class`20=`20"BATCH"
X$`20`20`20`20endif
X$`20`20`20`20if`20f$element(1,"-",method).nes."-"`20then`20method`20=`20f$elem
Vent(1,"-",method)
X$search_3:
X$`20`20`20`20file`20=`20f$search(savedfiles,4)
X$`20`20`20`20if`20file`20.eqs.`20""`20then`20goto`20search_1
X$`20`20`20`20`20`20`20`20`20`20`20`20cfile`20=`20f$element(0,";",file)
X$`09`20`20`20`20`20versions`20=`20f$integer(f$parse(file,,,"VERSION","SYNTAX_O
VNLY")-";")
X$`09`20`20`20`20`20ver`20=`200
X$search_2:`20`20ver`20=`20ver`20+`201
X$`09`20`20`20`20`20if`20(ver.gt.versions)`20then`20goto`20search_3
X$`09`20`20`20`20`20file`20=`20cfile`20+`20";"`20+`20f$string(ver)
X$`09`20`20`20`20`20if`20f$search(file).eqs.""`20then`20goto`20search_2
X$`09`20`20`20`20`20sayit`20"''f$time()'`09...forwarding`20items`20to`20''node'
V`20via`20''storage_class'-''method'"
X$`09`20`20`20`20`20sayit`20=`20"!"
X$`20`20`20`20`20`20`20`20`20`20`20`20on`20error`20then`20goto`20no_copy_2
X$`20`20`20`20`20`20`20`20`20`20`20`20on`20warning`20then`20goto`20no_copy_2
X$`09`20`20`20`20`20open/read/error=no_copy_2`20access_check`20'file'
X$`09`20`20`20`20`20if`20storage_class.eqs."FILELIST"
X$`09`09then
X$merge_versions:`20`20`20`20v1`20=`20ver`20+`201
X$`09`09`20`20`20`20open/read/error=no_merge`20access_check_1`20'cfile';'f$stri
Vng(v1)'
X$`09`09`20`20`20`20close`20access_check
X$`09`09`20`20`20`20append`20access_check_1:`20'file'
X$`09`09`20`20`20`20open/read`20access_check`20'file'
X$`09`09`20`20`20`20delete`20'cfile;'f$string(v1)'
X$`09`09`20`20`20`20ver`20=`20ver`20+`201
X$`09`09`20`20`20`20close`20access_check_1
X$`09`09`20`20`20`20goto`20merge_versions
X$no_merge:
X$`09`20`20`20`20`20endif
X$`09`20`20`20`20`20goto`20'method'METHOD
X$_METHOD:`09`09!`20Default`20(Original`20ANU`20NEWS)`20Method`20is`20DECnet
X$DECNET_METHOD:
X$`09`20`20`20`20`20if`20storage_class.eqs."FILELIST"
X$`09`09then
X$`09`09`20`20`20`20batch_file`20=`20file`20-`20f$parse(file,,,"VERSION")`20+
V`20"-BATCH"
X$`09`09`20`20`20`20batchnews`20/FILELIST='file'`20/SIZE=1000000`20/BATCHFILE='
Vbatch_file'
X$`09`09`20`20`20`20copy/log`20'batch_file'*`20'node'::;
X$`09`09`20`20`20`20delete`20'batch_file'*;*
X$`09`09else
X$`09`09`20`20`20copy/log`20'file`20'node'::;
X$`09`20`20`20`20`20endif
X$`20`20`20`20`20`20`20`20`20`20`20`20goto`20delete_it
X$UUCP$GZIP_METHOD:`09!`20Compressed`20UUCP`20NEWS`20batch
X$`09`20`20`20`20`20gzip_compressed`20=`20"YES"
X$`09`20`20`20`20`20goto`20UUCP_METHOD
X$UUCP$CMPRS_METHOD:`09!`20Compressed`20UUCP`20NEWS`20batch
X$`09`20`20`20`20`20compressed`20=`20"YES"
X$UUCP_METHOD:`09!`20Uncompressed`20UUCP`20NEWS`20batch
X$`09`20`20`20`20`20call`20uucp_disk_check`20"''file'"`20"''compressed'"`20"''n
Vode'"`20"''storage_class'"`20"''start_hour'"`20"''end_hour'"
X$`09`20`20`20`20`20batch_file`20=`20file`20-`20f$parse(file,,,"VERSION")`20+
V`20"-BATCH"
X$`09`20`20`20`20`20if`20(storage_class.eqs."FILELIST")
X$`09`09then
X$`09`09`20`20`20`20batchnews`20/FILELIST='file'`20/MAX_SIZE='total_batch_size'
V`20/SIZE='batch_size'`20/BATCHFILE='batch_file'
X$`09`09else
X$`09`09`20`20`20`20copy`20'file'`20'batch_file'
X$`09`20`20`20`20`20endif
X$`20`20`20`20`20`20`20`20`20`20`20`20if`20compressed`20then`20compress`20-fzpv
V`20'batch_file'*
X$`20`20`20`20`20`20`20`20`20`20`20`20if`20gzip_compressed`20then`20gcompress
V`20-fzv`20'batch_file'*
X$`09`20`20`20`20`20uux_rnews`20-j`20'node'`20'batch_file'*
X$`09`20`20`20`20`20delete`20'batch_file'*;*
X$`20`20`20`20`20`20`20`20`20`20`20`20goto`20delete_it
X$NNTP_METHOD:`09!`20Outgoing`20NNTP`20based`20feeds
X$NNTP$TCP_METHOD:
X$NNTP$DECNET_METHOD:
X$`09`20`20`20`20`20if`20f$search("news_bin:nntp_xmit.exe").nes.""`20
X$`09`09then
X$`09`09`09nntp_flags`20=`20f$trnlnm("NEWS_NNTP_FLAGS_''node'")
X$`09`09`09if`20nntp_flags.eqs.""`20then`20nntp_flags`20=`20f$trnlnm("NEWS_NNTP
V_FLAGS")
X$`09`09`09nntp_protocol`20=`20f$trnlnm("NEWS_NNTP_PROTOCOL_''node'")
X$`09`09`09if`20nntp_protocol.eqs.""`20then`20nntp_protocol`20=`20f$trnlnm("NEW
VS_NNTP_PROTOCOL")
X$`09`09`09if`20nntp_protocol.eqs.""`20then`20nntp_protocol`20=`20"TCP"
X$`09`09`09if`20method.nes."NNTP_"`20then`20nntp_protocol`20=`20(method`20-`20"
VNNTP$")`20-`20"_"
X$`09`09`09if`20f$trnlnm(node).nes.""`20then`20node`20=`20f$trnlnm(node)
X$`09`09`09nntp_log`20=`20"SYS$OUTPUT:"
X$`09`09`09if`20f$trnlnm("NEWS_NNTP_LOG").nes.""`20then`20nntp_log`20=`20"NEWS_
VNNTP_LOG:"
X$`09`09`09close/nolog`20access_check
X$`09`09`09nntp_xmit_verify`20=`20f$verify(1)
X$`09`09`09nntp_xmit`20'nntp_flags'`20'node'`20'nntp_protocol'`20'file'`20'nntp
V_log'
X$`09`09`09say`20"NNTP`20News`20batch`20for`20''node'`20processed"`20!`20'f$ver
Vify(nntp_xmit_verify)'
X$`09`09else
X$`09`09`09say`20"No`20NNTP`20Transmitter`20(news_bin:nntp_xmit.exe)`20found"
X$`09`09`09say`20"''file'`20preserved"
X$`09`09`09goto`20no_copy_2
X$`09`09endif
X$`09`20`20`20`20`20goto`20no_copy_2
X$COMMAND_METHOD:`20!`20User`20Supplied`20Command`20file`20to`20effect`20delive
Vry
X$`09`20`20`20`20`20command`20=`20f$search(f$parse("NEWS_TRANSPORT.COM",,file))
V
X$`09`20`20`20`20`20if`20command.eqs.""`20then`20command`20=`20f$search("NEWS_M
VANAGER:NEWS_TRANSPORT_''node'.COM")
X$`09`20`20`20`20`20if`20command.eqs.""`20then`20command`20=`20f$search("NEWS_M
VANAGER:NEWS_TRANSPORT.COM")
X$`09`20`20`20`20`20if`20f$search(command).nes.""`20
X$`09`09then`20
X$`09`09`09if`20file.nes.(file-"`5DNEWS_TRANSPORT.COM;")`20then`20goto`20no_cop
Vy_2
X$`09`09`09if`20storage_class.eqs."FILELIST"
X$`09`09`09`20`20`20then
X$`09`09`09`09batch_file`20=`20file`20-`20f$parse(file,,,"VERSION")`20+`20"-BAT
VCH"
X$`09`09`09`09batchnews`20/FILELIST='file'`20/SIZE=1000000`20/BATCHFILE='batch_
Vfile'
X$`09`09`09`09@'command'`20'node'`20'batch_file'*
X$`09`09`09`09delete`20'batch_file'*;*
X$`09`09`09`20`20`20else
X$`09`09`09`09@'command'`20'node'`20'file'
X$`09`09`09endif
X$`09`09else
X$`09`09`09say`20"No`20Delivery`20procedure`20NEWS_TRANSPORT.COM`20for`20''NODE
V'"
X$`09`09`09say`20"''file'`20preserved"
X$`09`09`09goto`20no_copy_2
X$`09`09endif
X$`09`20`20`20`20`20goto`20delete_it
X$MAIL_METHOD:`20`20!`20Outgoing`20mail`20based`20feeds
X$`20`20`20`20`20`20`20`20`20`20`20`20mail/subject=newsfeed/noedit/noself`20'fi
Vle'`20'node'
X$`20`20`20`20`20`20`20`20`20`20`20`20say`20"''f$time()'`09News`20batch`20maile
Vd`20to`20''node'"
X$`20`20`20`20`20`20`20`20`20`20`20`20goto`20delete_it
X$MLIST_METHOD:`20`20!`20Outgoing`20news`20gateway`20to`20mailing`20lists
X$`09`20`20`20`20`20if`20gatenews.nes.""
X$`09`09then
X$`09`09`09say`20"''f$time()'`09News`20batch`20gatewayed`20to`20mailing`20list
V`20mailed`20to`20''node'"
X$`20`20`20`20`20`20`20`20`20`20`20`20`09`09gatenews`20'file'`20'f$trnlnm(node)
V'`20'f$trnlnm(node)'
X$`09`09else
X$`09`09`09say`20"No`20news/mlist`20gateway`20(news_bin:gatenews.exe`20or`20mx_
Vexe:gatenews.exe)`20found"
X$`09`09`09say`20"''file'`20preserved"
X$`09`09`09goto`20no_copy_2
X$`09`09endif
X$`20`20`20`20`20`20`20`20`20`20`20`20goto`20delete_it
X$UUEMAIL_METHOD:`20`20!`20Outgoing`20mail`20based`20feeds`20with`20EMBL`20UUEn
Vcoding
X$`09`20`20`20`20`20if`20f$search("news_bin:newsuue.exe").nes.""`20
X$`09`09then
X$`09`09`09newsuue`20'file'
X$`09`09`09mail/subject=news_uue_feed/noedit/noself`20uuenews.uue`20'node'
X$`09`09`09del`20uuenews.uue;*
X$`09`09`09say`20"UUENCODEd`20News`20batch`20mailed`20to`20''node'"
X$`09`09else
X$`09`09`09say`20"No`20EMBL-UUencoder`20(news_bin:newsuue.exe)`20found"
X$`09`09`09say`20"''file'`20preserved"
X$`09`09`09goto`20no_copy_2
X$`09`09endif
X$`20`20`20`20`20`20`20`20`20`20`20`20goto`20delete_it
X$delete_it:
X$`20`20`20`20`20`20`20`20`20`20`20`20delete`20'file
X$no_copy_2:
X$`09`20close/nolog`20access_check
X$`20`20`20`20`20`20`20`20goto`20search_2
X$transport_done:
X$`09if`20p1.nes.""`20then`20goto`20fin
X$`09if`20f$getjpi("","PRCCNT").gt.start_prccnt
X$`09`20`20`20then
X$`09`09say`20"''f$time()'`09Waiting`20for`20transmission`20sub`20processes`20t
Vo`20complete`20..."
X$`09`09WAIT`2000:00:30
X$`09`09goto`20transport_done
X$`09endif
X$`09say`20"''f$time()'`09Item`20forwarding`20scan`20complete"
X$`20!
X$`20!
X$map_process:
X$`20!
X$`20!`20`20This`20section`20deals`20with`20the`20special`20case`20news`20group
V`20comp.mail.maps
X$`20!`20`20and`20assumes`20that`20an`20entry`20exists`20in`20the`20NEWS.SYS`20
Vfile`20of`20the`20following
X$`20!`20`20form:
X$`20!
X$`20!`20`20mapsink:world,na,usa,comp.mail.maps:B:NEWS_MANAGER_DEV/`5BUUCP_MAPS
V`5Dmapsaver`5EM
X$`20!
X$`20!`20`20A`20related`20entry`20must`20exist`20in`20NEWS.DISTRIBUTION:`20`20(
VSee`20the`20comments`20in
X$`20!`20`20both`20files)
X$`20!
X$`20!`20`20node_we_get_maps_from`09mapsink
X$`20!
X$`20!`20`20If`20no`20such`20entries`20exist,`20then`20this`20code`20is`20a`20n
Voop.
X$`20!
X$`20!`20`20We`20only`20do`20the`20maps`20once`20a`20day,`20since`20rebuilding
V`20paths.`20is`20such`20a`20big
X$`20!`20`20job;`20it`20seems`20silly`20to`20do`20it`20when`20more`20maps`20mig
Vht`20arrive`20later`20the`20same
X$`20!`20`20day.`20`20If`20maps`20arrive`20after`20the`20day's`20paths.`20our
V`20paths.`20will`20be`20at`20most
X$`20!`20`20a`20day`20"old".`20`20Since`20it`20takes`20days`20or`20weeks`20for
V`20new`20map`20entries`20to`20filter
X$`20!`20`20through`20rutgers,`20to`20the`20regional`20map`20coordinators,`20ba
Vck`20to`20rutgers,`20and
X$`20!`20`20finally`20through`20innumerable`20uucp`20news`20links`20to`20us,`20
Vthis`20is`20a`20non-problem.
X$`20!
X$`20!`20`20new_day`20was`20set`20earlier,`20when`20we`20decided`20whether`20or
V`20not`20to`20do`20the`20
X$`20!`20`20NEWS`20SKIM`20operation.`20`20
X$
X$`20`20`20`20if`20(.not.`20new_day).and.(p1.eqs."")`20then`20goto`20map_done
X$`20`20`20`20map_mail_subject`20=`20""
X$`20!
X$`20!`20`20any`20maps`20to`20do?
X$`20!
X$`20`20`20`20if`20f$search("NEWS_MANAGER_DEV:`5BUUCP_MAPS`5Dmapsaver.*").eqs."
V"`20`09-
X`09then`20goto`20map_cleanup
X$`20!
X$`20`20`20`20say`20"''f$time()'`09Processing`20New`20UUCP`20Map`20Entries"
X$`20!
X$`20!`20`20Lets`20first`20make`20sure`20we`20have`20enough`20disk`20space`20to
V`20complete`20this`20function
X$`20!
X$`20`20`20`20new_maps_size`20=`200
X$map_size:
X$`20`20`20`20mapfile`20=`20f$search("NEWS_MANAGER_DEV:`5BUUCP_MAPS`5Dmapsaver.
V*;*",1)
X$`20`20`20`20if`20mapfile`20.eqs.`20""`20then`20goto`20map_size_done
X$`20`20`20`20new_maps_size`20=`20new_maps_size`20+`20f$file_attributes(mapfile
V,`20"ALQ")
X$`20`20`20`20goto`20map_size
X$map_size_done:
X$`20`20`20`20space_required`20=`20f$integer(f$trnlnm("UUCP_MINIMUM_DISKSPACE")
V)
X$`20`20`20`20if`20space_required.eq.0`20then`20space_required`20=`205000
X$`20`20`20`20spool_space`20=`20f$getdvi("UUCP_SPOOL","FREEBLOCKS")-space_requi
Vred
X$`20`20`20`20paths_size`20=`204500`09`09!`20Assume`20big
X$`20`20`20`20if`20f$search("UUCP_DATA:PATHS.").nes.""`20then`09-
X`09paths_size`20=`20f$file_attributes("UUCP_DATA:PATHS.","ALQ")
X$`20`20`20`20if`20(F$GETDVI("UUCP_SPOOL","DEVNAM").eqs.F$GETDVI("NEWS_MANAGER_
VDEV","DEVNAM"))
X$`09then
X$`09`20`20`20desired_space`20=`202*new_maps_size
X$`09`20`20`20if`20(desired_space`20.gt.`20spool_space)`20then`20goto`20map_dis
Vk_full
X$`09`20`20`20desired_space`20=`20paths_size
X$`09`20`20`20if`20(paths_size`20.gt.`20spool_space)`20then`20goto`20map_disk_f
Vull
X$`09else
X$`09`20`20`20desired_space`20=`20new_maps_size`20+`20paths_size
X$`09`20`20`20if`20(f$getdvi("NEWS_MANAGER_DEV","FREEBLOCKS").lt.new_maps_size)
V`20-
X`09`09then`20goto`20map_disk_full
X$`09`20`20`20if`20(spool_space`20.lt.`20desired_space)`20`09`09-
X`09`09then`20goto`20map_disk_full
X$`20`20`20`20endif
X$map_size_ok:
X$`20`20`20`20on`20warning`20then`20goto`20map_parse_error
X$`20!
X$`20!`20`20`20Extract`20the`20newly`20arrived`20newsgroup`20entries`20(comp.ma
Vil.maps)`20into
X$`20!`20`20`20the`20UUCP_PATH_DATA`20directory.
X$`20!
X$`20`20`20`20create`20nla0:
X$`20`20`20`20mapsaver`20:==`20$news_bin:mapsaver
X$`20`20`20`20mapsaver`20-vdnews_manager_dev:`5Buucp_maps`5D`20news_manager_dev
V:`5Buucp_maps`5Dmapsaver.*;*
X$`20`20`20`20delete`20news_manager_dev:`5Buucp_maps`5Dmapsaver.*;*
X$`20`20`20`20copy`20news_manager_dev:`5Buucp_maps`5D*.*`20uucp_path_data:
X$`20`20`20`20delete`20news_manager_dev:`5Buucp_maps`5D*.*;*
X$`20`20`20`20on`20warning`20then`20goto`20map_done
X$`20!
X$`20!`20`20Rebuild`20the`20PATHS`20database`20considering`20the`20new`20map`20
Ventry`20data
X$`20!`20`20just`20provided.
X$`20!
X$`20`20`20`20say`20"''f$time()'`09...starting`20MAKEPATHS"
X$`20`20`20`20@news_bin:makepaths`20"''f$trnlnm("NEWSSKIM_UUCP_PATH_DATA")'"`20
V"''f$trnlnm("NEWSSKIM_UUCP_DATA")'"
X$`20`20`20`20say`20"''f$time()'`09...MAKEPATHS`20complete"
X$`09!`20what`20I`20really`20want`20to`20do`20is`20DIR`20/excl=;0,`20but`20that
V`20never`20finds`20ANY
X$`09!`20files`20for`20some`20reason.`20`20
X$`20`20`20`20directory/outp=news_log:temp.txt`20uucp_data:paths,uucp_path_data
V:*.*;-1,;-2,;-3,;-4,;-5,;-6/dates/size
X$`20`20`20`20set`20noon
X$`20`20`20`20define/user`20sys$output`20nla0:
X$`20`20`20`20define/user`20sys$error`20nla0:
X$`20`20`20`20if`20f$search("uucp_log:pathalias.log").nes.""
X$`20`20`20`20then
X$`09copy`20uucp_log:pathalias.log`20news_log:temp.txt
X$`09append`20news_log:temp.txt;-1`20news_log:temp.txt
X$`09delete`20news_log:temp.txt;-1,uucp_log:pathalias.log;*
X$`20`20`20`20endif
X$`20`20`20`20create`20nla0:`09!`20Get`20rid`20of`20stray`20sys$output`20and`20
Vsys$error`20redirection
X$`20`20`20`20set`20on
X$`20`20`20`20map_mail_subject`20=`20"Obsolete`20uucp`20maps;`20purge`20after
V`20inspection"
X$
X$map_cleanup:
X$`20!`20adjust`20retention`20period`20of`20map`20entries`20in`20the`20newsgrou
Vp`20so`20they'll`20be
X$`20!`20deleted`20by`20tomorrow's`20SKIM.`20`20(They`20arrive`20with`20an`20Ex
Vpires:`20header`20and`20will
X$`20!`20stick`20around`20for`20a`20long`20time`20otherwise,`20and`20they've`20
Valready`20been`20
X$`20!`20"forwarded"`20to`20the`20map`20collection`20mechanism,`20and`20we`20do
Vn't`20need`20TWO`20
X$`20!`20copies`20of`20the`20maps!)`20`20We`20intentionally`20do`20this`20here,
V`20under`20control
X$`20!`20of`20the`20"on`20warning`20then`20goto`20map_done",`20so`20that`20if
V`20there`20are`20any
X$`20!`20problems`20in`20the`20map`20processing`20we`20won't`20delete`20any`20m
Vaps`20from`20the`20newsgroup
X$`20!`20until`20after`20the`20problems`20are`20fixed.`20`20
X$
X$`20`20`20`20if`20f$search("news_device:`5Bcomp.mail.maps`5D*.itm")`20.nes.`20
V""`20
X$`20`20`20`20then`20
X$`09set`20noon
X$`09news/noscreen
Xselect`20comp.mail.maps
Xset`20item/hold=1`20*
Xexit
X$`20`20`20`20`20`20`20if`20$status.eqs.SS$_DEADLOCK
X$`20`20`20`20`20`20`20then
X$`09`20`20say`20"NEWS`20Processing`20is`20LOCKED`20-`20Waiting`2010`20minutes
V
X$`09`20`20wait`2000:10:00
X$`09`20`20goto`20map_cleanup
X$`20`20`20`20`20`20`20endif
X$`09set`20on
X$`20`20`20`20endif
X$`20`20`20`20goto`20map_mail_results
X$
X$map_parse_error:
X$
X$`20`20`20`20say`20"''f$time()'`09Error`20Processing`20Newly`20Arrived`20Maps"
V
X$`20`20`20`20map_mail_subject`20=`20"Error`20Processing`20Newly`20Arrived`20Ma
Vps"
X$`20`20`20`20create`20news_log:temp.txt
X
XAn`20error`20occured`20while`20extracting`20newly`20arrived`20maps`20prior`20t
Vo`20passing`20them`20to`20
Xpathalias.`20`20This`20usually`20happens`20when`20a`20map`20arrives`20from`20t
Vhe`20net`20in`20a`20mangled
Xform.`20`20You`20should`20review`20the`20NEWSSKIM`20log`20for`20this`20time`20
Vperiod,`20and`20examine
Xthe`20possibly`20malformed`20map`20indicated`20in`20the`20log.`20`20Usually,
V`20you`20may`20simply`20
Xdelete`20the`20offending`20map`20NEWS_MANAGER_DEV:`5BUUCP_MAPS`5DMAPSAVER.TXT
V`20file`20and
Xlet`20the`20normal`20nightly`20processing`20of`20newly`20arrived`20maps`20proc
Vess`20the`20remaining`20
Xmaps`20at`20that`20time.
X
X$`20`20`20`20goto`20map_mail_results
X$
X$map_disk_full:
X$`20`20`20`20directory/size=all/date/output=news_log:temp.txt`20NEWS_MANAGER_D
VEV:`5BUUCP_MAPS`5D
X$`20`20`20`20say`20"''f$time()'`09*****`20Deferring`20processing`20maps`20due
V`20to`20insufficient`20disk`20space"
X$`20`20`20`20say`20"''f$time()'`09*****`20Desired`20available`20UUCP_DISK`20sp
Vace:`20`20''desired_space'`20blocks"
X$`20`20`20`20say`20"''f$time()'`09*****`20Current`20unreserved`20UUCP_DISK`20s
Vpace:`20''spool_space'`20blocks"
X$`20`20`20`20map_mail_subject`20=`20"Processing`20of`20the`20following`20UUCP
V`20maps`20has`20been`20deferred`20until`20tomorrow`20due`20to`20insufficient
V`20disk`20space"
X$
X$map_mail_results:
X$`20`20`20`20if`20(f$search("news_log:temp.txt").nes."").and.(map_mail_subject
V.nes."")
X$`20`20`20`20then
X$`20`20`20`20`20`20`20mail`20news_log:temp.txt`20uucp_postmaster`20/subject="'
V'map_mail_subject'"
X$`20`20`20`20`20`20`20delete`20news_log:temp.txt;
X$`20`20`20`20endif
X$
X$map_done:
X$`20`20`20`20if`20p1.nes.""`20then`20goto`20fin
X$
X$`20!`20---------------------
X$`20!`20Check`20for`20errors`20in`20yesterday's`20rnews`20batch`20log`20files,
V`20mail`20results`20to`20
X$`20!`20local`20news`20manager`20
X$`20!
X$`20`20`20`20if`20(new_day)
X$`20`20`20`20then
X$`09set`20noon
X$`09define/user`20sys$error`20nl:
X$`09define/user`20sys$output`20nl:
X$`09search`20news_log:rnews*.log/since=yesterday/before=today`20-
X`09`09"cannot`20open",`20"error:"`20-
X`09`09/output=news_log:temp.txt
X$`09if`20$status`20.eq.`201
X$`09then
X$`09`09mail`20news_log:temp.txt`20usenet`20-
X`09`09`09/subject="Errors`20adding`20yesterday's`20news`20batches"
X$`09endif
X$`09if`20f$search("news_log:temp.txt;").nes.""`20then`20delete`20news_log:temp
V.txt;
X$`20`20`20`20endif
X$
X$`20!
X$`20!`20`20Report`20on`20the`20activity`20and`20"quality"`20of`20your`20news
V`20feed(s).
X$`20!
X$`09
X$`20`20`20`20`20do_feedcheck`20=`20f$trnlnm("NEWS_NEWSSKIM_FEEDCHECK")
X$`20`20`20`20`20if`20do_feedcheck.eqs.""`20then`20do_feedcheck`20=`20"TRUE"
X$`20`20`20`20`20if`20(do_feedcheck.and.new_day.and.(f$search("news_bin:feedche
Vck.exe").nes.""))
X$`20`20`20`20`20then
X$`09`20`20say`20"''f$time()'`09Analyzing`20NEWS`20Log`20files"
X$`09`20`20set`20noon
X$`09`20`20feedcheck`20=`20"$news_bin:feedcheck"
X$`09`20`20feedfiles`20=`20"news_log:NEWSSKIM.*;*`20"
X$`09`20`20if`20f$search("news_log:rnews*.*;*").nes.""`20
X$`09`20`20then
X$`09`20`20`20`20`20`20feedfiles`20=`20feedfiles`20+`20",news_log:rnews*.*;*"
X$`09`20`20endif
X$`09`20`20if`20f$search("news_log:nntp_processing.*;*").nes.""`20
X$`09`20`20then
X$`09`20`20`20`20`20`20feedfiles`20=`20feedfiles`20+`20",news_log:nntp_processi
Vng.*;*"
X$`09`20`20endif
X$`09`20`20feedcheck/Since=YESTERDAY/Before/Output=news_log:temp.txt`20'feedfil
Ves'
X$`09`20`20if`20f$file_attributes("news_log:temp.txt","EOF").gt.0)
X$`09`20`20then
X$`09`20`20`20`20`20`20feed_date`20=`20f$element(0,"`20",f$cvtime("YESTERDAY","
VABSOLUTE"))
X$`09`20`20`20`20`20`20mail`20news_log:temp.txt`09`09`09`09`09-
X`09`20`20`20`20`09/subject="News`20Feed`20Analysis`20for`20''feed_date'"`09`09
V-
X`09`20`20`20`20`09usenet
X$`09`20`20endif
X$`09`20`20delete`20news_log:temp.txt;
X$`20`20`20`20`20endif
X$`20!
X$`20!`20`20delete`20log`20files`20that`20are`20more`20than`20four`20days`20old
V.
X$`20!
X$`20`20`20`20`20delete_files`20=`200
X$`20`20`20`20`20delete_total`20=`200
X$`20`20`20`20`20delete_age`20=`20f$trnlnm("NEWS_NEWSSKIM_LOG_LIFETIME")`09!`20
Vage`20in`20days
X$`20`20`20`20`20if`20delete_age.eqs.""`20then`20delete_age`20=`20"4"`09`09!`20
V4`20day`20default
X$`20`20`20`20`20if`20delete_age.lts."2"`20then`20delete_age`20=`20"2"`09`09!
V`202`20day`20minimum
X$`20`20`20`20`20delete_age`20=`20"-"+delete_age+"-00:00:00"
X$rnews_loop:
X$`20`20`20`20`20rnews_file`20=`20f$search("news_log:rnews*.*;*")
X$`20`20`20`20`20if`20rnews_file.nes.""
X$`20`20`20`20`20then
X$`09`20`20if`20(f$cvtime(f$file_attributes(rnews_file,"CDT")).les.`09-
X`09`20`20`20`20`20`20f$cvtime(delete_age))
X$`09`20`20then`20
X$`09`09delete_files`20=`20delete_files`20+`201
X$`09`09delete_total`20=`20delete_total`20+`20f$file_attributes(rnews_file,"ALQ
V")
X$`09`09delete/log`20'rnews_file'
X$`09`20`20endif
X$`09`20`20goto`20rnews_loop
X$`20`20`20`20`20endif
X$newsskim_loop:
X$`20`20`20`20`20newsskim_file`20=`20f$search("news_log:newsskim.*;*")
X$`20`20`20`20`20if`20newsskim_file.nes.""
X$`20`20`20`20`20then
X$`09`20`20if`20(f$cvtime(f$file_attributes(newsskim_file,"CDT")).les.`09-
X`09`20`20`20`20`20`20f$cvtime(delete_age))
X$`09`20`20then`20
X$`09`09delete_files`20=`20delete_files`20+`201
X$`09`09delete_total`20=`20delete_total`20+`20f$file_attributes(newsskim_file,"
VALQ")
X$`09`09delete/log`20'newsskim_file'
X$`09`20`20endif
X$`09`20`20goto`20newsskim_loop
X$`20`20`20`20`20endif
X$nntp_log_loop:
X$`20`20`20`20`20nntp_log_file`20=`20f$search("news_log:nntp_processing.log*;*"
V)
X$`20`20`20`20`20if`20nntp_log_file.nes.""
X$`20`20`20`20`20then
X$`09`20`20if`20(f$cvtime(f$file_attributes(nntp_log_file,"CDT")).les.`09-
X`09`20`20`20`20`20`20f$cvtime(delete_age))
X$`09`20`20then`20
X$`09`09delete_files`20=`20delete_files`20+`201
X$`09`09delete_total`20=`20delete_total`20+`20f$file_attributes(nntp_log_file,"
VALQ")
X$`09`09delete/log`20'nntp_log_file'
X$`09`20`20endif
X$`09`20`20goto`20nntp_log_loop
X$`20`20`20`20`20endif
X$`20`20`20`20`20if`20delete_files.gt.1`20then`20say`20"%DELETE-I-TOTAL,`20''de
Vlete_files'`20files`20deleted`20(''delete_total'`20blocks)"
X$
X$`20!`20---------------------
X$`20!`20If`20it's`20close`20to`20the`20end`20of`20the`20month,`20run`20the`20a
Vrbitron`20and`20inpaths`20
X$`20!`20programs`20and`20mail`20the`20results`20to`20decwrl.`20`20
X$`20`20`20do_arbitron`20=`20f$trnlnm("NEWS_NEWSSKIM_ARBITRON")
X$`20`20`20if`20do_arbitron.eqs.""`20then`20do_arbitron`20=`20"FALSE"
X$`20`20`20if`20.not.(new_day`20.and.`20do_arbitron`20.and.`20(f$search("news_b
Vin:arbitron.exe").nes.""))
X$`20`20`20then`20goto`20arbitron_inpaths_done
X$`20`20`20endif
X$
X$`20`20`20host`20=`20f$logi("uucp_host_name")
X$`20`20`20this_mo`20=`20f$cvtime(,"ABSOLUTE","MONTH")
X$`20`20`20mmm_yyyy`20=`20f$edit(this_mo,"LOWERCASE")+"`20"+f$cvtime(,"ABSOLUTE
V","YEAR")`20
X$
X$`20`20`20!`20Are`20we`20close`20enough`20to`20the`20end`20of`20the`20month?
V`20`20Find`20out`20how`20far`20away`20
X$`20`20`20!`20decwrl`20is`20(in`20hops),`20assume`20one`20day`20per`20hop,`20a
Vnd`20see`20if`20that`20many
X$`20`20`20!`20days`20added`20to`20the`20current`20time`20would`20take`20us`20i
Vnto`20the`20next`20month.`20`20
X$`20`20`20
X$`20`20`20uupath`20=`20"$uucp_bin:checkaddr"
X$`20`20`20define/user`20sys$output`20temp.txt
X$`20`20`20uupath`20foo@decwrl.dec.com
X$`20`20`20if`20uucp_path_length`20.eq.`200`20`09!`20this`20symbol`20is`20set
V`20by`20uupath
X$`20`20`20then
X$`20`20`20`09day_of_month_ok`20=`200`09!`20no`20path`20to`20decwrl,`20can't`20
Vdo`20this`20stuff
X$`20`20`20else
X$`09ndays`20=`20f$string(uucp_path_length)`09!`20assume`20one`20day`20per`20ho
Vp
X$`09day_of_month_ok`20=`20this_mo`20.nes.`20-
X`20`20`20`09`09f$cvtime("+''ndays'-0:0:0",`20"ABSOLUTE",`20"MONTH")
X$`20`20`20endif
X$
X$`20!`20Have`20we`20done`20arbitron`20this`20month`20already?
X$
X$`20`20`20if`20(f$search("news_log:arbitron.out").eqs."")
X$`20`20`20then
X$`09!`20ok`20if`20haven't`20done`20it`20before,`20at`20all.
X$`09month_ok`20=`201
X$`20`20`20else
X$`09!`20ok`20if`20last`20month`20run`20is`20different`20from`20current`20month
V.`20
X$`09month_ok`20=`20this_mo`20.nes.`20-
X`09`20f$cvtime(f$file("news_log:arbitron.out","CDT"),"ABSOLUTE","MONTH")`20
X$`20`20`20endif
X$
X$`20`20`20if`20(day_of_month_ok`20.and.`20month_ok)
X$`20`20`20then
X$`09say`20"''f$time()'`09Arbitron`20Beginning"
X$`09run`20news_bin:arbitron
X$`09backup/delete`20arbitron.out`20news_log:/new_version
X$`09purge`20news_log:arbitron.out
X$`09rename`20news_log:arbitron.out`20;1
X$`09mail`20news_log:arbitron.out`20-
X`09`09/subj="Arbitron`20stats`20from`20site:`20''host'`20for`20''mmm_yyyy'"`20
V-
X`09`09uucp%"""netsurvey@decwrl.dec.com""",usenet
X$`09say`20"''f$time()'`09Arbitron`20Completed"
X$`20`20`20endif
X$
X$`20!`20Pretty`20much`20the`20same`20for`20inpaths.`20`20File`20handling`20is
V`20slightly`20different.
X$`20!`20Have`20we`20done`20inpaths`20this`20month`20already?
X$
X$`20`20`20do_inpaths`20=`20f$trnlnm("NEWS_NEWSSKIM_INPATHS")
X$`20`20`20if`20do_inpaths.eqs.""`20then`20do_inpaths`20=`20"FALSE"
X$`20`20`20if`20(do_inpaths`20.and.`20new_day`20.and.`20(f$search("news_bin:inp
Vaths.exe").nes.""))
X$`20`20`20then
X$`20`20`20`20`20`20`20if`20(f$search("news_log:inpaths.out").eqs."")
X$`20`20`20`20`20`20`20then
X$`09`20`20`20`20!`20ok`20if`20haven't`20done`20it`20before,`20at`20all.
X$`09`20`20`20`20month_ok`20=`201
X$`09else
X$`09`20`20`20`20!`20ok`20if`20last`20month`20run`20is`20different`20from`20cur
Vrent`20month.`20
X$`09`20`20`20`20month_ok`20=`20this_mo`20.nes.`20-
X`09`20`20`20`20`20`20f$cvtime(f$file("news_log:inpaths.out","CDT"),"ABSOLUTE",
V"MONTH")`20
X$`20`20`20`20`20`20`20endif
X$
X$`20`20`20`20`20`20`20if`20(day_of_month_ok`20.and.`20month_ok)
X$`20`20`20`20`20`20`20then
X$`09`20`20`20`20say`20"''f$time()'`09Inpaths`20beginning"
X$`09`20`20`20`20inpaths`20:=`20$news_bin:inpaths
X$`09`20`20`20`20define/user`20sys$output`20news_log:inpaths.out
X$`09`20`20`20`20inpaths`20'host'
X$`09`20`20`20`20purge`20news_log:inpaths.out
X$`09`20`20`20`20mail/subject="INPATHS`20report`20from`20site:`20''host'`20for
V`20''mmm_yyyy'"`20-
X`09`20`09news_log:inpaths.out`20uucp%"""pathsurvey@decwrl.dec.com""",usenet
X$`09`20`20`20`20say`20"''f$time()'`09Inpaths`20completed"
X$`09endif
X$`20`20`20endif
X$arbitron_inpaths_done:
X$
X$`20!
X$`20!`20`20On`20Sunday`20Mornings,`20we`20clean`20up`20the`20index`20file`20st
Vructures`20by`20rebuilding`20them.
X$`20!
X$`09!`20never`20do`20this`20except`20on`20the`20first`20run`20of`20the`20day.
V
X$`09!`20force`20it`20to`20be`20done`20if`20we`20haven't`20done`20it`20for`20th
Vree`20weeks`20(in`20case
X$`09!`20system`20has`20been`20down`20on`20weekends,`20or`20something).`20`20
X$`09!`20under`20normal`20conditions,`20do`20this`20on`20the`20first`20run`20on
V`20sunday`20.`20`20
X$
X$`20`20`20`20if`20(`20(f$cvtime(f$file_attributes("news_root:news.items","CDT"
V)).gts.`20-
X`09`20f$cvtime("-21-00:00:00"))`20.and.`20-
X`09(f$cvtime("TODAY",,"WEEKDAY")`20.nes.`20"Sunday")`20)`20.or.`20(.not.new_da
Vy)
X$`20`20`20`20`20`20then`20goto`20fin
X$`20`20`20`20endif
X$`20`20`20`20newsshutdown`20=`20f$search("NEWS_BIN:NEWSSHUTDOWN.EXE")
X$`20`20`20`20if`20newsshutdown.nes.""
X$`20`20`20`20`20`20then
X$`09`20old_privs`20=`20f$setprv("SYSLCK")
X$`09`20if`20.not.f$privilege("SYSLCK")
X$`09`20then
X$`09`20`20`20say`20"''f$time()'`09SYSLCK`20privilege`20required`20to`20ensure
V`20database`20consistency
X$`09`20`20`20say`20"''f$time()'`09Continuing`20anyway`20.`20.`20."
X$`09`20`20`20goto`20do_rebuild
X$`20`20`20`20`20`20`20`20endif
X$`09`20say`20"''f$time()'`09Shutting`20Down`20the`20NEWS`20system`20for`20file
V`20maintenance."
X$`09`20define/user`20NEWS_LOCKED_COMMAND`20"@''f$environment("PROCEDURE")'`20d
Vo_rebuild`20''f$verify()'"
X$`09`20run`20'newsshutdown
X$`09`20old_privs`20=`20f$setprv(old_privs)
X$`20`20`20`20`20`20`20`20goto`20fin
X$`20`20`20`20endif
X$do_rebuild:
X$`20`20`20`20say`20"''f$time()'`09Starting`20rebuild`20of`20indexed`20files"
X$`20`20`20`20convert`20=`20"convert"
X$`20`20`20`20if`20f$search("NEWS_BIN:NEWS_SITE_REBUILD.COM")
X$`09then`09!`20If`20a`20site`20specific`20rebuild`20procedure`20exists`20then
V`20use`20it
X$`09`20`20set`20noon
X$`09`20`20@NEWS_BIN:NEWS_SITE_REBUILD
X$`09`20`20goto`20rebuild_done
X$`20`20`20`20endif`09!`20else`20take`20the`20default`20rebuild`20action.
X$`20`20`20`20on`20warning`20then`20goto`20groups_failed
X$`20`20`20`20convert/reclaim/statistics`20news_root:news.groups
X$`20`20`20`20goto`20do_items
X$groups_failed:
X$do_items:
X$`20`20`20`20on`20warning`20then`20goto`20items_failed
X$`20`20`20`20analyze/rms/fdl/output=news_root:newsitems.fdl`20news_root:news.i
Vtems
X$`20`20`20`20edit/fdl/analyze=news_root:newsitems.fdl/nointer`20news_root:news
Vitems.fdl
X$`20`20`20`20convert/statistics/fdl=news_root:newsitems.fdl`20-
X`09news_root:news.items`20news_root:news.items_new
X$`20`20`20`20rename`20news_root:news.items_new`20news_root:news.items;
X$`20`20`20`20purge`20news_root:news.items
X$`20`20`20`20delete`20news_root:newsitems.fdl;*
X$`20`20`20`20goto`20do_history
X$items_failed:
X$`20`20`20`20if`20f$search("news_root:news.items_new").nes.""`20then`20-
X`09delete/log`20news_root:news.items_new;*
X$`20`20`20`20if`20f$search("news_root:news.fdl").nes.""`20then`20-
X`09delete/log`20news_root:news.fdl;*
X$`20`20`20`20purge/log`20news_root:news.items
X$do_history:
X$`20`20`20`20on`20warning`20then`20goto`20history_failed
X$`20`20`20`20if`20f$search("news_root:history.v60").eqs.""`20then`20goto`20his
Vtory_failed
X$`20`20`20`20analyze/rms/fdl/output=news_root:history.fdl`20news_root:history.
Vv60
X$`20`20`20`20edit/fdl/analyze=news_root:history.fdl/nointer`20news_root:histor
Vy.fdl
X$`20`20`20`20convert/statistics/fdl=news_root:history.fdl`20-
X`09news_root:history.v60`20news_root:history.v60_new
X$`20`20`20`20rename`20news_root:history.v60_new`20news_root:history.v60;
X$`20`20`20`20purge`20news_root:history.v60
X$`20`20`20`20delete`20news_root:history.fdl;*
X$`20`20`20`20goto`20rebuild_done
X$history_failed:
X$`20`20`20`20if`20f$search("news_root:history.v60_new").nes.""`20then`20-
X`09delete/log`20news_root:history.v60_new;*
X$`20`20`20`20if`20f$search("news_root:history.fdl").nes.""`20then`20-
X`09delete/log`20news_root:history.fdl;*
X$`20`20`20`20purge/log`20news_root:history.v60
X$rebuild_done:
X$`20`20`20`20say`20"''f$time()'`09Indexed`20file`20rebuild`20complete"
X$`20`20`20`20if`20p1.nes.""`20then`20goto`20fin
X$`20!
X$abort:
X$fin:
X$`20!
X$`20!`20`20Normal`20and`20error`20exit`20-`20schedule`20next`20run
X$`20!
X$`20!`20`20only`20resubmit`20actual`20NEWSSKIM`20batch`20jobs
X$`20!
X$`20`20`20`20if`20f$environment("DEPTH").ne.0`20.or.`20p1.nes.""`20then`20goto
V`20all_done`20
X$`20!
X$`20!`20Rename`20our`20log`20file`20to`20NEWSSKIM.LOG_mmdd-hh`20to`20avoid`20l
Varge`20version`20numbers
X$`20!
X$`20`20`20`20last_time`20=`20f$cvtime(f$file("news_manager:last_skim.time","CD
VT"),"ABSOLUTE")
X$`20`20`20`20log`20=`20f$cvtime(last_time,,"MONTH")+f$cvtime(last_time,,"DAY")
V+"-"+f$cvtime(last_time,,"HOUR")`20
X$`20`20`20`20rename`20news_log:newsskim.log;0`20news_log:newsskim.log_'log';0
V
X$`20!
X$`20!`20`20This`20code`20will`20resubmit`20with`20a`201-hour`20delay.
X$`20!
X$`20`20`20`20next_delta`20=`20f$trnlnm("NEWS_NEWSSKIM_SKIM_JOB_DELTA")
X$`20`20`20`20if`20next_delta.eqs.""`20then`20next_delta`20=`20"+01:00:00"
X$`20`20`20`20if`20f$extract(0,1,next_delta).nes."+"`20then`20next_delta`20=`20
V"+"`20+`20next_delta
X$`20`20`20`20Next_Time`20=`20f$cvtime("''start_time'''next_delta'","ABSOLUTE")
V
X$`20`20`20`20submit/noprint/log=NEWS_LOG:/priority='f$getsyi("MAXQUEPRI")'`09-
V
X`09/queue='news_batch_queue'`09`09`09`09`09-
X`09/after="''Next_Time'"`20`09`09`09`09`09`09-
X`09news_bin:newsskim.com
X$all_done:
X$`20`20`20`20if`20f$trnlnm("LAST_SKIM").nes.""
X$`20`20`20`20`20`20`20then
X$`09`20`20close/nolog`20last_skim
X$`09`20`20purge`20news_manager:last_skim.time
X$`09`20`20rename`20news_manager:last_skim.time`20;1
X$`20`20`20`20endif
X$`20`20`20`20set`20process/name="''old_prcnam'"
X$`20`20`20`20exit
X$
X$uucp_disk_check:`20subroutine
X$`20`20`20`20space_required`20=`20f$integer(f$trnlnm("UUCP_MINIMUM_DISKSPACE")
V)
X$`20`20`20`20if`20space_required.eq.0`20then`20space_required`20=`205000
X$`20`20`20`20spool_space`20=`20f$getdvi("UUCP_SPOOL","FREEBLOCKS")-space_requi
Vred
X$`20`20`20`20if`20(p4.eqs."FILELIST")
X$`20`20`20`20`20`20`20then
X$`09`20`20`20uustat`20:=`20$news_bin:uustat
X$`09`20`20`20UUCP_SITE_BYTES_QUEUED_'p3'`20=`200
X$`09`20`20`20UUCP_SITE_JOB_AGE_'p3'`20=`200
X$`09`20`20`20UUCP_SITE_CONNECT_STATUS_'p3'`20=`200
X$`09`20`20`20uustat`20-m`20-q`20-s`20'p3'`20>NLA0:
X$`09`20`20`20current_usage`20=`20(f$integer(UUCP_SITE_BYTES_QUEUED_'p3')+511)/
V512
X$`09`20`20`20batch_size`20=`20f$integer(f$trnlnm("NEWS_SITE_UUCP_BATCH_SIZE_''
Vp3'"))
X$`09`20`20`20if`20batch_size.le.0`20then`20batch_size`20=`20f$integer(f$trnlnm
V("NEWS_DEFAULT_UUCP_BATCH_SIZE"))
X$`09`20`20`20if`20batch_size.le.0`20then`20batch_size`20=`20500000
X$`09`20`20`20batch_size`20==`20batch_size
X$`09`20`20`20limit`20=`20f$integer(f$trnlnm("UUCP_SITE_QUEUE_LIMIT_''p3'"))
X$`09`20`20`20if`20limit.le.0`20then`20limit`20=`20f$integer(f$trnlnm("UUCP_SIT
VE_QUEUE_LIMIT"))
X$`09`20`20`20if`20limit.le.0`20then`20limit`20=`2014000`09!`201`20hour's`20wor
Vth`20of`20fast`20traffic
X$`09`20`20`20if`20limit.gt.spool_space`20then`20limit`20=`20spool_space
X$`09`20`20`20limit`20=`20limit`20-`20current_usage
X$`09`20`20`20if`20limit.le.0
X$`09`20`20`20`20`20`20then
X$`09`09`20say`20"''f$time()'`09Insufficient`20Disk`20Space`20to`20forward`20ba
Vtch`20''p1'"
X$`09`09`20limit`20=`20limit`20+`20current_usage
X$`09`09`20say`20"''f$time()'`09''current_usage'`20blocks`20already`20queued,
V`20''limit'`20blocks`20allowed"
X$`09`09`20exit`20%x10000002
X$`09`20`20`20endif
X$`09`20`20`20age`20=`20f$integer(UUCP_SITE_JOB_AGE_'p3')/60
X$`09`20`20`20if`20((p5.eqs."$").and.(p6.eqs."$").and.((age/60).ge.2).and.`09-
V
X`09`20`20`20`20`20`20`20(9.ne.f$integer(UUCP_SITE_CONNECT_STATUS_'p3')).and.
V`09-
X`09`20`20`20`20`20`20`20(4.ne.f$integer(UUCP_SITE_CONNECT_STATUS_'p3')))
X$`09`20`20`20`20`20`20then
X$`09`09`20say`20"''f$time()'`09Jobs`20more`20than`202`20hours`20old`20exist,
V`20batch`20forwarding`20deferred"
X$`09`09`20say`20"''f$time()'`09''current_usage'`20blocks`20already`20queued,
V`20`20Oldest`20job`20is`20''age'`20minutes"
X$`09`09`20exit`20%x10000002
X$`09`20`20`20endif
X$`09`20`20`20if`20(p2)
X$`09`20`20`20`20`20`20then`09!`20<Compressed
X$`09`09`20limit`20=`20(limit`20*`204)`20/`203
X$`09`20`20`20endif
X$`09`20`20`20news_limit`20=`20(f$getdvi("NEWS_MANAGER_DEV","FREEBLOCKS")*2)/3
V
X$`09`20`20`20if`20limit.gt.news_limit`20then`20limit`20=`20news_limit
X$`09`20`20`20total_batch_size`20==`20512*limit
X$`09`20`20`20exit`201
X$`20`20`20`20endif
X$`20`20`20`20if`20(p2)
X$`09then`09!`20Compressed
X$`09`20`20`20data_size`20=`20(f$file_attributes(p1,"EOF")`20*`203)`20/`204
X$`09`20`20`20extra_size`20=`20((data_size`20/`2066)`20+`201)`20*`2066
X$`09else`09!`20Uncompressed
X$`09`20`20`20data_size`20=`20f$file_attributes(p1,"ALQ")
X$`09`20`20`20extra_size`20=`200
X$`20`20`20`20endif
X$`20`20`20`20if`20(F$GETDVI("UUCP_SPOOL","DEVNAM").eqs.F$GETDVI("NEWS_MANAGER_
VDEV","DEVNAM"))
X$`09then
X$`09`20`20`20needed_size`20=`20extra_size`20+`20data_size`20+`2020
X$`09`20`20`20if`20(spool_space.gt.needed_size)`20then`20exit`201
X$`09else
X$`09`20`20`20if`20(f$getdvi("NEWS_MANAGER_DEV","FREEBLOCKS").gt.extra_size).an
Vd.`20-
X`09`20`20`20`20`20`20(spool_space.gt.(data_size`20+`2020))`20then`20exit`201
X$`20`20`20`20endif
X$`20`20`20`20say`20"''f$time()'`09Insufficient`20Disk`20Space`20to`20forward
V`20batch`20''p1'"
X$`20`20`20`20exit`20%x10000002
X$`20`20`20`20endsubroutine
$ call unpack NEWSSKIM.COM;211 17538976 "" 106 1 2
$!
$ create 'f'
X$`20!`09`09`09`09`09`09`09NEWS_RNEWS.COM
X$`20GOTO`20START`09`09!`20'f$verify(f$trnlnm("NEWS_RNEWS_VERIFY"))'
X$`20!
X$`20!`09This`20command`20procedure`20executes`20in`20an`20independent`20batch
V`20process
X$`20!`09usually`20initiated`20by`20UUXQT_DCL.COM`20which`20is`20running`20as
V`20a`20spawned
X$`20!`09subprocess`20of`20UUXQT.EXE`20.
X$`20!`09
X$`20!`09P1`09-`20the`20input`20file`20spec`20of`20a`20NEWS`20batch`20file(s)
V`20to`20be`20processed
X$`20!`09P2`09-`20the`20hostname`20of`20the`20site`20supplying`20(this`20is`20o
Vptional)
X$`20!`09P3`09-`20(Not`20a`20user`20parameter)`20Immediate`20retry`20count`20(1
V5`20minute`20wait)
X$`20!`09P4`09-`20(Not`20a`20user`20parameter)`20Job`20Suspend`20Count
X$`20!
X$`20!`09Author:`09Mark`20Pizzolato`20`20`20`20`202/5/89`09mark@infocomm.com
X$`20!`09Modified:
X$`20!`09`09Mark`20Pizzolato`09`20`20`20`2011/03/94`20`20`20`20mark@infocomm.co
Vm
X$`20!`09`09`20`20`20`20`20`20-`20Added`20the`20ability`20to`20handle`20a`20wil
Vdcard`20file
X$`20!`09`09`09specification`20for`20the`20input`20news`20batch(es).`20`20This
V`20was
X$`20!`09`09`09done`20to`20support`20what`20tends`20to`20happen`20in`20some`20N
VNTP
X$`20!`09`09`09feed`20environments`20-`20i.e.`20during`20the`20period`20of`20ti
Vme
X$`20!`09`09`09between`20when`20runs`20of`20NEWSSKIM`20actually`20queue`20jobs
V`20
X$`20!`09`09`09to`20process`20data`20which`20arrives`20via`20NNTP,`20Many`20bat
Vches
X$`20!`09`09`09may`20have`20arrived`20(possibly`20one`20per`20minute).`20`20The
Vse
X$`20!`09`09`09batches`20may`20actually`20be`20rather`20small,`20and`20the`20sy
Vstem`20
X$`20!`09`09`09overhead`20to`20have`20a`20separate`20batch`20job`20for`20each
V`20of`20these
X$`20!`09`09`09relatively`20small`20batches`20is`20not`20worth`20it.`20`20Hence
V`20the`20
X$`20!`09`09`09motivation`20to`20be`20able`20to`20process`20a`20group`20of`20ba
Vtches`20in`20
X$`20!`09`09`09a`20single`20run`20of`20this`20procedure.`20`20One`20assumption
V`20that`20is
X$`20!`09`09`09made`20in`20the`20case`20of`20the`20wildcard`20input`20specifica
Vtion`20is
X$`20!`09`09`09that`20all`20batches`20that`20meet`20this`20wildcard`20are`20eit
Vher
X$`20!`09`09`09uncompressed`20or`20compressed`20with`20the`20same`20compression
V
X$`20!`09`09`09mechanism`20and`20that`20that`20compression`20mechanism`20is`20N
VOT
X$`20!`09`09`09LZCOMP.
X$`20!`09`09Mark`20Pizzolato`09`20`20`20`203/15/93`20`20`20`20`20mark@infocomm.
Vcom
X$`20!`09`09`20`20`20`20`20`20-`20Added`20use`20of`20gzip`20for`20decompression
V`20of`20compressed`20data.
X$`20!`09`09`09This`20inherently`20supports`20even`20more`20compressed`20file
X$`20!`09`09`09formats`20(compress,`20gzip,`20pack,`20pkzip).`20`20Support`20fo
Vr
X$`20!`09`09`09gzip`20format`20is`20desired`20since`20it`20gives`20about`2010-1
V5%
X$`20!`09`09`09better`20compression`20for`20the`20same`20amount`20of`20compute
V`20time
X$`20!`09`09`09to`20do`20the`20compression`20(for`20the`20sample`20news`20batch
Ves`20I
X$`20!`09`09`09tried).
X$`20!`09`09Mark`20Pizzolato`09`20`20`20`202/24/93`20`20`20`20`20mark@infocomm.
Vcom
X$`20!`09`09`20`20`20`20`20`20-`20Added`20appropriate`20check`20for`20space`20o
Vn`20NEWS_ROOT`20to`20avoid
X$`20!`09`09`09potential`20news`20database`20file`20corruption.
X$`20!`09`09Mark`20Pizzolato`09`20`20`2011/16/92`09mark@infocomm.com
X$`20!`09`09`20`20`20`20`20`20-`20Generalized`20batch`20file`20type`20determina
Vtion`20to`20allow`20for
X$`20!`09`09`09the`20case`20where`20an`20input`20news`20batch`20file`20is`20com
Vpressed
X$`20!`09`09`09and`20there`20are`20more`20than`20about`201000`20bytes`20at`20th
Ve
X$`20!`09`09`09beginning`20of`20the`20file`20without`20a`20NEWLINE.`20`20This
V`20problem
X$`20!`09`09`09was`20reported`20along`20with`20the`20fix`20method`20by`20James
V`20
X$`20!`09`09`09Thompson`20(jimmy_t@verifone.com)
X$`20!`09`09Mark`20Pizzolato`09`20`20`2011/16/92`09mark@infocomm.com
X$`20!`09`09`20`20`20`20`20`20-`20Added`20a`20more`20appropriate`20explanation
V`20in`20the`20mail
X$`20!`09`09`09message`20that`20is`20generated`20when`20the`20NEWS_DEVICE`20is
V`20
X$`20!`09`09`09too`20full.
X$`20!`09`09Mark`20Pizzolato`09`20`20`2010/12/92`09mark@infocomm.com
X$`20!`09`09`20`20`20`20`20`20-`20Downstream`20storage`20computations`20have`20
Vbeen`20adjusted
X$`20!`09`09`09to`20accomodate`20the`20new`20"FILELIST"`20storage`20method
X$`20!`09`09`09available`20with`20ANU-NEWS`20(V6.1`20Beta`206`20or`20later).
X$`20!`09`09`20`20`20`20`20`20-`20NEWS_RNEWS`20jobs`20are`20now`20submitted`20a
Vt`20priority
X$`20!`09`09`09SYSGEN(MAXQUEPRI)-1,`20and`20NEWSSKIM`20jobs`20are`20run`20at
X$`20!`09`09`09SYSGEN(MAXQUEPRI).`20This`20eliminates`20the`20need
X$`20!`09`09`09to`20run`20NEWSSKIM`20at`20the`20end`20of`20each`20NEWS_RNEWS`20
Vjob,`20
X$`20!`09`09`09so`20this`20is`20not`20done`20anymore.
X$`20!`09`09`20`20`20`20`20`20-`20If`20insufficient`20disk`20resources`20to`20p
Vrocess`20the`20current
X$`20!`09`09`09job`20are`20not`20available,`20this`20job`20now`20resubmits`20it
Vself
X$`20!`09`09`09for`20a`2015`20minute`20delay`20(up`20to`204`20times),`20and`20e
Vventually
X$`20!`09`09`09will`20put`20itself`20on`20hold`20as`20before.`20`20This`20allow
Vs`20other
X$`20!`09`09`09useful`20work`20to`20get`20done`20to`20hopefully`20clean`20thing
Vs`20up.
X$`20!`09`09Mark`20Pizzolato`09`20`20`209/19/92`09mark@infocomm.com
X$`20!`09`09`20`20`20`20`20`20-`20Added`20support`20for`20batches`20that`20may
V`20have`20been`20compressed
X$`20!`09`09`09with`20the`20ever`20popular`20LZCOMP`20program.
X$`20!`09`09Mark`20Pizzolato`09`20`20`203/28/92`09mark@infocomm.com
X$`20!`09`09`20`20`20`20`20`20-`20Added`20appropriate`20code`20to`20handle`20th
Ve`20case`20when`20NEWS
X$`20!`09`09`09either`20aborted`20add`20processing`20or`20couldn't`20even`20ini
Vtiate
X$`20!`09`09`09it`20due`20to`20the`20news`20system`20being`20shutdown`20via`20a
Vn
X$`20!`09`09`09exclusive`20lock`20on`20the`20news`20data`20base`20files`20(NEWS
V_LOCK).
X$`20!`09`09Mark`20Pizzolato`09`20`20`202/16/92`09mark@infocomm.com
X$`20!`09`09`20`20`20`20`20`20-`20integrated`20a`20few`20changes`20found`20in
V`20the`20ANU-NEWS
X$`20!`09`09`09distribution`20from`20V6.1-Alpha,`20and`20changed`20f$logi`20to
V
X$`20!`09`09`09f$trnlnm.
X$`20!`09`09`20`20`20`20`20`20-`20Added`20code`20to`20report`20Missing`20Batch
V`20files`20as`20missing.
X$`20!`09`09Mark`20Pizzolato`09`20`20`202/7/92`09mark@infocomm.com
X$`20!`09`09`20`20`20`20`20`20-`20Call`20NEWSSKIM`20after`20processing`20of`20t
Vhe`20inbound`20batch.
X$`20!`09`09Mark`20Pizzolato`09`20`20`201/29/92`09mark@infocomm.com
X$`20!`09`09`20`20`20`20`20`20-`20Added`20counting`20of`20downstream`20sites`20
Vto`20get`20a`20better
X$`20!`09`09`09approximation`20of`20how`20much`20space`20will`20be`20required
V`20to
X$`20!`09`09`09process`20the`20batch`20for`20the`20disk`20check.
X$`20!`09`09Mark`20Pizzolato`09`20`20`206/3/90`09mark@infocomm.com
X$`20!`09`09`20`20`20`20`20`20-`20Added`20checks`20for`20disk`20space`20on`20th
Ve`20disk`20used`20for`20
X$`20!`09`09`09target`20and`20workfile`20processing`20for`20news`20batches.
X$`20!`09`09`09If`20there`20is`20not`20sufficient`20space,`20we`20FIRST`20try
V`20to`20free
X$`20!`09`09`09up`20some`20space`20by`20executing`20a`20NEWSSKIM`20in`20line`20
Vwith`20the
X$`20!`09`09`09current`20procedure.`20`20After`20the`20NEWSSKIM,`20if`20there
V`20is
X$`20!`09`09`09still`20insufficient`20space,`20we`20wait`20up`20to`20an`20hour
V`20to`20give
X$`20!`09`09`09any`20outbound`20queues`20a`20chance`20to`20flush.`20`20If`20the
Vre`20is
X$`20!`09`09`09still`20insufficient`20space,`20we`20basically`20flow`20control
V`20
X$`20!`09`09`09things`20by`20not`20processing`20the`20current`20batch`20and`20
V
X$`20!`09`09`09resubmitting`20it`20as`20a`20held`20job
X$`20!`09`09Mark`20Pizzolato`09`20`20`204/15/90`09mark@infopiz.UUCP
X$`20!`09`09`20`20`20`20`20`20-`20Added`20optional`20argument`20for`20hostname
V`20of`20the
X$`20!`09`09`09site`20that`20the`20batch`20file`20being`20processed`20originate
Vd
X$`20!`09`09`09The`20purpose`20of`20this`20argument`20is`20to`20allow`20some`20
Vrealistic
X$`20!`09`09`09processing`20of`20news`20batch`20log`20files`20to`20determine`20
Vthe
X$`20!`09`09`09"quality"`20of`20a`20site's`20feed.`20`20This`20would`20only`20b
Ve`20needed
X$`20!`09`09`09if`20a`20site`20gets`20fed`20by`20more`20than`20one`20source,`20
Vand`20there
X$`20!`09`09`09is`20overlap`20(my`20site`20fits`20this`20case,`20but`20as`20mor
Ve`20DECUS
X$`20!`09`09`09sites`20start`20running`20this`20stuff,`20the`20need`20for`20thi
Vs`20info
X$`20!`09`09`09will`20grow)
X$`20!
X$`20!`09`09Mark`20Pizzolato`09`20`20`209/26/89`09mark@infopiz.UUCP
X$`20!`09`09`20`20`20`20`20`20-`20Added`20interpretation`20of`20NEWS_AUTO_CREGR
VP`20and
X$`20!`09`09`09NEWS_KEEP_BATCH`20logical`20name`20flags`20to`20assist`20in
X$`20!`09`09`09in`20debugging`20and`20to`20generalize`20this`20procedure.
X$`20!`09`09`20`20`20`20`20`20-`20Merged`20in`20changes`20made`20by`20Lenny
X$`20!`09`09`09Glassmann`20(glassmann@ccavax.camb.com)`20that`20dealt`20with
X$`20!`09`09`09compressed`20batch`20files`20that`20don't`20start`20with
X$`20!`09`09`09"#!`20cunbatch".
X$`20!`09
X$
X$`20START:
X$`09inspec`20=`20p1
X$`09hostname`20=`20p2
X$`09IF`20P2.NES.""`20THEN`20hostname`20=`20"-`20h:''hostname'"
X$`09SS$_DEADLOCK`20=`20"%X10000E0A"
X$`09news_batch_queue`20=`20f$getqui("DISPLAY_QUEUE","QUEUE_NAME","*","THIS_JOB
V")
X$`09SAY`20=`20"WRITE`20SYS$OUTPUT"
X$`09SAY`20"...Processing`20BATCH`20''hostname'`20starting`20at`20''f$time()',
V`20File(s):`20''inspec'"
X$`09SET`20PROCESS/NAME="RNEWS_''f$element(1,"_",f$getjpi("","PRCNAM"))'"
X$`09IF`20F$TRNLNM("NEWS_BIN").eqs.""`20THEN`20DEFINE`20NEWS_BIN`20'F$TRNLNM("U
VUCP_BIN")'
X$`09IF`20F$SEARCH("NEWS_BIN:GZIP.EXE")
X$`09THEN
X$`09`09UNCOMPRESS`20:==`20$NEWS_BIN:GZIP.EXE`20-d
X$`09ELSE
X$`09`09UNCOMPRESS`20:==`20$NEWS_BIN:COMPRESS.EXE`20-d
X$`09ENDIF
X$`09IF`20"'LZDCMP'".eqs.""`20THEN`20LZDCMP`20:==`20$NEWS_BIN:LZDCMP.EXE
X$`09NEWS`20:==`20$NEWS_BIN:NEWS.EXE
X$`09DEFINE/NOLOG`20NEWSRC`20NLA0:
X$`09MAGIC`20=`20"9D1F"
X$`09MAGIC_LZCOMP`20=`20"9E1F"
X$`09MAGIC_GZIP`20=`20"8B1F"
X$`09MAGIC_PKZIP`20=`20"04034B50"
X$`09MAGIC_PACK`20=`20"1E1F"
X$`09lz_comp`20=`200
X$`09pflag`20=`20""
X$`09batch_file`20=`20""
X$
X$`20`20`20`20`20`20`09delete_batch`20=`20"/DELETE"
X$`09IF`20f$trnlnm("NEWS_KEEP_BATCH")`20THEN`20delete_batch`20=`20""
X$`09execqual`20=`20""
X$`09IF`20(f$trnlnm("NEWS_EXECUTE_CONTROL"))`20THEN`20execqual`20=`20"/EXECUTE"
V
X$`09cregrpqual`20=`20""
X$`09IF`20(f$trnlnm("NEWS_AUTO_CREGRP"))`20THEN`20cregrpqual`20=`20"/CREGRP"
X$`09min_index_space`20=`202000
X$`09IF`20(f$trnlnm("NEWS_MINIMUM_INDEX_SPACE"))`20THEN`20min_index_space`20=
V`20f$integer(f$trnlnm("NEWS_MINIMUM_INDEX_SPACE"))
X$
X$`20CHECK_NEWS_LOCK:
X$`09IF`20F$TRNLNM("NEWS_STOP").NES.""
X$`09THEN
X$`09`09SAY`20"''f$time()'`09NEWS`20Processing`20is`20LOCKED(''F$TRNLNM("NEWS_S
VTOP")')`20-`20Waiting`2010`20minutes
X$`09`09WAIT`2000:10:00
X$`09`09GOTO`20CHECK_NEWS_LOCK
X$`09ENDIF
X$`09SET`20PROTECTION=(OWNER:RWED,GROUP:RWED,SYSTEM:RWED,WORLD:R)/DEFAULT
X$`09IF`20F$SEARCH(inspec).EQS.""`20THEN`20GOTO`20MISSING_NEWSBATCH
X$`09total_size`20=`200
X$`09file_count`20=`200
X$`09infile1`20=`20""
X$`20TOTAL_SIZE_LOOP:
X$`09infile`20=`20F$SEARCH(inspec,1)
X$`09IF`20(infile.NES."").AND.(infile.NES.infile1)
X$`09THEN
X$`09`09total_size`20=`20total_size`20+`20F$FILE_ATTRIBUTES(infile,"ALQ")
X$`09`09file_count`20=`20file_count`20+`201
X$`09`09infile1`20=`20infile
X$`09`09GOTO`20TOTAL_SIZE_LOOP
X$`09ENDIF
X$`09infile`20=`20F$SEARCH("DUMMY.FILE")
X$`09infile`20=`20F$SEARCH(inspec)
X$`09ON`20WARNING`20THEN`20GOTO`20NOT_NEWSBATCH
X$`09work_file`20=`20"NEWS_TEMP.BATCH"+F$GETJPI("","PID")
X$`09DUMP/WORD/RECORDS=(START=1,END=1)/OUTPUT='work_file'`20'infile'
X$`09OPEN/READ`20TEMP`20'work_file'
X$`09READ/END=NEWS_PROBLEM/ERROR=NEWS_PROBLEM`20TEMP`20LINE
X$`09READ/END=NEWS_PROBLEM/ERROR=NEWS_PROBLEM`20TEMP`20LINE
X$`09READ/END=NEWS_PROBLEM/ERROR=NEWS_PROBLEM`20TEMP`20LINE
X$`09READ/END=NEWS_PROBLEM/ERROR=NEWS_PROBLEM`20TEMP`20LINE
X$`09READ/END=NEWS_PROBLEM/ERROR=NEWS_PROBLEM`20TEMP`20LINE
X$`09READ/END=NEWS_PROBLEM/ERROR=NEWS_PROBLEM`20TEMP`20LINE
X$`09READ/END=NEWS_PROBLEM/ERROR=NEWS_PROBLEM`20TEMP`20LINE
X$`09CLOSE`20TEMP
X$`09DELETE`20'work_file';*
X$`09IF`20F$EXTRACT(81,11,LINE)`20`20.EQS."#!`20cunbatch"`20THEN`20GOTO`20DO_CO
VMPRESSED_UNBATCH
X$`09IF`20F$EXTRACT(76,`204,`20LINE)`20.EQS.`20MAGIC`20THEN`20GOTO`20DO_COMPRES
VSED_BATCH
X$`09IF`20F$EXTRACT(76,`204,`20LINE)`20.EQS.`20MAGIC_GZIP`20THEN`20GOTO`20DO_CO
VMPRESSED_BATCH
X$`09IF`20F$EXTRACT(76,`208,`20LINE)`20.EQS.`20MAGIC_PKZIP`20THEN`20GOTO`20DO_C
VOMPRESSED_BATCH
X$`09IF`20F$EXTRACT(76,`204,`20LINE)`20.EQS.`20MAGIC_PACK`20THEN`20GOTO`20DO_CO
VMPRESSED_BATCH
X$`09IF`20F$EXTRACT(76,`204,`20LINE)`20.EQS.`20MAGIC_LZCOMP
X$`09THEN
X$`09`09lz_comp`20=`201
X$`09`09GOTO`20DO_COMPRESSED_BATCH
X$`09ENDIF
X$`20DO_UNCOMPRESSED:
X$`09CALL`20DISK_CHECK`09"''p1'"`20"''p2'"`20"''total_size'"`20NO`20!`20Check
V`20for`20Sufficient`20Disk`20Space
X$`09SAY`20"''f$time()'`09Processing`20''file_count'`20inbound`20batches."
X$`09NEWS/NOSCREEN`20ADD`20FILE/NETFEED'execqual''cregrpqual'`20'inspec'`20'del
Vete_batch'
X$`09return_status`20==`20$status
X$`09GOTO`20RETURN_IT
X$
X$`20DO_COMPRESSED_UNBATCH:
X$`20DO_COMPRESSED_BATCH:
X$`09CALL`20DISK_CHECK`09"''p1'"`20"''p2'"`20"''total_size'"`20YES`20!`20Check
V`20for`20Sufficient`20Disk`20Space
X$`09batch_file`20=`20"NEWS.BATCH"+F$GETJPI("","PID")
X$`09SAY`20"''f$time()'`09File`20is`20compressed,`20decompressing."
X$`09IF`20lz_comp
X$`09THEN
X$`09`09TOOL`20=`20F$EXTRACT(1,255,F$ELEMENT(0,`20"`20",`20LZDCMP))
X$`09`09IF`20F$SEARCH(TOOL).eqs.""`20THEN`20GOTO`20MISSING_DECOMPRESSION_TOOL
X$`09`09LZDCMP`20'infile'`20'batch_file'
X$`09ELSE
X$`09`09TOOL`20=`20F$EXTRACT(1,255,F$ELEMENT(0,`20"`20",`20UNCOMPRESS))
X$`09`09IF`20F$SEARCH(TOOL).eqs.""`20THEN`20GOTO`20MISSING_DECOMPRESSION_TOOL
X$`09`09UNCOMPRESS`20-c`20'inspec'`20>'batch_file'
X$`09ENDIF
X$`09ON`20WARNING`20THEN`20GOTO`20NEWS_PROBLEM
X$`09SAY`20"''f$time()'`09Processing`20inbound`20batch."
X$`09NEWS/NOSCREEN`20ADD`20FILE/NETFEED'execqual''cregrpqual'`20'batch_file'`20
V'delete_batch'
X$`09IF`20f$locate(";",inspec).EQS.f$length(inspec)`20THEN`20inspec`20=`20inspe
Vc`20+`20";"
X$`09DELETE`20'inspec'
X$`09return_status`20==`20$status
X$`09GOTO`20RETURN_IT
X$
X$`20NEWS_PROBLEM:
X$`09return_status`20==`20$status
X$`09IF`20F$SEARCH(batch_file).NES.""`20THEN`20DELETE`20'batch_file';
X$`09IF`20return_status`20.eqs.`20SS$_DEADLOCK
X$`09THEN
X$`09`09SAY`20"''f$time()'`09NEWS`20Processing`20is`20LOCKED`20-`20Waiting`2010
V`20minutes
X$`09`09WAIT`2000:10:00
X$`09`09GOTO`20CHECK_NEWS_LOCK
X$`09ENDIF
X$`09SET`20NOON
X$`20`09MAIL`20NL:`20usenet/subject="NEWS_RNEWS`20-`20trouble`20inserting`20Bat
Vch`20File:`20''inspec'"
X$`09SAY`20"''f$time()'`09...''inspec'`20Couldn't`20be`20processed`20by`20NEWS!
V"
X$`09IF`20F$SEARCH(work_file).NES.""`20THEN`20DELETE`20'work_file';*
X$`09GOTO`20RETURN_IT
X$
X$`20NOT_NEWSBATCH:
X$`09return_status`20==`20$status
X$`09IF`20return_status`20.eqs.`20SS$_DEADLOCK
X$`09THEN
X$`09`09SAY`20"''f$time()'`09NEWS`20Processing`20is`20LOCKED`20-`20Waiting`2010
V`20minutes
X$`09`09WAIT`2000:10:00
X$`09`09GOTO`20CHECK_NEWS_LOCK
X$`09ENDIF
X$`20`09MAIL`20NL:`20usenet/subject="NEWS`20-`20Not`20a`20News`20Batch`20File:
V`20''inspec'"
X$`09SAY`20"''f$time()'`09...''inspec'`20is`20not`20a`20Compressed`20News`20Bat
Vch`20File!"
X$`09IF`20F$SEARCH(work_file).NES.""`20THEN`20DELETE`20'work_file';*
X$`09GOTO`20RETURN_IT
X$
X$`20MISSING_NEWSBATCH:
X$`09return_status`20==`20$status
X$`20`09MAIL`20NL:`20usenet/subject="NEWS`20-`20Missing`20Batch`20File:`20''ins
Vpec'"
X$`09SAY`20"''f$time()'`09...''inspec'`20is`20Missing!"
X$`09GOTO`20RETURN_IT
X$
X$`20MISSING_DECOMPRESSION_TOOL:
X$`09return_status`20==`2098962`09!`20RMS$_FNF
X$`20`09MAIL`20NL:`20usenet/subject="NEWS`20-`20Missing`20Batch`20Decompression
V`20Tool:`20''TOOL'"
X$`09SAY`20"''f$time()'`09...Uncompress`20tool(''TOOL')`20is`20Missing!"
X$
X$`20RETURN_IT:
X$!
X$!`20NEWSSKIM`20runs`20at`20a`20higher`20job`20scheduling`20priority`20than`20
Vthe`20NEWS_RNEWS`20add
X$!`20processing,`20this`20allows`20outflow`20processing`20to`20down`20stream
V`20sites`20at`20
X$!`20reasonable`20intervals`20(this`20defaults`20to`20once`20per`20hour,`20but
V`20that`20is`20dealt
X$!`20with`20directly`20within`20NEWSSKIM).`20`20
X$!
X$`09EXIT`20'return_status'
X$
X$`20DISK_CHECK:`20SUBROUTINE
X$`09batch_blocks`20=`20'p3'
X$!
X$!`20There`20are`20definately`20some`20worse`20case`20assumptions`20being`20ma
Vde`20
X$!`20here,`20but`20the`20whole`20point`20of`20this`20exercise`20is`20to`20make
V`20sure
X$!`20we`20never`20overfill`20the`20disk,`20so`20we`20always`20want`20to`20erro
Vr`20conservatively.
X$!`20We`20assume`20that`20every`20incoming`20batch`20will`20actually`20be`20fe
Vd`20to`20every`20site`20
X$!`20that`20we`20have`20a`20NEWS_MANAGER_DEV:`5BPOST*`5D`20directory`20for.`20
V`20This`20is`20in`20general
X$!`20never`20true,`20since`20a`20properly`20configured`20system`20should`20nev
Ver`20send`20the
X$!`20contents`20of`20the`20arriving`20batch`20back`20to`20the`20site`20it`20ar
Vrived`20from,`20but`20there
X$!`20are`20other`20cases`20that`20this`20assumption`20compensates`20for,`20nam
Vely`20extra`20copies`20of
X$!`20things`20that`20go`20elsewhere`20like`20the`20uucp`20map`20processing.`20
V
X$!`20We`20also`20assume`20that`20an`20arriving`20batch`20that`20is`20uncompres
Vsed`20ends`20up`20with`20a`20
X$!`20resulting`20disk`20usage`20of`20twice`20the`20batch`20size`20when`20uncom
Vpressed.`20`20Reasonable
X$!`20observations`20indicate`20that`20this`20might`20actually`20be`20about`205
V/3`20times,`20but`202
X$!`20times`20errors`20on`20the`20conservative`20side.`20`20Compressed`20batche
Vs`20are`20assumed`20to
X$!`20take`20twice`20the`20space`20of`20their`20uncompressed`20form,`20also`20a
Vccounting`20for`20the`20
X$!`20temporary`20uncompressed`20copy`20which`20needs`20to`20exist`20during`20t
Vhe`20processing.
X$!
X$`09downstream`20=`200
X$`20COUNT_DOWNSTREAM:
X$`09site`20=`20f$search("NEWS_MANAGER_DEV:`5B000000`5DPOST*.DIR;1",1)
X$`09IF`20(site.NES."")
X$`09`20`20`20`20THEN
X$`09`09node`20=`20f$parse(site,,,"NAME","SYNTAX_ONLY")`20-`20"POST_"
X$`09`09method`20=`20f$element(0,"_",node)`20+`20"_"
X$`09`09node`20=`20node`20-`20method
X$`09`09prio`20=`20f$string(f$integer(f$element(0,"-",method)))
X$`09`09if`20(prio.eqs.f$element(0,"-",method))`20then`20method`20=`20(method
V`20-`20prio)`20-`20"-"
X$`09`09if`20f$element(1,"-",method).nes."-"
X$`09`09`20`20`20`20then
X$`09`09`09storage_class`20=`20f$element(0,"-",method)
X$`09`09`09method`20=`20(method`20-`20storage_class)`20-`20"-"
X$`09`09`09storage_class`20=`20f$element(0,"$",storage_class)
X$`09`09`20`20`20`20else
X$`09`09`09storage_class`20=`20"BATCH"
X$`09`09endif
X$`09`09if`20f$element(1,"-",method).nes."-"`20then`20method`20=`20f$element(1,
V"-",method)
X$`09`09if`20storage_class.eqs."BATCH"`20then`20downstream`20=`20downstream`20+
V`201
X$`09`09GOTO`20COUNT_DOWNSTREAM
X$`09ENDIF
X$`09IF`20(p4)
X$`09`20`20`20`20THEN`09!`20Peak`20Compressed`20usage
X$`09`09required_blocks`20=`20(batch_blocks`20*`202)`20*`20(1`20+`20downstream
V`20+`202)`20
X$`09`20`20`20`20ELSE`09!`20Peak`20Uncompressed`20usage
X$`09`09required_blocks`20=`20batch_blocks`20*`20(downstream`20+`202)
X$`09ENDIF
X$`09news_space`20=`20F$GETDVI("NEWS_DEVICE","FREEBLOCKS")
X$`09CALL`20DISK_FREE`20news_space`20"NEWS_DEVICE"
X$`09indexfile_space`20=`20F$GETDVI("NEWS_ROOT","FREEBLOCKS")
X$`09CALL`20DISK_FREE`20indexfile_space`20"NEWS_ROOT"
X$!
X$!
X$`09JOB_P1`20=`20f$getqui("DISPLAY_ENTRY",`20"PARAMETER_1",`20"*",`20"THIS_JOB
V")
X$`09JOB_P2`20=`20f$getqui("DISPLAY_ENTRY",`20"PARAMETER_2",`20"*",`20"THIS_JOB
V")
X$`09JOB_P3`20=`20f$getqui("DISPLAY_ENTRY",`20"PARAMETER_3",`20"*",`20"THIS_JOB
V")
X$`09JOB_P3`20=`20f$integer(JOB_P3)`20+`201
X$`09JOB_P4`20=`20f$getqui("DISPLAY_ENTRY",`20"PARAMETER_4",`20"*",`20"THIS_JOB
V")
X$`09JOB_P4`20=`20f$integer(JOB_P4)
X$!
X$!
X$!`20Not`20enough`20space`20yet,`20wait`20for`20up`20to`20an`20hour`20for`20an
Vy`20output`20queues`20to`20
X$!`20flush.`20`20Then`20hold`20the`20job`20and`20send`20mail`20to`20that`20eff
Vect.
X$!
X$`09IF`20indexfile_space.LE.min_index_space
X$`09`20`20`20`20THEN
X$`09`20`09MAIL`20SYS$INPUT:`20usenet/subject="News`20Device`20(NEWS_ROOT)`20to
Vo`20Full,`20Suspended`20processing`20of`20NEWS`20Batch`20''p1'`20from`20''p2'"
V
XProcessing`20of`20the`20inbound`20NEWS`20batch`20mentioned`20in`20the`20subjec
Vt`20of`20this`20mail
Xmessage`20has`20been`20suspended`20due`20to`20insufficient`20space`20on`20the
V`20NEWS_ROOT`20device.
X
XYou`20most`20likely`20will`20have`20to`20free`20disk`20space`20on`20the`20disk
V`20specified`20by
XNEWS_ROOT.`20`20`20The`20files`20in`20the`20directory`20specified`20by`20NEWS_
VROOT`20are`20the`20
Xnews`20database`20index`20files.`20`20If`20processing`20were`20to`20proceed`20
Vand`20sufficient
Xspace`20was`20not`20available`20to`20handle`20the`20database`20descriptions`20
Vof`20newly`20arrived
Xarticles,`20the`20news`20database`20index`20files`20would`20most`20likely`20be
Vcome`20corrupted.
XProcessing`20has`20been`20suspended`20to`20avoid`20this`20condition.
X
XAfter`20you`20resolve`20this`20insufficient`20resource`20problem,`20you`20can
V`20resume`20
Xprocessing`20of`20this`20and`20any`20other`20suspended`20inbound`20NEWS_RNEWS
V`20jobs`20that`20are`20
Xon`20the`20NEWS_BATCH`20queue`20in`20the`20"Holding"`20state.`20`20This`20is
V`20done`20with`20the`20
Xfollowing`20commands:
X
X`09$`20SHOW`20QUEUE/BATCH`20NEWS_BATCH
X`09$`20SET`20ENTRY/RELEASE`20entry_number`5B,...`5D
X
XWithout`20any`20action`20on`20your`20part,`20this`20job`20will`20automatically
V`20be`20restarted`20
Xafter`20the`20next`20nightly`20NEWSSKIM`20job.
X
X$`09`09JOB_P3`20=`200
X$`09`09JOB_P4`20=`20JOB_P4`20+`201
X$`09`09SAY`20"''f$time()'`09News`20Device`20(NEWS_ROOT)`20too`20Full,`20Notify
V`20NEWS`20manager,`20Suspended`20processing`20of`20NEWS`20Batch`20''p1'`20from
V`20''p2'"
X$`09`09after_time`20=`20"/HOLD"
X$`09ENDIF
X$!
X$`09IF`20required_blocks.LE.news_space`20THEN`20EXIT
X$!
X$!`20Not`20enough`20space`20yet,`20wait`20for`20up`20to`20an`20hour`20for`20an
Vy`20output`20queues`20to`20
X$!`20flush.`20`20Then`20hold`20the`20job`20and`20send`20mail`20to`20that`20eff
Vect.
X$!
X$`09IF`20JOB_P3.LE.5
X$`09`20`20`20`20THEN
X$`09`09SAY`20"''f$time()'`09News`20Device`20too`20Full,`20Waiting`2015`20minut
Ves`20for`20NEWSSKIM`20and`20downstream`20queues`20to`20flush"
X$`09`09after_time`20=`20"/AFTER=""+00:15:00"""
X$`09`20`20`20`20ELSE
X$`09`20`09MAIL`20SYS$INPUT:`20usenet/subject="News`20Device`20too`20Full,`20Su
Vspended`20processing`20of`20NEWS`20Batch`20''p1'`20from`20''p2'"
XProcessing`20of`20the`20inbound`20NEWS`20batch`20mentioned`20in`20the`20subjec
Vt`20of`20this`20mail
Xmessage`20has`20been`20suspended`20due`20to`20insufficient`20space`20on`20the
V`20NEWS_DEVICE.
X
XYou`20may`20optionally`20free`20disk`20space`20on`20the`20disk`20specified`20b
Vy`20NEWS_DEVICE`20and
Xrelease`20any`20NEWS_RNEWS`20jobs`20that`20are`20on`20the`20NEWS_BATCH`20queue
V`20in`20the`20"Holding"
Xstate.`20`20This`20is`20done`20with`20the`20following`20commands:
X
X`09$`20SHOW`20QUEUE/BATCH`20NEWS_BATCH
X`09$`20SET`20ENTRY/RELEASE`20entry_number`5B,...`5D
X
XWithout`20any`20action`20on`20your`20part,`20this`20job`20will`20automatically
V`20be`20restarted`20
Xafter`20the`20next`20nightly`20NEWSSKIM`20job.
X
X$`09`09JOB_P3`20=`200
X$`09`09JOB_P4`20=`20JOB_P4`20+`201
X$`09`09SAY`20"''f$time()'`09News`20Device`20too`20Full,`20Suspended`20processi
Vng`20of`20NEWS`20Batch`20''p1'`20from`20''p2'"
X$`09`09after_time`20=`20"/HOLD"
X$`09ENDIF
X$`20RESUBMIT_IT:
X$`09batch_log`20=`20"NEWS_LOG:RNEWS_"+(f$parse(p1,,,"TYPE")-".")
X$`09rnews_job_prio`20=`20f$getsyi("MAXQUEPRI")-1
X$`09SUBMIT/NOPRINT/LOG='batch_log''after_time'`09`09`09-
X`09`20`20`20`20`20`20`20`09/PARAMETER=("''JOB_P1'","''JOB_P2'","''JOB_P3'","''
VJOB_P4'")`09-
X`09`09/QUEUE='news_batch_queue'`09`09`09`09-
X`09`09/PRIORITY='rnews_job_prio'`09`09`09`09-
X`09`09NEWS_BIN:NEWS_RNEWS`09
X$`09LOGOUT/FULL
X$`09ENDSUBROUTINE
X$
X$`20DISK_FREE:`20SUBROUTINE
X$!`09P1`20is`20Global`20Symbol`20Name`20to`20set`20to`20the`20number`20of`20fr
Vee`20blocks
X$!`09P2`20is`20Device`20Name`20to`20determine`20free`20space`20on
X$`09disk`20=`20F$GETDVI(P2,"ROOTDEVNAM")
X$`09blocks`20=`20F$GETDVI(disk,`20"FREEBLOCKS")
X$`20NXT_D:disk`20=`20F$GETDVI(disk,`20"NEXTDEVNAM")
X$`09IF`20disk.NES.""
X$`09`20`20`20`20THEN
X$`09`09blocks`20=`20blocks`20+`20F$GETDVI(disk,`20"FREEBLOCKS")
X$`09`09GOTO`20NXT_D
X$`09ENDIF
X$`09'P1'`20==`20blocks
X$`09ENDSUBROUTINE
$ call unpack NEWS_RNEWS.COM;54 -
 487853367 "FORMAT STREAM_LF;CARRIAGE_CONTROL CARRIAGE_RETURN" 38 2 2
$ v=f$verify(v)
$ exit
