SUBROUTINE SYSLISTS_PUSH.SELECT(CURSOR, SAVE1, SAVE2, SAVE3)
*#ADDED 1,2,3,4
*#SOURCE AREV32_BP
*#CTO
*#Precompile
*#FLAVOR AREV32
*






















!
*
!
*
* This  program  is  proprietary and is not  to be used  by or  disclosed to others, nor is it to be copied
* without written permission from COSMOS, INC.
*
!
*
*÷ VERSION  : AdvRev 1.0
*
*÷ PURPOSE  : Push an active select list within an EXECUTE level to
* prevent it from being destroyed by another select process
*
*÷ AUTHOR  : BDA
*
*÷ CREATED  : April 19, 88
*
*÷ PROCEDURES :
*
*÷ WARNINGS  :
*

!
*÷ REVISION HISTORY  (Most CURRENT first) :

* DATE  IMPLEMENTOR  FUNCTION
* -------- ----------- --------
* DD-MM-YY  initials  Modification
* Aug 15-91  Pat  Share code with RPM

!

*÷ THEORY OF OPERATION :
* NOTE THAT CURSOR IS NOT CURRENTLY USED - FOR FORWARD COMPATIBILITY

!

*÷ $INSERT Blocks :
*$insert syscommon
** INCLUDED SOURCE: SYSPROCS,SYSCOMMON **
*compile insert SysCommon

