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

Conference vaxcat::friends

Title:Welcome to Friends!
Moderator:POWDML::VENTURA
Created:Mon Mar 09 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:437
Total number of notes:35174

5.0. "Birthday Note" by VAXCAT::RKE () Mon Mar 09 1992 15:16

$!
$!-----------------------------------------------------------------------  
$! BIRTHDAY.COM - By Tom (DR::) Blinn
$!  
$!  This command file will send a birthday greeting (of your choice) to each
$!  person in a birthday list (such as the one contained in note 2 of the
$!  FRIENDS conference) on their birthday.  It assumes that you have NMAIL
$!  on your system; if not, remove the "NM%" in the MAIL command. 
$!  
$!  I've updated it to work correctly on all the days of the month, to
$!  use NMAIL to deliver the greetings (more likely to get through),
$!  to automatically resubmit itself (to run at 1am each day), and to
$!  use just the first name or nickname in the greetings. Also, the
$!  greetings are in a separate file (BIRTHDAY.TEXT), and it expects
$!  the birthday list to be in BIRTHDAY.LIST. 
$!          
$!  If you uncover any glitches, please send mail to DR::BLINN.  
$!-----------------------------------------------------------------------  
$!  You can run this command file interactively, or submit it to batch.
$!  
$!  If you want to watch it run, use "@BIRTHDAY DEBUG".
$!  
$!  If you want to rerun the processing for a given date, use
$!  	"@BIRTHDAY RERUN dd mmm" (or "@BIRTHDAY DEBUG dd mmm")
$!  
$!  If there is no value specified for P1, then the procedure submits itself
$!  to batch to be run again at 1:00AM tomorrow. 
$!  
$!  The greeting to be sent should be in the file BIRTHDAY.TEXT in your
$!  default directory.  If you want the person's name to be included
$!  in the message, include the text "********" (eight asterisks) in
$!  the body of the message, and the name (from the list file) will be
$!  inserted.  If the file isn't there, one is created.
$!  
$!  The birthday list should be in the file BIRTHDAY.LIST in your default
$!  directory.  If the file isn't there, the procedure aborts.
$!          
$    Close/nolog GREETINGS_IN:
$    Close/nolog GREETINGS_OUT:
$    Close/nolog BIRTHDAY_LIST:
$!
$ VFYP = F$ENVIRONMENT("VERIFY_PROCEDURE")
$ VFYI = F$ENVIRONMENT("VERIFY_IMAGE")
$ ON CONTROL_Y THEN GOTO FINISH_UP
$ IF P1 .NES. "DEBUG" THEN SET NOVERIFY
$ IF P1 .EQS. "DEBUG" THEN SET VERIFY
$ THISPROC=F$ENVIRONMENT("PROCEDURE")
$ IF P1 .EQS. "" THEN SUBMIT/NOPRINT 'THISPROC /AFTER="TOMORROW+1:0:0"
$
$    
$! Create BIRTHDAY.TEXT if it doesn't already exist
$
$    TEXT = F$SEARCH("BIRTHDAY.TEXT")
$    IF TEXT .NES. "" THEN GOTO GET_RUN_DATE
$    Create BIRTHDAY.TEXT

	Happy Birthday to you,
	Happy Birthday to you,
	Happy Birthday, dear ********,
	Happy Birthday to you!
    
