| 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 |
Programming Question Using ALL-IN-1 V3.0 on VMS V5.5-1.
I have created an INDEX form which accesses a RMS Indexed file. On the
INDEX form I have the standard ALL-IN-1 options (C,E,D,R,P, etc) which
work fine.
I wanted to create a XE option. The XE option works, but does not
update the information on the INDEX form. I looked for examples in
ALL-IN-1. All the subsystems that you would think to have a XE option
do not. For example, DIR PER I. I found that some TM Tasks call A
~~RE_INIT~~ which I could not find.
So then I thought I would create a loop and execute OA$SCL_UPDATE on
each line of the scrolled region. The following code only updates the
first record on the screen. Can anyone see something wrong with the
following code? Even better... How about a working example??
;;OA$_MO_X_EDIT;; XE
XOP "~~CHECK_SELECTIONS~~"\IFSTATUS\
GET #RFA=''\
.FX
NEXT_SELECTED "*SPR",#RFA\\
IFSTATUS\\
GET #SPR_NUMBER=*SPR.%KEY[#RFA]\\
XOP "~~CHECK_N_EDIT_SPR~~"\\
IFEXIT\\
REPEAT\
XOP "~~UPDATE_SCROLL~~"
;;~~CHECK_N_EDIT_SPR~~;;
IF #SPR_SA EQS "Y"
THEN
FORM SPR/SAVE_START=#SPR_NUMBER/MODE=CHANGE/ONCE/DATA=*SPR\\
CLOSE_PRIOR
ELSE
IF SPR.SPR$ASSIGNED_TO[#SPR_NUMBER] EQS OA$USER
THEN
FORM SPR/SAVE_START=#SPR_NUMBER/MODE=CHANGE/ONCE/DATA=*SPR
/FIELD=SPR$TOT_HRS,SPR$DMR_YN,SPR$D1,SPR$D2,SPR$D3,SPR$D4
,
SPR$D5,SPR$D6,SPR$D7,SPR$D8,SPR$D9,SPR$D10,
SPR$CLOSED_BY,SPR$CLOSED_DATE\\\\
CLOSE_PRIOR
ELSE
GET #PROMPT_TEXT="Unauthorized to EDIT SPR #"\\\\
GET #PROMPT_TEXT=#PROMPT_TEXT #SPR_NUMBER:2 "-" #SPR_NUMBER:5:2
"."\\\\
GET #PROMPT_TEXT=#PROMPT_TEXT " Press <RETURN> to continue."\\\\
PROMPT #PROMPT_TEXT
;;~~UPDATE_SCROLL~~;;
GET #SAVE = LINE\
OA$SCL_TOP\
.FX
OA$SCL_UPDATE\\
OA$SCL_RETURN\\
IFSTATUS\\
REPEAT\
OA$SCL_REFRESH\
OA$SCL_GOTO #SAVE
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 1775.1 | An example | CESARE::EIJS | All in 1 Piece | Fri Nov 13 1992 08:12 | 66 |
Hi,
Why not try to update theIndex for the *SPR record right after the
change. It will be marked for update, and a final REFRESH does the
trick. Check the following example (taken from CM$INDEX$OPTIONS$MENU):
;;CM$_MO_X_EDIT;; XE
XOP "~~CHECK_SELECTIONS~~"\IFSTATUS\
GET OA$STATUS = 1\
.IF $CM_CONFIRM THEN
YESNO_PROMPT CM$_IND_XED,CM$_YESNO\\
OA$FLD_STAY\\
.IF OA$PROMPT_DISPOSE NE 2 THEN GET OA$STATUS = 0\
IFSTATUS\
GET #CM_I_OPT_TITLE = CM$_IND_EDITED\
GET #CM_FILEOP = "EDIT"\
XOP "~~MULTIPLE_FILING_LOOP~~"
\GET #CM_INDEX_DISPLAY = ""
;;~~MULTIPLE_FILING_LOOP~~;;
GET #CM_INDEX_MULTI_OPTION = 1\
GET OA$DISPLAY = #CM_REFRESH_MESSAGE = CM$_GBL_WORKING\FORCE\
.IF #CM_FILEOP EQS "MOVE_SAME" THEN
GET #CM_RFA = #CM_FIRST_RFA\\
COMPUTE #CM_X_COUNT = 1
ELSE
GET #CM_RFA = ""\\
COMPUTE #CM_X_COUNT = 0\
XOP "~~MULTIPLE_LOOP~~"\
CLOSE_PRIOR\
!X ------
OA$SCL_REFRESH \
!X ------
OA$FLD_STAY\
GET #CM_INDEX_MULTI_OPTION = 0\
.IF #CM_X_COUNT GT 1
THEN OA$FAO CM$_IND_SOME_ELE,"OA$DISPLAY",#CM_X_COUNT,#CM_I_OPT_TITLE
ELSE .IF #CM_X_COUNT EQ 1 THEN
OA$FAO CM$_IND_ONE_ELE,"OA$DISPLAY",#CM_I_OPT_TITLE ELSE
OA$FAO CM$_IND_NO_ELE,"OA$DISPLAY",#CM_I_OPT_TITLE
;;~~MULTIPLE_LOOP~~;;
NEXT_SELECTED OA$SCROLL_DATA_SET,#CM_RFA\
IFSTATUS\
GET #CM_KEY = *CM_INDEX.%KEY[#CM_RFA]\
CLOSE_PRIOR\GET #CM_I_STATUS = 0\
GET OA$FUNCTION="XOP '~~MULTIPLE_" #CM_FILEOP "~~'"\
!X ------
OA$SCL_UPDATE #CM_RFA,#CM_RFA\
!X ------
IFEXIT\
CLOSE_PRIOR\
.IF #CM_STATUS THEN COMPUTE #CM_X_COUNT = #CM_X_COUNT + 1\
.IF #CM_STATUS NE 1 AND #CM_I_STATUS = 0 THEN XOP
"~~TEST_FOR_X_ERROR~~"\
IFSTATUS\
REPEAT
Ciao,
Simon
| |||||