Cursors and Saved Lists to a Variable (OpenInsight)
At 11 MAY 2000 08:18:17PM Orlay Edward Plummer wrote:
Make.List allows you to take a variable containing a list of keys separate by @fm and make it into a cursor.
How does one take a saved list or a cursor and save it to a variable containing a list of keys separated appropriately?
Ed Plummer
At 11 MAY 2000 11:17PM WinWin/Revelation Support wrote:
*–
* With an active cursor for myfile
* To load the (<64k) keys to a variable
*–
keys='
done='
loop
readnext key else done=1
Until done
keys:=key:@FMRepeat
keys-1,1 ='
*–
* To save the list to SYSLISTS, MYKEYS
*–
$INSERT RLIST_EQUATES
CALL RLIST('SELECT MYFILE',TARGET_SAVELIST$,'MYKEYS',
,
)*–
* To Activate that list again
*–
declare subroutine Activate_Save_Select
$insert Logical
Activate_Save_Select("MYKEYS")
if Get_Status() else
EOF=FALSE$loopreadnext Key else EOF=TRUE$until EOFgosub ProcessEntityrepeatend
Hope this helps
Bob Carten
WinWin Solutions, Inc.
At 12 MAY 2000 12:57AM Donald Bakke wrote:
Orlay,
I hybrid alternative would be to save the list and then read the record from the SYSLISTS table.
dbakke@srpcs.com
At 12 MAY 2000 10:38AM WinWin/Revelation Technical Support wrote:
True.
You'd need to know to strip the SYSLIST header (depending upon you version of OI you may not have one), and to read multiple SYSLIST records byt checking for id, id*2, id*3, etc.
Mike Ruane
At 13 MAY 2000 11:58AM Cameron Purdy wrote:
Ed,
You should also check out the following in the help file:
Save_Select
Activate_Save_Select
Delete_Save_Select
It is best not to try to manipulate cursor information in a variable, as tempting as it may seem. The primary reason is that a cursor can exceed 64k, and if you try to collect ] 64k, you will get a VEML. If you are certain the list will never exceed 64k, then it is not a problem.
Cameron Purdy
Revelation Software