******************************************************************************
*
* This program is proprietary and is not to be used by or disclosed
* to others, nor is it to be copied without written permission from
* Revelation Technologies, Inc.
*
* Name  : SysCommon
* Description: OpenEngine System Common variable declarations
*
* History  : (date, initials, notes)
* 08-13-91 ba  original programmer
* 10-31-91 rkh  removed SC_TIMEDATE_FMT (#215), per fix 4831 and 4813
* 01-18-94 gg  changed SC_UNUSED73 to SC_CONCURRENCY
* 04-05-94 Pat  changed SC_UNUSED_107 to SC_ENGINE_LOGGING_REQ;the
* semaphore between oengine.exe and revexec.dll
* 04-25-94 Slj  changed SC_UNUSED_78 to SC_ATWINDOW for event handlers
* 05-16-94 Pat  change SC_UNUSED_165 to SC_CTRL_TYPES
* 06-13-94 tmc  10695 changed SC_ARRAY_VOLUMES to dim of 6 (was 5)
* 06-24-95 gg  11322 changed SC_UNUSED_155 to SC_DATASOURCETYPE
* 07-17-95 cp  11322 changed SC_UNUSED_154 to SC_XO_DEFAULTS
* 03-05-96 cp  11777 added SC_LHLICENSING SC_LHENABLED SC_LHFILESUSED
* (160-162)
* 08-05-96 gg  11853 changed PROGRAMS_DIM$ from '0299' to '0499'
* 06-23/97 cp  added support for SYSLOGINS table (201-203)
*
******************************************************************************

equ FRAMES_DIM$  to 49
equ PROGRAMS_DIM$  to '0499' ;* appears in obj code's literal pool
equ SC_ARRAY_VOLUMES_OFFSET$  to 17
equ SC_ARRAY_TABLES_OFFSET$  to 19

*
SYSCOM SC_ATRM  ;* Set by RTP1 to the value of char(255) 
SYSCOM SC_ATFM  ;* Set by RTP1 to the value of char(254) 
SYSCOM SC_ATVM  ;* Set by RTP1 to the value of char(253) 
SYSCOM SC_ATSVM  ;* Set by RTP1 to the value of char(252) 
SYSCOM SC_TM  ;* Set by RTP1 to the value of char(251) 
SYSCOM SC_STM  ;* Set by RTP1 to the value of char(13) 
SYSCOM SC_CRLF  ;* Set by RTP1 to the value of char(10) 
SYSCOM SC_FILE_SYSENV  ;* 8 The file handle for the SYSENV file 
SYSCOM SC_TIMEDATA
SYSCOM SC_FILE_SYSPTRS  ;* 10 The file handle for the SYSPTRS file 
SYSCOM SC_PROGLIST  ;* Array of program names, format of name is 
SYSCOM SC_PROGRAMS(PROGRAMS_DIM$) ;* Object code for the program name in PROGLIST 
SYSCOM SC_FSTACK(1)
SYSCOM SC_FRAMELIST
SYSCOM SC_FRAMES(FRAMES_DIM$) ;* Originally ROS frames, now also other ones 
SYSCOM SC_FILE_VOLUMES  ;* 16 The file handle for the VOLUMES file
SYSCOM SC_ARRAY_VOLUMES(6) ;* 17 anchor The physical location of the SYSVOLUMES file
SYSCOM SC_FILE_TABLES  ;* 18 The file handle for the SYSTABLES file 
SYSCOM SC_ARRAY_TABLES(5) ;* 19 anchor The physical location of the SYSTABLES file
SYSCOM SC_FILES_NO_DETACH  ;* A list of system files that CAN NOT be detached 
SYSCOM SC_RTP1  ;* RTP1 is executed from here.  Then used for encryption key 
SYSCOM SC_AFSNAMES  ;* A list of all BFS and MFS encountered by the system 
SYSCOM SC_FILE_SYSOBJ  ;* 23 the file handle for the SYSOBJ file 
SYSCOM SC_FILE_SYSDICT  ;* 24 The file handle for the SYSDICT file 
SYSCOM SC_USER  ;* 25 anchor This is @USERNAME, the name of the current user 
SYSCOM SC_DBID  ;* 26 anchor This is @DBID, the name of the current account 
SYSCOM SC_LIST
SYSCOM SC_TODAY  ;* Today's date, used by RLIST 
SYSCOM SC_SUNDAY0  ;* Day of the week (0-6) Sunday = 0 
SYSCOM SC_SUNDAY7  ;* Day of the week (1-7) Sunday = 7 
SYSCOM SC_ATUSER0  ;* 31 (C01F) anchor This is @USER0 
SYSCOM SC_ATUSER1  ;* 32 (C020) anchor This is @USER1 
SYSCOM SC_ATUSER2  ;* 33 (C021) anchor This is @USER2 
SYSCOM SC_ATUSER3  ;* 34 (C022) anchor This is @USER3 
SYSCOM SC_ATUSER4  ;* 35 (C023) anchor This is @USER4 
SYSCOM SC_CURR_PROGRAM  ;* 36 (C024) moveable used by debugger 
SYSCOM SC_CURRENT_LINE  ;* 37 (C025) moveable Used by debugger current line number 
SYSCOM SC_SYSTEM_STATE  ;* 38 (C026) State of engine '' - uninitialized;'0' - initialized;'1' - Ready to terminate 
SYSCOM SC_DBG_BUFFER  ;* 39 (C027) moveable multipurpose var for the debugger 
SYSCOM SC_WORKLIST  ;* 40 (C028) Real questionable variable 
SYSCOM SC_ATID  ;* 41 (C029) (C0anchor) This is @ID 
SYSCOM SC_ATREC  ;* 42 (C02A) (C0anchor) This is @RECORD 
SYSCOM SC_DATA_LIST  ;* 43 (C02B) (anchor) This is @data 
SYSCOM SC_ADMIN  ;* 44 (C02C) The user has administrative privilege 

SYSCOM SC_SQL_PARAMS  ;* 45 (C02d) @SQL_PARAMS Passed parameters in compiled SQL 
SYSCOM SC_SQL_CURSPARAMS  ;* 46 (C02E) @CURS_PARAMS Passed parameters for SQL cursors 
SYSCOM SC_SQL_NCACHEIDS  ;* 47 (C02F) @NCACHEIDS Normalized query id cache 
SYSCOM SC_SQL_NCACHEDATA(8) ;* 48 (C030) @NCACHEDATA() Normalized query record cache 
SYSCOM SC_FILE_SYSPROCS  ;* 49 (C031) The file handle for the SYSPROCS table 

SYSCOM SC_FLAGS  ;* 50 (C032) debug flags (trace, break, etc.) 
SYSCOM SC_SYSPROCNAMES  ;* 51 (C033) used by the compiler to protect system procedures 
SYSCOM SC_SQL_SQBUFFS(20) ;* 52 (C034) @SQBUFFS( ) Sub Query Buffers 
SYSCOM SC_SQL_SQBUFF_CURS  ;* 53 (C035) Subquery buffer to cursor map 
SYSCOM SC_SQL_CURS_SQBUFF  ;* 54 (C036) Cursor to Subquery Buffer map 
SYSCOM SC_SQL_CURSSLOTS  ;* 55 (C037) SQL cursor to ReAL cursor map 
SYSCOM SC_SQL_PROJEX  ;* 56 (C038) PROJEX meta object cache 
SYSCOM SC_ATLIMIT  ;* 57 (C039) @LIMIT moveable RLIST count limit 
SYSCOM SC_NEXT_GROUP  ;* 58 (C03A) moveable list variable 
SYSCOM SC_PRI_NAME  ;* 59 (C03B) 

SYSCOM SC_PRI_DICT  ;* 60 (C03C)
SYSCOM SC_PRI_FILE  ;* 61 (C03D) anchor @PRI.FILE 
SYSCOM SC_COMPILER  ;* 62 (C03E) This holds a copy of the compiler, RBASIC_RUN record in the verbs file 
SYSCOM SC_ATLIST_ACTIVE  ;* 63 (C03F) Used in conjunction with LIST, is the data in LIST current 
SYSCOM SC_LIST_OFF  ;* 64 (C040) 
SYSCOM SC_REDUCTION_SPEC  ;* 65 (C041) 
SYSCOM SC_SORT_SPEC  ;* 66 (C042) 
SYSCOM SC_ATANS  ;* 67 (C043) anchor This is @ANS 
SYSCOM SC_ATDICT  ;* 68 (C044) anchor This is @DICT 
SYSCOM SC_SQL_FIRSTIDS  ;* 69 (C045) Used by SQL FETCH 

SYSCOM SC_SQL_LASTIDS  ;* 70 (C046) Used by SQL FETCH 
SYSCOM SC_SQL_SKIPWHERE  ;* 71 (C047) Place holder for optimization flag 
SYSCOM SC_SQL_LIKE  ;* 72 (C048) Like buffer information 
SYSCOM SC_CONCURRENCY  ;* 73 (C049) Concurrency scheme for SQL bond optimization 
SYSCOM SC_ATCONV  ;* 74 (C04A) 
SYSCOM SC_ATFORMAT  ;* 75 (C04B) 
SYSCOM SC_ATHEADER  ;* 76 (C04C) anchor @header 
SYSCOM SC_DATE_FORMAT  ;* 77 (C04D) moveable 
SYSCOM SC_ATWINDOW  ;* 78 (C04E) current win id in event hdlrs 
SYSCOM SC_IO_PROC  ;* 79 (C04F) moveable select variable 

SYSCOM SC_ATRECUR0  ;* 80 (C050) anchor This is @RECUR0 
SYSCOM SC_ATRECUR1  ;* 81 (C051) anchor This is @RECUR1 
SYSCOM SC_ATRECUR2  ;* 82 (C052) anchor This is @RECUR2 
SYSCOM SC_ATRECUR3  ;* 83 (C053) anchor This is @RECUR3 
SYSCOM SC_ATRECUR4  ;* 84 (C054) anchor This is @RECUR4 
SYSCOM SC_MVCOUNT  ;* 85 (C055) anchor This is @MV 
SYSCOM SC_ATRECCOUNT  ;* 86 (C056) anchor This is @RECCOUNT or @REC_COUNT 
SYSCOM SC_ATQUERY_DICT  ;* 87 (C057) anchor @query.dict 
SYSCOM SC_DST_RECORDS(9) ;* 88 (C058) sql distinct records cache 
SYSCOM SC_DST_OFFSETS(9) ;* 89 (C059) sql distinct keys cache 

SYSCOM SC_DST_HANDLES(9) ;* 90 (C05A) sql distinct table handles 
SYSCOM SC_DST_HASHTABLES(9) ;* 91 (C05B) sql distinct hash tables 
SYSCOM SC_ATLPTRWIDE  ;* 92 (C05C) anchor This is @LPTRWIDE 
SYSCOM SC_ATLPTRHIGH  ;* 93 (C05D) anchor This is @LPTRHIGH 
SYSCOM SC_FVSYSREPOS  ;* 94 (C05E) to be fv for SYSREPOS 
SYSCOM SC_FVSYSREPOSLOG  ;* 95 (C05F) to be fv for SYSREPOSLOG 
SYSCOM SC_FILE_REPOSEXE  ;* 96 (C060) to be fv for SYSREPOSEVENTEXES 
SYSCOM SC_ATTCL_STACK  ;* 97 (C061) @tcl.stack 
SYSCOM SC_DRIVER  ;* 98 (C062) Used by op91, vspace and 
SYSCOM SC_LONG_LIST  ;* 99 (C063) moveable select variable 

SYSCOM SC_LIST_LEVEL  ;* 100 (C064) moveable select variable 
SYSCOM SC_ATCURSORS(8,12) ;* 101 (C065)anchor @cursors select cursors 
SYSCOM SC_SORT_FILE  ;* 102 (C066)name of the sort file 
SYSCOM SC_APPID  ;* 103 (C067) 
SYSCOM SC_APPINFO  ;* 104 (C068) 
SYSCOM SC_NEXTREQARGS  ;* 105 (C069) Delayed request arguments 
SYSCOM SC_IDXSVR  ;* 106 (C06A)flag for dedicate index server 
SYSCOM SC_ENGINE_LOGGING_REQ  ;* 107 (C06B) 
SYSCOM SC_HUSH  ;* 108 (C06C) Curtis - Patrick Alpha3 fix  
SYSCOM SC_ATPRIVILEGE  ;* 109 (C06D) 

SYSCOM SC_ATSTATION  ;* 110 (C06E) anchor This is @STATION 
SYSCOM SC_ATVIEW_MODE  ;* 111 (C06F) @VIEW.MODE 
SYSCOM SC_LINEAR_HASH_FRAMES  ;* 112 (C070) lh vars 
SYSCOM SC_ATHEADING  ;* 113 (C071) anchor 
SYSCOM SC_ATFOOTING  ;* 114 (C072) anchor 
SYSCOM SC_ATPAGE  ;* 115 (C073) anchor @page 
SYSCOM SC_ATBREAK1  ;* 116 (C074) @BREAK
SYSCOM SC_ATBREAK2  ;* 117 (C075) 
SYSCOM SC_ATBREAK3  ;* 118 (C076) 
SYSCOM SC_ATFIRST_PAGE  ;* 119 (C077) 

SYSCOM SC_ATFIRST_COLHEAD  ;* 120 (C078) 
SYSCOM SC_ATCOLHEADING  ;* 121 (C079) 
SYSCOM SC_ATCOLLENGTH  ;* 122 (C07A) 
SYSCOM SC_ATCOLHEAD  ;* 123 (C07B) 
SYSCOM SC_ATCHACTIVE  ;* 124 (C07C) 
SYSCOM SC_EXT_LIST  ;* 125 (C07D) moveable select variable 
SYSCOM SC_CMDLINE  ;* 126 (C07E) moveable DOS command line 
SYSCOM SC_LOCKED_USER_ID  ;* 127 (C07F) Moveable user lock semaphore 
SYSCOM SC_LABELED_COMMON_NAMES  ;* 128 (C080) moveable List of all LABELED COMMON names, defined so far 
SYSCOM SC_LABELED_COMMON_SPTS  ;* 129 (C081) Moveable Location of descriptors for the above labeled common vars 

SYSCOM SC_ATREDUCTION_DONE  ;* 130 (C082) moveable select variable 
SYSCOM SC_ATRETURN_VALUE  ;* 131 (C083) moveable ??? The value being returned by a FUNCTION is placed here 
SYSCOM SC_XLATE_KEYS  ;* 132 (C084) 
SYSCOM SC_XLATE_LRU  ;* 133 (C085) 
SYSCOM SC_SYS_LOCKS(8) ;* 134 (C086) 
SYSCOM SC_USER_LIST  ;* 135 (C087) list of users registered on this database 
SYSCOM SC_ADMIN_LIST  ;* 136 (C088) list of admin flags per user 
SYSCOM SC_PASSWORD_LIST  ;* 137 (C089) list of encrypted passwords per user 
SYSCOM SC_XLATE_RESET  ;* 138 (C08A) anchor 
SYSCOM SC_PROT_DOCONV  ;* 139 (C08B) @IOCONV do conversion on read or write 

SYSCOM SC_PROT_DEFCONV  ;* 140 (C08C) default environmental conversion 
SYSCOM SC_PROT_LOCKMODE  ;* 141 (C08D) @LOCKMODE used to specify implicit or explicit lock mode 
SYSCOM SC_PROT_HANDLES  ;* 142 (C08E) handles of tables involved in a transaction 
SYSCOM SC_PROT_TABLEDATA  ;* 143 (C08F) data about tables involved in  a transaction 
SYSCOM SC_PROT_TRANSSTATE  ;* 144 (C090) current state of transaction 
SYSCOM SC_PROT_TRANSDATA  ;* 145 (C091) data about current transaction 
SYSCOM SC_PROT_CONSISTENCY  ;* 146 (C092) @CONSISTENCY_LEVEL transaction consistency level 
SYSCOM SC_PROT_TABLELOCKS(8) ;* 147 (C093) handles for tables locked in a transaction 
SYSCOM SC_PROT_LOCKDATA(7) ;* 148 (C094) information about locks held in a transaction 
SYSCOM SC_PROT_TRANSHANDLES  ;* 149 (C095) handles of transaction temporary tables 

SYSCOM SC_PROT_CURSCONV  ;* 150 (C096) defeats conversion logic 
SYSCOM SC_PROT_SPECS  ;* 151 (C097) protection specs for tables 
SYSCOM SC_PROT_SPECS_LRU  ;* 152 (C098) LRU information for sc_prot_specs 
SYSCOM SC_AT_INSERT  ;* 153 (C099) @INSERT 
SYSCOM SC_XO_DEFAULTS  ;* 154 (C09A)<1>=default XOInstance() options 
SYSCOM SC_DATASOURCETYPE  ;* 155 (C09B) current DataSource type (used by DSO) 
SYSCOM SC_ATPSEUDO  ;* 156 (C09C) anchor This is @PSEUDO 
SYSCOM SC_ATPRIORITY_INT  ;* 157 (C09D) @priority.int 
SYSCOM SC_ATUPPER_CASE  ;* 158 (C09E) anchor This is a string of all upper case letters 
SYSCOM SC_ATLOWER_CASE  ;* 159 (C09F) anchor This is a string of all lower case letters 

SYSCOM SC_LHLICENSING  ;* 160 (C0A0) set to true for OI/WG runtimes with user count > 1 
SYSCOM SC_LHENABLED  ;* 161 (C0A1) if SC_LHLICENSING, this is set to TRUE$ by RTP57 when the user semaphore is actually set 
SYSCOM SC_LHFILESUSED  ;* 162 (C0A2) if SC_LHLICENSING, this is a list of LH files that have been opened 
SYSCOM SC_ATPROG_CHAR  ;* 163 (C0A3) @PROG.CHAR 
SYSCOM SC_ATMW  ;* 164 (C0A4) @MW 
SYSCOM SC_CTRL_TYPES  ;* 165 (C0A5) holds control types info 
SYSCOM SC_REPOSMIRROR  ;* 166 (C0A6) Mirror data: mirrorHandle : @RM : configdata 
SYSCOM SC_ATDEFAULT_STOPS  ;* 167 (C0A7) @DEFAULT.STOPS anchor xref stop list 
SYSCOM SC_ATPAGE_LINE  ;* 168 (C0A8) @PAGE_LINE 
SYSCOM SC_QHANDLE  ;* 169 (C0A9) handle to queue 

SYSCOM SC_REQID  ;* 170 (C0AA) request is (aka procid ) 
SYSCOM SC_EXEC_COMMAND  ;* 171 (C0AB) Current command 
SYSCOM SC_SPSTATUS  ;* 172 (C0AC) stored procedure status 
SYSCOM SC_SPSTATCODE  ;* 173 (C0AD) stored procedure status code string 
SYSCOM SC_SPSTATTEMPL  ;* 174 (C0AE) status code template 
SYSCOM SC_SPABORT  ;* 175 (C0AF) 
SYSCOM SC_SPTYPE  ;* 176 (C0B0) Store procedure type 
SYSCOM SC_SPARGDTYPES  ;* 177 (C0B1) Argument data types 
SYSCOM SC_SPRECDTYPES  ;* 178 (C0B2) Record data types (template) 
SYSCOM SC_SPWRECDTYPES  ;* 179 (C0B3) Working record data types 

SYSCOM SC_ATCRTWIDE  ;* 180 (C0B4) @CRTWIDE 
SYSCOM SC_ATCUR_BUF  ;* 181 (C0B5) @CUR.BUF 
SYSCOM SC_ATMACRO_WORDS  ;* 182 (C0B6) @MACRO.WORDS
SYSCOM SC_ATMACRO_HEX  ;* 183 (C0B7) @MACRO.HEX
SYSCOM SC_ATMACRO_MODE  ;* 184 (C0B8) @MACRO.MODE 
SYSCOM SC_ATMESSAGES  ;* 185 (C0B9) @MESSAGES 
SYSCOM SC_ATFILTER  ;* 186 (C0BA) @FILTER 
SYSCOM SC_ATSTATLIST  ;* 187 (C0BB) @STATLIST
SYSCOM SC_ATSTATREC  ;* 188 (C0BC) @STATREC 
SYSCOM SC_ATSTATPOS  ;* 189 (C0BD) @STATPOS 
SYSCOM SC_ENCACTIVE  ;* 190 (C0BE) OpenInsight security encryption 

SYSCOM SC_ATCAPTURE  ;* 191 (C0BF) @capture 
SYSCOM SC_ATSCRIPT  ;* 192 (C0C0) @SCRIPT 
SYSCOM SC_ATSTATUS_ON  ;* 193 (C0C1) @STATUS.ON 
SYSCOM SC_ATMODAL  ;* 194 (C0C2) @MODAL 
SYSCOM SC_DICT_MODE  ;* 195 (C0C3) @DICT.MODE** new anchor Dict call mode  ( LAST SELET PROC IN AREV ) 
SYSCOM SC_ATTYPEAHEAD  ;* 196 (C0C4) @TYPEAHEAD
SYSCOM SC_ATBROWSE_LIST  ;* 197 (C0C5) @BROWSE.LIST 
SYSCOM SC_ATBROWSE_MODE  ;* 198 (C0C6) @BROWSE.MODE
SYSCOM SC_ATFILTER_MODE  ;* 199 (C0C7) @FILTER.MODE
SYSCOM SC_ATHW  ;* 200 (C0C8) @HW 

SYSCOM SC_FILE_SYSLOGINS  ;* 201 (C0C9) file handle for SYSLOGINS table  (v3.5) 
SYSCOM SC_KEY_SYSLOGINS  ;* 202 (C0CA) this session's key to the SYSLOGINS table     (v3.5) 
SYSCOM SC_LOGGED_ON  ;* 203 (C0CB) the date/time value that this session started (v3.5) 
SYSCOM SC_CHAR_MAPS  ;* 204 (C0CC) moveable Character collation maps 
SYSCOM SC_ATFILE_ERROR  ;* 205 (C0CD) anchor @file.error Contains information about last I/O error 
SYSCOM SC_MEM_ALLOC  ;* 206 (C0CE) memory allocated open engine specific 
SYSCOM SC_INDEXLIST  ;* 207 (C0CF) old @index.time ) info for index flushing logic 
SYSCOM SC_ATROLLOUT_FILE  ;* 208 (C0D0) @ROLLOUT.FILE moveable 
SYSCOM SC_ATFILE_ERROR_MODE  ;* 209 (C0D1) anchor @file.error.mode 
SYSCOM SC_LOCKED_TABLES  ;* 210 (C0D2) 

