Save_Select subroutine
Description
The Save_Select subroutine saves an active select list of keys from cursor 0.
Syntax
Save_Select(target, targetName, reserved, comment, cursorNum)
Parameters
The Save_Select subroutine has the following parameters:
Parameter | Description | |
---|---|---|
target | Reserved. Pass null. | |
targetName | The name to save the select as. The targetName may be in the following formats: 1. <targetName> 2. <tableName><space><targetName> If targetName contains a space then the assumption is that the first word is <tablename>. If the <tablename> is valid then any wording after the initial space is the targetName .If the tablename is not valid the tablenme is SYSLISTS and the whole string is used as the targetName. | |
reserved | Reserved for internal use. | |
comment | A reference string can be stored with the saved list; null is permitted. The comment must not contain system delimiters. | |
cursorNum | A number from 0 to 8, indication which cursor's keys to save. Optional, defaults to 0 |
Note
The list of keys is stored in the SYSLISTS table, with targetName as the record ID. An Activate_Save_Select should be used to process the list once the Save_Select is executed.
See Also
Example
Function Save_Select_Example(param1) Declare Subroutine Save_Select, Activate_Save_Select, Msg $Insert Logical ClearSelect 0 done = False$ ctr = 0 Select "SYSREPOS" by "@ID" using 0 Then Save_Select("","SYSREPOS_LIST","","") Activate_Save_Select("SYSREPOS_LIST") Loop Readnext id Else done = True$ Until done ctr += 1 repeat Msg(@window,"Number of Records Selected = ": ctr) end return ctr ** **