From:	CSBVAX::MRGATE!SCS7317%OCVAXB@VB.CC.CMU.EDU@SMTP 16-MAY-1988 17:53
To:	ARISIA::EVERHART
Subj:	POSTNEWS(VMS)  POST to USENET groups over the inter-net


Received: from VB.CC.CMU.EDU by KL.SRI.COM with TCP; Fri 13 May 88 01:17:19-PDT
Date: Fri, 13 May 88 04:19 EDT
From: Christopher Seline <SCS7317%OCVAXB@VB.CC.CMU.EDU>
Subject: POSTNEWS(VMS)  POST to USENET groups over the inter-net
To: info-vax@KL.SRI.COM
X-VMS-To: CMCCVB::IN%"info-vax@kl.sri.com"

POSTNEWS(VMS) allows any VMS site with inter-net access to POST to any USENET
news group.


I have received several requests to post POSTNEWS(VMS) to the net.  We (at the
project) have been unable to determine how to improve the documentation, so we
are releasing this product today.  We would appreciate any comments, or
suggestions on how to improve the POSTNEWS(VMS) manual.

POSTNEWS(VMS) must be configured for your site.  The project has been unable to
determine how best to document the installation process.  Your comments will be
used to write a manual to aid those who install POSTNEWS in the future. 


Christopher Seline
NEWS(DECNET/VMS) Project Manager

SCS7317@oberlin.bitnet
SCS7317%ocvaxa@vb.cc.cmu.edu (internet)
ihnp4!oberlin!cjs

........................ Cut between dotted lines and save ......................
$!..............................................................................
$! VAX/VMS archive file created by VMS_SHAR V-5.01 01-Oct-1987
$! which was written by Michael Bednarek (U3369429@ucsvc.dn.mu.oz.au)
$! To unpack, simply save and execute (@) this file.
$!
$! This archive was created by SCS7317
$! on Friday 13-MAY-1988 09:09:37.17
$!
$! It contains the following 2 files:
$! POSTNEWS.COM POSTNEWS.RNO
$!==============================================================================
$ Set Symbol/Scope=(NoLocal,NoGlobal)
$ Version=F$GetSYI("VERSION") ! See what VMS version we have here:
$ If Version.ges."V4.4" then goto Version_OK
$ Write SYS$Output "Sorry, you are running VMS ",Version, -
                ", but this procedure requires V4.4 or higher."
$ Exit 44
$Version_OK: CR[0,8]=13
$ Pass_or_Failed="failed!,passed."
$ Goto Start
$Convert_File:
$ Read/Time_Out=0/Error=No_Error1/Prompt="creating ''File_is'" SYS$Command ddd
$No_Error1: Define/User_Mode SYS$Output NL:
$ Edit/TPU/NoSection/NoDisplay/Command=SYS$Input/Output='File_is' -
        VMS_SHAR_DUMMY.DUMMY