SYSCOM SC_EP  ;* 211 (C0D3) @EP Encrypted Password for Bonds 
SYSCOM SC_LND_DATA  ;* 212 (C0D4) Misc language/national data sets 
SYSCOM SC_LND_NAMES  ;* 213 (C0D5) Names of langage/national data sets 
SYSCOM SC_LND_POINT  ;* 214 (C0D6) Pointer to default language/national data set 
SYSCOM SC_HW_ENV  ;* 215 (C0D7) Node Hardware environent: byte 1 = current display mode, bytes 2-> =name of INI file with config. 
SYSCOM SC_ATLEVEL  ;* 216 (C0D8) CURRENT LEVEL OF TCL 
SYSCOM SC_ATPRECISION  ;* 217 (C0D9) Number of decimal digits of precision 
SYSCOM SC_CM_NAMES  ;* 217 (C0DA) 
SYSCOM SC_CM_POINT  ;* 219 (C0DB) 
SYSCOM SC_ATENVIRON_SET  ;* 220 (C0DC) moveable @environ.set  
* 
* mtr 12-6-06
* We extended the SC addressspace to 250 today in order to bring back more of the system common needed for Arev32, and to add some more as needed for the pick compatibility.

SYSCOM SC_SAVE(8,26) ;* 221 (C0DD) EXECUTE saves the previous level's state here 
SYSCOM SC_ATCRT_MAX_Y  ;* 222 (C0DE) @CRTMAXHIGH 
SYSCOM SC_DEMO  ;* 223 (C0DF) 
SYSCOM SC_TCL_STATE  ;* 224 (C0E0) 
SYSCOM SC_RESET_ROUTINE  ;* 225 (C0E1) holds code and command for TCL level 1 
SYSCOM SC_ATSENTENCE  ;* 226 (C0E2) @SENTENCE the current tcl line being processed 
SYSCOM SC_FILE_VOC  ;* 227 (C0E3) The file handle for the VOC file 
SYSCOM SC_DICT_VOC  ;* 228 (C0E4) The file handle for the DICT_VOC file 
SYSCOM SC_CHAIN_LINE  ;* 229 (C0E5) Place to pass a command to RTP18 
SYSCOM SC_PARSE_TCL  ;* 230 (C0E6) The parsed command line - @RM delimited word list 
SYSCOM SC_VERB  ;* 231 (C0E7) Name of last verb executed at tcl (example :EDIT VOC *, VERB= "EDIT") 
SYSCOM SC_VERBS_FILE  ;* 232 (C0E8) The file handle for the file in last TCL command 
SYSCOM SC_BREAKKEY  ;* 233 (C0E9) 
SYSCOM SC_ABORT_FLAG  ;* 234 (C0EA) 
SYSCOM SC_ATSCREEN_SAVE  ;* 235 (C0EB)screen image for view mode 
SYSCOM SC_ATXW  ;* 236 (C0EC) @XW 
SYSCOM SC_VIEW_SCREEN  ;* 237 (C0ED) 
SYSCOM SC_VIEW_PARAMS  ;* 238 (C0EE) 
SYSCOM SC_MULTI_LIMIT  ;* 239 (C0EF) 
SYSCOM SC_CURR_EXEC_CNT  ;* 240 (C0F0) 
SYSCOM SC_FROM_PROC  ;* 241 (C0F1) 
SYSCOM SC_ATSAVE_SELECT  ;* 242 (C0F2) @SAVE.SELECT
SYSCOM SC_BREAK_TABLE  ;* 243 (C0F3) debug's break table 
SYSCOM SC_TRACE_TABLE  ;* 244 (C0F4) debug's trace table 
SYSCOM SC_PROMPT_STR  ;* 245 (C0F5) 
SYSCOM SC_OPTIONS  ;* 246 (C0F6) Each bit in this variable represents a system option See the equates below OPTION.EQUATES 
SYSCOM SC_OPTLIST  ;* 247 (C0F7) 
SYSCOM SC_MOD_FLAGS  ;* 248 (C0F8) 
SYSCOM SC_LOADER_SEMAPHORE  ;* 249 (C0F9) 