$ GET_RUN_DATE:
$! Get the birthdate to send messages for, usually today
$ 
$    TODAY   = F$TIME()
$    T_DAY   = F$EXTRACT(0,2,TODAY)
$    T_MONTH = F$EXTRACT(3,3,TODAY)
$    IF P1 .NES. "RERUN" THEN IF P1 .NES. "DEBUG" THEN GOTO NOT_RERUN
$    IF P2 .NES. "" THEN T_DAY = P2
$    IF P3 .NES. "" THEN T_MONTH = P3
$    IF F$LENGTH(T_DAY) .EQ. 1 THEN T_DAY = "0"+T_DAY
$
$ NOT_RERUN:
$
$    IF F$EXTRACT(0,1,T_DAY) .EQS. " " THEN T_DAY = "0"+F$EXTRACT(1,1,T_DAY)
$    T_DATE  = T_MONTH+" "+T_DAY
$    WRITE SYS$OUTPUT "Looking for birthdate: ",T_DATE
$
$! Open the BIRTHDAY.LIST file, create a BIRTHDAY.TEMP file
$
$    Open BIRTHDAY_LIST: BIRTHDAY.LIST
$
$    Create BIRTHDAY.TEMP
$
$ READ_BIRTHDAY_LIST:
$
$    Read/end_of_file=FINISH_UP BIRTHDAY_LIST: BIRTHREC
$
$! Get and test the birthdate from the current record
$
$    B_MONTH := 'F$EXTRACT(0,3,BIRTHREC)
$    B_DAY   := 'F$EXTRACT(4,2,BIRTHREC)
$                                         
$    If B_MONTH.NES.T_MONTH then goto READ_BIRTHDAY_LIST
$    If B_DAY.NES.T_DAY     then goto READ_BIRTHDAY_LIST
$
$! We want to use this one, pull out the name
$
$    OFFSET = F$LOCATE("!",BIRTHREC)
$    LENGTH = F$LENGTH(BIRTHREC)
$    IF OFFSET .EQ. LENGTH THEN GOTO NO_NAME
$    OFFSET = OFFSET + 2
$    LENGTH = LENGTH - OFFSET
$    NAME = F$EXTRACT(OFFSET,LENGTH,BIRTHREC)
$! We have the name, see if there's a nickname (in parentheses)
$    LP = F$LOCATE("(",NAME)
$    RP = F$LOCATE(")",NAME)
$    IF LP .LT. RP THEN GOTO NICKNAME
$! No nickname, see if there's a firstname/lastname (embedded space)
$    SP = F$LOCATE(" ",NAME+" ")
$    NAME = F$EXTRACT(0,SP,NAME)
$    GOTO EXTRACT_ADDRESS
$
$ NICKNAME:
$    LP = LP + 1
$    NAME = F$EXTRACT(LP,RP-LP,NAME)
$    GOTO EXTRACT_ADDRESS
$
$ NO_NAME:
$    NAME = "Mystery Guest"
$
$ EXTRACT_ADDRESS:
$    B_ADDRESS = F$EXTRACT(7,99,BIRTHREC)+" "
$    SPACE = F$LOCATE(" ",B_ADDRESS)
$    HT[0,7] = 9
$    TAB = F$LOCATE(HT,B_ADDRESS)
$    IF TAB .LT. SPACE THEN SPACE = TAB
$    B_ADDRESS = "''F$EXTRACT(0,SPACE,B_ADDRESS)'"
$
$ ALTER_GREETINGS:
$    Open/read  GREETINGS_IN:  BIRTHDAY.TEXT
$    Open/write GREETINGS_OUT: BIRTHDAY.TEMP
$
$ READ_GREETINGS_IN:
$    Read/end_of_file=CLOSE_GREETINGS GREETINGS_IN: GREETINGS_REC
$
$    LENGTH = F$LENGTH(GREETINGS_REC)
$    OFFSET = F$LOCATE("********",GREETINGS_REC)
$
$    If OFFSET.EQS.LENGTH then goto WRITE_GREETINGS_OUT
$
$    GREETINGS_LEFT  = F$EXTRACT(0,OFFSET,GREETINGS_REC)
$    OFFSET = OFFSET + 8
$    REST   = LENGTH - OFFSET
$    GREETINGS_RIGHT = F$EXTRACT(OFFSET,REST,GREETINGS_REC)
$
$    GREETINGS_REC := "''GREETINGS_LEFT'''NAME'''GREETINGS_RIGHT'"
$
$ WRITE_GREETINGS_OUT:
$
$    Write GREETINGS_OUT: GREETINGS_REC
$    Goto READ_GREETINGS_IN
$         
$ CLOSE_GREETINGS:
$
$    Close/nolog GREETINGS_IN:
$    Close/nolog GREETINGS_OUT:
$
$ MAIL_BIRTHDAY_GREETINGS:
$
$    B_ADDRESS = "NM%"+B_ADDRESS
$    MAIL/NOEDIT/SUBJ="Happy Birthday" BIRTHDAY.TEMP 'B_ADDRESS 
$    Goto READ_BIRTHDAY_LIST
$
$ FINISH_UP:
$
$    Close/nolog BIRTHDAY_LIST:
$    Delete BIRTHDAY.TEMP;*
$    Temp = F$VERIFY(VFYP,VFYI)
$    Exit 1
$

