home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!uwm.edu!linac!att!ucbvax!PFC.MIT.EDU!MRL
- From: MRL@PFC.MIT.EDU (Mark London)
- Newsgroups: comp.os.vms
- Subject: VACATION program.
- Message-ID: <9D8EF627D28340209A@NERUS.PFC.MIT.EDU>
- Date: 5 Jan 93 16:00:00 GMT
- Sender: daemon@ucbvax.BERKELEY.EDU
- Organization: The Internet
- Lines: 565
-
- Anyone running the latest PMDF can ignore this posting as the software is meant
- for people without PMDF (or with an old PD version like myself.)
-
- The following software works with DELIVER to send reply messages to mail when
- the user is away. It's main feature which DELIVER presently does not have (at
- least I've not found it) is that the message is also delivered as new mail with
- the FROM address being preserved. Without this software, the message gets
- delivered with the user's name as the FROM address, and the real sender's
- address is placed in the subject line instead, making it impossible to use the
- REPLY command on it.
-
- $ v='f$verify(f$trnlnm("SHARE_VERIFY"))'
- $!
- $! This archive created by VMS_SHARE Version 7.2-007 22-FEB-1990
- $! On 5-JAN-1993 10:34:10.39 By user MRL
- $!
- $! This VMS_SHARE Written by:
- $! Andy Harper, Kings College London UK
- $!
- $! Acknowledgements to:
- $! James Gray - Original VMS_SHARE
- $! Michael Bednarek - Original Concept and implementation
- $!
- $! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER
- $! AND EXECUTE AS A COMMAND PROCEDURE ( @name )
- $!
- $! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:
- $! 1. VACATION.BUILD;3
- $! 2. VACATION.COM;4
- $! 3. VACATION.DELIVERY;4
- $! 4. VACATION.FOR;26
- $! 5. VACATION.HLP;5
- $! 6. VACATION.LNK;8
- $! 7. VACATION_CLD.CLD;3
- $!
- $set="set"
- $set symbol/scope=(nolocal,noglobal)
- $f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID"))
- $e="write sys$error ""%UNPACK"", "
- $w="write sys$output ""%UNPACK"", "
- $ if f$trnlnm("SHARE_LOG") then $ w = "!"
- $ 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=filename, P2=checksum
- $ if f$search(P1) .eqs. "" then $ goto file_absent
- $ e "-W-EXISTS, File ''P1' exists. Skipped."
- $ delete 'f'*
- $ exit
- $file_absent:
- $ 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:
- $ w "-I-PROCESS, Processing file ''P1'."
- $ if .not. f$verify() then $ define/user sys$output nl:
- $ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1'
- PROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET(
- SUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");b:=
- CREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(b));
- LOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION(
- BEGINNING_OF(b));g:=0;LOOP EXITIF MARK(NONE)=END_OF(b);x:=ERASE_CHARACTER(1);
- IF g=0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x="V" THEN APPEND_LINE;
- MOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;IF x="+" THEN g:=1;
- ERASE_LINE;ENDIF;ELSE IF x="-" THEN IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+")=
- 1 THEN g:=0;ENDIF;ENDIF;ERASE_LINE;ENDIF;ENDLOOP;t:="0123456789ABCDEF";
- POSITION(BEGINNING_OF(b));LOOP r:=SEARCH("`",FORWARD);EXITIF r=0;POSITION(r);
- ERASE(r);x1:=INDEX(t,ERASE_CHARACTER(1))-1;x2:=INDEX(t,ERASE_CHARACTER(1))-1;
- COPY_TEXT(ASCII(16*x1+x2));ENDLOOP;WRITE_FILE(b,GET_INFO(COMMAND_LINE,
- "output_file"));ENDPROCEDURE;Unpacker;QUIT;
- $ delete/nolog 'f'*
- $ CHECKSUM 'P1'
- $ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT
- $ e "-E-CHKSMFAIL, Checksum of ''P1' failed."
- $ ENDSUBROUTINE
- $START:
- $ create 'f'
- X$!
- X$! NOTE: The following command should be executed at startup:
- X$! MCR INSTALL PMDF_ROOT:`5BEXE`5DVACATION/PRIV=(SYSPRV,SETPRV)
- X$!
- X$ FOR VACATION
- X$ SET COMMAND /OBJ VACATION_CLD
- X$ @VACATION.LNK
- $ CALL UNPACK VACATION.BUILD;3 943790897
- $ create 'f'
- X$ !
- X$ ! VACATION.COM sends the file SYS$LOGIN:VACATION.TXT to any user
- X$ ! who sends mail. Only one copy of VACATION.TXT is sent to a given
- X$ ! user no matter how many messages he or she sends.
- X$ !
- X$ ! Check for replies sent list's presence
- X$ if F$SEARCH("SYS$LOGIN:VACATION.REPLY") .nes "" then goto search_list
- X$ open/write tr SYS$LOGIN:VACATION.REPLY
- X$ goto add_list
- X$ !
- X$ ! Check the list for this sender
- X$ search_list:
- X$ search/nooutput SYS$LOGIN:VACATION.REPLY "''QFROM'"
- X$ if $status .eq. 1 then GOTO exit
- X$ open/append tr SYS$LOGIN:VACATION.REPLY
- X$ !
- X$ add_list:
- X$ write tr FROM
- X$ close tr
- X$ mail/noself/subject="Away." SYS$LOGIN:VACATION.TXT -
- X "''F$ELEMENT(0," ",QFROM)'"
- X$exit:
- X$ ! `20
- X$ ! Mail message so it shows up as new mail from the actual user.
- X$ VACATION := $PMDF_ROOT:`5BEXE`5DVACATION
- X$ VACATION 'f$element(0," ",message_file) "''QFROM'" "''QSUBJECT'"
- $ CALL UNPACK VACATION.COM;4 1815303466
- $ create 'f'
- X! VACATION.DELIVERY`20
- X!`20
- X! Sends a reply saying this user is on vacation. Place this file in your
- X! SYS$LOGIN directory and name it MAIL.DELIVERY. When you do a VACATION/ENA
- VBLE`20
- X! it will send one copy of the reply message contained in the file`20
- X! SYS$LOGIN:VACATION.TXT to each sender, regardless of how many messages the
- Vy
- X! send. This is done by the command procedure PMDF_ROOT:`5BDELIVER`5DVACATI
- VON.COM
- X! which stores the senders's names in the file SYS$LOGIN:VACATION.REPLY.
- X! That file is deleted when you execute VACATION/DISABLE. The subject of th
- Ve
- X! reply message is "Away." This is set in the command procedure`20
- X! PMDF_ROOT:`5BDELIVER`5DVACATION.COM. If you want to specify a different s
- Vubject,
- X! you will have to have your own copy of that file in your SYS$LOGIN directo
- Vry,
- X! and remove the PMDF_ROOT:`5BDELIVER`5D from the reference to that file at
- V the end
- X! of this file so that your copy will be executed instead.
- X!
- X! The following lines select which command procedure to run based on message
- V's
- X! FROM, TO, or SUBJECT. VACATION.COM will send a reply to the user and put
- V the`20
- X! message in your NEWMAIL folder. CONTINUE.COM is similar but avoids sendin
- Vg
- X! a reply. The first line shown here avoids sending a reply to any address
- X! which starts with the string Postmaster (the Postmaster username is usuall
- Vy
- X! used by mail sf in order to alert users that mail that they have sent coul
- Vd`20
- X! not be deliered. Thus, you don't want to send reply messages to them.)
- X! Similarly, you might also want to place lines that avoid replying to maili
- Vng
- X! lists that you are on.
- X!
- X! FROM TO SUBJECT
- X!
- X"Postmaster*" * * T E @PMDF_ROOT:`5BDELIVER`5DCONTINU
- VE.COM
- X *`09 * * O E @PMDF_ROOT:`5BDELIVER`5DVACATIO
- VN.COM
- $ CALL UNPACK VACATION.DELIVERY;4 158149221
- $ create 'f'
- X`09IMPLICIT INTEGER (A-Z)
- X
- X`09INCLUDE '($MAILDEF)'
- X`09INCLUDE '($JPIDEF)'
- X
- X`09EXTERNAL VACATION_MAINCOMMANDS
- X
- X`09EXTERNAL ENABLE_CTRL_EXIT
- X
- X`09COMMON /CTRLY/ CTRLY
- X
- X`09CHARACTER FILE*132,SUBJECT*132,SENDTO*13,FROM*132
- X`09CHARACTER INCMD*274
- X
- X`09COMMON /PRIV/ PROCPRIV,SETPRV
- X`09DIMENSION PROCPRIV(2),SETPRV(2)
- X
- X`09PARAMETER LIB$M_CLI_CTRLY = '2000000'X
- X
- X`09CALL LIB$GET_FOREIGN(INCMD)
- X`09INCMD = 'VACATION '//INCMD
- X`09CALL CLI$DCL_PARSE(INCMD(:TRIM(INCMD)),VACATION_MAINCOMMANDS)
- X
- X`09IF (CLI$PRESENT('ENABLE')) THEN
- X`09 CALL GETUSER(SENDTO)
- X`09 INCMD = 'DELIVER%'//SENDTO(:TRIM(SENDTO))
- X`09 C = 0
- X
- X`09 STATUS = MAIL$USER_BEGIN(C,0,0)
- X`09 IF (.NOT.STATUS) CALL EXIT
- X
- X`09 CALL INIT_ITMLST
- X`09 CALL ADD_2_ITMLST(TRIM(SENDTO)+8,MAIL$_USER_SET_FORWARDING,
- X &`09`09`09 %LOC(INCMD))
- X`09 CALL END_ITMLST(ADDRESS_ITMLST)
- X
- X`09 STATUS = MAIL$USER_SET_INFO(C,%VAL(ADDRESS_ITMLST),0)
- X`09 CALL EXIT
- X`09ELSE IF (CLI$PRESENT('DISABLE')) THEN
- X`09 C = 0
- X
- X`09 STATUS = MAIL$USER_BEGIN(C,0,0)
- X`09 IF (.NOT.STATUS) CALL EXIT
- X
- X`09 CALL INIT_ITMLST
- X`09 CALL ADD_2_ITMLST(0,MAIL$_USER_SET_NO_FORWARDING,0)
- X`09 CALL END_ITMLST(ADDRESS_ITMLST)
- X
- X`09 STATUS = MAIL$USER_SET_INFO(C,%VAL(ADDRESS_ITMLST),0)
- X`09 CALL LIB$DELETE_FILE('SYS$LOGIN:VACATION.REPLY;*')
- X`09 CALL EXIT
- X`09END IF
- X
- X`09CALL CLI$GET_VALUE('FILE',FILE,I)
- X`09CALL CLI$GET_VALUE('FROM',FROM,I)
- X`09CALL CLI$GET_VALUE('SUBJECT',SUBJECT,I)
- X
- X`09CALL DCLEXH(%LOC(ENABLE_CTRL_EXIT))`09`09! Declare exit handler
- X
- X`09CALL LIB$DISABLE_CTRL(LIB$M_CLI_CTRLY,CTRLY)`09! Disable CTRL-Y & -C
- X`09CTRLY = CTRLY .AND. LIB$M_CLI_CTRLY
- X
- X`09CALL INIT_ITMLST`09! Initialize item list
- X`09CALL ADD_2_ITMLST(8,JPI$_PROCPRIV,%LOC(PROCPRIV))
- X`09CALL END_ITMLST(GETJPI_ITMLST)`09! Get address of itemlist
- X
- X`09IER = SYS$GETJPIW(,,,%VAL(GETJPI_ITMLST),,,,) ! Get info
- X`09CALL SYS$SETPRV(%VAL(0),,,SETPRV)`09! Get privileges
- X`09SETPRV(1) = SETPRV(1).AND..NOT.PROCPRIV(1)
- X
- X`09CALL SYS$SETPRV(%VAL(0),SETPRV,,)`09! Disable installed privs
- X
- X`09OPEN (UNIT=1,FILE=FILE,STATUS='OLD',IOSTAT=IER,READONLY)
- X`09CLOSE (UNIT=1)
- X`09IF (IER.NE.0) CALL EXIT
- X
- X`09IER = SYS$SETPRV(%VAL(1),SETPRV,,)
- X`09IER = SYS$SETPRV(%VAL(1),SETPRV,%VAL(1),)
- X
- X`09IF (.NOT.CLI$PRESENT('SPAWN')) THEN
- X`09 CALL LIB$SPAWN('$'//INCMD(:TRIM(INCMD))//'/SPAWN')
- X`09 CALL EXIT
- X`09END IF
- X
- X`09CALL GETUSER(SENDTO)
- X`09SENDTO = '_'//SENDTO
- X
- X`09C = 0
- X
- X`09STATUS = MAIL$SEND_BEGIN(C,0,0)
- X`09IF (.NOT.STATUS) CALL EXIT
- X
- X`09CALL INIT_ITMLST
- X`09CALL ADD_2_ITMLST(TRIM(SENDTO),MAIL$_SEND_USERNAME,%LOC(SENDTO))
- X`09CALL ADD_2_ITMLST(0,MAIL$_NOSIGNAL,0)
- X`09CALL END_ITMLST(ADDRESS_ITMLST)
- X
- X`09STATUS = MAIL$SEND_ADD_ADDRESS(C,%VAL(ADDRESS_ITMLST),0)
- X`09IF (.NOT.STATUS) CALL EXIT
- X
- X`09CALL INIT_ITMLST
- X`09CALL ADD_2_ITMLST(TRIM(SUBJECT),MAIL$_SEND_SUBJECT
- X &`09`09`09`09,%LOC(SUBJECT))
- X`09CALL ADD_2_ITMLST(TRIM(FROM),MAIL$_SEND_FROM_LINE,%LOC(FROM))
- X`09CALL ADD_2_ITMLST(TRIM(SENDTO),MAIL$_SEND_TO_LINE,%LOC(SENDTO))
- X`09CALL ADD_2_ITMLST(0,MAIL$_NOSIGNAL,0)
- X`09CALL END_ITMLST(ATTRIBUTE_ITMLST)
- X
- X`09STATUS = MAIL$SEND_ADD_ATTRIBUTE(C,%VAL(ATTRIBUTE_ITMLST),0)
- X`09IF (.NOT.STATUS) CALL EXIT
- X
- X`09CALL INIT_ITMLST
- X`09CALL ADD_2_ITMLST(TRIM(FILE),MAIL$_SEND_FILENAME,%LOC(FILE))
- X`09CALL ADD_2_ITMLST(0,MAIL$_NOSIGNAL,0)
- X`09CALL END_ITMLST(BODYPART_ITMLST)
- X
- X`09STATUS = MAIL$SEND_ADD_BODYPART(C,%VAL(BODYPART_ITMLST),0)
- X`09IF (.NOT.STATUS) CALL EXIT
- X
- X`09CALL INIT_ITMLST
- X`09CALL ADD_2_ITMLST(0,MAIL$_NOSIGNAL,0)
- X`09CALL END_ITMLST(SEND_ITMLST)
- X
- X`09STATUS = MAIL$SEND_MESSAGE(C,%VAL(SEND_ITMLST),0)
- X`09IF (.NOT.STATUS) CALL EXIT
- X
- X`09STATUS = MAIL$SEND_END(C,0,0)
- X`09IF (.NOT.STATUS) CALL EXIT
- X
- X`09END
- X
- X
- X
- X`09SUBROUTINE DCLEXH(EXIT_ROUTINE)
- X
- X`09IMPLICIT INTEGER (A-Z)
- X
- X`09INTEGER*4 EXBLK(4)
- X
- X`09EXBLK(2) = EXIT_ROUTINE
- X`09EXBLK(3) = 1
- X`09EXBLK(4) = %LOC(EXBLK(4))
- X
- X`09CALL SYS$DCLEXH(EXBLK(1))
- X
- X`09RETURN
- X`09END
- X
- X
- X`09SUBROUTINE ENABLE_CTRL_EXIT
- X
- X`09IMPLICIT INTEGER (A-Z)
- X
- X`09COMMON /PRIV/ PROCPRIV,SETPRV
- X`09DIMENSION PROCPRIV(2),SETPRV(2)
- X
- X`09COMMON /CTRLY/ CTRLY
- X
- X`09CALL SYS$SETPRV(%VAL(0),SETPRV,%VAL(1),)
- X`09CALL SYS$SETPRV(%VAL(1),PROCPRIV,%VAL(1),)
- X
- X`09CALL LIB$ENABLE_CTRL(CTRLY,)`09`09! Renable CTRLY-Y & -C
- X
- X`09RETURN
- X`09END
- X
- X
- XC
- XC ITMLST.FOR
- XC
- XC FUNCTION:
- XC`09A set of routines to easily create item lists. It allows one
- XC to easily create item lists without the need for declaring arrays
- XC or itemlist size. Thus, the code can be easily changed to add or
- XC delete item list codes.
- XC
- XC Here is an example of how to use the routines (prints file to a queue):
- XC
- XC`09CALL INIT_ITMLST`09! Initialize item list
- XC`09`09`09`09! Now add items to list
- XC`09CALL ADD_2_ITMLST(LEN,SJC$_FILE_SPECIFICATION,%LOC(FILENAME))
- XC`09CALL ADD_2_ITMLST(9,SJC$_QUEUE,%LOC(QUEUE))
- XC`09CALL END_ITMLST(SNDJBC_ITMLST)`09! Get address of itemlist
- XC`09IER = SYS$SNDJBCW(,%VAL(SJC$_ENTER_FILE),,%VAL(SNDJBC_ITMLST),IOSB,,)
- XC
- XC NOTE: These routines don't presently allow return length address
- XC in item list.
- XC
- X`09SUBROUTINE ITMLST_SUBS
- X
- X`09IMPLICIT INTEGER (A-Z)
- X
- X`09DATA SAVE_ITMLST_ADDRESS/0/,NUM_ITEMS/0/,QUEUE_HEADER/0/
- X
- X`09ENTRY INIT_ITMLST
- X
- X`09IF (QUEUE_HEADER.EQ.0) THEN`09! First time INIT_ITMLST ever called?
- X`09 CALL LIB$GET_VM(8,QUEUE_HEADER) ! Yes, create queue header pointer
- X`09 CALL LIB$MOVC3(4,0,%VAL(QUEUE_HEADER))`09! Zero out header
- X`09 CALL LIB$MOVC3(4,0,%VAL(QUEUE_HEADER+4))`09! Zero out header
- X`09ELSE IF (SAVE_ITMLST_ADDRESS.GT.0) THEN`09! Clean out old item list
- X`09 CALL LIB$FREE_VM((NUM_ITEMS+1)*12,SAVE_ITMLST_ADDRESS)
- X`09 NUM_ITEMS = 0`09`09! Release old itemlist memory
- X`09 SAVE_ITMLST_ADDRESS = 0
- X`09ELSE`09`09`09`09! ITMLST calls cannot be nested.
- X`09 WRITE (6,'('' ERROR: INIT_ITMLST called before previous'',$)')
- X`09 WRITE (6,'(''+ ITMLST terminated with END_ITMLST.'')')
- X`09 CALL EXIT
- X`09END IF
- X
- X`09RETURN
- X
- X
- X`09ENTRY ADD_2_ITMLST(BUFLEN,CODE,BUFADR)
- XC
- XC ITMLST entries are initially stored in a queue. Each queue entry
- XC needs 8 bytes for pointer + 12 bytes for itemlist info.
- XC
- X`09CALL LIB$GET_VM(20,INPUT_ITMLST)`09! Get memory for entry
- X
- X`09CALL STORE_ITMLST_ENTRY(%VAL(INPUT_ITMLST+8),BUFLEN,CODE,BUFADR,0)
- X`09`09`09`09`09`09! Store data in itemlist format
- X`09CALL LIB$INSQTI(%VAL(INPUT_ITMLST),%VAL(QUEUE_HEADER))
- X`09`09`09`09`09`09! Insert entry into queue
- X`09NUM_ITEMS = NUM_ITEMS + 1`09`09! Increment item count
- X
- X`09RETURN
- X
- X
- X`09ENTRY ADD_2_ITMLST_WITH_RET(BUFLEN,CODE,BUFADR,RETADR)
- XC
- XC ITMLST entries are initially stored in a queue. Each queue entry
- XC needs 8 bytes for pointer + 12 bytes for itemlist info.
- XC
- X`09CALL LIB$GET_VM(20,INPUT_ITMLST)`09! Get memory for entry
- X
- X`09CALL STORE_ITMLST_ENTRY(%VAL(INPUT_ITMLST+8),BUFLEN,CODE,BUFADR,
- X 1`09`09`09`09`09`09`09`09RETADR)
- X`09`09`09`09`09`09! Store data in itemlist format
- X`09CALL LIB$INSQTI(%VAL(INPUT_ITMLST),%VAL(QUEUE_HEADER))
- X`09`09`09`09`09`09! Insert entry into queue
- X`09NUM_ITEMS = NUM_ITEMS + 1`09`09! Increment item count
- X
- X`09RETURN
- X
- X
- X`09ENTRY END_ITMLST(ITMLST_ADDRESS)
- X
- X`09CALL LIB$GET_VM((NUM_ITEMS+1)*12,ITMLST_ADDRESS)
- X`09`09`09`09`09`09! Get memory for itemlist
- X`09SAVE_ITMLST_ADDRESS = ITMLST_ADDRESS`09! Save address to remove memory
- X
- X`09DO I=1,NUM_ITEMS`09`09`09! Place entries into itemlist
- X`09 CALL LIB$REMQHI(%VAL(QUEUE_HEADER),INPUT_ITMLST)
- X`09 CALL LIB$MOVC3(12,%VAL(INPUT_ITMLST+8),
- X &`09`09%VAL(ITMLST_ADDRESS+(I-1)*12))
- X`09 CALL LIB$FREE_VM(20,INPUT_ITMLST)
- X`09END DO
- X
- X`09CALL LIB$MOVC3(4,0,%VAL(ITMLST_ADDRESS+NUM_ITEMS*12))
- X`09`09`09`09`09! Place terminating 0 at end of itemlist
- X
- X`09RETURN
- X`09END
- X
- X
- X
- X`09SUBROUTINE STORE_ITMLST_ENTRY(INPUT_ITMLST,BUFLEN,CODE,BUFADR,
- X 1`09`09`09`09`09`09`09`09RETADR)
- X
- X`09IMPLICIT INTEGER (A-Z)
- X
- X`09STRUCTURE /ITMLST/
- X`09 UNION
- X`09 MAP
- X`09`09 INTEGER*2 BUFLEN,CODE
- X`09`09 INTEGER BUFADR,RETADR
- X`09 END MAP
- X`09 END UNION
- X`09END STRUCTURE
- X
- X`09RECORD /ITMLST/ INPUT_ITMLST(1)
- X
- X`09INPUT_ITMLST(1).BUFLEN = BUFLEN
- X`09INPUT_ITMLST(1).CODE = CODE
- X`09INPUT_ITMLST(1).BUFADR = BUFADR
- X`09INPUT_ITMLST(1).RETADR = RETADR
- X
- X`09RETURN
- X`09END
- X
- X
- X
- X
- X`09SUBROUTINE GETUSER(USERNAME)
- XC
- XC SUBROUTINE GETUSER
- XC
- XC FUNCTION:
- XC`09To get username of present process.
- XC OUTPUTS:
- XC`09USERNAME - Username owner of present process.
- XC
- X
- X`09IMPLICIT INTEGER (A-Z)
- X
- X`09INCLUDE '($PRVDEF)'
- X
- X`09CHARACTER*(*) USERNAME`09`09! Limit is 12 characters
- X
- X`09INCLUDE '($JPIDEF)'
- X
- X`09CALL INIT_ITMLST`09! Initialize item list
- X`09CALL ADD_2_ITMLST(LEN(USERNAME),JPI$_USERNAME,%LOC(USERNAME))
- X`09CALL END_ITMLST(GETJPI_ITMLST)`09! Get address of itemlist
- X
- X`09IER = SYS$GETJPIW(,,,%VAL(GETJPI_ITMLST),,,,) ! Get info
- X
- X`09RETURN
- X`09END
- X
- X
- X
- X
- X`09INTEGER FUNCTION TRIM(INPUT)
- X`09CHARACTER*(*) INPUT
- X`09DO TRIM=LEN(INPUT),1,-1
- X`09 IF (INPUT(TRIM:TRIM).NE.' '.AND.INPUT(TRIM:TRIM).NE.CHAR(0)) RETURN
- X`09END DO
- X`09RETURN
- X`09END
- $ CALL UNPACK VACATION.FOR;26 1363972240
- $ create 'f'
- X1 VACATION
- XVACATION is a utility that is used to configure a user's mail so that when a
- Xmessage is received, a reply message will be automatically sent to the
- Xsender. This is mainly used to tell people that the user is on vacation. To
- Xuse this utility, copy the file PMDF_ROOT:`5BDELIVER`5DVACATION.DELIVERY int
- Vo
- Xyour SYS$LOGIN (or top level) directory and rename it to be MAIL.DELIVERY.`2
- V0
- XThis file is used to determine which mail should be replied to. For
- Xexample, mail messages from mailing lists should be not be replied to. Read
- Xthe comments in that file to see how to do this. `20
- X
- XTo enable automatic replying, first create a file SYS$LOGIN:VACATION.TXT
- Xwhich contains the reply message. Typically this will tell the user that yo
- Vu
- Xare away and when you will be back. It might also mention that the reply
- Xmessage is being automatically generated and that it will be not sent out
- Xagain in response to further messages.
- X
- XThe VACATION command is used to enable and disable automatic replying. It
- Xis defined by the command $VACATION :== $PMDF_ROOT:`5BEXE`5DVACATION. You m
- Vight
- Xwant to place this in your LOGIN.COM.
- X
- XTo enable automatic replying, type the command: `20
- X
- X $ VACATION/ENABLE
- X
- XThis will modify your mail forwarding so that reply messages will be sent.
- X
- XTo disable automatic replying, type the command:
- X
- X $ VACATION/DISABLE`20
- X
- XThis will remove mail forwarding. Also, it will delete the file`20
- XSYS$LOGIN:VACATION.REPLY. This file is created when VACATION is enabled
- Xand when mail is received. It is used to store a list of the names of the
- Xsenders in order not to send more than one reply message to each user.`20
- X
- XThis utility is based on the DELIVER utility. If you want more infomation
- Xon further customizations, read the help on DELIVER.
- $ CALL UNPACK VACATION.HLP;5 1729441038
- $ create 'f'
- X$ LINK VACATION,VACATION_CLD/NOTR/EXE=`5BEXE`5DVACATION
- X$ SET NOON
- X$ MCR INSTALL PMDF_ROOT:`5BEXE`5DVACATION/DELETE
- X$ MCR INSTALL PMDF_ROOT:`5BEXE`5DVACATION/PRIV=(SYSPRV,SETPRV)
- $ CALL UNPACK VACATION.LNK;8 1176580303
- $ create 'f'
- X`09MODULE VACATION_MAINCOMMANDS
- X`09DEFINE VERB VACATION
- X`09`09PARAMETER P1, LABEL=FILE
- X`09`09PARAMETER P2, LABEL=FROM
- X`09`09PARAMETER P3, LABEL=SUBJECT
- X`09`09QUALIFIER DISABLE`20
- X`09`09QUALIFIER ENABLE`20
- X`09`09QUALIFIER SPAWN
- X`09`09DISALLOW (ENABLE OR DISABLE) AND (FILE OR FROM OR SUBJECT)
- X`09`09DISALLOW (ENABLE AND DISABLE)
- $ CALL UNPACK VACATION_CLD.CLD;3 117771735
- $ v=f$verify(v)
- $ EXIT
-
- Mark London
- MRL@NERUS.PFC.MIT.EDU
-