* mtr 12-13-06
* bumped the number up to 320 for further availability

SYSCOM SC_ATQUERY_DEPTH  ;* 250 (C0FA)*
SYSCOM SC_ATQUERY_TABLE  ;* 251 (C0FB)*
SYSCOM SC_ATEW  ;* 252 (C0FC) This is @EW 
SYSCOM SC_ATAW  ;* 253 (C0FD) This is @AW 
SYSCOM SC_SPACER1  ;* 254- SPACE HOLDER
SYSCOM SC_SPACER2  ;* 255- SPACE HOLDER
SYSCOM SC_ATPLAYDELAY  ;* 256 (C10100)
SYSCOM SC_ATBACKGRND_TIME  ;* 257 (C10101)
SYSCOM SC_ATINT_CONST  ;* 258 (C10201) This is @INT_CONST
SYSCOM SC_ATEDIT_KEYS  ;* 259 (C10301) This is @EDIT_KEYS
SYSCOM SC_TAB_STOPS  ;* 260 (C10401) Used by the EDITOR
SYSCOM SC_ATMV_KEYS  ;* 261 (C10501) @MV.KEYS
SYSCOM SC_ATMOVE_KEYS  ;* 262 (C10601) This is @MOVE_KEYS
SYSCOM SC_ATMACRO_KEYS  ;* 263 (C10701) @MACRO.KEYS
SYSCOM SC_ATUTOR  ;* 264 (C10801) @TUTOR
SYSCOM SC_ATPAGE_REC  ;* 265 (C10901) Used by Report Writer, repl. ATATRBP.PTR
SYSCOM SC_ATWINDOW_LEVEL  ;* 266 (C10A01) @WINDOW.LEVEL
SYSCOM SC_ATSTATATR  ;* 267 (C10B01) @statatr
SYSCOM SC_ATSCRIBE_MODE  ;* 268 (C10C01) @SCRIBE.MODE
SYSCOM SC_ATPW  ;* 269 (C10D01) This is @PW
SYSCOM SC_ATPLAYBACK  ;* 270 (C10E01) @PLAYBACK
SYSCOM SC_ATENVIRON_KEYS  ;* 271 (C10F01) @ENVIRON.KEYS
* MTR 12-18-06
SYSCOM SC_SYMBOL_TABLE  ;* 272 (C11001) used by Arev debuger
SYSCOM SC_PREV_PROG  ;* 273 (C11101) used by Arev debugger
SYSCOM SC_MASTER_OPTIONS  ;* 274 (C11201) Used by rtp29
SYSCOM SC_VIDEO_DATA  ;* 275 (C11301) Video card data, byte 1 = type, byte 2 = "CGA flag", bytes 3 & 4 = display adapter RAM segment (i.e. B800) */
* MTR 12-26-06
SYSCOM SC_ATHELP_LEVEL  ;* 276 (C11401)
SYSCOM SC_ATCRTLFMAX  ;* 277 (C11501)
SYSCOM SC_ATCRTLFS  ;* 278 (C11601)



