home *** CD-ROM | disk | FTP | other *** search
- ********************** ' MultiNet Source Code ' ***********************
- ** ' SBT Corporation ' **
- ** ' One Harbor Drive, Sausalito, California 94965 ' **
- ** ' Telephone (415) 331-9900 ' **
- ***********************************************************************
- ** ' (c) Copyright 1984, Revisions 1985 - 1990 SBT Corporation ' **
- ** ' All Rights Reserved by SBT Corporation ' **
- ** ' ' **
- ***********************************************************************
- ** ' 06/04/90 = Last Update ** SYSSTRT.PRG ** Version 6.35.00 ' **
- ***********************************************************************
- * ' System wide startup program, called by XX.PRG
- *
- SET CONSOLE ON
- SET DEVICE TO SCREEN
- SET PRINT OFF
- SET SAFETY OFF
- SELECT a
- STORE ' ' TO mans
- DO CASE
- CASE clipper .OR. xquicks
- STORE .t. TO mfound
- CASE FILE('&m0cmddr.sysmult.prg')
- STORE .t. TO mfound
- CASE FILE('&m0cmddr.sysmult.fox')
- STORE .t. TO mfound
- CASE FILE('&m0cmddr.sysmult.fxp')
- STORE .t. TO mfound
- CASE FILE('&m0cmddr.sysmult.cod')
- STORE .t. TO mfound
- CASE FILE('&m0cmddr.sysmult.cmd')
- STORE .t. TO mfound
- CASE FILE('&m0cmddr.sysmult.run')
- STORE .t. TO mfound
- CASE FILE('&m0cmddr.sysmult.dbo')
- STORE .t. TO mfound
- OTHERWISE
- STORE .f. TO mfound
- ENDCASE
- IF mfound
- SET PROCEDURE TO sysmult
- ELSE
- USE
- CLEAR
- ?? CHR(7)
- STORE ' ' TO mans
- @ 2,4 SAY 'Warning [9004] - Procedure File Missing.'
- @ 4,4 SAY 'Informational only - No data has been lost.'
- @ 6,4 SAY 'The Procedure File SYSMULT was not found on ' + m0cmddr
- @ 7,4 SAY 'Please reinstall the system and check to be sure all of the'
- @ 8,4 SAY 'files are present on the Program Drive and Directory.'
- @ 10,4 SAY 'Program Cancelled. Press any key to continue...' GET mans
- READ
- SET TALK ON
- SET SAFETY ON
- CANCEL
- ENDIF
- RELEASE m0dbfdr, m0comp, m0company, m0cname, ;
- m0compno, m0date, m0tmpf1, m0tmpf2, m0tmpf3, m0tmpf4, m0tmpf5, m0tmpf6, ;
- m0link, m0add, m0del, m0seqno, m0miscno, action, m0port
- RELEASE m0ret, m0deflink, m0new, m0change, m0pass, ;
- m0dept, m0color, m0monitor, m0usedep, m0stpprn, m0prnesc, m0litebar
- PUBLIC m0dbfdr, m0comp, m0company, m0cname, ;
- m0compno, m0date, m0tmpf1, m0tmpf2, m0tmpf3, m0tmpf4, m0tmpf5, m0tmpf6, ;
- m0link, m0add, m0del, m0seqno, m0miscno, action, m0port
- PUBLIC m0ret, m0deflink, m0new, m0change, m0pass, ;
- m0color, m0monitor, m0stpprn, m0prnesc, m0litebar
- RELEASE foxpro, mdbase4
- PUBLIC foxpro, mdbase4
- IF 'DBASE IV' $ UPPER(VERSION())
- STORE .t. TO mdbase4
- ENDIF
- IF m0pgmid = 'GL'
- PUBLIC m0dept, m0usedep
- ENDIF
- * ' We force fox true for early SCO versions that didn't support DBMS var
- IF 'NIX' $ UPPER(OS()) .AND. 'FOX' $ UPPER(VERSION())
- STORE .t. TO fox
- ENDIF
- * ' Define which platforms support the litebar menu system
- * ' As of 6/1/90 Only Fox 2.x and FoxPro will use litebar menus
- STORE .f. TO m0litebar
- DO CASE
- * ' Leave litebar to .f. if 'MA' version 6.10 or less
- CASE VAL(m0vers) < 6.30 .AND. .NOT. (m0pgmid = 'MA' .AND. ;
- VAL(m0vers) > 6.10)
- * ' leave litebar false for non supported versions
- CASE foxpro
- STORE .t. TO m0litebar
- CASE fox .AND. ' 2.' $ VERSION()
- STORE .t. TO m0litebar
- ENDCASE
- IF 'MAC' $ UPPER(OS())
- STORE .f. TO m0litebar
- ENDIF
- * ' Initialize the print escape values.
- STORE .f. TO m0stpprn, m0prnesc
- * ' Check for these variables in case calling program is early version
- IF TYPE('m0switchar') = 'U'
- PUBLIC m0switchar
- ENDIF
- IF TYPE('m0single') = 'U'
- RELEASE m0single
- PUBLIC m0single
- STORE .f. TO m0single
- ENDIF
- IF TYPE('m0trial') = 'U'
- RELEASE m0trial
- PUBLIC m0trial
- STORE .f. TO m0trial
- ENDIF
- * ' prepare the picure information for decimals to input for inventory
- RELEASE mdecimal0, mdecimal1, mdecimal2, mdecimal3
- PUBLIC mdecimal0, mdecimal1, mdecimal2, mdecimal3
- STORE '#####' TO mdecimal0
- STORE '#####.#' TO mdecimal1
- STORE '#####.##' TO mdecimal2
- STORE '#####.###' TO mdecimal3
- CLEAR
- * ' Process of creating unique temporary file names for each user
- LOCATE FOR UPPER(sysid) = 'MM '
- DO p0rlockn
- REPLACE int3 WITH IIF(int3 < 999993, int3 + 6, 6)
- UNLOCK
- STORE SUBSTR(STR(100000000 + int3 - 5,9,0),2,8) TO m0tmpf1
- STORE SUBSTR(STR(100000000 + int3 - 4,9,0),2,8) TO m0tmpf2
- STORE SUBSTR(STR(100000000 + int3 - 3,9,0),2,8) TO m0tmpf3
- STORE SUBSTR(STR(100000000 + int3 - 2,9,0),2,8) TO m0tmpf4
- STORE SUBSTR(STR(100000000 + int3 - 1,9,0),2,8) TO m0tmpf5
- STORE SUBSTR(STR(100000000 + int3,9,0),2,8) TO m0tmpf6
- * ' Set up colors/shadings on monitors
- IF (m0os = 'D' .OR. (fox .AND. 'MAC' $ UPPER(OS()))) .AND. .NOT. m0trial
- STORE TRIM(LTRIM(SUBSTR(str5,2,25))) TO m0color
- DO WHILE ' ' $ m0color
- STORE AT(' ',m0color) TO mpos
- STORE SUBSTR(m0color,1,mpos-1) + SUBSTR(m0color,mpos+1) TO m0color
- ENDDO
- IF SUBSTR(str5,1,1) $ 'CM'
- SET COLOR TO &m0color
- STORE SUBSTR(str5,1,1) TO m0monitor
- ELSE
- * ' If sysdata isn't set to Color or Mono assume 'Ask on Startup'
- IF ISCOLOR()
- STORE 'C' TO m0monitor
- ELSE
- STORE 'M' TO m0monitor
- ENDIF
- * ' If monitor type not defined
- @ 22,10 SAY 'What type of Monitor do you have ? (Color/Mono) ' + ;
- SUBSTR(m0border,181,5) GET m0monitor PICTURE '!'
- READ SAVE
- DO WHILE .NOT. m0monitor $ 'CM'
- ?? CHR(7)
- READ SAVE
- ENDDO
- CLEAR GETS
- DO CASE
- CASE m0monitor = 'C' .AND. LEN(m0color) > 0
- SET COLOR TO &m0color
- CASE m0monitor = 'C'
- SET COLOR TO W+/B,N/W,B
- CASE 'MAC' $ UPPER(OS()) .AND. fox
- SET COLOR TO N/W,W/N,N
- OTHERWISE
- SET COLOR TO W+/N,N/W,N
- ENDCASE
- ENDIF && SUBSTR(str5,1,1) $ 'CM'
- ENDIF && (m0os = 'D' .OR. (fox .AND. 'MAC' $ UPPER(OS()))) .AND. .NOT. m0trial
- * ' Set to latest of clock date or stored SBT last used date for system date
- STORE DATE() TO m0date
- IF CTOD(SUBSTR(a->str8,1,8)) > m0date .OR. SUBSTR(DTOC(DATE()),7,2) = '80'
- STORE CTOD(SUBSTR(a->str8,1,8)) TO m0date
- CLEAR
- ?? CHR(7)
- IF SUBSTR(DTOC(DATE()),7,2) = '80'
- @ 15,3 SAY ;
- 'NOTE: Your computer appears to have no clock.'
- @ 16,9 SAY '(The operating system date is ' + DTOC(DATE()) + '.)'
- ELSE
- @ 15,3 SAY ;
- "NOTE: The SBT system date is greater than computer's clock date."
- ENDIF
- STORE DTOC(m0date) TO mdate
- @ 19,15 SAY 'Please enter Current Date ' + SUBSTR(m0border,179,7) ;
- GET mdate PICTURE '##/##/##'
- READ SAVE
- DO WHILE DTOC(CTOD(mdate)) <> mdate .OR. ' ' $ mdate
- ?? CHR(7)
- @ 23,2 SAY 'Invalid date, please reenter'
- READ SAVE
- @ 23,0
- ENDDO
- CLEAR GETS
- DO p0rlockn
- REPLACE str8 WITH mdate + SUBSTR(str8,9)
- STORE CTOD(mdate) TO m0date
- ELSE
- DO p0rlockn
- REPLACE str8 WITH DTOC(m0date) + SUBSTR(a->str8,9,2)
- ENDIF
- UNLOCK
- * ' Set up version heading for billboard 6.2 was start of Six PLUS
- IF VAL(m0vers) < 6.2
- STORE m0system + ' Series Six - Version ' + m0vers TO mtitle
- ELSE
- STORE m0system + ' Series Six Plus - Version ' + m0vers TO mtitle
- ENDIF
- * ' The trial billboard/copyright screen is a little different
- IF m0trial
- IF ISCOLOR()
- SET COLOR TO W+/B,N/W,B
- ELSE
- SET COLOR TO W+/N,N/W,N
- ENDIF
- CLEAR
- @ 1,40 - INT(LEN(mtitle)/2) SAY mtitle
- TEXT
- Copyright (c) 1990 SBT Corporation
-
- This trial program has been provided pursuant to a License
- Agreement containing restrictions on its use. The program
- contains valuable trade secrets and proprietary information
- of SBT Corporation and is protected by federal copyright
- law. The trial program may be copied and distributed in any
- form or medium, and may be used in any manner not
- specifically prohibited by said License Agreement.
-
- For further information regarding SBT's complete product
- line, call or write:
-
- SBT Corporation
- Sales Department
- One Harbor Drive
- Sausalito, Ca 94965
- 415/331-9900
-
- ENDTEXT
- * ' Special trial specific installation routines
- DO p0trinst
- ELSE
- CLEAR
- @ 1,40 - INT(LEN(mtitle)/2) SAY mtitle
- TEXT
- Copyright (c) 1990 SBT Corporation
-
- This software has been provided pursuant to a License
- Agreement containing restrictions on its use. The software
- contains valuable trade secrets and proprietary information
- of SBT Corporation and is protected by federal copyright
- law. It may not be copied or distributed in any form or
- medium, disclosed to third parties, or used in any manner
- not provided for in said License Agreement except with
- prior written authorization from SBT.
-
- For further information regarding SBT's complete product
- line, call or write:
-
- SBT Corporation
- Sales Department
- One Harbor Drive
- Sausalito, Ca 94965
- 415/331-9900
-
- ENDTEXT
- ENDIF
- IF FILE ('sysbuil.dbf')
- DELETE FILE sysbuil.dbf
- ENDIF
- IF m0litebar
- STORE 'SYS' + m0pgmid + 'MN' TO menuf
- STORE 'SYS' + m0pgmid + 'MO' TO menuo
- IF .NOT. FILE ('&m0sysdr.&menuf..dbf')
- STORE .f. TO m0litebar
- ENDIF
- ENDIF
- IF m0litebar
- IF .NOT. (FILE ('&m0sysdr.&menuf..ndx') .AND. FILE('&m0sysdr.&menuo..ndx'))
- @ 23,0
- @ 23,2 SAY '***** Building Indexes for Light Bar Menus *****'
- USE &m0sysdr.&menuf
- COPY TO &m0sysdr.tempfile FOR .NOT. DELETED()
- USE
- DELETE FILE &m0sysdr.&menuf..dbf
- RENAME &m0sysdr.tempfile.dbf TO &m0sysdr.&menuf..dbf
- USE &m0sysdr.&menuf
- INDEX ON menuprg+SUBSTR(STR(1000 + disprow + dispcol,4,0),2,3) ;
- TO &m0sysdr.&menuo..ndx
- INDEX ON menuprg+SUBSTR(title,1,1) TO &m0sysdr.&menuf..ndx
- ENDIF
- ENDIF
- USE &m0sysdr.sysdata
- @ 23,0
- * ' New fields to access multinet files from both DOS and Mac
- IF TYPE('maclink1') = 'U'
- STORE FLOCK() TO lockedf
- IF .NOT. lockedf
- @ 23,0
- @ 23,3 SAY 'File ' + UPPER(DBF()) + '. Attempting to lock file...'
- DO WHILE .NOT. lockedf
- STORE FLOCK() TO lockedf
- ENDDO
- ENDIF
- @ 23,0
- @ 23,1 SAY ;
- '*** Updating SYSDATA file for networking with Macintosh computers ***'
- COPY STRUCTURE EXTENDED TO sysbuil
- USE sysbuil EXCLUSIVE
- LOCATE FOR field_name = 'MACPROG'
- IF EOF()
- APPEND BLANK
- REPLACE field_name WITH 'MACPROG', field_type WITH 'C', ;
- field_len WITH 40, field_dec WITH 0
- ENDIF
- LOCATE FOR field_name = 'MACDATA'
- IF EOF()
- APPEND BLANK
- REPLACE field_name WITH 'MACDATA', field_type WITH 'C', ;
- field_len WITH 40, field_dec WITH 0
- ENDIF
- LOCATE FOR field_name = 'MACSYST'
- IF EOF()
- APPEND BLANK
- REPLACE field_name WITH 'MACSYST', field_type WITH 'C', ;
- field_len WITH 40, field_dec WITH 0
- ENDIF
- APPEND BLANK
- REPLACE field_name WITH 'MACLINK1', field_type WITH 'C', ;
- field_len WITH 40, field_dec WITH 0
- APPEND BLANK
- REPLACE field_name WITH 'MACLINK2', field_type WITH 'C', ;
- field_len WITH 40, field_dec WITH 0
- APPEND BLANK
- REPLACE field_name WITH 'MACLINK3', field_type WITH 'C', ;
- field_len WITH 40, field_dec WITH 0
- USE
- CREATE systemp.dbf FROM sysbuil.dbf
- USE systemp EXCLUSIVE
- APPEND FROM sysdata
- USE
- DELETE FILE sysdata.dbf
- DELETE FILE sysbuil.dbf
- RENAME systemp.dbf TO sysdata.dbf
- ENDIF
- * ' Added fields in SYSTABL in version 6.21 for maximum value checking
- IF FILE('systabl.dbf')
- USE systabl
- IF TYPE('tblnum01') = 'U'
- @ 23,0
- @ 23,1 SAY ;
- '*** Updating SYSTABL.DBF structure to support range checking ***'
- COPY TO sysbuil.dbf STRUCTURE EXTENDED
- USE sysbuil EXCLUSIVE
- APPEND BLANK
- REPLACE field_name WITH 'TBLNUM01', field_type WITH 'N', ;
- field_len WITH 15, field_dec WITH 4
- APPEND BLANK
- REPLACE field_name WITH 'TBLNUM02', field_type WITH 'N', ;
- field_len WITH 15, field_dec WITH 4
- APPEND BLANK
- REPLACE field_name WITH 'TBLNUM03', field_type WITH 'N', ;
- field_len WITH 15, field_dec WITH 4
- USE
- CREATE systemp.dbf FROM sysbuil.dbf
- USE systemp EXCLUSIVE
- APPEND FROM systabl
- USE
- DELETE FILE systabl.dbf
- DELETE FILE sysbuil.dbf
- RENAME systemp.dbf TO systabl.dbf
- ENDIF && TYPE('tblnum01') = 'U'
- ENDIF && FILE('systabl.dbf')
- USE sysdata
- LOCATE FOR UPPER(sysid) = 'MM '
- IF .NOT. m0single
- STORE ' ' TO mans
- DO WHILE SUBSTR(str10,1,1) = 'Y' .AND. mans <> 'Q'
- * ' Clear file from current use area before displaying error msg
- USE
- * ' Display System Maintenance operation message
- DO syshelp WITH 10002
- STORE ' ' TO mans
- @ 21,4 SAY 'Press Q to quit or any other key to retry access...' ;
- GET mans PICTURE '!'
- READ
- IF mans <> 'Q'
- USE sysdata
- LOCATE FOR UPPER(sysid) = 'MM '
- ELSE
- STORE .t. TO mquit
- RETURN
- ENDIF
- ENDDO
- ENDIF
- DO p0setenv
- IF m0pgmid <> 'MM'
- DO p0usrcnt WITH .t.
- ENDIF
- RETURN
- *
- * ' $Revision: 1.36 $
- * ' $Date: 30 May 1990 17:17:06 $
- **********************
- ** ' SYSSTRT.PRG ' **
- ** ' 405 Lines ' **
- **********************