f:=Get_Info(Command_Line,"File_Name");b:=Create_Buffer("",f);
o:=Get_Info(Command_Line,"Output_File");Set(Output_File,b,o);
Position(Beginning_of(b));Loop x:=Erase_Character(1);Loop ExitIf x<>"V";
Move_Vertical(1);x:=Erase_Character(1);Append_Line;
Move_Horizontal(-Current_Offset);EndLoop;Move_Vertical(1);
ExitIf Mark(None)=End_of(b) EndLoop;Position(Beginning_of(b));Loop
x:=Search("`",Forward,Exact);ExitIf x=0;Position(x);Erase_Character(1);
If Current_Character='`' then Move_Horizontal(1);else
Copy_Text(ASCII(INT(Erase_Character(3))));EndIf;EndLoop;Exit;
$ Delete VMS_SHAR_DUMMY.DUMMY;*
$ Checksum 'File_is
$ Success=F$Element(Check_Sum_is.eq.CHECKSUM$CHECKSUM,",",Pass_or_Failed)+CR
$ Read/Time_Out=0/Error=No_Error2/Prompt=" CHECKSUM ''Success'" SYS$Command ddd
$No_Error2: Return
$Start:
$ File_is="POSTNEWS.COM"
$ Check_Sum_is=1864639013
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X$! postnews.com`009`009Copyright 1988 Chris Seline
X$ ! 
X$ ! See end of postnews.com for instructions on customizing postnews for
X$ ! your installation.
X$ !
X
X$! ***************************************************************************
X$! ******* REMOVE THIS MESSAGE FOR YOUR SITE           ***********************
X$   write sys$output "Postnews must be configured SPECIFICLY FOR YOUR SITE."
X$   write sys$output "Please see end of postnews.com for more information."
X$   write sys$output "Abort."
X$   exit
X
X$ ! If you find this software to be of use, a donation might be nice.  Send
X$ ! $10 to:
X$ !`009`009Chris Seline
X$ !`009`009127 Green Bay Rd.
X$ !`009`009Winnetka, IL 60093
X$ ! If you've already donated for the NEWS(DECNET/VMS) package, there is
X$ ! NO NEED to send money for this module.
X
X$ !
X$ ! postnews.com`009`009Send USENET news messages to the world
X$ !
X
X$ !                                HISTORY
X$ !
X$ ! 17 Apr 88`009`009`009`009Added post to news_fariste::"rnews"
X$ ! 11 Apr 88                           Modified for user configuration     
X$ ! 27 Nov 87 19:00:00 EST`009 `009Established V1.00`009-cjs
X$ echo `009:= write sys$output                                      
X$ if F$TRNLNM("news_editor")  .eqs. "" then news_editor :== edit
X$ if p1 .eqs. "DEBUG" then goto debug
X$ !
X$ start:
X$ echo "start"                 
X$! ***************************************************************************
X$! ******* CHANGE THIS MESSAGE FOR YOUR SITE           ***********************
X$ TYPE SYS$INPUT
X
XRemember!  The message you post will be transmitted all over the whole United
XStates.  Anything you post should be of interest to more than just LOCAL USERS.
XIf you post something offensive or stupid, about 10,000 people will see the
Xmessage.  So think twice before sending a message. 
X
X$ 10$: inquire subject 
X$ if subject .eqs. "" then goto 10$
X$ inquire Keywords
V$ 20$:inquire newsgroup "Newsgroups (remember, I don't check this for validity)
X"
X$ if newsgroup .eqs. "" then goto 20$
X$ TYPE SYS$INPUT
X
XRemember!
XFor reasons of speed I do not check to see if you are posting to a valid
Xgroup.  You should check to be sure you are sending to a valid group. 
X
X$ ! We don't check for reasons of speed, so you can post to a group 
X$ ! that is not supported locally 
X$ ! 
X$ open/write out news-message.postnews `009! create the message file 
X$ write out "Subject: " + subject 
X$ write out "Keywords: " + f$EDIT(keywords, "LOWERCASE") 
X$ write out "Newsgroups: " + f$EDIT(newsgroup,"LOWERCASE") 
X$ write out "" 
X$ write out "(Enter message below this line)" 
X$ write out "" 
X$ write out "(Enter message above this line)" 
X$ open/read/err=skipit  in sys$login:signature.postnews  ! append signature 
X$loop3: 
X$ read/end=eof2 in a 
X$ write out a 
X$ goto loop3 
X$ eof2: 
X$ close in 
X$skipit: 
X$ close out 
X$ goto proceed 
X$ ! 
X$ proceed: 
X$ echo "Proceed>>>" 
X$ assign tt: sys$input/nolog 
X$ assign tt: sys$output/nolog 
X$ 'news_editor' news-message.postnews 
X$ deassign sys$input 
X$ deassign sys$output 
X$ loop: 
X$ inquire which "[LIST EDIT SEND WRITE QUIT] " 
X$ which = f$edit(which,"UPCASE,COLLAPSE, UNCOMMENT") 
X$ if which .eqs. "LIST" then goto list 
X$ if which .eqs. "EDIT" then goto edit 
X$ if which .eqs. "SEND" then goto send 
X$ if which .eqs. "WRITE" then goto write 
X$ if which .eqs. "QUIT" then exit 
X$ echo "<" + which + ">" + "  nope, try again!" 
X$ goto loop 
X$ ! 
X$ list: 
X$ echo "list>>>" 
X$ type news-message.postnews 
X$ goto loop
X
X$! 
X$ edit: 
X$ echo "edit>>>" 
X$ 'news_editor' news-message.postnews 
X$ goto loop 
X$! 
X$ send:
X
X$ debug: 
X$ echo "send>>>" 
X$ ! preprocess 
X$ echo "Preprocessing -- this takes a bit of time -- please wait..." 
X$ open/read  in   news-message.postnews 
X$ open/write out  workfile1.postnews 
X$ read in subject 
X$ read in keywords 
X$ read in newsgroups 
X$ lines = 0`009`009`009! count # of lines in message 
X$loop_1: 
X$ read/end=eof in a 
X$ if a .eqs. "(Enter message below this line)" then goto loop_1 
X$ if a .eqs. "(Enter message above this line)" then goto loop_1 
X$ write out a 
X$ lines = lines + 1 
X$ goto loop_1 
X$ eof: 
X$ close in 
X$ close out 
X
X$ ! end of preprocess 
X$ ! 
X$ ! calculate message info 
X$! ***************************************************************************
X$ !***** THIS IS WHERE THE MAGIC SYMBOLS ARE -- CHANGE THESE FOR YOUR SITE
X$ set ver
X$ mesg = f$CVTIME(,,"HOUR")`009! create a uniq message number 
X$ mesg = mesg + f$CVTIME(,,"MINUTE")`009! made of current time + pid 
X$ mesg = mesg + f$CVTIME(,,"SECOND") + "." + F$FAO("!SL",f$pid(junk)) 
X
X$! ***************************************************************************
X$ !****** CHANGE messageID. Replace ocvaxa.oberlin.edu with the internet 
X$ !address of your site.  The internet address is the mail address someone 
X$ !would use to send mail to your site.  If you still can't figure it out, 
X$ ! use your DECNET node name (for example site.decnet). 
X$ !************************** 
X$ messageID = "<" + mesg + "@ocvaxa.oberlin.edu>"
X
X$! 
X$ username = f$edit(f$getjpi("","username"),"COLLAPSE") 
X$! make a date 
X$! "27 Nov 87 19:46:38 GMT" 
X$ time = f$time() 
X$ mon  = f$cvtime(time,,"month") 
X$month= f$element(mon,"\","\Jan\Feb\Mar\Apr\May\Jun\Jul\Aug\Sep\Oct\Nov\Dec") 
X$ date = f$cvtime(time,,"day") + " " + month + " " 
X$ date = date + f$extract(2,2,f$cvtime(time,,"year")) + " " 
X$ date = date + f$extract(0,8,f$cvtime(time,,"time")) + " GMT" 
X$ ! form into final message 
X$ open/read  in  workfile1.postnews 
X$ open/write out workfile2.postnews 
X
X$! ***************************************************************************
X$! ******* CHANGE THIS FOR YOUR SITE           ***********************
X$ ! replace Oberlin.bitnet with the name that the computer(s) you are mailing 
X$ !the news message to (see further on) use to mail messages TO your computer. 
X$ !**********                              
X$ write out "NPath: oberlin.bitnet!" + username 
X$ write out  "NFrom: " + username + "@oberlin.bitnet" 
X$ ! 
X$ write out  "N" + newsgroups 
X$ write out  "N" + subject
X
X$ write out  "NMessage-ID: " + messageID 
X$ write out  "NDate: " +date 
X$! write out "NReferences: " + references 
X$! write out "NReply-To: " + reply-to 
X$! ***************************************************************************
X$! ******* CHANGE THIS FOR YOUR SITE           ***********************
X$ ! Change "na" to "world" if you are outside north america
X$ write out  "NDistribution: na" 
X$! 
X$ write out  "NAdvert: POSTNEWS/READNEWS for VAX/VMS  SCS7317@OBERLIN.BITNET" 
X$ write out  "NUA: Oberlin Network News <V01.01>" 
X$ ! CHANGE "Oberlin College" to the name of your organization.  For example 
X$ ! if you work for Alcoa, change "Oberlin College" to "Alcoa" 
X$ write out  "NOrganization:  Oberlin College" 
X$! ***********
X
X$ write out F$FAO("NLines: !SL", lines) 
X$ write out  "N" + keywords 
X$ write out  "N" 
X$ loop4: 
X$ read/end=eof4 in a 
X$ write out "N" + a 
X$ goto loop4 
X$ eof4: 
X$ close in
X
X$ close out 
X$ ! 
X$ ! mail it to our feed systems 
X$ echo "Posting it -- please wait..."
X
X$ ! You may add extra 'target' sites.  For example, in addition to posting
X$ ! to news_farsite, my site, Oberlin, posts to uunet, and to our CS Dept VAX
X$ ! (which gets its mail from us via PMDF).  
X$ ! 
X$ !  o You should send the mail to a site that can process USENET.  
X$ ! 
X$ !  o We send to uunet ( a backbone ).  If you decide to send to uunet, please
X$ !    contact postmaster@uunet.uu.net and ask permission first. 
X
V$ mail/noself workfile2.postnews news_farsite::"rnews"`009! COMMENT OUT IF YOU 
XONLY USE POSTNEWS and not NEWS(DECNET/VMS)
V$ !!!mail/noself workfile2.postnews in%"""rnews@uunet.uu.net""" ! use this if y
Xou do not share a DECNET with a site supporting USENET~r
V$ mail/noself workfile2.postnews jnet%"""rnews%occs%ocvaxa@cmccvb"""  ! if  you
X have jnet/bitnet also use this address
X$ !
X
X$ ! clean up
X$ delete/noconfirm/nolog workfile*.postnews;*
X$ !
X$ echo "Done...I hope it worked...you'll get returned mail if it didn't"
X$ echo "in which case you should find the brightest person you know, and"
X$ echo "ask them for help."
X$ exit
X$!
X$ write:                    
X$ echo "write>>>"
X$ inquire where "Name of file to write to"
X$ where =  f$edit(where,"UPCASE,COLLAPSE, UNCOMMENT")
X$ if where .nes. "" then copy/log news-message.postnews  'where'
X$ goto loop
X$!
X$!
X$!                                            
X$ ! VARIOUS THINGS MUST BE CHANGED FOR THIS PROGRAM TO WORK CORRECTLY
X$ ! FROM YOUR SITE.  UNFORTUNATELY, BECAUSE THE NETWORK CONFIGURATION
X$ ! OF EACH SITE IS DIFFERENT (I.E. SOME RECEIVE PMDF, UUCP, OF SMTP
X$ ! MAIL WHILE OTHERS USE DECNET OR JNET) I CAN NOT GIVE YOU ANYTHING
X$ ! BUT GENERAL HINTS ON HOW TO CUSTOMIZE THIS PROGRAM FOR YOUR SITE.
X$ ! 
X$ ! SECTIONS MARKED WITH "***************" MUST BE CHANGED FROM THE DEFAULT
X$ ! SETTINGS FOR POSTNEWS TO WORK CORRECTLY.  BY "WORK CORRECTLY" I MEAN
X$ ! PRODUCE VALID USENET ARTICLES.  UNFORTUNATELY, THERE IS NO REAL WAY
X$ ! TO KNOW WHETHER POSTNEWS IS PRODUCING CORRECTLY FORMATTED ARTICLES
X$ ! -- EXCEPT THAT SOME INCORRECTLY FORMATTED ARTICLES WILL NOT POST
X$ ! (THOUGH MOST WILL).
X$ ! 
X$ ! SO I WISH YOU LUCK.  I FEEL IT IS UNFORTUNATE THAT THE USE OF NETWORKS
X$ ! REQUIRES LOTS OF ARCANE KNOWLEDGE, BUT IF ANY IDIOT COULD DO THIS, THEN
X$ ! YOUR EMPLOYER PROBABLY WOULD NOT PAY YOU AS MUCH AS THEY DO.
X$ ! 
X$ !END.  
X
$ GoSub Convert_File
$ File_is="POSTNEWS.RNO"
$ Check_Sum_is=191563822
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X.lm 8
X.rm 72
X.sp 1
X.ap
X.p 0,1,3
X
X.c80;---------------------------------
X.c80;|           POSTNEWS            |
X.c80;|  USENET News posting utility  |
X.c80;---------------------------------
X
X.c80;(c) 1988 by Christopher Seline
X.sk 4
X
X.c80;^&Introduction\&
X
XPOSTNEWS is a DCL program that allows the user to post news items
X("messages") to the USENET News service ("Netnews").  The program was
Xwritten to complement the NEWS NetNews reading utility.  It is
Xstrongly recommended that the user thoroughly familiarize him/herself 
Xwith NetNews through the NEWS manual before using POSTNEWS.
XYou should read everything in the newsgroup news.announce.newusers
Xbefore posting messages.
X.sk2
X
X.c80;^&Getting Started\&
X
XTwo system variables may have to be dealt with before using POSTNEWS.
X"news__farsite" defines the USENET site that you are using as your 
Xgateway to USENET.  This should already have been defined for using
XNEWS; it remains the same for POSTNEWS.  See the NEWS
Xmanual for more information.
X
X"news__editor" tells
XPOSTNEWS what editor to use when you write your message.  It is
Xalready defined as "edit"; change it only if you usually edit your
Xfiles with a command like EDIT/TSP.  Define it like this, either at
Xthe prompt or in your LOGIN.COM file:
X.sk1
X.c80;$ news__editor :== edit/tsp
X
XThe POSTNEWS program itself should be stored in a public directory
Xon your system.  Your system manager can tell you where it is located.
XRun the program by typing '@', immediately followed by the program
Xname.  For example, here is how the program is run at Oberlin:
X.sk1
X.c80;@softlib:[share]postnews
X
XRather than typing the directory and program names every time you
Xuse POSTNEWS, you can define this command to be something 
Xsimpler in your LOGIN.COM file, like so:
X.sk1
X.c80;$ postnews :== @softlib:[share]postnews
X
XAgain, your system manager can tell you where to find the program
Xon your system.  Now, simply type 'postnews' to run the program.
X
X.sk2
X.c80;^&Using Postnews\&
X
XPOSTNEWS is a one-shot program:  you post one 
Xmessage with it, then quit.  
X
XWhen you invoke the program, it will ask
Xyou for the Subject (i.e., title) of your message, the
Xkeywords, and the newsgroup(s).  The Subject should be concise and
Xdescriptive.  Keywords, used by some news readers for scanning
Xarticles for particular topics, are optional.  If you give one or
Xmore, they should indicate the subject you intend to discuss more
Xspecifically than the newsgroup name.  
X
XThe program will warn you that it does not check the validity of the
Xnewsgroup name you give it.  This is partly in the interest of 
Xefficiency, and partly because it allows you to post to newsgroups
Xnot known to the system you are on.  For example, you may wish to
Xpost a message to a newsgroup specific to AT_&T, but you are not
Xdirectly linked to AT_&T and thus never see their news.  This way,
Xthe message will float around the NetNews world until it finds its
Xnewsgroup, and will not try to tell you that the newsgroup does not
Xexist. 
X
XNext, the program will invoke the editor on a file called
X"news-message.postnews".  The file will already contain subject,
Xkeyword, and newsgroup headers with the information you entered.
XIt will also have two lines of text that say "(Enter message below this
Xline)" and "(Enter message above this line)".  Do ^&not\& delete those
Xlines.  The program will remove them before it posts the message.
X
XEnter the text of your message between those lines.  You can also
Xedit the header lines, if you see you have made a typo in the subject,
Xkeywords, or newsgroup.  Do not change anything else in the file.
X
XNote that since you are using your usual editor on a normal file,
Xyou can insert other files as part of the text.  See your editor's
Xdocumentation for information on how to do this.
X
XWhen you have completed composing the message, exit the editor as
Xyou normally would.  The file will be saved and the POSTNEWS 
Xprogram will resume.  The article has not been posted yet.
X
XYou are now given a command line that looks like this:
X.lit
X[LIST EDIT SEND WRITE QUIT] :
X.el
XYou can respond with any of the five options.  They need not be
Xin capitals, but you must type the entire word.
X
X.lm 16
X.p -8,1,3
XLIST####Shows you the file you just edited.  Useful for checking
Xwhether or not the editor worked properly and the file is as it should be.
X
XEDIT####Return to editing the file to make changes before it is posted.
X
XSEND####Post the article.  You ^&must\& do this if you want your article
Xto be posted.  The program stops automatically after you SEND.
X
XWRITE###Make a copy of the article in another file for future reference.
XPOSTNEWS will prompt you for the file name you wish to store it under.
X
XQUIT####Exit the program.  Do this ^&only\& if you do not want your
Xarticle to be posted.
X
X.lm 8
X.p 0,1,3
XThe same prompt will reappear after these commands, except for SEND 
Xand QUIT.
XAfter you exit the program, the file news-message.postnews will remain
Xin your current directory.  This is primarily so you can remember what
Xyou posted.  
X
XThis also is useful if you forget to SEND the message before you quit.
XRename the file to be 'temp.news', or something you can remember.
XThen, edit it using your normal editor and remove everything but the
Xtext of the message.  Now run POSTNEWS and, when you reach the
Xstage with the editor, insert that file into the new message and
Xproceed normally.
X
XGood luck!
$ GoSub Convert_File
$ Exit
