;************************************************************************
;                                                                       *
;             DEVDMO.GLU - Developer's example/demonstration.           *
;                                                                       *
;************************************************************************
;
;				 NOTICE
;
;	 COPYRIGHT (C) 1987 Distributed Management Systems, Inc.
;	 ALL RIGHTS RESERVED.
;
; THIS PROGRAM HAS BEEN DONATED TO THE PUBLIC DOMAIN FOR EDUCATIONAL PURPOSES.
; RECEIPT OR POSSESSION OF THIS PROGRAM DOES NOT CONVEY ANY RIGHTS TO SELL
; OR OTHERWISE USE THIS PROGRAM FOR COMMERCIAL GAIN. ALL RIGHTS REMAIN VESTED 
; IN THE COPYRIGHT HOLDER.
;
;
; Edit History:
;
;[102] 06/01/88	Released via AMUS./CAE
;[101] 12/12/87 Add Headings./CAE
;[100] 11/14/87 Designed and implemented by Creed Erickson.
;
TITLE "System Developers' DART/GLUE/BASIC Interaction Example and Demonstration"

HEADING	"RUN File/DART Interaction"
HEADING	""
KEY F2
SELECTION "Begin the DEVDMO Demostration"
 EXECUTE :S|LOOKUP DEVDMO.RUN/|GOTO NO-PROG|GOTO PROG-OK
 EXECUTE ;NO-PROG
 EXECUTE :<Compiling program||>|COMPIL DEVDMO
 EXECUTE ;PROG-OK
 EXECUTE LOOKUP DEVDMO.IDX/|GOTO NO-FILE|GOTO FILE-OK
 EXECUTE ;NO-FILE
 EXECUTE :<Building Data Base files||>|ERASE DEVDMO.ID?|ISMBLD DEVDMO|5|1|36|50|3|Y|||
 EXECUTE ;FILE-OK
 EXECUTE :R|RUN DEVDMO

HEADING ""
HEADING ""
HEADING "Indirect Input/BASIC Interact"
HEADING ""
KEY F10
SELECTION "Report DEVDMO Data Base Records"
 EXECUTE :<PLEASE WAIT>|:S|ERASE DEVDRP.LST|BASIC
 EXECUTE OPEN #1, "DEVDMO.TIP", OUTPUT
 EXECUTE PRINT #1, CHR$(9);CHR$(9);CHR$(9);"N";CHR$(31);CHR$(17);CHR$(27);"X";
 EXECUTE CLOSE #1
 EXECUTE XCALL SETUSR,14,"DEVDMO.TIP"
 EXECUTE BYE|DART DEVDRP|BASIC
 EXECUTE 10 KILL "TEMP.RUN"
 EXECUTE 20 PRINT TAB(-1,0);
 EXECUTE 30 MAP1 CMDS, S, 4, "VTPQ"
 EXECUTE 40 MAP1 X$, S, 1
 EXECUTE 50 MAP1 EXEC$, S, 128
 EXECUTE 60 MAP1 CRLF, S, 2, CHR$(13)+CHR$(10)
 EXECUTE 70 PRINT : PRINT "Enter Command by first letter -"
 EXECUTE 80 INPUT "V)ue Report, T)ype Report, P)rint report, Q)uit to menu: ", X$
 EXECUTE 90 ON INSTR(1, CMDS, UCS(X$)) GOTO 200, 210, 220, 230
 EXECUTE 100 PRINT CHR$(7); : GOTO 70
 EXECUTE 200 EXEC$ = "VUE DEVDRP.LST/S" : GOTO 300
 EXECUTE 210 EXEC$ = "TYPE DEVDRP.LST" : GOTO 300
 EXECUTE 220 EXEC$ = "PRINT DEVDRP.LST" : GOTO 300
 EXECUTE 230 END
 EXECUTE 300 CHAIN ":"+CRLF+":R"+CRLF+EXEC$+CRLF
 EXECUTE COMPILE
 EXECUTE SAVE TEMP.RUN
 EXECUTE BYE
 EXECUTE :R
 EXECUTE RUN TEMP
 RETURN-AFTER-PAUSE

HEADING ""
HEADING ""
HEADING "Misc Functions"
HEADING ""
KEY F1
SELECTION "Edit DEVDMO.BAS Source Code"
 EXECUTE VUE DEVDMO.BAS|:S|ERASE *.BAK,*.BK?

SELECTION "Maintain DEVDMO.DRT Structure"
 EXECUTE :S|BASIC
 EXECUTE OPEN #1, "DEVDMO.TIP", OUTPUT
 EXECUTE PRINT #1, "MAINTAIN";CHR$(13);"DEVDMO";CHR$(27);"X";
 EXECUTE CLOSE #1
 EXECUTE XCALL SETUSR,14,"DEVDMO.TIP"
 EXECUTE BYE|:R|DART|:S|ERASE DEVDMO.TIP,*.BAK,*.BK?

KEY F8
 EXECUTE GLUE DEVDM2
 RETURN-AFTER-PAUSE

KEY MENU
 EXECUTE :<Performing house-keeping||>
 EXECUTE :S|BASIC|XCALL SETUSR,0,0|BYE
 EXECUTE :R|DEL*
 EXECUTE ERASE *.BAK,*.BK?,DEVDMO.TIP,DEVDRP.LST
 EXIT

MESSAGE "Demo switches between DEVDMO.RUN and DEVDMO.DRT - F8 for special functions"