*****************************
* OPTION.EQUATES
EQU  D.OPT  TO  BITAND(SC_OPTIONS,1)
EQU  O.OPT  TO  BITAND(SC_OPTIONS,2)
EQU  P.OPT  TO  BITAND(SC_OPTIONS,4)
EQU  T.OPT  TO  BITAND(SC_OPTIONS,8)
EQU  X.OPT  TO  BITAND(SC_OPTIONS,16)
EQU  I.OPT  TO  BITAND(SC_OPTIONS,32)
EQU  R.OPT  TO  BITAND(SC_OPTIONS,64)
EQU  N.OPT  TO  BITAND(SC_OPTIONS,128)
EQU  S.OPT  TO  BITAND(SC_OPTIONS,256)
EQU  C.OPT  TO  BITAND(SC_OPTIONS,512)
EQU  L.OPT  TO  BITAND(SC_OPTIONS,1024)
EQU  E.OPT  TO  BITAND(SC_OPTIONS,2048)
EQU WRITE.OPT  TO  BITAND(SC_OPTIONS,4096)
EQU  U.OPT  TO  BITAND(SC_OPTIONS,8192)
EQU  A.OPT  TO  BITAND(SC_OPTIONS,16384)
EQU  K.OPT  TO  BITAND(SC_OPTIONS,32768)
EQU  B.OPT  TO  BITAND(SC_OPTIONS,65536)
EQU  F.OPT  TO  BITAND(SC_OPTIONS,131072)
*
EQU ONLY.MOD  TO  BITAND(SC_MOD_FLAGS,1)
EQU IDSUPP.MOD  TO  BITAND(SC_MOD_FLAGS,2)
EQU COLSUPP.MOD  TO  BITAND(SC_MOD_FLAGS,4)
EQU HDRSUPP.MOD  TO  BITAND(SC_MOD_FLAGS,8)
EQU DETSUPP.MOD  TO  BITAND(SC_MOD_FLAGS,16)
EQU DBLSPC.MOD  TO  BITAND(SC_MOD_FLAGS,32)
EQU ERRORSUPP.MOD  TO  BITAND(SC_MOD_FLAGS,64)
*
EQU NETWORK.FLAG TO BITAND(RUNTIME(),32768)
EQU NETWORK.MASK TO \48692047656E6521\
*
* Meta objects are stored in the FRAMES array so they can be thrown
* out by the garbage collect if necessary.
*
EQU ROS.FRAME.CACHE  TO  0
EQU ROS.FRAME.CACHE.TOP TO  9
EQU OCONV.RUN  TO SC_FRAMES(10)
EQU WITH.RUN  TO SC_FRAMES(11)
EQU WITH0.RUN  TO SC_FRAMES(12)
EQU SORT.RUN  TO SC_FRAMES(13)
EQU TEMPLATE.CACHE  TO  14
EQU TEMPLATE.NAMES  TO SC_FRAMES(14)
EQU TEMPLATE.CACHE.TOP  TO  40
EQU XLATE.CACHE  TO  41
EQU XLATE.CACHE.TOP  TO  49

