Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!ucbvax!rtpark.rtp.ge.com!rlb From: rlb@rtpark.rtp.ge.com.UUCP Newsgroups: mod.computers.vax Subject: Com file for using EVE or EVE+ from MAIL Message-ID: <8702032249.AA07377@ge-rtp.GE.COM> Date: Tue, 3-Feb-87 17:49:10 EST Article-I.D.: ge-rtp.8702032249.AA07377 Posted: Tue Feb 3 17:49:10 1987 Date-Received: Sat, 7-Feb-87 11:13:47 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 54 Approved: info-vax@sri-kl.arpa $! MAIL$EDIT command procedure -- see comments at end $ edit = "EDIT/TPU/SECTION=SYS$SHARE:EVEPLUS.GBL" $ define/process tpuini login_dir:mailtpuini.tpu ! my private tpu ini file $ if f$TRNLNM("kept_edit","lnm$job").nes."" then $ goto ATTACH $NO_KEPT: $ DEFINE /USER SYS$INPUT 'F$TRNLNM("SYS$OUTPUT")' $ IF P1 .EQS. "" THEN GOTO NOINPUT $ EDIT /OUTPUT='P2' 'P1' $ EXIT $NOINPUT: $ EDIT 'P2' $ EXIT $ATTACH: $ priv_list = f$SETPRV("NOWORLD,NOGROUP") $ pid = 0 $ edit_name = f$TRNLNM("kept_edit","lnm$job") $10$: $ process = f$GETJPI(f$PID(pid),"prcnam") $ if process.eqs.edit_name then $ goto DO_ATTACH $ if pid.ne.0 then $ goto 10$ $ goto NO_KEPT $DO_ATTACH: $ define/job mail_sub 'f$GETJPI("","PRCNAM")/nolog $ define/job mail_tmp 'p2'/nolog $ priv_list = f$SETPRV(priv_list) $ write sys$error "[Attaching to Kept Editor]" $ write sys$error "Get File MAIL_TMP to edit" $ write sys$error "Attach to ",f$GETJPI("","PRCNAM")," pid=",- f$GETJPI("","PID")," to send the message" $ wait 0:0:2 $ define/nolog/exec sys$input sys$command: $ define/nolog sys$input sys$command: $ attach "''edit_name'" $ deassign/job mail_sub $ deassign/job mail_tmp $ exit $ ! $ ! Command procedure to invoke an editor for MAIL. $ ! $ ! Inputs: $ ! $ ! P1 = Input file name. $ ! P2 = Output file name. $ ! $ ! If MAIL$EDIT is undefined, MAIL will invoke callable EDT. $ ! If MAIL$EDITis defined to be a command procedure, $ ! MAIL will create a subprocess to edit the mail. $ ! $ ! Note that this procedure is run in the context of a subprocess. $ ! LOGIN.COM is not executed. However, all process logical names $ ! and DCL global symbols are copied. $ ! $ ! The default directory is the same as the parent process $ !