| as my personal name says - oooopps
this note should have read -
when a user types GPC to access group conferencing, they want to
have their conferences UPDATED automatically. i've got the function to
call, but how do i pass the list of conferences in a users notebook to
the function?
ann - thanks!
|
| As an aside, I was asked at DECUS whether or not there was any way that
users could receive automatic notifications about unseen notes in
conferences. I hate going to DCL for anything, especially now that you
don't have to very much in V3.0, so some delightful hours were occupied
in the campground building the following set of code to be used with
the ALL-IN-1 script symbiont.
There is:
- NOTES_SCAN.SCP
- NOTES_LIST_UNSEEN.SCP
- NOTES_SCAN_UNSEEN.BLP
- NOTES_SCAN_UNSEEN_HDR.BLP
Note the <LF> in NOTES_SCAN_UNSEEN_HDR.BLP. This divides the header and
footer information in the boilerplate.
Submit them to the symbiont as follows:
SUBMIT_SCRIPT (SCRIPT="NOTES_SCAN.SCP", P1 = OA$USER)
You should (!?) receive back a listing of unseen notes in all the
conferences in your notebook.
Enjoy,
Tony
!+
! NOTES_SCAN.SCP
!+
.LABEL START
! Initialize ALL-IN-1
OA$INI_INITIALIZE
GET #OAN_CONF_COUNT = #OAN_CONF_ERRORS = #OAN_NO_NOTES = 0
! Initialize connection to VAX Notes
NOTES INITIALIZE\OA$MSG_PURGE
.IF OA$STATUS EQ 0 THEN .GOTO CANT_OPEN_NOTEBOOK
! Open a temporary file to log errors in, and write some lines out
TEXT_FILE OPEN ERR_FILE "OA$TEMP:OAN_NOTES_CONF_ERRORS.TMP"/WRITE
TEXT_FILE WRITE ERR_FILE ""
TEXT_FILE WRITE ERR_FILE "Listing of Unseen Notes - Messages from scan"
TEXT_FILE WRITE ERR_FILE "--------------------------------------------"
TEXT_FILE WRITE ERR_FILE ""
! Scan down through the notebook and execute a script to produce the
! unseen listing for each one
FOR OAN$ENTRY DO DO OA$DO:NOTES_LIST_UNSEEN
! Close off the temporary file
TEXT_FILE CLOSE ERR_FILE
! Append the temporary file to our mail message if it contains
! anything interesting
.IF (#OAN_CONF_ERRORS > 0) OR (#OAN_NO_NOTES > 0)
.THEN
APPEND "OA$TEMP:OAN_NOTES_CONF_ERRORS.TMP" -
"OA$TEMP:OAN_NOTES_SCAN_UNSEEN.TMP"
.END_IF
DELETE_FILE OA$TEMP:OAN_NOTES_CONF_ERRORS.TMP
! Mail the user with the result
.TEXT "Sending mail to " OA$SMB_PARAMETER_1
CABINET SET_DRAWER OA$MAIL_DRAWER
MAIL INITIALIZE
MAIL PUSH
MAIL CREATE/NOSEND/OPEN/TEMPLATE = OA$TEMP:OAN_NOTES_SCAN_UNSEEN.TMP
MAIL TO OA$SMB_PARAMETER_1
MAIL SUBJECT "Extract of Unseen notes at " OA$TIME " on " OA$DATE_FULL
MAIL CLOSE_MESSAGE
MAIL SEND
CABINET REFILE_DOCUMENT , OA$WASTEBASKET
MAIL POP
.LABEL ALL_COMPLETE
! Clean up
DELETE_FILE OA$TEMP:OAN_NOTES_SCAN_CONF.TMP
DELETE_FILE OA$TEMP:OAN_NOTES_SCAN_UNSEEN.TMP
.TEXT "Job Complete. " #OAN_CONF_COUNT " conferences scanned."
FORCE
.EXIT
.LABEL CANT_OPEN_NOTEBOOK
DISPLAY Unable to open user notebook
.EXIT
!
! Author: Tony Redmond
!
! Modified by: | Date: | Reason:
!-----------------------------------------------------------------------------
! Tony Redmond | 12-May-1992 01:40pm | Element created
!+
! NOTES_LIST_UNSEEN.SCP
!+
.LABEL START
! Some information...
GET #OAN_CLASS = .CLASS\GET #OAN_ENTRY = .ENTRY
.TEXT "Processing conference " #OAN_ENTRY " in class " #OAN_CLASS
FORCE
! Dump the user's notebook, just to make sure that everything is
! updated correctly
DUMP_CACHE OAN$ENTRY
! Delete any older extracts that might be hanging around
DELETE_FILE OA$TEMP:OAN_NOTES_SCAN_CONF.TMP
! Open the new conference to be processed
NOTES OPEN #OAN_ENTRY
.IF OA$STATUS EQ 0 THEN .GOTO OPEN_FAILURE
! Successful open. Now update the conference to get a new unseen
! count
NOTES UPDATE OA$NOTES_ENTRY_NAME, OA$NOTES_ENTRY_CLASS\OA$MSG_PURGE
INCREMENT (#OAN_CONF_COUNT)
! If we have some unseen notes we'll perform the merge, else we
! will write a line out to our errors file.
.IF OA$NOTES_ENTRY_TOTAL_UNSEEN > 0
.THEN
MERGE NOTES_SCAN_UNSEEN.BLP, OA$TEMP:OAN_NOTES_SCAN_CONF.TMP, , -
NOTES_SCAN_UNSEEN_HDR.BLP
.ELSE
GET #OAN_LINE = "No unseen notes in conference " #OAN_ENTRY
TEXT_FILE WRITE ERR_FILE #OAN_LINE
INCREMENT (#OAN_NO_NOTES)
.END_IF
.LABEL COPY_OR_APPEND
! First time though copy the file that we've produced, thereafter
! append it to the final output.
.IF #OAN_CONF_CONF EQ 1
.THEN
COPY "OA$TEMP:OAN_NOTES_SCAN_CONF.TMP" -
"OA$TEMP:OAN_NOTES_SCAN_UNSEEN.TMP"
.ELSE
APPEND "OA$TEMP:OAN_NOTES_SCAN_CONF.TMP" -
"OA$TEMP:OAN_NOTES_SCAN_UNSEEN.TMP"
OA$MSG_PURGE
.END_IF
.EXIT
.LABEL OPEN_FAILURE
! Handle any open errors
INCREMENT (#OAN_CONF_ERRORS)
GET #OAN_TEXT_LINE = "Error opening conference " OA$_NOTES_ENTRY_NAME
GET OA$DISPLAY = #OAN_TEXT_LINE \ FORCE
GET #OAN_STATUS = 0
TEXT_FILE WRITE ERR_FILE #OAN_TEXT_LINE
.EXIT
!
! Author: Tony Redmond
!
! Modified by: | Date: | Reason:
!-----------------------------------------------------------------------------
! Tony Redmond | 12-May-1992 01:29pm | Element created
<&OA FOR OAN$NOTE WITH .SEEN EQS OA$N AND .RSE_RANGE = "*.*" DO <->
< GET OA$MERGE_LINE = .ID:8 <&tab 9> .AUTHOR:22 <&tab 32> .TITLE:36 " " .CREATED:11>
--------------------------------------------------------------------------------
End of Unseen notes for conference: <#OAN_ENTRY>
<&page>
List of Unseen notes in conference: <#OAN_ENTRY>
at <OA$TIME> on <OA$DATE_FULL>
--------------------------------------------------------------------------------
|