*$INSERT AREV_BP, SELECT.CONSTANTS
** INCLUDED SOURCE: AREV_BP,SELECT.CONSTANTS **
* MISC EQUATES *
EQUATE MAX.WORK.LIST.LEN$ TO 32768
EQUATE MAX.SORT.KEY.LEN$ TO 32600
EQUATE MAX.LIST.LEN$ TO 65527
EQUATE MAX.LIMIT$ TO 9E99  ;* WHAT TO SET LIMIT TO TO AVOID LIMIT

* SELECT MODE NUMERIC CODES *

EQUATE COMPAT.SELECT$ TO 0
EQUATE SETTING.SELECT$ TO 1
EQUATE USING.SELECT$ TO 2
EQUATE ASSIGN.SELECT$ TO 3

* REDUCE MODE NUMERIC CODES *

EQUATE NEW.REDUCE$ TO 0
EQUATE SETTING.REDUCE$ TO 1
EQUATE AND.REDUCE$ TO 2
EQUATE OR.REDUCE$ TO 3

* SEEK MODE NUMERIC CODES *

EQUATE TOP.SEEK$ TO 0
EQUATE BOTTOM.SEEK$ TO 1
EQUATE CURRENT.SEEK$ TO 2
EQUATE MARK.SEEK$ TO 3
EQUATE RESTORE.SEEK$ TO 4