T.RTitleUserPersonal
Name
DateLines
5.3About BIRTHDAY.COM, BIRTHDAY.LIST & BIRTHDAY.TEXTMEOC02::CASEYMEO78B::CASEY 4 chattin'Fri Oct 08 1993 03:2818
    Does everyone really understand how the Birthday DCL procedure
    operates? If you've set it up properly in your account, then every day
    at 1am, wherever you are located, the system automatically generates
    birthday greetings in accordance with your instructions. The process,
    once initially set to work, is completely automatic ..and you never
    need remember to send a mail to congratulate somebody on their birthday
    again .. the system does it for you all by itself.
    
    Over the past couple of days I've been testing its operation, because
    I must admit, even *I* had gotten it wrong and had not set it up
    correctly. And it just occurs to me that others might similarly not
    fully understand how it functions. It really is a GREAT facility so if
    you feel you need some more advice about how it can really work
    properly for you, I'll be happy to advise you accordingly. Please
    simply drop me a line..
    
    Don
    *8-)
5.4SNOC02::CASEYChat on VAXphone=SNOV20::CASEYSat Mar 05 1994 15:369
    In order to minimise the unnecessary replies to this topic - which
    waste valuable time for the mod who sets out to update the Birthday
    List - should you wish to add/modify/delete information to/on/from the
    list, please send mail to one of the mods. For information as to WHO
    are the mods and what are there mail addresses, please do a SHOW
    MOD<return> at the "Notes." prompt above.
    
    Don
    *8-)
5.5BIRTHDAY.NOTEMEOC02::CASEYA legend in 'is own lunchwrap!Wed Jun 15 1994 16:53218
5.6MEOC02::CASEYDon, DTN 739 3414Sun Nov 27 1994 10:2614
    Re .5
    
    I've mailed everyone individually on this list. It's amazing but VERY
    FEW of the listed names are relevant today, since there's been
    significant restructuring of Digital, as we're all aware.
    
    It's encumbent on recipients of my mail to reply in order to be added
    back onto the list. I am also going to test if this facility will
    handle VAXmail-type Internet mail addresses too.
    
    Many thanks,
    
    	Don
    
5.7It's amazing what a survey can tell one!MEOC02::CASEYDon, DTN 739 3414Sun Nov 27 1994 16:098
    Re .5
    
    I've now set the list as hidden.. simply because 1 or 2 have already
    indicated amazement that their names had somehow found their way onto
    the list at all.
    
    Don
    *8-)
5.8CHEFS::WARRENJSun Nov 27 1994 19:5213
    
    re. 6
    
    I didn't receive any mail..now its either 
    
    1  coz my mail account has been playing up
    2  I'm getting too old for birthdays (not yet!)
    3  You forgot about me (sniff)
    
    Lets hope it was no 1!
    
    Jackie
    
5.9FWIW Jackie.. here's a symptom.. MEOC02::CASEYDon, DTN 739 3414Mon Nov 28 1994 13:1625

                  I N T E R O F F I C E   M E M O R A N D U M

 Digital Equipment Corporation          Date:     27-Nov-1994 22:54 AED
 (Australia) Pty. Limited               From:     Mail Postmaster
 A.C.N. 000 446 800                               POSTMASTER
                                        Dept:     
                                        Tel No:   

TO:  DON CASEY                            ( CASEY DONALD )


Subject: Delivery Failure Report

    ALL-IN-1 was unable to deliver your message dated 27-Nov-1994 22:54 to

      __wendys::warrenj

          - Recipient has invalid alternate MTS address;

    on node MEO78B

    The subject of the message was :
      The network.. she is SICK!!