SYSLISTS Question (OpenInsight 32-Bit)
At 24 MAY 2004 01:11:47PM B. Cameron wrote:
In Pick we had the POINTER-FILE to store IDs from SAVE-LISTs or programs.
In the early days it was unaccessible through the editor or programatically except via the GET-LIST. In the middle days it became just a one level file (No dict. just data portion).
We were then able to edit, view delete etc. through the editor and also write to it programmatically and then activate the list with GET-LIST.
Is this possible in 7.0? It would be a nice feature. It saves from having to create a WORK file to dump ids into then SELECT WORK USING DICT……
How do people programmatically write ids to SYSLISTS now without using RLIST and target=4?
At 24 MAY 2004 01:24PM Sean FitzSimons wrote:
Bruce,
You could use the Save_Select subroutine. This will save Cursor 0 to whatever name you give it. You can then read the file through SYSLISTS or through Activate_Save_Select.
Sean
At 24 MAY 2004 01:46PM Bruce Cameron wrote:
Thanks but if I understand correctly I have to have an active select list in a cursor. My problem is that I am looping through a whole file and picking out the ids I want in my secondary processing.
At 24 MAY 2004 01:49PM Bruce Cameron wrote:
FYI - from Revtech. (Thanks Bob)
OI can do what you want.
See RLIST EQUATES
If you call RLIST('SELECT MY RECS', TARGET_SAVELIST$, "MYLIST",
,
)then the result will be in SYSLISTS, as a record named MYLIST.
The record is an FM delimited list of keys.
If you selected or sorted on a multivalued field, so that the same key could show up multiple times, then the list will look like
key1:@vm:1
key1:@vm:5
key1:@vm:3
key2:@vm:3
key2:@vm:1
…
where the number after the VM points to which multivalue was used.
If there are more than 64k of keys, the follow on lists are MYLIST*1, MYLIST*2, etc.
There is a command named ACTIVE_SAVED_SELECT to activate a saved list of keys.
Note there is another command called make.list which can be used to turn any FM delimited list into an active cursor
If you want to use the /edit the lists by hand, you can just read MYLIST MYLIST*1, MYLIST*2 till you don't find a record.
Note the 64k thing is leftover from old days. If you are creating programatically, then in 7.0 shove all the keys in the first record. Before 7.0 you need the 64k chunks if you want to use activate_saved_select, I think.
RLIST will uses the first line as a timestamp/comment. that comment line looks something like timestamp:@svm:rlist_cmd
thus, if you want to read lists by hand look for an @svm in line 1. If the svm is there, then ignore that line.
if you want to make lists by hand, then use activate_saved_Select, you can with put in a first line following the format, or not. I think it the svm that triggers activate saved_Select to ignore the first line.
You can read, write edit SYSLISTS like any other table.
At 24 MAY 2004 01:53PM B. Cameron wrote:
I understand but am missing something in my brain.
This is what I want to do….
loop
readnext iduntil eoj
read item ...if item=blah" thenread pf from syslists,"mylist" else pf="pf=idwrite pf on syslists,"mylist"endendrepeat
call activate list ("mylist")
do whatever…
I dont understand the SELECT portion of the TARGET_SAVELIST$ in the RLIST statement. I can't select them because I need to go through them and 'plop' out the ones I need for later, see above.
I like the make.list . That pretty much does the trick although how much is processing slowed down with really large variables in memory.
It would be great to have the SYSLISTS as a straight data file of keys now that the 64k thing is obsolete and have the same things like GETLIST SAVELIST DELETELIST. You could also store the date, time, user, etc. in a dict item with the same name.
I can see now how I can create my own POINTER-FILE now and write some functions for get,save and delete myself using the make.list.
Thanks alot. I'm loving 7.x
Bruce
Bruce.
At 24 MAY 2004 02:07PM Richard Hunt wrote:
I might be missing the point???
Why not just do it the way you have noted. All you have to do is to change the statement
call activate list ('mylist')
to
DECLARE SUBROUTINE ACTIVATE_SAVE_SELECT
ACTIVATE_SAVE_SELECT('MYLIST')
__
I wrote a record to the SYSLISTS table (file) "A". It was a @FM delimited list of ids. After that, this progam worked perfectly. Although this is version 4.1.3
DECLARE SUBROUTINE ACTIVATE_SAVE_SELECT
ACTIVATE_SAVE_SELECT('A')
IDS='
DONE=0
LOOP
READNEXT ID ELSE
DONE=1
END
UNTIL DONE DO
IDS=ID
REPEAT
At 24 MAY 2004 02:46PM Bruce Cameron wrote:
Richard,
Its not the activating and then processing that I am curious about.
It is the creation of the SYSLIST item.
I want to 'manually' create the list and then append item ids to
it 'on the fly' without having to worry about the 64k limit and not
have a huge variable in memory to beable to use the save. ( I can work around this in 7.x but some of our clients are still pre 4.x)
Bruce
At 24 MAY 2004 07:17PM Richard Hunt wrote:
So then the SYSTLIST record ids would be like this…
A
A*1
A*2
A*3
At 25 MAY 2004 11:09AM Richard Guise wrote:
Back in the old days of ARev this was a doddle - and hidden in OI I think it still is!
1) Make up an @FM-delimited list of keys in a variable, say Keys.
2) Call Make.List(Cursor,Keys,FileVar,DictVar) where Cursor is usually zero, FileVar and DictVar are null (unless you want to do fancy things!)
3) Hey presto - your keys are an active select list. Is that what you wanted?
Like most of the old ARev stuff it's mostly still there in OI and works the same (or nearly so). To check just use SysEd and see if $MAKE.LIST is in SYSOBJ.
Much of this is documented in the old optional extra ARev "Developer Series" manual "System Subroutines" - still one of my bibles for OI! Also have a word with Sprezzatura re their "Revmedia" series on the innermost workings of ARev which is my other OI bible.
At 25 MAY 2004 11:25AM [email protected] wrote:
Funnily enough Richard one of our presentations at NOLA will be concentrating once again on underdocumented features/neglected features/AREV features still in OI. Nearly 30% of AREV routines made it into OI!
The Sprezzatura Group Web Site
World Leaders in all things RevSoft
At 26 MAY 2004 12:21PM Tom Savell wrote:
Interesting. In RevG the TCL command was FORM-LIST.
I am looking forward to hearing Sprez's talk in New Orleans
At 27 MAY 2004 12:59PM Richard Guise wrote:
Lucky I didn't throw away my copies of Revmedia, ARev Developer's Series, etc. in the excitement of the arrival of Open Insight Ver 1!
Er- sorry - I mean Open Insight Ver 2!!!
Anyone like to bid for my historic set of OI Ver 1 floppies? I don't think I jumped on them and I might even be able to find them.