Triggers would be nice, but the'd have to work on type19 files.
Modifying ED is simple, but you might want to wrap other verbs, so
generalized wrapper pgm is good. Protect the vanilla versions of ED,
DELETE, UPDATE.RECORD, REVISE as 'remote-controlled' R-items that will
only execute if executed by wrapper.
In wrapper, just capture/save the active select list, then reuse it 3
times:
(1st) to capture the before version of all records,
(2nd) to do ED, UPDATE.RECORD, REVISE, DELETE, or whatever else you
are wrapping, then
(3rd) to compare the before & after versions.
How to capture & reactiveate the list is up to you, but I guess that's
the root of the question, isn't it?
The flavors handle list variables differently: getlist, savelist,
formlist, passlist, etc.
$OPTIONS IDEAL makes pgm conform to documentation. Pick flavor is
poorly documented (in my exalted opinion).
There is a config option for PERFORM & EXECUTE.
The following silly example uses methods that do essentially what you
need, (uv 10.0, pick flavor account):
>CT CDS.BP HESTER
HESTER
0001 $OPTIONS -VAR.SELECT ;* (I like ideal behavior, not Pick)
0002 READLIST LIST FROM 0 ELSE LIST = something from command line?
0003 FORMLIST LIST TO 0
0004 DATA 'Y'
0005 PERFORM 'COPYI FROM VOC TO VOCLIB'
0006 FORMLIST LIST TO 0
0007 PERFORM 'ED VOC'
0008 LOOP
0009 REMOVE ID FROM LIST SETTING MORE
0010 CRT ID, 'compare old to new...'
0011 WHILE MORE
0012 REPEAT
0013 END
>
>SELECT VOC SAMPLE
10 record(s) selected to SELECT list #0.
>>NSELECT VOCLIB
10 record(s) selected to SELECT list #0.
>>RUN CDS.BP HESTER
You have an active SELECT list.
Do you wish to copy the records previously SELECTed?
The first record ID = "HASH.TEST".
Enter Y or N:
10 records copied.
SELECTed record name = "HASH.TEST".
8 lines long.
----: 1
0001: V
----: A XXXXX
0001: V XXXXX
----: FI
"HASH.TEST" filed in file "VOC".
SELECTed record name = "QUIT.KEY".
2 lines long.
----: 1
0001: X
----: A
0001: X XXXXX
----: FI
"QUIT.KEY" filed in file "VOC".
SELECTed record name = "CLEAR.LOCKS".
4 lines long.
----: X
HASH.TEST compare old to new...
QUIT.KEY compare old to new...
CLEAR.LOCKS compare old to new...
>< compare old to new...
>= compare old to new...
DIVX compare old to new...
=< compare old to new...
T.LOAD compare old to new...
=> compare old to new...
MENU.DOC compare old to new...
>2UP VOC VOCLIB HASH.TEST QUIT.KEY CLEAR.LOCKS
/home_app/cds3389612:19:42pm 27 Apr 2004 Pg
. 1
File: VOC VOCLIB
Rec: HASH.TEST HASH.TEST
---1: V XXXXX # V
0002: hash.test | hash.test
0003: E | E
0004: GSP | GSP
0005: |
0006: |
0007: P}N | P}N
0008: LPTR}NOPAGE | LPTR}NOPAGE
1 difference(s)
__________________________________
Rec: QUIT.KEY QUIT.KEY
---1: X XXXXX # X
0002: ACLQ | ACLQ
1 difference(s)
__________________________________
Rec: CLEAR.LOCKS CLEAR.LOCKS
0001: V | V
0002: CLEAR.LOCKS | CLEAR.LOCKS
0003: I | I
0004: G | G
0 difference(s)
>
>.L RELLEVEL
RELLEVEL
001 X
002 10.0.16
003 PICK
004 PICK.FORMAT
005 10.0.16
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users