hide all.
display skip(2) " ********* LOADING the database ********* " skip(1) " ********* please stand by............." with title "WELCOME TO HLC DEMO PROGRAM" row 5 centered frame hdr. output to hldemout. run prodict/load_df.p ("customer.df"). run prodict/load_df.p ("agedar.df"). run prodict/load_df.p ("monthly.df"). run prodict/load_df.p ("tank.df"). /* create signal file to indicate success */ if opsys = "unix" then do: unix cat >hlcsigfile & . end. hide all. |
#define FUNCTEST(nam, rout) \
if (strcmp(nam, pfunnam) == 0) \ return rout(argc,argv); /* PROGRAM: PRODSP * * This is the interface to all C routines that * ABL has associated 'call' statements to. */ long PRODSP(pfunnam, argc, argv) char *pfunnam; /* Name of function to call */ int argc; char *argv[]; { /* Interface to installation test */ FUNCTEST( "SUBVRD", subvrd) FUNCTEST( "SUBVWT", subvwt) FUNCTEST( "SUBFRD", subfrd) FUNCTEST( "SUBFWT", subfwt) FUNCTEST( "SUBFIX", subfix) FUNCTEST( "SUBVIX", subvix) FUNCTEST( "SUBARG", subarg) FUNCTEST( "SUBCLR", subclr) FUNCTEST( "SUBCLS", subcls) FUNCTEST( "SUBINT", subint) /* Interface to 'screen' examples */ FUNCTEST ("EXAMPLE1", example1); FUNCTEST ("EXAMPLE2", example2); /* Interface to 'tank' example */ FUNCTEST ("AVCALC", hlvcalc); return 1; } |
DEFINE VARIABLE answer AS CHARACTER NO-UNDO FORMAT "9".
DEFINE VARIABLE choice AS CHARACTER NO-UNDO INITIAL "1,2,3,4". DEFINE VARIABLE last1 AS LOGICAL NO-UNDO INITIAL TRUE. DEFINE VARIABLE last2 AS LOGICAL NO-UNDO INITIAL TRUE. RUN loaddb.p. INPUT FROM TERMINAL. OUTPUT TO TERMINAL. FORM SKIP(4) SPACE(4) " 1 - Installation Test" SKIP(1) SPACE(4) " 2 - TANK Capacity Calculation demo " SKIP(1) SPACE(4) " 3 - Screen raw/cooked demo " SKIP(1) SPACE(4) " 4 - Exit Session" SKIP(2) SPACE(4) " Enter example selection ===> " answer no-label WITH CENTERED TITLE " EXAMPLE MENU " FRAME example. FORM last1 last2 WITH FRAME lastcheck. REPEAT: HIDE ALL. UPDATE answer AUTO-RETURN VALIDATE(LOOKUP(answer,choice) <> 0,"Enter one of choices displayed.") WITH FRAME example. HIDE ALL. IF answer = "1" THEN DO: /* Check to see if need to reinitialize database. */ IF last1 THEN DO: last1 = TRUE. last2 = FALSE. RUN initdb.p. HIDE ALL. END. last1 = TRUE. RUN hltest.p. END. ELSE IF answer = "2" THEN DO: /* Check to see if need to reinitialize database. */ IF last2 THEN DO: last2 = TRUE. last1 = FALSE. RUN initdb.p. HIDE ALL. END. last2 = TRUE. RUN hltank.p. END. ELSE IF answer = "3" THEN RUN hlscreen.p. ELSE IF answer = "4" THEN QUIT. end. HIDE ALL. QUIT. |