* FIELD POSITIONS FOR NEXT.GROUP *
* GROUP.LAST$:
* USED BY ALL SELECT MODES. IN INDEX MODE IS THE LAST NODE ID FOR CURRENT LIST
* GROUP.FIELD$:
* IN EXTRA LIST INDEX MODE IS THE FIELD NUMBER OF THE CURRENT LIST IN MEMORY
* GROUP.FIRST$:
* IN INDEX MODE IS THE FIRST NODE ID FOR THE CURRENT LIST IN MEMORY
*
EQUATE GROUP.LAST$  TO 1
EQUATE GROUP.FIELD$  TO 2
EQUATE GROUP.FIRST$  TO 3

* FIELD POSITIONS FOR LONG.LIST *
* USED IN EXTERNAL SELECT MODE AND BREAK SORT INDEX MODE *
* THE INDEX OF THE CURRENT OVERFLOW LIST IN THE LISTS FILE *
*
EQUATE LONG.LIST.NUMBER$ TO 1
*
* THE LARGEST INDEX OF THE OVERFLOWS IN THE LISTS FILE *
EQUATE LONG.LIST.MAX$ TO 2

* CODES FOR LIST.ACTIVE *
EQUATE INACTIVE.SELECT$  TO 0
EQUATE LATENT.FILE.SELECT$  TO 1
EQUATE LATENT.INDEX.SELECT$  TO 2
EQUATE EXTRN.SELECT$  TO 3

* CODES FOR READNEXT DIRECTION *
EQUATE ASND.TERM$  TO 0
EQUATE ASND.NONTERM$  TO 1
EQUATE DSND.TERM$  TO 2
EQUATE DSND.NONTERM$  TO 3



* SECONDS ALLOWED BETWEEN BREAKS WHILE IN READNEXT *
EQUATE BREAK.TIME$  TO 10

EQUATE V119.INITIALIZE$  TO 'I'
EQUATE V119.SORT$  TO 'S'
EQUATE V119.WRITE$  TO 'W'
EQUATE V119.EXTRACT$  TO 'E'
EQUATE V119.MERGE$  TO 'M'
EQUATE V119.LONG.EXTRACT$  TO 'L'
EQUATE V119.DELETE$  TO 'D'

*** CURSORS ARRAY EQUATES ***

EQUATE MAX.CURSORS$  TO 8
EQUATE MAX.CURSOR.ELEMENTS$  TO 12

EQUATE CURS.LIST$  TO 1  ;* referenced by number in OP118
EQUATE CURS.LIST.OFF$  TO 2  ;* referenced by number in OP118
EQUATE CURS.EXT.LIST$  TO 3
EQUATE CURS.NEXT.GROUP$  TO 4
EQUATE CURS.LIST.ACTIVE$  TO 5
EQUATE CURS.LONG.LIST$  TO 6
EQUATE CURS.QUERY.DICT$  TO 7
EQUATE CURS.PRI.FILE$  TO 8
EQUATE CURS.REDUCTION.SPEC$  TO 9
EQUATE CURS.SORT.SPEC$  TO 10
EQUATE CURS.REDUCTION.DONE$  TO 11  ;* refereced by number in OP118
EQUATE CURS.IO.PROC$  TO 12  ;* Cursor I/O process

