[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::hackers_v1

Title:-={ H A C K E R S }=-
Notice:Write locked - see NOTED::HACKERS
Moderator:DIEHRD::MORRIS
Created:Thu Feb 20 1986
Last Modified:Mon Aug 03 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:680
Total number of notes:5456

180.0. "store and forwarding notes" by SPRITE::OSMAN () Wed Dec 04 1985 11:12

Can anyone think of a solution to the following:

I write up a file containing a note (or reply) for some notes file.

I attempt to use VNOTES to submit the note but I get something like:

	% Node FROZ is not currently reachable

So, what I'd like is some sort of REMOTE_NOTE procedure, whose
purpose is illustrated by the following possible human interface example:

	$ @remote_note
	What notes file ?  ORPHAN::VAXC	   ! notes file I want to write to
	What local file ?  FOO.TXT	   ! my file containing my note
	Title (none if this is a reply) :  ! title for my note
	Reply to note # :		   ! only asked if I give no title

	Job 3412 submitted on queue SYS$BATCH
	$

I've often wanted such a thing for situations in which either I have a
new note to submit, or I've received a note or reply via MAILNOTES so
I know exactly which note I want to reply to, and the notes file or node
is currently down (or unavailable during prime time).

Another possible human interface for this scheme would be a mail server
implemented kind of like nm% was implemented for nmail.  Perhaps what
I'm asking for could be implemented as rn% for "remote noter".

Then, the human interface could work like this:

	$ mail
	MAIL> send
	To: rn%"orphan::vaxc"
	Subject: Title strange error from C compiler
	    or
	Subject: Reply to note # 35
	Message:
	blah blah
	^Z
	MAIL> exit
	$

For this implementation, I'm assuming the "rn" server would parse
the subject and only allow subjects of the form "Title . . ." or
"Reply to note # . . .".

Do other people think this would be useful ?  Anyone want to implement
it ?  Shall I give it a crack ?  Can someone give some info as to
what conventions I need in order to write a mail server of the form
"foo%" ?

/Eric
                     
T.RTitleUserPersonal
Name
DateLines
180.1KOALA::ROBINSWed Dec 04 1985 13:22108
$! This is a version of what you want, but it's not very sophisticated.
$! It merely submits a batch job, it's not a mail-server thing.
$!+
$! This command file will post a note (or several notes) to a notesfile (or
$! several notesfiles).
$! It will do it [for this version] by creating a self-submitting batch job
$! for each note/reply.
$!
$! This assumes that NOTES-11 is invoked with the symbol "Notes"
$!
$! Command line:
$!    @post textfile notesfile [command [notenumber]]
$!
$!    textfile
$!        The name of a text file that contains the body of the note to write
$!        or reply.  A default of SYS$SCRATCH:.TXT is applied.
$!    notesfile
$!        The notesfile to post the note in.  A default of SYS$NOTES:.NOT is
$!        applied.
$!    command
$!        WRITE or REPLY.  Default is WRITE.
$!    notenumber
$!        Only allowed if command is REPLY; this parameter is the NOTE number
$!        to REPLY to.  No checking is made for validity of this number in v1.
$!        No guarantee is made that the REPLY will be to the correct note,
$!        especially if a note that does not exist is specified.
$!-
$ ver = 'f$ver(0)' ! 'f$ver(post_debug)'
$ textfile_default = "SYS$SCRATCH:.TXT"
$ notesfile_default = "SYS$NOTES:.NOT"
$ if p1.eqs."" then read/end=alldone/prompt="$_Textfile: " sys$command p1
$ if p1.eqs."" then goto alldone
$ p1 = f$parse(p1,textfile_default)
$ if f$search(p1).eqs."" then goto no_textfile
$ if p2.eqs."" then read/end=alldone/prompt="$_Notesfile: " sys$command p2
$ if p2.eqs."" then alldone
$ p2 = f$parse(p2,notesfile_default)
$ if p3.eqs."" then p3 = "WRITE"
$ if (p3.nes."WRITE") .and. (p3.nes."REPLY") then goto bad_p3
$ p3 = p3+"_LABEL"
$ the_time = f$time() - "-" - "-" - ":" - ":" - "."
$ the_time = f$edit(the_time,"COLLAPSE")
$ the_pid  = f$getj("","PID")
$ the_user = f$getj("","USERNAME")
$ goto 'p3'
$!
$WRITE_LABEL:
$!
$ command_file_name = "SYS$SCRATCH:WRITE_"+the_pid+"_"+the_time+".COM"
$ read/prompt="$_note Title? " sys$command note_title
$ open/write comfile 'command_file_name'
$ write comfile "$! This command file will WRITE ''p1' to notesfile ''p2'"
$ write comfile "$ on error then goto resubmit"
$ write comfile "$ Notes notes ''p2'"
$ write comfile "write ''p1'"
$ write comfile "''note_title'"
$ write comfile "Y"
$ write comfile "exit"
$ write comfile "$ set noon ! In case we can't delete or mail"
$ write comfile "$ delete ''command_file_name';"
$ write comfile "$ mail nl: ''the_user'/sub=""''p1' written to ''p2'."""
$ write comfile "$ exit"
$ write comfile "$resubmit:"
$ write comfile "$ sub=""sub/nonoti/keep/after=tom/noprint/log=sys$scratch:/que=sys$netcopy"""
$ write comfile "$ sub/name=""Post_WRITE"" ''command_file_name'"
$ write comfile "$ exit"
$ close comfile
$ sub="sub/nonoti/keep/noprint/log=sys$scratch:/que=sys$netcopy"
$ sub/name="Post_WRITE" 'command_file_name' !/after=tom
$ exit
$!
$REPLY_LABEL:
$!
$ command_file_name = "SYS$SCRATCH:REPLY_"+the_pid+"_"+the_time+".COM"
$ read/prompt="$_note number to reply to [1]? " sys$command note_number
$ open/write comfile 'command_file_name'
$ write comfile "$! this command file will use ''p1' as a reply to note #''note_number' of notesfile ''p2'"
$ write comfile "$ on error then goto resubmit
$ write comfile "$ notes notes ''p2'"
$ write comfile "''note_number'"
$ write comfile "reply ''p1'"
$ write comfile "Y"
$ write comfile "exit"
$ write comfile "$ set noon ! In case we can't delete or mail"
$ write comfile "$ mail nl: ''the_user'/sub=""''p1' used as reply to ''note_number' in ''p2'"""
$ write comfile "$ delete ''command_file_name';"
$ write comfile "$ exit"
$ write comfile "$resubmit:"
$ write comfile "$ sub=""submit/noprint/keep/log=sys$scratch:/after=tom/que=sys$netcopy"""
$ write comfile "$ sub/name=""Post_REPLY"" ''command_file_name'"
$ write comfile "$ exit"
$ close comfile
$ sub="sub/nonoti/keep/noprint/log=sys$scratch:/que=sys$netcopy"
$ sub/name="Post_REPLY" 'command_file_name' !/after=tom
$ exit
$!
$! Error handlers:
$!
$No_textfile:
$ write sys$output "Can't find ''p1'"
$ goto alldone
$
$bad_p3:
$ write sys$output "Only WRITE or REPLY allowed as p3"
$ goto alldone
$
$alldone:
$ ver = f$ver(ver)