-+-+-+-+-+-+-+-+ START OF PART 2 -+-+-+-+-+-+-+-+ X$! try to get topic number: characters 1-8 of line. collapse spaces, etc. X$ note_num = f$extract(0,8,line) X$ note_num = f$edit(note_num,"collapse,upcase") X$ if note_num.nes."" then write out "delete note ''note_num'" X$ if note_num.nes."" then write out "Y" X$ if first.eqs."" then first == note_num X$ if note_num.nes."" then goto loop X$! try to get reply number. if topic is null, then this is a reply note. X$! if a topic, then reply number is 4th parameter on line, X$! if a reply, then reply number is 3rd parameter on line. X$! Use a call w/ line as parameter so DCL will parse the fields for us. X$ call parse_reply 'line' X$ note_num = reply_3 X$ write out "delete note ''note_num'" X$ write out "Y" X$ if first.eqs."" then first == note_num X$ goto loop X$! X$end_sub: X$! turn on verify again. X$ set ver X$ last == note_num X$ write out "close" X$ write out "exit" X$ write out "$ exit" X$ close in X$ close out X$ exit X$ endsubroutine X$! X$! subroutine to get reply number of a note. X$parse_reply: subroutine X$ reply_3 == p3 X$ exit X$ endsubroutine $ CALL UNPACK NOTE-ARCHIVE.COM;1 690973236 $ create 'f' X$! Command procedure to post a file to a desired Notes conference. X$! Conference name is passed via P1. X$! File to be posted is in MESSAGE_FILE. X$! Symbols FROM, TO, and SUBJECT have the corresponding information from X$! the incoming mail message. We add them to the top of the message X$! file. X$!Tom Bailey 8/11/88 X$!----------------------------------------------------------------------- X$! X$! get filename of message file to be used for temporary files. X$ temp_file = f$parse(MESSAGE_FILE,,,"NAME") X$ temp_mess_file = temp_file + ".tmpm" X$ temp_com_file = temp_file + ".tmpc" X$! X$! debugging stuff. X$ sho default X$ sho sym/all/local X$ sho log X$ type 'temp_file'.com X$! X$! Open temp message file, write header stuff, and append message file. X$ open/write temp 'temp_mess_file' X$ write temp "FROM: " + FROM X$ write temp "TO: " + TO X$ write temp "SUBJECT: " + SUBJECT X$ write temp " " X$ close temp X$ append 'MESSAGE_FILE' 'temp_mess_file' X$! X$! create and execute a temporary command file to actually post the note. X$! A temporary command file is needed because symbols don't expand X$! in DCL data statements. X$ open/write temp 'temp_com_file' X$ write temp "$ NOTES /NONOTEBOOK ''P1'" X$ write temp "WRITE /NOEDIT ''temp_mess_file'" X$ write temp "''SUBJECT'" X$ write temp "Y" X$ write temp "SHOW ERROR" X$ write temp "EXIT" X$ write temp "$ EXIT" X$ close temp X$ @'temp_com_file' X$! X$! delete our temporary files. get full names first. X$ temp_com_file = f$parse(temp_com_file) X$ temp_mess_file = f$parse(temp_mess_file) X$ delete 'temp_com_file','temp_mess_file' X$! X$! clean up directory. assume that we won't lose anything important by X$! purging. X$ purge *.log/keep=2 X$! X$ exit $ CALL UNPACK POST-IT-NOTE.COM;1 1312299124 $ v=f$verify(v) $ EXIT