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

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

1096.0. "Who is receiving me?" by SNOC01::HOLLING () Wed Jul 22 1992 08:28

    Folks,
    
       This question may well be answered in some V3.0 documentation
    elsewhere but I haven't got the time to wade through it all. My 
    apologies up front for being so lazy...
    
       I have a problem where by I'd like to create an Index of messages
    based on recipient. The V2.4 index form allows quite a number of
    selection criteria (folder, date, status, author) but nothing by
    recipient. How can I find out what I've sent to someone (in case I
    need to check the date or title, for example)? 
    
       Does V3.0 have a search by recipient capability? Can this be done
    in V2.4 somehow or will I have to write a UDP?
    
    Thanks in advance,
    Kerry.
T.RTitleUserPersonal
Name
DateLines
1096.1IOSG::WDAVIESThere can only be one ALL-IN-1 MailWed Jul 22 1992 11:4810
    This can be RATHER timeconsuming because it would entail searchin every
    SDAF entries TO and CC list (not too mention messy :-).
                                                          
    I modified mine to search by *FIRST* recipient on OUTBOX as this is
    held in the CAB$ dataset.                             
                                                          
    To do it just switch the named data on author to do the appropriate thing.
    if folder eqs "outbox".                               
                                                          
    Winton
1096.2Useful??LARVAE::JORDANChris Jordan, TSE - Technology Services, End-User ComputingThu Jul 23 1992 13:54108
    No need for you to write a UDP.... I have one already!!
    
    Is it quick - NO.
    
    Does it  work - Probably!! :-)
    
    It searches your File Cabinet (its best to specify a folder to limit
    the search) and finds all messages sent TO or CC to someone.... that is
    not just the ones you have sent, but ones other people might have sent
    that you also have a copy of...
    
    It puts the results in your scratch pad.....
    
!FC_TO_WHO
! Searches the whole File Cabinet, looking for all memos addressed (TO and 
! CC) to a particular user....
! THIS IS NOT QUICK TO RUN!!
!
!
.FX PROMPT "Enter Name (or location) to search for: "
.IF OA$PROMPT_DISPOSE EQS 0 THEN .GOTO END
.IF OA$PROMPT_TEXT EQS "" THEN .GOTO END
.FX GET #USER = OA$PROMPT_TEXT

.FX PROMPT "Enter folder, or <RETURN> for all folders: "
.IF OA$PROMPT_DISPOSE EQS 0 THEN .GOTO END
.IF OA$PROMPT_TEXT EQS "" THEN .GOTO ALL_FOLDERS

!
! Open the scratch pad for writing...
!
.FX 	TEXT_FILE OPEN/WRITE #FILE "paste.tmp"
.FX 	GET #LINE = " FOLDER                       TITLE" -
	"                        DOCNUM  CREATED"
.FX 	TEXT_FILE WRITE #FILE #LINE
.FX 	GET OA$FUNCTION = "DISPLAY Searching " OA$PROMPT_TEXT " folders. " -
	" Could take some time! . . . "
.FX 	FORCE
.FX	GET #A = 0
!
! Now for the major loop...
!
! Can make this search quicker by only searching a few folders...
!	(N.B. saying .FOLDER = "gas" says search for all folders that 
!	START WITH gas), 
! Also can make the final list shorter, by only searching for mail messages 
! that you have sent... 
! Do this by replacing the next (non-commented) line with various 
! others Like:
! .FX 	FOR CAB$ WITH .FOLDER = "gas" DO -
! .FX 	FOR CAB$ WITH .MAIL_STATUS = "SENT" DO - 
! .FX	FOR CAB$ WITH .FOLDER = "gas" AND .MAIL_STATUS = "SENT" DO -
!.FX  FOR CAB$ DO -
!
.FX	FOR CAB$ WITH .FOLDER = OA$PROMPT_TEXT DO -
	GET #LINE = .FOLDER:27 " " .TITLE:30 " " .DOCNUM " " .CREATED:11 \\ -
	FOR FIRST CAB$ATTRIBUTES:"TO" WITH .VALUE <=> #USER DO -
		GET #A = 1 \\ -
	FOR FIRST CAB$ATTRIBUTES:"CC" WITH .VALUE <=> #USER DO -	
		GET #A = 1 \\ -
	.IF #A = 1 THEN TEXT_FILE WRITE #FILE #LINE \\ -
	GET #A = 0

!
! The above lines look through the required section of the File Cabinet.
! For each document it saves the details (folder, title etc).
! Then it looks through the TO and CC to see if we need this document.
! If so, it writes it out to the file...
!
! Again it could be speeded up by removing the lines:
!	FOR FIRST CAB$ATTRIBUTES:"CC" WITH .VALUE <=> OA$PROMPT_TEXT DO -																						       
!		GET #A = 1 \\ -
!
!
! Having done all the search, display the scratch pad to the user...
!
.FX 	TEXT_FILE CLOSE #FILE
.FX 	LIST PASTE.TMP
.FX	DISPLAY The list of documents is in your Scratch Pad
.GOTO	END

.LABEL ALL_FOLDERS
.FX YESNO_PROMPT "This could take some time, are you sure [Y/N]? "
.IF OA$PROMPT_TEXT = "Y" THEN .GOTO OK
.GOTO END
.LABEL OK
.FX	FOR CAB$ DO -
	GET #LINE = .FOLDER:27 " " .TITLE:30 " " .DOCNUM " " .CREATED:11 \\ -
	FOR FIRST CAB$ATTRIBUTES:"TO" WITH .VALUE <=> #USER DO -
		GET #A = 1 \\ -
	FOR FIRST CAB$ATTRIBUTES:"CC" WITH .VALUE <=> #USER DO -	
		GET #A = 1 \\ -
	.IF #A = 1 THEN TEXT_FILE WRITE #FILE #LINE \\ -
	GET #A = 0
!
! Having done all the search, display the scratch pad to the user...
!
.FX 	TEXT_FILE CLOSE #FILE
.FX 	LIST PASTE.TMP
.FX	DISPLAY The list of documents is in your Scratch Pad
.GOTO	END

.LABEL END
.FX 	OA$FLD_STAY
.EXIT