| 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 |
hi -
i have this do script that isn't working quite right. i can't decifer
the problem from a trace. so, if anyone can help....
the idea behind the script is the customer wants a customized forward
function. it weill be a menu option that the user will invoke
themselves. it will bring up a form with 5 fields:
forward_to forward_begin_date forward_begin_time
forward_end_date forward_end_time
the values for these fields will be passed to a command procedure. this
.com will submit a batch job that will be run at specific times during
the day. the .com will enter ALL-IN-1 by:
ALLIN1/NOINIT/REENTER
OA$INI_INIT
DO my_forward_script
this is my_forward_script:
.LABEL START
MAIL INITIALIZE
CAB GET_PENDING "MAIL", "UNREAD"
FOR CAB$:FOLDER WITH .FOLDER = "INBOX" DO
CABINET CHANGE_ATTRIBUTE ,"STATUS","UNREAD","READ"
MAIL FORWARD $FORWARD_TO /NOEDIT
CABINET DECREMENT_COUNT "MAIL"
CABINET REFILE_DOCUMENT ,"FORWARDED MAIL FOLDER"
.EXIT
the problems that i notice are:
1. it uses whatever is in the current item box, not the INBOX message.
2. the cab change_attribute is having problems.
it appears to work because the message gets send to the new
address with a status of SENT, but when i look at the trace, i keep
get errors such as:
Your current document cannot be established
>> is this because it wasn't in the current item block?
You cannot send an UNREAD message, please READ it first
>> shouldn't the CABINET CHANGE_ATTRIBUTE change this?
thanks for the support! - ann
below is part of the trace -
1323 ! [SCP/TRACE] << forward_3m 0008
1323 ! Text DSAB Name: TXT$TXL_DO Requests :GET_NEXT
1323 ! [SCP/TRACE] FOR CAB$:FOLDER WITH .FOLDER = "INBOX" DO <<forward_3m
1323 ! %OA-I-LOGFUN, Function: FOR CAB$:FOLDER WITH .FOLDER = "
1324 ! GET Symbol: "INBOX"
1324 ! Value: INBOX
1324 ! DSAB Name: DOCDB Requests : LOCATE
1324 ! DSAB Name: DOCDB Requests :GET_NEXT
1325 ! Text DSAB Name: TXT$TXL_DO Requests :GET_NEXT
1325 ! [SCP/TRACE] CABINET CHANGE_ATTRIBUTE ,"STATUS","UNREAD","READ" << fo
1325 ! %OA-I-LOGFUN, Function: CABINET CHANGE_ATTRIBUTE ,"STATUS","
1325 ! GET Symbol:
1325 ! Value:
1325 ! GET Symbol: "STATUS"
1325 ! Value: STATUS
1325 ! GET Symbol: "UNREAD"
1325 ! Value: UNREAD
1326 ! GET Symbol: "READ"
1326 ! Value: READ
1326 ! %OA-I-LOGERROR, %OA-W-CAB_NEED_CURDOC,Your current document can not
1326 ! Text DSAB Name: TXT$TXL_DO Requests :GET_NEXT
1326 ! [SCP/TRACE] MAIL FORWARD $FORWARD_TO /NOEDIT << forward_3m 0011
1326 ! %OA-I-LOGFUN, Function: MAIL FORWARD $FORWARD_TO/NOEDIT
1327 ! DSAB Name: DOCDB Requests : UNLOCK
1327 ! DSAB Name: DOCDB Requests :GET_BY_KEY
1327 ! DSAB Name: DOCDB Requests : UNLOCK
1328 ! GET Symbol: $FORWARD_TO
1328 ! Value: HARRIS, ANN @A1 @ORION
1328 ! DSAB Name: NIENTR Requests :GET_BY_KEY
1328 ! DSAB Name: PROFIL Requests :GET_BY_KEY
1328 ! DSAB Name: PROFIL Requests :GET_BY_KEY
1329 ! DSAB Name: NETWORK Requests :GET_BY_KEY
1329 ! DSAB Name: NETWORK Requests :GET_BY_KEY
1331 ! DSAB Name: DOCDB Requests :GET_NEXT
1332 ! DSAB Name: DOCDB Requests : UNLOCK
1334 ! DSAB Name: CAB$PDAF Requests :PUT_RECORD
1334 ! DSAB Name: DOCDB Requests :PUT_RECORD
1335 ! DSAB Name: DOCDB Requests : UNLOCK
1335 ! DSAB Name: CAB$PDAF Requests : UNLOCK
1335 ! DSAB Name: DOCDB Requests :GET_BY_KEY
1335 ! DSAB Name: PROFIL Requests :GET_BY_KEY
1336 ! DSAB Name: CAB$PDAF Requests :GET_BY_KEY
1336 ! DSAB Name: DOCDB Requests : UPDATE
1338 ! DSAB Name: CAB$PDAF Requests : UPDATE
1341 ! Text DSAB Name: TXT$MAIL_MESSAGE Requests :OPEN
1343 ! Text DSAB Name: TXT$MAIL_MESSAGE Requests :CLOSE
1343 ! DSAB Name: DOCDB Requests : UNLOCK
1343 ! DSAB Name: CAB$PDAF Requests : UNLOCK
...
1376 ! Text DSAB Name: TXT$TXL_DO Requests :GET_NEXT
1376 ! [SCP/TRACE] CABINET DECREMENT_COUNT "MAIL" << forward_3m 0012
1377 ! %OA-I-LOGFUN, Function: CABINET DECREMENT_COUNT "MAIL"
1377 ! GET Symbol: "MAIL"
1377 ! Value: MAIL
1377 ! DSAB Name: CAB$PENDING Requests :GET_BY_KEY
1377 ! DSAB Name: CAB$PENDING Requests : UPDATE
1377 ! DSAB Name: CAB$PENDING Requests : CLEAR
1378 ! Text DSAB Name: TXT$TXL_DO Requests :GET_NEXT
1378 ! [SCP/TRACE] CABINET REFILE_DOCUMENT ,"FORWARDED MAIL FOLDER"
<< forw
1378 ! %OA-I-LOGFUN, Function: CABINET REFILE_DOCUMENT
,"FORWARDED
1378 ! GET Symbol:
1378 ! Value:
1378 ! GET Symbol: "FORWARDED MAIL FOLDER"
1378 ! Value: FORWARDED MAIL FOLDER
1378 ! GET Symbol:
1378 ! Value:
1378 ! DSAB Name: DOCDB Requests : DELETE
1379 ! DSAB Name: DOCDB Requests : DELETE
1379 ! DSAB Name: DOCDB Requests :PUT_RECORD
1380 ! Text DSAB Name: TXT$TXL_DO Requests :GET_NEXT
1380 ! [SCP/TRACE] .EXIT << forward_3m 0014
1380 ! [SCP/CLOSE] forward_3m << forward_3m 0014
1380 ! *** FX nesting level: 0
1380 ! line** SCRIPT-script ***********script_file
1380 ! line*** DO script **************script_file
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 733.1 | more, can you believe it! | NCPROG::HARRIS | oooppps | Wed May 20 1992 22:18 | 10 |
re .1
Naturally, i forgot somethings-
ALL-IN-1 2.4 no patches
also the loop doesn't work, if there is more than 1 message in the
INBOX, it only looks at the 1 in the current item block.
thanks again - ann
| |||||
| 733.2 | Sell 'em APA.... We need the $$$... | SHALOT::CREAMER | Keep a low profile | Thu May 21 1992 04:31 | 37 |
Ann,
First, I feel obligated to mention that ALL-IN-1 Personal Assistant
would easily do this and MORE!!!
Now, with that said, you might look at the following _UNTESTED_
script. It might not be completely right but, hopefully, it'll be
a start.
HTH,
Jack
.LABEL START
MAIL INITIALIZE
CABINET GET_PENDING "MAIL",#UNREADFOLDER
FOR CAB$:FOLDER WITH .FOLDER EQS #UNREADFOLDER -
AND .FORWARDABLE NES OA$NO DO -
GET #OLD_PROMPT = $NEW_FOLDER_PROMPT -
\\GET $NEW_FOLDER_PROMPT = OA$N -
\\CABINET REFILE_DOCUMENT .%KEY,#UNREADFOLDER,#READFOLDER -
\\CABINET CHANGE_ATTRIBUTE -
.%KEY,"MAIL_STATUS",OA$MAIL_UNREAD,OA$MAIL_READ -
\\CABINET CHANGE_ATTRIBUTE .%KEY,"DELETE",OA$N,OA$Y -
\\CABINET DECREMENT_COUNT "MAIL" -
\\GET $NEW_FOLDER_PROMPT = #OLD_PROMPT -
\\GET #NEW_KEY = #READFOLDER:30 .%KEY:6:30 -
\\MAIL GET #NEW_KEY -
\\IFSTATUS -
\\GET #TITLE = OA$CURDOC_TITLE -
\\MAIL FORWARD $FORWARD_TO /NOEDIT/NOSEND/OPEN -
\\MAIL EXPAND_DIST_LIST -
\\MAIL SUBJECT #TITLE -
\\MAIL CLOSE_MESSAGE -
\\MAIL SEND
.EXIT
| |||||