EQUATE BY.DSND.FLAG$  TO '#' ;* FLAG FOR SELECT BY FIELD NAMES

* CODES FOR SORT.SPEC FIELD 1 *
EQUATE SORT.DIR$  TO 1
EQUATE SORT.JUST$  TO 2
EQUATE BOTTOM.VAL$  TO 3
EQUATE TOP.VAL$  TO 4
EQUATE SORT.NAME$  TO 5

* CODES FOR BY.LIST FIELD 1 *
EQUATE BY.F1.NAME$  TO 1
EQUATE BY.F1.BOTTOM$  TO 2
EQUATE BY.F1.TOP$  TO 3

* SORT.SPEC DEFINES *

EQUATE SORT.BYS$ TO 2  ;* FLAG TRUE IF DESCEND
EQUATE SORT.FMTS$ TO 3  ;* 'AL' 'AR'
EQUATE SORT.MULT$ TO 4  ;* FLAG TRUE IF MULTI-VALUE
EQUATE SORT.CALC$ TO 5  ;* VALUE TRUE IF FIELD IS SYMBOLIC
EQUATE SORT.FIELDS$ TO 6  ;* FIELD NAMES OR NUMBERS
EQUATE SORT.EXPLODE$ TO 7  ;* ANY MULTI-VALUES
EQUATE SORT.ID.ONLY$ TO 8  ;* SORTING ONLY BY @ID

* REDUCTION.SPEC DEFINES *
EQUATE REDUCT.SCRIPT$  TO 1  ;* R/LIST WITH SCRIPT
EQUATE REDUCT.SPEC.RANGE$ TO 2  ;* RANGE INFO FOR FEED FORWARD TO SELECT
EQUATE RANGE.FIELD$ TO 1
EQUATE RANGE.BOTTOM.VAL$ TO 2
EQUATE RANGE.TOP.VAL$ TO 3
EQUATE REDUCT.DONE$ TO 4
EQUATE REDUCT.CASE.FORCE$ TO 3  ;* FIELD 3 FORCE CASE FLAG (INSENSITIVITY)
*
* IF REDUCT.DONE IS TRUE THEN, IF THE RANGE IS USED BY THE SELECT THEN
* THAT WILL SATISFY ALL REDUCTION AND REDUCTION.DONE MAY BE SET TO TRUE

*** SELECT.SEEK STATUS ERROR CODES ***
EQUATE SEEK.ERR.BAD.CURS$  TO 1  ;* INVALID CURSOR
EQUATE SEEK.ERR.BAD.MODE$  TO 2  ;* INVALID MODE
EQUATE SEEK.ERR.BAD.POS$  TO 3  ;* INVALID POSITION
EQUATE SEEK.ERR.NO.SEL$  TO 4  ;* NO ACTIVE SELECT
EQUATE SEEK.ERR.BAD.SEL$  TO 5  ;* INVALID SELECT MODE
EQUATE SEEK.ERR.BAD.RN$  TO 6  ;* ERROR IN READNEXT
EQUATE SEEK.ERR.BAD.BRN$  TO 7  ;* ERROR IN BLOCK READNEXT
EQUATE SEEK.ERR.BAD.IRN$  TO 8  ;* ERROR IN INDEX READNEXT
EQUATE SEEK.ERR.BAD.ERN$  TO 9  ;* ERROR IN EXTERNAL READNEXT
* Source Date: 18:54:30  21 MAY 1992  Build ID: AREV*2.2.18  Level: 2.2

*÷ COMMON Variables  (Terminate with '%') :

*÷ LABELED COMMON Variables  (Terminate with '@') :


*÷ EQUATE Variables  (Terminate with '$') :

EQU COSMO$  TO 'Copyright (C) 1987, COSMOS, INC.'
EQU TRUE$  TO 1
EQU FALSE$  TO 0
EQU YES$  TO 1
EQU NO$  TO 0
EQU OTHERWISE$  TO 1

*÷ LOCAL Variables :

*÷ DECLARED - FUNCTIONS  called :

*÷ DECLARED - SUBROUTINES called :

*÷ INDIRECT - FUNCTIONS/SUBROUTINES called if known  (Make COMMENTS) :
*
*============================================================================

TRANSFER SC_LIST TO SAVE1
SAVE2 = SC_ATLIST_ACTIVE
SAVE2 := @RM:SC_LONG_LIST
SAVE2 := @RM:SC_EXT_LIST
SAVE2 := @RM:SC_LIST_OFF
SAVE2 := @RM:SC_PRI_FILE
SAVE2 := @RM:SC_ATQUERY_DICT
SAVE2 := @RM:SC_REDUCTION_SPEC
SAVE2 := @RM:SC_SORT_SPEC
SAVE2 := @RM:SC_ATREDUCTION_DONE
SAVE2 := @RM:SC_IO_PROC
SAVE3 = SC_NEXT_GROUP
SC_ATLIST_ACTIVE = INACTIVE.SELECT$
SC_LIST_LEVEL += 1

return 
* Source Date: 13:54:30  03 MAY 1992  Build ID: AREV*2.2.5  Level: 2.2
 
* PreCompiled On 01/17/2007 at 11:57:18AM OpenInsight version CTO
