




















                                 BoxSoft Development














                                     Super Models









                                         for

                        The Clarion Professional Developer 2.1

                                 (Batches 2105-2110)













                              BoxSoft Super Models 3.6G






                                  Table of Contents


     Introduction
       Contacting BoxSoft  . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
       Installation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
         Getting The Files Onto Your System  . . . . . . . . . . . . . . . . 1-2
           Downloading From The BoxSoft BBS  . . . . . . . . . . . . . . . . 1-2
           Downloading From Another BBS  . . . . . . . . . . . . . . . . . . 1-3
           Installing from a Diskette  . . . . . . . . . . . . . . . . . . . 1-4
         Converting VERSION.RAW to SUPER.MDL . . . . . . . . . . . . . . . . 1-4
         Adding the SUPER Directory To Your DOS Path . . . . . . . . . . . . 1-5
         Modify OM.COM / MITTEN.COM (for users of Mitten's Overlay Manager)  1-5
       What is a Model File? . . . . . . . . . . . . . . . . . . . . . . . . 1-6

     Application Style
       Setting Global Defaults . . . . . . . . . . . . . . . . . . . . . . . 2-1
       Setting Local Defaults  . . . . . . . . . . . . . . . . . . . . . . . 2-2
       Global Default Variables  . . . . . . . . . . . . . . . . . . . . . . 2-3
         File Modes  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
           sSingleMulti  . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
           sIOpen  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
           sOpenAtStart  . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
           sWarnCreate . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
           sWrnCreatPC . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
           sWrnCreatSec  . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
           sWrnCreatTag  . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
           sWrnCreatHlp  . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
         Miscellaneous Keys Options  . . . . . . . . . . . . . . . . . . . . 2-5
           Accept_Key  . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
           Reject_Key  . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
           sXtra_Accept  . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
           sXtra_Reject  . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
           sXtra_Esc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
           sQBE_Key  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
           sQBEAskEdit . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
           sAskFirstTag  . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
           sUp_Ok  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
           sTab_Ok . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
           sAcptExitTbl  . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
           sAcptExitMnu  . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
         Table Features  . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
           sHotTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
           sSinglAddKey  . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
           sSinglAddMem  . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
           sMultiAddKey  . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
           sMultiAddMem  . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
           sMultiShow  . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
           sAddEmptyMod  . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
           sCopy_Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
           sChange_Key . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
           sView_Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
           sDelete_Key . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9
         Locator Features  . . . . . . . . . . . . . . . . . . . . . . . . . 2-9
           sFindRow  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9
           sLocateJust . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9
           sLocateFill . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9


                              BoxSoft Super Models 3.6G




         Menu Options  . . . . . . . . . . . . . . . . . . . . . . . . . .  2-10
           sEsc_Ok . . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-10
           sClrAction  . . . . . . . . . . . . . . . . . . . . . . . . . .  2-10
           sAutoExit . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-10
         Message Options . . . . . . . . . . . . . . . . . . . . . . . . .  2-10
           sPausMsgType  . . . . . . . . . . . . . . . . . . . . . . . . .  2-10
           sPausMsgBeep  . . . . . . . . . . . . . . . . . . . . . . . . .  2-10
           sPauseYNBeep  . . . . . . . . . . . . . . . . . . . . . . . . .  2-11
           sSetMsgBeep . . . . . . . . . . . . . . . . . . . . . . . . . .  2-11
           sJustify  . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-11
           sJustMemMsg . . . . . . . . . . . . . . . . . . . . . . . . . .  2-11
           sNormMsgFHue  . . . . . . . . . . . . . . . . . . . . . . . . .  2-11
           sNormMsgBHue  . . . . . . . . . . . . . . . . . . . . . . . . .  2-11
           sErrMsgFHue . . . . . . . . . . . . . . . . . . . . . . . . . .  2-11
           sErrMsgBHue . . . . . . . . . . . . . . . . . . . . . . . . . .  2-11
           sChkAbort . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-12
           sChkDelete  . . . . . . . . . . . . . . . . . . . . . . . . . .  2-12
           sChkAddEmpty  . . . . . . . . . . . . . . . . . . . . . . . . .  2-12
           sLogoPause  . . . . . . . . . . . . . . . . . . . . . . . . . .  2-12
           Message Strings . . . . . . . . . . . . . . . . . . . . . . . .  2-13
         Progress Bar Options  . . . . . . . . . . . . . . . . . . . . . .  2-13
           sPB_FgDone  . . . . . . . . . . . . . . . . . . . . . . . . . .  2-13
           sPB_BgDone  . . . . . . . . . . . . . . . . . . . . . . . . . .  2-13
           sPB_FgRemain  . . . . . . . . . . . . . . . . . . . . . . . . .  2-13
           sPB_BgRemain  . . . . . . . . . . . . . . . . . . . . . . . . .  2-13
           sFillProg . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-13
         Tagging Options . . . . . . . . . . . . . . . . . . . . . . . . .  2-14
           sSingMultTag  . . . . . . . . . . . . . . . . . . . . . . . . .  2-14
           sTagFilename  . . . . . . . . . . . . . . . . . . . . . . . . .  2-14
           sTagChar  . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-14
           sScrollTags . . . . . . . . . . . . . . . . . . . . . . . . . .  2-15
           sWipeTags . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-15
           sQBEWipeTags  . . . . . . . . . . . . . . . . . . . . . . . . .  2-15
           Tagging Keys  . . . . . . . . . . . . . . . . . . . . . . . . .  2-15
         Dialing . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-16
           sDialPort . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-16
           sDialInit . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-16
           sDialPrefix . . . . . . . . . . . . . . . . . . . . . . . . . .  2-16
           sDialSuffix . . . . . . . . . . . . . . . . . . . . . . . . . .  2-16
           sDialHangup . . . . . . . . . . . . . . . . . . . . . . . . . .  2-16
           sDialInitW  . . . . . . . . . . . . . . . . . . . . . . . . . .  2-16
           sDialWait . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-17
           sDialHotFHue  . . . . . . . . . . . . . . . . . . . . . . . . .  2-17
         Arrows On Tables  . . . . . . . . . . . . . . . . . . . . . . . .  2-17
           sArrows . . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-17
           sSTArrows . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-17
           sUpArrow  . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-17
           sDownArrow  . . . . . . . . . . . . . . . . . . . . . . . . . .  2-17
           sNoArrow  . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-18
         Idle Procedures, Clocks and Timeouts  . . . . . . . . . . . . . .  2-18
           sIdle . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-18
           sIdlePause  . . . . . . . . . . . . . . . . . . . . . . . . . .  2-18
           sDateClock  . . . . . . . . . . . . . . . . . . . . . . . . . .  2-18
           sDateRow  . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-18
           sDateCol  . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-18
           sDateFHue . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-18
           sDateBHue . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-18


                              BoxSoft Super Models 3.6G




           eDateFormat . . . . . . . . . . . . . . . . . . . . . . . . . .  2-19
           sTimeClock  . . . . . . . . . . . . . . . . . . . . . . . . . .  2-19
           sTimeRow  . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-19
           sTimeCol  . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-19
           sTimeFHue . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-19
           sTimeBHue . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-19
           eTimeFormat . . . . . . . . . . . . . . . . . . . . . . . . . .  2-19
           sPathClock  . . . . . . . . . . . . . . . . . . . . . . . . . .  2-19
           sPathRow  . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-19
           sPathCol  . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-20
           sPathFHue . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-20
           sPathBHue . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-20
           sMemClock . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-20
           sMemRow . . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-20
           sMemCol . . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-20
           sMemFHue  . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-20
           sMemBHue  . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-20
           eMemFormat  . . . . . . . . . . . . . . . . . . . . . . . . . .  2-20
           sMemDivisor . . . . . . . . . . . . . . . . . . . . . . . . . .  2-21
           sMemType  . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-21
           sLClockTrim . . . . . . . . . . . . . . . . . . . . . . . . . .  2-21
           sRClockTrim . . . . . . . . . . . . . . . . . . . . . . . . . .  2-21
           sTimeout  . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-21
         Report Options  . . . . . . . . . . . . . . . . . . . . . . . . .  2-22
           sReRun  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-22
           sGetDevice  . . . . . . . . . . . . . . . . . . . . . . . . . .  2-22
         Batch Procedure Options . . . . . . . . . . . . . . . . . . . . .  2-22
           sBtchScrType  . . . . . . . . . . . . . . . . . . . . . . . . .  2-22
         Security Options  . . . . . . . . . . . . . . . . . . . . . . . .  2-22
           sSecurity . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-22
           sLogOn  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-23
           sSecType  . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-23
           sChkPrevLog . . . . . . . . . . . . . . . . . . . . . . . . . .  2-23
           sPassEcho . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-24
           sMaxTries . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-24
           sBackDoor . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-24
           sShowDenied . . . . . . . . . . . . . . . . . . . . . . . . . .  2-24
           Default Doors . . . . . . . . . . . . . . . . . . . . . . . . .  2-24
         Form Options  . . . . . . . . . . . . . . . . . . . . . . . . . .  2-25
           sLoopToTop  . . . . . . . . . . . . . . . . . . . . . . . . . .  2-25
           sMemLopToTop  . . . . . . . . . . . . . . . . . . . . . . . . .  2-25
         Printer Control Options . . . . . . . . . . . . . . . . . . . . .  2-25
           sPC_Upd_Ok  . . . . . . . . . . . . . . . . . . . . . . . . . .  2-25
           sAskPrnName . . . . . . . . . . . . . . . . . . . . . . . . . .  2-26
         Super Table Options . . . . . . . . . . . . . . . . . . . . . . .  2-26
           sPrevTbl_Key  . . . . . . . . . . . . . . . . . . . . . . . . .  2-26
           sNextTbl_Key  . . . . . . . . . . . . . . . . . . . . . . . . .  2-26
           sMenuTbl_Key  . . . . . . . . . . . . . . . . . . . . . . . . .  2-26
           sWrap . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-26
           sKeepRec  . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-26
         Field Help Options  . . . . . . . . . . . . . . . . . . . . . . .  2-27
           sHelpRow, sHelpCol, sHelpRows, sHelpCols  . . . . . . . . . . .  2-27
           sHelpFilenam  . . . . . . . . . . . . . . . . . . . . . . . . .  2-27
           sHelpEditKey  . . . . . . . . . . . . . . . . . . . . . . . . .  2-27
         Miscellaneous Options . . . . . . . . . . . . . . . . . . . . . .  2-27
           sCalcDepth  . . . . . . . . . . . . . . . . . . . . . . . . . .  2-27
           sBlankTime  . . . . . . . . . . . . . . . . . . . . . . . . . .  2-27


                              BoxSoft Super Models 3.6G




           sShadow . . . . . . . . . . . . . . . . . . . . . . . . . . . .  2-28

     Using the Features
       Designer's Building Blocks  . . . . . . . . . . . . . . . . . . . . . 3-1
       Menu  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1-1
         Pull Down Menus . . . . . . . . . . . . . . . . . . . . . . . . . 3-1-1
           Create a Horizontal Menu  . . . . . . . . . . . . . . . . . . . 3-1-1
           Create the Vertical Menus . . . . . . . . . . . . . . . . . . . 3-1-2
           Creating Subordinate Vertical Menus . . . . . . . . . . . . . . 3-1-3
         Disabling the Esc_Key and Reject_Key  . . . . . . . . . . . . . . 3-1-4
         Clearing the Action Code  . . . . . . . . . . . . . . . . . . . . 3-1-4
         Exiting a Menu Automatically  . . . . . . . . . . . . . . . . . . 3-1-5
       Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2-5
         Adding Single and Multiple Records  . . . . . . . . . . . . . . . 3-2-5
         Copying Records . . . . . . . . . . . . . . . . . . . . . . . . . 3-2-7
         Customizing Locators  . . . . . . . . . . . . . . . . . . . . . . 3-2-8
         Using Hot Tables  . . . . . . . . . . . . . . . . . . . . . . . . 3-2-8
         Simulating Scrolling Data Entry Tables  . . . . . . . . . . . . . 3-2-8
         Disabling Add, Change and Delete  . . . . . . . . . . . . . . . . 3-2-9
         Using Tag Tables  . . . . . . . . . . . . . . . . . . . . . . .  3-2-10
         Using Pick Tables . . . . . . . . . . . . . . . . . . . . . . .  3-2-11
         Adding "More That-a-way" Arrows . . . . . . . . . . . . . . . .  3-2-11
         Creating Batch Procedures . . . . . . . . . . . . . . . . . . .  3-2-12
         Creating TagBatch Procedures  . . . . . . . . . . . . . . . . .  3-2-14
         Placing Tables On Forms . . . . . . . . . . . . . . . . . . . .  3-2-14
         Super Tables  . . . . . . . . . . . . . . . . . . . . . . . . .  3-2-16
         Exiting a Table With The Accept_Key . . . . . . . . . . . . . .  3-2-17
         Changing the Pointer Color  . . . . . . . . . . . . . . . . . .  3-2-17
         Displaying the Table in Reverse Order . . . . . . . . . . . . .  3-2-18
         Formatted Locators  . . . . . . . . . . . . . . . . . . . . . .  3-2-18
       Form  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  3-3-18
         Looping From The Bottom To The Top Of The Form  . . . . . . . .  3-3-18
         Jumping Between Fields Using Hot Keys . . . . . . . . . . . . .  3-3-18
         Creating Multi-Page Forms . . . . . . . . . . . . . . . . . . .  3-3-19
         Checking Before Aborting Changes  . . . . . . . . . . . . . . .  3-3-20
         Checking Before Deleting Records  . . . . . . . . . . . . . . .  3-3-20
         Forcing The Next Procedure  . . . . . . . . . . . . . . . . . .  3-3-20
         Stopping The Form From Saving The Record  . . . . . . . . . . .  3-3-20
         Creating OtherProcs . . . . . . . . . . . . . . . . . . . . . .  3-3-21
       Report  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  3-4-21
         Using Generic Printer Controls  . . . . . . . . . . . . . . . .  3-4-21
         Re-Running a Report . . . . . . . . . . . . . . . . . . . . . .  3-4-23
         Filtering with Tags . . . . . . . . . . . . . . . . . . . . . .  3-4-23
         Creating a TagReport  . . . . . . . . . . . . . . . . . . . . .  3-4-23
         Restricting Min/Max Memo Lengths  . . . . . . . . . . . . . . .  3-4-24
         Printing Reports in Reverse Order . . . . . . . . . . . . . . .  3-4-24
       General . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  3-5-25
         Maintaining Referential Integrity . . . . . . . . . . . . . . .  3-5-25
         Intelligently Opening Data Files  . . . . . . . . . . . . . . .  3-5-29
         Providing An Extra Accept_Key/Reject_Key/Esc_Key  . . . . . . .  3-5-32
         Placing On-Screen Clocks  . . . . . . . . . . . . . . . . . . .  3-5-32
         Using Tab_Key/Shft_Tab For Field-To-Field Movement  . . . . . .  3-5-32
         Making The Up_Key Work Properly . . . . . . . . . . . . . . . .  3-5-33
         Dialing a Phone Number  . . . . . . . . . . . . . . . . . . . .  3-5-33
         Utilizing Security  . . . . . . . . . . . . . . . . . . . . . .  3-5-34
         Action EQUATE's . . . . . . . . . . . . . . . . . . . . . . . .  3-5-35
         Improving Error Checking  . . . . . . . . . . . . . . . . . . .  3-5-35


                              BoxSoft Super Models 3.6G




         Adding Extra Hot Keys . . . . . . . . . . . . . . . . . . . . .  3-5-35
         Utilizing Fast Range Filters  . . . . . . . . . . . . . . . . .  3-5-36
         Accessing Source Points . . . . . . . . . . . . . . . . . . . .  3-5-37
         Query By Example  . . . . . . . . . . . . . . . . . . . . . . .  3-5-39
         Inactivity Timeout  . . . . . . . . . . . . . . . . . . . . . .  3-5-42
         Extra Memo Fields . . . . . . . . . . . . . . . . . . . . . . .  3-5-42
         Field-Sensitive Help  . . . . . . . . . . . . . . . . . . . . .  3-5-43

     User Include Files
       INIT1.CPY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
       INIT2.CPY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
       FINAL.CPY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
       GINIT1.CPY  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
       GINIT2.CPY  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
       LOADCFG.CPY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
       EXTRAMAP.CPY  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
       MEM_VARS.CPY  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
       DOOR.CPY  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
       IDLE.CPY  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
       LOGO.CPY  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
       PASSLOG.CPY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
       CHKPRN.CPY  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
       VIEWKEY.CPY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
       CLOCKFMT.CPY  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3

     Support Procedures and Functions
       PutKbd  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1
       Proper  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1
       ChkErr  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
       ChkErrSave_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
       GetDevice_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
       ShowCancel_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
       AbortEditYN_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
       ChkAddEmpty_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
       ExtraKeys_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
       PauseMsg_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
       PauseYN_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4
       PauseChoice_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4
       SetMessage_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5
       ActionMsg_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5
       Open_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5
       Close_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7
       WarnCreate_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7
       ClrErr  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7
       ClrKcd  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7
       SetKcd  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7
       LocateBreak_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7
       RJustLocate_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7
       LJustLocate_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
       View_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
       ViewHelp_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
       ViewSearch_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
       ViewSearchA_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
       ViewMsg_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
       ViewPoint_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
       ViewLock_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
       ViewUnlock_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8


                              BoxSoft Super Models 3.6G




       ViewPrint_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
       FixFile_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9
       FixFile__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9
       ViewOpen__  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9
       ViewClose__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9
       ViewLen__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9
       ViewPrint__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9
       ViewRead__  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-10
       ViewSearch__  . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-10
       GetText__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-10
       PutText__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-10
       ProgressBar_  . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-10
       ProgressPos_  . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-11
       ClipLen_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-11
       ShadowOn__  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-11
       ShadowOff_  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-11
       InString_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-11
       WrapLine_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-12
       ShadowOn_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-12
       Progress_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-12
       GetPrnCtl_  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-12
       GetPrnCtl__ . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-13
       UpdPrnCtl__ . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-13
       OpenPC_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-13
       ClosePC_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-13
       InitPC_View_  . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-13
       InitPC_Disk_  . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-13
       InitPC_Prn_ . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-13
       RandomFile_ . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-14
       SetDest_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-14
       CleanRpt_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-14
       Hot_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-14
       HotStop_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-14
       MenuAlert_  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-14
       FormAlert_  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-15
       TableAlert_ . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-15
       Spin_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-15
       OpenTF_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-15
       CloseTF_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-15
       Tag_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-15
       NewTag_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-15
       GetTag_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-15
       SetTag_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-16
       ClrTag_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-16
       RvsTag_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-16
       CntTag_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-17
       FstTag_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-17
       NxtTag_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-17
       LstTag_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-17
       PrvTag_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-17
       Pass_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-17
       ChkPass_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-18
       Dial_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-19
       Dial__  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-20
       Idle_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-20
       Timeout_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-20
       Clock_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-20


                              BoxSoft Super Models 3.6G




       AskMtchType_  . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-20
       QBETask_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-20
       QBESetFile_ . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-20
       QBEWipe_  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-21
       HelpEdit_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-21
       HelpShow_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-21
       OpenHelp_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-21
       CloseHelp_  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5-21

     Appendices
       Appendix A - Tag Tables . . . . . . . . . . . . . . . . . . . . . . . A-1
       Appendix B - DoorEdit and UserEdit  . . . . . . . . . . . . . . . . . A-3
       Appendix C - Default Keys . . . . . . . . . . . . . . . . . . . . . . A-5
       Appendix D - Removing Features with STRIP . . . . . . . . . . . . . . A-7
       Appendix E - Miscellaneous Programs . . . . . . . . . . . . . . . . . A-9
         CLEANTRN.BAT  . . . . . . . . . . . . . . . . . . . . . . . . . . . A-9
         CLEAN_.BAT  . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-9
         SFM.BAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-9
         SAOG.BAT  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-9








































                              BoxSoft Super Models 3.6G





















                                      Chapter 1



                                     Introduction































































                              BoxSoft Super Models 3.6G







     You  are now  looking at  the  formal documentation  for the  BoxSoft Model
     files.  This  is the third major version of the  manual.  For the most part
     we have just added  the new features to the existing areas.   Also, much of
     the manual  has been  modified to make  it more readable.   It's  still not
     perfect,  but it's  much better that  it was  before.  I  maintain the same
     offer:  if  there's anything that  you feel needs  better description,  I'm
     more than happy to explain the topics further.

     Initially,  this manual  may seem  to be  organized in  a somewhat  chaotic
     fashion.   This is because there are  an extremely large number of features
     in the models.  To  alleviate any confusion each feature has its  own Table
     of Contents entry.  As well, every entry starts on its own page.

     The  basic  problem  areas addressed  by  this  custom model  are:   adding
     functionality  to  the  designer,   overcoming  Clarion  inadequacies,  and
     increasing error detection.  All the features will  be grouped according to
     these categories.   Each feature will  be presented in the  form of PROBLEM
     then SOLUTION.


                                  Contacting BoxSoft

     There are  four ways to contact  BoxSoft.  Feel  free to use any  or all of
     these methods to contact me.

     1.  Leave a message on the BoxSoft BBS at (416)944-8510.  As well, you will
         be able to download new version  of the Super Models and Utilities from
         the BBS.   The first time  you log on to  the BBS, leave a  note to the
         SYSOP explaining that you are a new user.  Your access rights should be
         updated  within 48 hours  (sometimes immediately  if I am  watching the
         BBS).

     2.  Phone BoxSoft at (416)944-8500.

     3.  Send BoxSoft a letter.  The address is:

           BoxSoft Development
           P.O. Box 309, Station P
           Toronto, ON  Canada  M5S 2S8

     4.  Send a fax to (416)944-8255.















                              BoxSoft Super Models 3.6G                      1-1




                                     Installation

     I've  tried to make  my models as easy  to install as  possible.  There are
     actually three different methods, depending on whether you downloaded  them
     from the BoxSoft BBS, downloaded them  from another BBS, or received a disk
     package.

     Regardless of the source of the models, you will be ending with a directory
     under your main CLARION directory called SUPER.  The structure  beneath the
     SUPER directory should be as follows:

           D:\
           CLARION
             SUPER
               DOCS
               DOOREDIT
               USEREDIT
               QBE_DEMO
               PHONES

     1. Getting The Files Onto Your System

        a) Downloading From The BoxSoft BBS

           i) Download the Files

              The  number of the  BBS is (416)944-8510.   To  download the files
              select (F)iles on  the main menu  and (S)elect the  area to  down-
              load.  You  will be choosing area #1 for the Super Model, and area
              #2 for the Fancy Utilities.  You can  now list the files using the
              (L)ist command to see a list of the available files.

              The files contain the version number  in their name.  For example,
              the  latest  model  file  is  called  "MODEL##&.ZIP",  where  "##"
              denotes the version and  "&" denotes the batch.  You will want  to
              download  this file,  the Security  files (SECUR##.ZIP),  and  the
              phones example (PHONES##.ZIP).

              Finally, you  should also download a copy of the  manual, which is
              offered  in a  variety of  formats.   Download the  one that  best
              suits your  referencing style.  Many  of our users never print the
              manual.   They simply  reference it  on disk whenever  they have a
              question.   On the  other hand,  others like  to print it  out and
              have it on hand for constant perusal.

           ii)    Create The Directory Structure

              Once you've  downloaded all of the  desired files,  make sure that
              your directory structure matches the one show  above.  If you  are
              upgrading  from an  earlier  version,  delete the  existing  files
              before unzipping the new ones.








                              BoxSoft Super Models 3.6G                      1-2




           iii)   UnZIP The Files

              To perform the  UnZIP operation,  you need a  copy of Phil  Katz's
              PKUNZIP  version 2.04g or  later.   If you don't  have this, it is
              available on the BoxSoft BBS.

              The  MODELxxx.ZIP file should  be unzipped in the SUPER directory.
              The  SECUR##.ZIP file  should be  unzipped in  the SECURITY direc-
              tory.    You  will  find  two  other  ZIP  files  enclosed within:
              USEREDIT.ZIP  and  DOOREDIT.ZIP.   Unzip each  of  these  files in
              their  respective directories.   Any  of the  manuals that  you've
              downloaded should  be unzipped into  the DOCS directory.  Finally,
              unzip  the PHONES##.ZIP  file  should  be unzipped  in  the PHONES
              directory.

        b) Downloading From Another BBS

           i) Finding the BBS

              There  are various  other BBS's which  offer the  Super Models for
              download.  Here is a partial list:

                       Mike Gould's BBS (Florida)        (904)272-5915
                       BBS USA                           (708)896-2759
                       Cargo BBS (United Kingdom)        44-420-478884
                       Point CLA (France)                 33-818-67843

                   More BBS's  are being added all  the time,  so keep your
                   eyes open for a system near you.

                ii)    Finding the File

                   You will be  downloading two  files called  SUPER##&.ZIP
                   (where  "##" is  the version and  "&" is  the batch) and
                   FANCYyym.ZIP  (where "yy"  is  the year  and "m"  is the
                   month).  The file is not  password protected at the  BBS
                   level.   Simply log onto the desired  system, and wander
                   around  until you  find  it.   While  you're  meandering
                   about the  BBS, I  encourage you  to sample the  various
                   offerings.   If you  find a  particular system saves you
                   phone  charges for  downloads and/or  provides you  with
                   other  desired  services,  please  consider  becoming  a
                   registered user.

                iii)   Get The Password From BoxSoft

                   You must  have the  proper password to  unZIP the  files
                   once they  are downloaded.  There  two ways  to get this
                   magic word.  You can call  BoxSoft for the password,  or
                   quickly log  onto the BoxSoft  BBS, select (F)iles  then
                   (P)assword for other  BBS's.  The password will be  dis-
                   played, along  with  various other  bits of  information
                   about downloading from other BBS's.






                              BoxSoft Super Models 3.6G                 1-3




                iv)    Installing The File

                   Once  you  download  the file,  place  it in  your SUPER
                   directory (under CLARION) and  unZIP it.   You will Phil
                   Katz's PKUNZIP  2.04g or later for  this.   If you don't
                   already have this program, it is available  for download
                   on most BBS's.

                   After unzipping the file, you  will find that  there are
                   a number of other  ZIP files contained within.  There is
                   also a  batch file  called UNZIP.BAT.   To complete  the
                   installation,   execute  the   following  command  while
                   logged into the SUPER directory:

                       UNZIP <password>

                   This  process will  automatically create  the  necessary
                   directories,  and  place  all  of  the  files  in  their
                   respective places.

             c) Installing from a Diskette

                Put the install disk into  your drive and execute  the com-
                mand "A:INSTALL" or "B:INSTALL", depending on your  drives.
                This will  automatically create  the necessary  directories
                and copy the files into  their respective places.   It will
                also change your PATH if you wish.


          The following  steps  must be  performed  regardless of  how  you
          obtained the models.


          2) Converting VERSION.RAW to SUPER.MDL

             After installing the  files, you will discover  that SUPER.MDL
             isn't there.   This is  because it  must be  created for  your
             batch of  Clarion.  There is a master model called VERSION.RAW
             which  contains  all  the  necessary  code  for  batches  2105
             through 2109.

             If you  don't know which batch you have, execute the following
             command from the DOS command line:

                CCMP !

             To create  SUPER.MDL, run  the program  VERSION.EXE.  You  can
             specify your  batch on the  command line, or  skip the parame-
             ters and wait  for the menu.   VERSION.EXE will  automatically
             search the DOS  PATH for VERSION.RAW, and will place SUPER.MDL
             in the same directory.








                              BoxSoft Super Models 3.6G                 1-4




          3) Adding the SUPER Directory To Your DOS Path

             The SUPER  directory  should be  somewhere in  your DOS  PATH.
             Here is an example:

                SET PATH=C:\DOS;D:\CLARION;D:\CLARION\SUPER;C:\WP51

          4) Modify  OM.COM /  MITTEN.COM (for  users  of Mitten's  Overlay
          Manager)

             To enable the Designer Post Processor  (DPP) to work properly,
             there is a  file called SUPERDES.EXE.  When you  use the Super
             Model,   you  start   Clarion   with  SUPER.COM   instead   of
             CLARION.COM.  When you enter  Designer, it calls SUPERDES.EXE,
             which calls CDES.EXE  (Designer itself) then DPP.   Of course,
             if you are  using OM.COM or  MITTEN.COM instead of  SUPER.COM,
             then DPP will not be called.

             To fix  this  problem,  edit your  .COM  file  with  Clarion's
             Scanner.   Press Ctrl-T  to get  to the  text side,  and press
             Ctrl-S to  search  for "CDES.EXE".   Press  Ctrl-C and  change
             this to "SUPERDES.EXE".  Now it will work.

             DPP  performs a variety  of indispensable functions, including
             Intelligent Opening and reduction  of source code size, so  it
             necessary that it  is called in  the normal  chain of  events.
             It  automatically  searches  for the  Clarion  environment  in
             memory to determine the current  .APP file.  If DPP was called
             from DOS, it checks  to see if you specified the  .APP name on
             the  command  line.    If not,  it  searches  for CLARION.COM,
             SUPER.COM,  LPM.COM,   LE.COM,  OM.COM,  and  MITTEN.COM  (for
             Overlay Manager).  and gets the most recent .APP name from it.
             It then double-checks  to verify that this  is not a  new .APP
             in the current directory.

























                              BoxSoft Super Models 3.6G                 1-5




                                What is a Model File?

          For those  of you that are not familiar with the subject of model
          files, I would like to cover a few basic topics.  When you create
          a  application using  Designer, it  writes actual  Clarion source
          code to  perform the desired functions.  To enable it to do this,
          it uses a set  of examples contained in a model  file.  There are
          two  model files that come  with Clarion:   a single-user version
          called STANDARD.MDL  and a multi-user version called NETWORK.MDL.
          Each  of these  files contains  sample code  for the  creation of
          menus, forms, tables, and reports  (as well as various supporting
          routines).

          When  Designer  generates  these  procedures, it  looks  for  two
          different types of keywords in the model code.  The first type is
          prefixed by an asterisk (*)  and is always located at  the begin-
          ning of a line (character 1); it's called a model procedure name.
          If you look in one of the model files you would see the following
          line:

             *Menu****************

          which begins  the menu model  procedure.  The  trailing asterisks
          are optional.   If you have included a menu screen in your appli-
          cation, Designer will use the sample code following this keyword.
          It includes all code until the start of the next model  procedure
          in the model file.

          I like to call the other type of model keyword a placeholder.  It
          is prefixed by the "at"  character (@), and it could represent  a
          variety  of language  elements,  depending  on  its usage.    For
          example,  "@ProcName" denotes  the  name of  the procedure  being
          created.  "@Pre"  represents the  prefix of the  main file  being
          used for a given  procedure.  And "@Edits" instructs  Designer to
          place the field edit procedures at this position in the code.

          Because the model  files are  supplied to you,  there is  nothing
          stopping you  from changing them to  increase their functionality
          and/or  suit your own specific purposes.   This is what I've done
          with my  model file.  If you're careful, you can add bits of code
          to the model procedures that will make your application much more
          powerful.  The  important thing is  to make sure  that you  don't
          remove  code  that  is required  for  the  proper functioning  of
          Designer.

          When  changing a model procedure, it is recommended that you make
          a copy of the original procedure before making any changes.  Once
          you determine that the procedure works in all situations, you may
          use it to replace the original.  With all of my features, you may
          turn them off and on at  will, so the original procedure has been
          removed.








                              BoxSoft Super Models 3.6G                 1-6



















                                      Chapter 2



                                  Application Style












          There are many features in the model.  Virtually all  of them can
          be turned on and off.  In some cases, a particular  switch may be
          available only as a global  switch.  In other cases, it  may also
          be  available as  a local  setting.   This depends  completely on
          whether the feature is  procedure-related, or a high-level appli-
          cation setting.

          All global switches  are generated  as part of  your main  module
          (APPNAME.CLA).  I have used the convention of prefixing my global
          default variables with  an "s".   When there  is a  corresponding
          local  control switch,  it uses  the same  name, except  that the
          leading "s" is  removed, and an underscore ("_") is  added to the
          end of  the  name.   For  example,  there is  a  variable  called
          "sArrows" which  indicates whether  arrows will be  maintained in
          tables.   This is the  global default.   There is a corresponding
          variables called "Arrows_"  in each table  procedure that can  be
          used to override this default on a table-by-table basis.

          There  are a couple of situations where this naming convention is
          not  upheld.  This is  mainly because the  original public domain
          models did  not have  underscores after the  switches, and  there
          were too many in place to have to change them all.  These include
          the  following:    Add_Ok,  Upd_Ok, Del_Ok,  Up_Ok,  Tab_Ok,  and
          Esc_Ok.   It also include the  key names, because I  felt that it
          would be  best to stay with the  standard that Clarion had estab-
          lished.    This  means   that  Add_Key,  Copy_Key,  MultiAdd_Key,
          Tag_Key,   Untag_Key,   Tog_Key,  TagAll_Key,   UntagAll_Key  and
          TogAll_Key will not end in underscores.


                               Setting Global Defaults

          You  have a number of options when  setting style variables.  The
          initial  default values for the style variables are fine for most
          situations, but they are rarely perfect.  If you want to change a
          particular switch for the entire application, it's best to change
          the global switch.  To do this, create a file called INIT1.CPY in
          your application's directory.  This file contains the  first code
          to be  executed after the screen is blanked.  If you don't create
          this file,  the default  INIT1.CPY will  be used, which  contains
          nothing.












                              BoxSoft Super Models 3.6G                 2-1




          If  you create this file in your application's directory, it will
          automatically  incorporate  any   additional  commands  that  you
          include.  Because almost  all of the style settings  are actually
          variables, you can assign new values to them in INIT1.CPY.   They
          will take  effect before anything else happens.  Here is a sample
          INIT1.CPY:

             sSingleMulti = 'M'    !Multi-user application
             sSecurity    = False  !Turn-off security
             sIdlePause   = 0      !Call Idle_ very often
             sDateRow     = 25     !Show Date on row 25
             sDateCol     = 3      !Show Date at col  3
             sTimeRow     = 25     !Show Time on row 25
             sTimeCol     = 15     !Show Time at col 15
             sPathCol     = 26     !Show Path at col 26

          IMPORTANT  - Don't forget to indent each line, otherwise you will
          get compiler errors!

          Finally, some of  the style settings are  limited length strings.
          If you  attempt to assign a string  that is too long,  it will be
          truncated.

          There are  three settings  that cannot  be changed  in INIT1.CPY.
          These are  eDateFormat, eTimeFormat and eMemFormat:   the formats
          for the clock displays.  Because they are EQUATE'd pictures, they
          cannot be  stored in a variable; they must be hard-coded.  There-
          fore,  if  you  want to  change  these  from the  default  of @D9
          (yy/mm/dd), @T3 (hh:mmPM)  and @N3  (<<#), you must  copy a  file
          called CLOCKFMT.CPY  from the SUPER directory  into your applica-
          tion directory.   This copy of  the file can be  modified to suit
          your preferences.


                                Setting Local Defaults

          Once  you've  decided  on the  settings  for  all  of the  global
          switches,  you may  want to  vary these  for certain  procedures.
          This  is done  in the  Setup Procedure  of the  procedure itself.
          Depending on the  type of procedure  (Menu, Table, Form,  Report,
          etc.)  you  will have  access to  different  local switches.   To
          change a setting, simply assign a new value to the  local switch.
          For example,  you can turn  the Esc_Key off  in menus by  placing
          "Esc_Ok=False" in the menu's setup procedure.















                              BoxSoft Super Models 3.6G                 2-2




                               Global Default Variables

          Here  is a detailed description  of all the  global default vari-
          ables with  the corresponding  names of their  local counterparts
          (if they exist).



                                      File Modes

          sSingleMulti   This controls whether the application is single or
                         multi-user.    See  the Intelligent  File  Opening
                         section for more information.

                              Default:  'S'
                              Options:  'S' = Single
                                        'M' = Multi-User

          sIOpen         This  variable specifies whether  the files should
                         be  opened and closed as  needed, or left open all
                         the time.  If it is  False, the false will be left
                         open.   See the Intelligent  File Opening  section
                         for more information.

                              Default:  True
                              Options:  True = intelligent opening of files
                                        False = files left open always

          sOpenAtStart   Beginning  in 3.5E,  the sOpenAtStart  default was
                         changed from  "True" to "False".   This is because
                         files  will automatically be created when they are
                         needed, even  lower in  the program.   However, if
                         you want  the files  checked for integrity  before
                         the  user starts venturing  about in  the applica-
                         tion, you may want to revert this value to "True".

                         By  the  way,  the   file  must  have  the  Create
                         attribute  specified for it.  Otherwise, a Clarion
                         critical error will occur when the system attempts
                         to create the file.

                         To  prevent the  user  from accidentally  creating
                         files if he starts  the application from the wrong
                         directory,  there is a setting called sWarnCreate.
                         (Keep reading for more information.)

                         After G_RunProc,  the files  will be processed  by
                         G_OpenFiles,  regardless of  this setting.   Don't
                         worry, the intelligent opening is maintained.  See
                         the  Intelligent File  Opening  section  for  more
                         information.

                              Default:  False
                              Options:  True = open at start
                                        False = don't open at start.




                              BoxSoft Super Models 3.6G                 2-3




          sWarnCreate    If you  have decided to leave  sOpenAtStart to its
                         default of "False", you may  want to check to make
                         sure  the  user  doesn't  accidentally  start  the
                         application  in the  wrong directory  and inadver-
                         tently create new data files.

                         You  can  do this  with  the sWarnCreate  setting.
                         There are three options:  you can have  the system
                         automatically create files without a  whimper, you
                         can have the system  ask the user if they  want to
                         create  the file,  or  you can  have an  automatic
                         error  and  exit  to  DOS.    There  are  separate
                         switches for the TagFile_  file, PrnCtl_ file, and
                         Security files (User_,  Access_ and Pass_).   Keep
                         on reading for more information.

                              Default:  1
                              Options:  0 = No Warning
                                        1 = Warn then create, or abort
                                        2 = Don't create, exit to DOS

          sWrnCreatPC    This  switch  is the  same as  sWarnCreate, except
                         that  it applies  only to  the PrnCtl_ file.   Its
                         default is also different.

                              Default:  0
                              Options:  0 = No Warning
                                        1 = Warn then create, or abort
                                        2 = Don't create, exit to DOS

          sWrnCreatSec   This switch  is  the same  as sWarnCreate,  except
                         that it applies only to the Security files (User_,
                         Access_ and  Pass_).  Its default  is also differ-
                         ent.

                              Default:  0
                              Options:  0 = No Warning
                                        1 = Warn then create, or abort
                                        2 = Don't create, exit to DOS


          sWrnCreatTag   This switch  is the  same  as sWarnCreate,  except
                         that it applies  only to the  TagFile_ file.   Its
                         default is also different.

                              Default:  0
                              Options:  0 = No Warning
                                        1 = Warn then create, or abort
                                        2 = Don't create, exit to DOS










                              BoxSoft Super Models 3.6G                 2-4




          sWrnCreatHlp   This  switch  is the  same as  sWarnCreate, except
                         that  it applies  only  to the  Help_  file.   Its
                         default is also different.

                              Default:  0
                              Options:  0 = No Warning
                                        1 = Warn then create, or abort
                                        2 = Don't create, exit to DOS


                              Miscellaneous Keys Options

          Accept_Key     This is the standard screen accept key.

                              Default:  Ctrl_Enter
                              Options:  Any  valid  Clarion  keycode  other
                                        than 0

          Reject_Key     This is the standard screen reject key.

                              Default:  Ctrl_Esc
                              Options:  Any  valid  Clarion  keycode  other
                                        than 0

          sXtra_Accept   This is an  extra Accept_Key.  See  the Extra Keys
                         section for more information.

                              Default:  F10_Key
                              Options:  Any valid Clarion keycode

          sXtra_Reject   This is an extra Reject_Key.   See the Extra  Keys
                         section for more information.

                              Default:  F2_Key
                              Options:  Any valid Clarion keycode

          sXtra_Esc      This  is an  extra Esc_Key.    See the  Extra Keys
                         section for more information.

                              Default:  GAst_Key  (grey  asterisk  on  num.
                                        keypad)
                              Options:  Any valid Clarion keycode

          sQBE_Key       This  key is  used for  invoking Query  By Example
                         functions.   It is used in  tables for calling the
                         form  with Action=eQBE.  It is used in QBEForms to
                         access the Query Help screens.

                              Default:  Ctrl_S
                              Options:  Any valid Clarion keycode
                              Local:    QBE_Key in Tables and Forms








                              BoxSoft Super Models 3.6G                 2-5




          sQBEAskEdit    After the user has specified their query criteria,
                         they  may  be asked  if  they  wish to  "Edit"  or
                         "Select" matching  records.  If you  don't wish to
                         provide  editing  capabilities from  your QBEForms
                         they you may want to set this to "False".

                              Default:  True
                              Options:  True = ask if user wants to edit
                                        False = don't ask about edit, 
                                                   just select
                              Local:    QBEAskEdit_ in Forms

          sAskFirstTag   After a  QBEForms selects a series  of records and
                         returns to the calling table, should the table ask
                         if the user wishes to go to first tag?

                              Default:  True
                              Options:  True:   ask if user wants  to go to
          the tag
                                        False:  don't ask, just stay on top
          record of table
                              Local:    AskFirstTag_ in Forms

          sUp_Ok         This controls whether Up_Keys are treated normally
                         for field-to-field  movement.   That is,  when you
                         press Up when editing a field, is your value saved
                         before exiting the field?  See the Improved Up_Key
                         Processing section for more information.

                              Default:  True
                              Options:  True = normal Clarion
                                        False = saves before exit
                              Local:    Up_Ok in Menus, Tables and Forms

          sTab_Ok        This  controls whether  the  Tab_Key and  Shft_Tab
                         will move  the user from field-to-field.   See the
                         Tabs  For Field-To-Field Movement section for more
                         information.

                              Default:  True
                              Options:  True = Tab moves between fields
                                        False = Tab operates normally
                              Local:    Tab_Ok in Menus, Tables and Forms

          sAcptExitTbl   This  controls whether the  Accept_Key will exit a
                         table.     Normally,  if  the  user   presses  the
                         Accept_Key  on a  table, they  will be  allowed to
                         update  the record.  If  this is set  to True, the
                         table  will exit when the user presses Accept_Key.
                         See  The  Accept_Key And  Tables section  for more
                         information.

                              Default:  False
                              Options:  True = Accept_Key exits table
                                        False = Accept_Key edit records
                              Local:    AcptExitTbl_ in all Tables



                              BoxSoft Super Models 3.6G                 2-6




          sAcptExitMnu   This controls whether  the Accept_Key will exit  a
                         menu.     Normally,  if   the  user  presses   the
                         Accept_Key  on  a  menu,  they  will  select  that
                         option.  If this  is set to "True", the  menu will
                         exit when the user presses Accept_Key.

                              Default:  False
                              Options:  True = Accept_Key exits table
                                        False = Accept_Key edit records
                              Local:    AcptExitTbl_ in all Tables



                                    Table Features

          sHotTable      This specifies whether currently highlighted table
                         record will always be available in memory for non-
                         scrolling display  fields on  the Table.   See the
                         Hot Tables section for more information.

                              Default:  False
                              Options:  True = keep record in memory
                                        False = normal Table
                              Local:    HotTable_ in all Tables

          sSinglAddKey   This  is  the  normal Add  key.    See the  Adding
                         Records in a Table section for more information.

                              Default:  Ins_Key
                              Options:  Any valid Clarion keycode
                              Local:    Add_Key in all Tables

          sSinglAddMem   This determines  whether the record  is remembered
                         after each  single  add for  each subsequent  add.
                         See the Adding Records in a Table section for more
                         information.

                              Default:  False
                              Options:  True = record is remembered
                                        False = record is cleared
                              Local:    AddMem_ in all Tables

          sMultiAddKey   This is  the key used for  adding multiple records
                         to the table without  having to press Add_Key each
                         time.   See the Adding Records  in a Table section
                         for more information.

                              Default:  Ctrl_M
                              Options:  Any valid Clarion keycode
                              Local:    MultiAdd_Key in all Tables









                              BoxSoft Super Models 3.6G                 2-7




          sMultiAddMem   This determines whether  the record is  remembered
                         after each multiple add  for each subsequent  add.
                         See the Adding Records in a Table section for more
                         information.

                              Default:  False
                              Options:  True = record is remembered
                                        False = record is cleared
                              Local:    MultiAddMem_ in all Tables

          sMultiShow     This setting determines whether the table is fully
                         updated  between each  multiply-added record  in a
                         series.  See the Adding Records in a Table section
                         for more information.

                              Default:  False
                              Options:  True = update table after each add
                                        False = update table after last add
                              Local:    MultiShow_ in all Tables

          sAddEmptyMod   This specifies the mode for entering records to an
                         empty table.   See the Adding  Records in a  Table
                         section for more information.

                              Default:  'S'
                              Options:  'S' = single add
                                        'M' = multiple add
                              Local:    AddEmptyMod_ in all Tables

          sCopy_Key      This  is the key  that copies records  in a table.
                         See  the Copying  Records in  a Table  section for
                         more information.

                              Default:  Ctrl_C
                              Options:  Any valid Clarion keycode
                              Local:    Copy_Key in all Tables

          sChange_Key    This is the key that changes records in a table.

                              Default:  Enter_Key
                              Options:  Any valid Clarion keycode
                              Local:    Change_Key in all Tables

          sView_Key      This  is the  key  that views  records in  a table
                         (calls the  form with  Action=eView).  If  you set
                         this key  different from sChange_Key, you  can use
                         one  key to  change  records and  another to  view
                         them.   If  they are  the same,  the sView_Key  is
                         ignored.

                              Default:  Enter_Key
                              Options:  Any valid Clarion keycode
                              Local:    View_Key in all Tables






                              BoxSoft Super Models 3.6G                 2-8




          sDelete_Key    This  is  the key  that  deletes a  record  from a
                         table.   Use  this setting  to change  the default
                         delete key  from  Clarion "Del_Key"  to any  other
                         key.

                              Default:  Del_Key
                              Options:  Any valid Clarion keycode
                              Local:    Delete_Key in all Tables



                                   Locator Features

          sFindRow       This specifies which line will contain the located
                         record.  Normal Clarion always displays the record
                         on the first line.   See the Fast Locators section
                         for more information.

                              Default:  3
                              Options:  1 to the # of items in table
                              Local:    FindRow_ in all Tables

          sLocateJust    This  setting will  normally be left  at "L".   It
                         determines  whether  locators  should  be  entered
                         right- or left-justified.  The Super Model is able
                         to determine  the appropriate setting for this, so
                         you should  never need to  adjust this.   See  the
                         section  on  Right-Justified  Locaters  for   more
                         information.

                              Default:  'L'
                              Options:  'L' = Left, 'R' = Right
                              Local:    LocateJust_ 
                                        (this is set automatically by DPP)

          sLocateFill    This specifies  the character to be  used for left
                         fill  when  entering  a  right-justified  locator.
                         This setting will  normally be left  at "0".   You
                         may, however, want to change it to  a space (' ').
                         See  the section  on Right-Justified  Locaters for
                         more information.

                              Default:  '0'
                              Options:  any single character string















                              BoxSoft Super Models 3.6G                 2-9




                                     Menu Options

          sEsc_Ok        This specifies whether Esc_Key and Reject_Key will
                         exit  a Menu.    See the  Controlling Esc_Key  and
                         Reject_Key in a Menu section for more information.

                              Default:  True
                              Options:  True:  Esc_Key and Reject_Key exit
                                        False:  Disable Esc_Key/Reject_Key
                              Local:    Esc_Ok in all Menus

          sClrAction     This determines  whether  the Action  variable  is
                         cleared when a  menu is called.   This prevents  a
                         menu from  passing a previous Action  through to a
                         new Table.

                              Default:  True
                              Options:  True:  clear Action in menus
                                        False:  leave Action as is
                              Local:    ClrAction_ in all Menus

          sAutoExit      This determines  whether a menu is  closed after a
                         choice is  made.   That is,  you  would select  an
                         option,  the  menu  screen  would  disappear,  the
                         selected procedure would be  executed, and when it
                         quit it would return  to the procedure that called
                         the initial menu.

                         In the case of a VertMenu with Depth_ > 1, it will
                         cascade up to the HorzMenu.

                              Default:  False
                              Options:  True = exit menu after choice
                                        False = return to menu as usual
                              Local:    AutoExit_ in all Menus



                                   Message Options

          sPausMsgType   This  is the  system  default for  PauseMsg_.   It
                         determines  whether  the  PauseMsg_  screen   will
                         appear as  an auto-sized  window in the  center of
                         the  screen or as  a single line  at the bottom of
                         the screen.

                              Default:  'W'
                              Options:  'W':  window
                                        'L':  line

          sPausMsgBeep   This is  the system default for PauseMsg_.  If the
                         Beep parameter is omitted  in a call to PauseMsg_,
                         it will use this value.

                              Default:  True
                              Options:  True = beep, False = no beep



                              BoxSoft Super Models 3.6G                2-10




          sPauseYNBeep   This is the  system default for PauseMsg_.  If the
                         Beep parameter  is omitted in a  call to PauseYN_,
                         it will use this value.

                              Default:  False
                              Options:  True = beep, False = no beep

          sSetMsgBeep    This is  the system  default for SetMessage_.   If
                         the  Beep  parameter  is  omitted  in  a  call  to
                         SetMessage_, it will use this value.

                              Default:  False
                              Options:  True = beep, False = no beep

          sJustify       This is the  system default for the  justification
                         of all messages  displayed by PauseMsg_,  PauseYN_
                         and SetMessage_.   If the  Justification parameter
                         is omitted in a call to any of these functions, it
                         will use this value.

                              Default:  eJustCenter
                              Options:  eJustLeft, eJustCenter, eJustRight

          sJustMemMsg    This  is the global  setting for the justification
                         of Mem:Message in Forms.   There is no  local con-
                         trol.

                              Default:  eJustCenter
                              Options:  eJustLeft, eJustCenter, eJustRight

          sNormMsgFHue   This is  the foreground color used  for most mess-
                         ages displayed by PauseMsg_ and SetMessage_.

                              Default:  0 (black)
                              Options:  0-15 (16-31 for blink)

          sNormMsgBHue   This is  the background color used  for most mess-
                         ages displayed by PauseMsg_ and SetMessage_.

                              Default:  7 (grey)
                              Options:  0-7

          sErrMsgFHue    This is  the foreground color used  for most error
                         messages displayed by PauseMsg_ and SetMessage_.

                              Default:  31 (blinking bright white)
                              Options:  0-15 (16-31 for blink)

          sErrMsgBHue    This is  the background color used  for most error
                         messages displayed by PauseMsg_ and SetMessage_.

                              Default:  4 (red)
                              Options:  0-7






                              BoxSoft Super Models 3.6G                2-11




          sChkAbort      This controls  whether a user will  be warned when
                         he aborts (using Esc_Key or Reject_Key) a partial-
                         ly completed form.  He will receive  a screen ask-
                         ing if he would like to save his changes,  abandon
                         his changes, or return  to the form.  If  the data
                         has not been changed,  the screen will not appear.
                         See  the Check  Before Aborting? section  for more
                         information.

                              Default:  True
                              Options:  True - check when aborting changes
                                        False - don't check
                              Local:    ChkAbort_ in Forms (not for MEMORY)

          sChkDelete     This specifies  whether a  user should be  asked a
                         second time before a  record is deleted.   See the
                         Check Before  Deleting? section for  more informa-
                         tion.

                              Default:  False
                              Options:  True - ask again, before deleting
                                        False - ask only once
                              Local:    ChkDelete_ in Forms 
                                           (not in MEMORY Forms)

          sChkAddEmpty   This controls  whether the system  should ask  the
                         user  if they  want to  add a  record to  an empty
                         table,  before  automatically offering  the update
                         form.  See  the Adding Records in  a Table section
                         for more information.

                              Default:  True
                              Options:  True - ask before calling form
                                        False - don't ask
                              Local:    ChkAddEmpty_ in all tables

          sLogoPause     This controls  whether G_OpenFiles will wait for a
                         keystroke before  closing the logo  screen defined
                         in  LOGO.CPY.   See  User Include  Files for  more
                         information.

                              Default:  False
                              Options:  False:  don't wait
                                        1:  wait for keystroke
                                        >= 2:  wait for keystroke 
                                               or that many seconds













                              BoxSoft Super Models 3.6G                2-12





          Message Strings

          The following  message strings  are used throughout  the applica-
          tion.   In most  cases you will  not need  to change these.   If,
          however, you  decide to modify  any of them,  make sure  that you
          don't assign  a string that is  too long to fit  in the variable.
          In the case of sAddMsg  and sChgMsg, they expect to  be preceeded
          with an "object"  name.   For example, the  default sAddMsg is  '
          will  be Added'.   It expects to  follow a word  like 'Record' or
          'Customer'.

          sAddEmptyMsg is similar, except that it expects to have an object
          name  follow it.  (The  default is 'This Table  is empty.  Do you
          wish to add a '.)  If your object name start with a vower and you
          want "a" to be "an",  you can prefix your object name with  "n ",
          as in  'n Item'.  The  system will automatically detect  the "n "
          and will not place a space after the "a".

               sAddMsg        Adding records with a form
               sChgMsg        Changing records with a form
               sDelMsg        Deleting records with a form
               sViewMsg       Viewing records with a form
               sNoSaveMsg     Used in form when NoSave_=True
               sQBEMsg        Prompts user to input search criteria in form
               sQBEAskEdMsg   Prompts for  edit or continue when QBE search
                              finds something
               sNoRecsMsg     Table is empty, adds are not allowed
                              (see Disabling Operations in a Table)
               sRecDelMsg     Record was deleted by another station
               sAddEmptyMsg   Check before adding to empty table
                              (see Adding Records in a Table)
               sNoAddMsg      Adds not allowed in Table
                              (see Disabling Operations in a Table)
               sNoDelMsg      Deletes not allowed in Table
                              (see Disabling Operations in a Table)
               sChkDelMsg     Check one more time before deleting
                              (see Check Before Deleting)
               sNoAccMsg      Generic "Access Denied!" message
                              (see Security)



                                 Progress Bar Options

          sPB_FgDone, sPB_BgDone      These are  used to  specify the  color
                                      of the  "Done" portion of the progress
                                      bars.

          sPB_FgRemain, sPB_BgRemain  These are  used to  specify the  color
                                      of  the  "Remaining"  portion  of  the
                                      progress bars.

          sFillProg                   If  you  have  slow-filling   filtered
                                      tables, you can set  this to "True" to
                                      display  the progress  while  the page
                                      of records is being loaded.


                              BoxSoft Super Models 3.6G                2-13






                                   Tagging Options

          sSingMultTag   This  variable controls  whether  the  Tag  system
                         operates in  multi-user the same mode  as the rest
                         of the files.  Initially it does not have a value.
                         If  you  don't  change the  setup  in  any of  the
                         INCLUDE  files   (like  INIT1.CPY),  it   will  be
                         defaulted to the same value as sSingleMulti.  Keep
                         reading for more information on sSingMultTag.

          sTagFilename   This  is the name  of the file  where the tags are
                         stored.   Many people have commented  on the speed
                         of the  tags.  To  alleviate this, I  have changed
                         the  tagging system  so  that you  may define  the
                         location of the tag file.  This may be  on a local
                         drive while the rest of  the data is on a  network
                         drive.  Or it may  be on a RAM drive (if  you have
                         enough extended  or  expanded memory).   I  cannot
                         suggest  a good  RAM drive  size, as  this depends
                         completely on you application.   The best thing to
                         do is tag as many  records as you would ever  tag,
                         then look at the size of TAGFILE_.*.

                         Here  are a  number of  examples for  changing the
                         name of the tag file:

                         1.   You have a network  where each user has their
                              own  local drive  C:.   INIT1.CPY could  look
                              like this:

                              sSingMultTag = 'S'
                              sTagFilename = 'C:\TAGS\TAGFILE_.DAT'

                         2.   You  have a  multi-user PC-MOS  system, where
                              everyone is accessing the  same drive and the
                              security  system is  turned on.   LOADCFG.CPY
                              could look like this:

                              sSingMultTag = 'S'
                              sTagFilename = 'TAG' & UserNo_ & '.DAT'

                         3.   You have  a stand  alone machine with  a 500K
                              RAM drive as drive  G:.  INIT1.CPY would look
                              like this:

                              sSingMultTag = 'S'
                              sTagFilename = 'G:\TAGFILE_.DAT'

          sTagChar       This  is   the  character  that  is   returned  by
                         GetTag_() and Tag_(eGetTag, ...).

                              Default:  Ascii 251 (Check Mark)
                              Options:  Any 1-5 character string,
                                        except a space
                              Local:    TagChar_ in TagTables


                              BoxSoft Super Models 3.6G                2-14




          sScrollTags    This controls whether  the table pointer moves  to
                         the next record after a tagging operation has been
                         performed.

                              Default:  True
                              Options:  True:  scroll
                                        False:  don't scroll
                              Local:    ScrollTags_ in TagTables

          sWipeTags      This variable controls  whether any existing  tags
                         for  a  TagTable are  cleared  when  the table  is
                         called.

                              Default:  True
                              Options:  0 = leave existing tags as-is
                                        1 = clear tags when entering table
                                        2 = ask the user first
                              Local:    WipeTags_ in TagTables

          sQBEWipeTags   This variable  controls whether any  existing tags
                         associated  with  a  "QBE  Tag  Table"  should  be
                         cleared when the table is called.

                              Default:  True
                              Options:  0 = leave existing tags as-is
                                        1 = clear tags when entering table
                                        2 = ask the user first
                              Local:    QBEWipeTags_ in TagTables



          Tagging Keys

                    sTag_Key       Tag single record
                                   (Default: Ctrl_T, Local: Tag_Key)
                    sUntag_Key     Untag single record
                                   (Default: Ctrl_U, Local: Untag_Key)
                    sTog_Key       Toggle (Flip) tag for single record
                                   (Default: Ctrl_F, Local: Tog_Key)
                    sTagAll_Key    Tag all records
                                   (Default: Alt_T, Local: TagAll_Key)
                    sUntagAllKey   Untag all records
                                   (Default: Alt_U, Local: UntagAll_Key)
                    sTogAll_Key    Toggle (Flip) all tags
                                   (Default: Alt_F, Local: TogAll_Key)
                    sNextTag_Key   Search for next tag in table
                                   (Default: Ctrl_N, Local: NextTag_Key)
                    sPrevTag_Key   Search for previous tag in table
                                   (Default: Ctrl_P, Local: PrevTag_Key)










                              BoxSoft Super Models 3.6G                2-15





                                       Dialing

          sDialPort      This variable specifies the  COM port to which the
                         modem is connected.

                              Default:  1:  COM1
                              Options:  1 or 2 
                                        (3 and 4 work with some BIOS's)

          sDialInit      This  variables contains the  modem initialization
                         string.  After it is sent to the modem, there is a
                         pause (specified by sDialInitW) before sending the
                         dialing prefix.

                              Default:  ''
                              Options:  Any 20 character string

          sDialPrefix    This is the modem dialing prefix.  It precedes the
                         number being called.   The default is the standard
                         Hayes tone  dial prefix.   If  your phone  line is
                         pulse  only, you  will  have to  change 'ATDT'  to
                         'ATDP'.

                              Default:  'ATDT'
                              Options:  Any 20 character string

          sDialSuffix    This  is the modem dialing suffix.  If follows the
                         number being  called.  After  sending this string,
                         there is  a pause (specified by  sDialWait) before
                         the hang-up string is transmitted.

                         Most  modems require  the  semi-colon to  indicate
                         that this is a voice call.  A few modems are smart
                         enough  to recognize  that the  receiver has  been
                         picked up, but they also recognize the semi-colon.
                         You should be save with this string.

                              Default:  ';<13>'
                              Options:  Any 10 character string

          sDialHangup    This string  is sent to the modem to hang-up after
                         the user has picked up the phone.

                              Default:  'ATH<13>'
                              Options:  Any 20 character string

          sDialInitW     This  specifies  the  pause (in  seconds)  between
                         sending sDialInit and sDialPrefix.

                              Default:  0.5  (seconds)
                              Options:  Any value >= 0 
                                        (including fractions)






                              BoxSoft Super Models 3.6G                2-16




          sDialWait      This controls  how long  Dial_ will wait  (in sec-
                         onds) after dialing  the number before hanging-up.
                         The user is expected to  pick up the phone  during
                         this on-screen countdown.

                              Default:  10  (seconds)
                              Options:  Any value >= 0 (integer only)
                                        Suggested minimum:  5 secs

          sDialHotFHue   This  specifies the  color  of the  "Hot" keys  on
                         Dial_'s number selection menu.

                              Default:  15  (Bright White)
                              Options:  0 to 15  (16 to 31 for blink)



                                   Arrows On Tables

          sArrows        This  variable  determines  whether  up  and  down
                         arrows  will  be  calculated for  tables.    These
                         arrows indicate if there is more data above and/or
                         below the displayed records.

                              Default:  True
                              Options:  True:  calculate arrows
                                        False:  don't
                              Local:    Arrows_ in all Tables

          sSTArrows      This  variable  determines  whether  up  and  down
                         arrows will be calculated for ShowTables.

                              Default:  False
                              Options:  False:  don't display arrows
                                         1:  1 arrow, 
                                             1 char to the left
                                         2:  1 arrow, 
                                             2 chrs to the left, etc.
                                        -1:  2 arrows, 
                                             1 char to either side
                                        -2:  2 arrows
                                             2 chars to either side, etc.
                              Local:    Arrows_ in all ShowTables

          sUpArrow       This is the Up arrow character.

                              Default:  Ascii 24 (Up arrow)
                              Options:  Any single character
                              Local:    UpArrow_ in all Tables

          sDownArrow     This is the Down arrow character.

                              Default:  Ascii 25 (Down arrow)
                              Options:  Any single character
                              Local:    DownArrow_ in all Tables




                              BoxSoft Super Models 3.6G                2-17




          sNoArrow       This is the "Arrow Off" character.  You might want
                         to  change this if your arrows were part of a bor-
                         der,  and you wanted there to be a vertical bar if
                         the arrow was off.

                              Default:  ' '
                              Options:  Any single character
                              Local:    NoArrow_ in all Tables



                         Idle Procedures, Clocks and Timeouts

          sIdle          This  setting turns  the idle  system on  and off,
                         which also controls the clocks and timeout.

                              Default:  True
                              Options:  True:  idle on
                                        False:  idle off

          sIdlePause     This controls the amount of time between each call
                         to the Idle_ procedure.  For faster  update of the
                         on-screen clocks, set this to a smaller value.

                              Default:  1 (second)
                              Options:  Any value (0 means update often)

          sDateClock     This switches the date clock on and off.

                              Default:  True
                              Options:  True:  on
                                        False:  off

          sDateRow       This specifies the row of the date clock.

                              Default:  1
                              Options:  1 to 25

          sDateCol       This specifies the column of the date clock.

                              Default:  3
                              Options:  1 to 73  (depending on format)

          sDateFHue      This is the foreground color for the date clock.

                              Default:  15  (bright white)
                              Options:  0 to 15  (16 to 31 for blink)

          sDateBHue      This is the background color for the date clock.

                              Default:  5  (magenta)
                              Options:  0 to 7







                              BoxSoft Super Models 3.6G                2-18




          eDateFormat    This is the format picture for the date clock.  It
                         may not  changed in INIT1.CPY.   Instead, you must
                         modify this in CLOCKFMT.CPY.   (Make sure you copy
                         this file from your  SUPER directory to your local
                         application directory.)  Note that it starts  with
                         an "e", not an "s".

                              Default:  @D9  (yy/mm/dd)
                              Options:  Any valid Clarion date picture

          sTimeClock     This switches the time clock on and off.

                              Default:  True
                              Options:  True:  on
                                        False:  off

          sTimeRow       This specifies the row of the time clock.

                              Default:  1
                              Options:  1 to 25

          sTimeCol       This specifies the column of the time clock.

                              Default:  70
                              Options:  1 to 76  (depending on format)

          sTimeFHue      This is the foreground color for the time clock.

                              Default:  15  (bright white)
                              Options:  0 to 15  (16 to 31 for blink)

          sTimeBHue      This is the background color for the time clock.

                              Default:  5  (magenta)
                              Options:  0 to 7

          eTimeFormat    This is the format picture for the time clock.  It
                         may not  changed in INIT1.CPY.   Instead, you must
                         modify this in CLOCKFMT.CPY.   (Make sure you copy
                         this file from your  SUPER directory to your local
                         application directory.)  Note  that it starts with
                         an "e", not an "s".

                              Default:  @T3  (hh:mmXM)
                              Options:  Any valid Clarion time picture

          sPathClock     This switches  the current DOS  directory clock on
                         and off.

                              Default:  True
                              Options:  True:  on
                                        False:  off

          sPathRow       This specifies the row of the path clock.

                              Default:  25
                              Options:  1 to 25


                              BoxSoft Super Models 3.6G                2-19




          sPathCol       This specifies the column of the path clock.

                              Default:  3
                              Options:  1 to 75  
                                        (depending on the path size)

          sPathFHue      This is the foreground color for the Path clock.

                              Default:  15  (bright white)
                              Options:  0 to 15  (16 to 31 for blink)

          sPathBHue      This is the background color for the time clock.

                              Default:  5  (magenta)
                              Options:  0 to 7

          sMemClock      This switches the free memory clock on and off.

                              Default:  True
                              Options:  True:  on
                                        False:  off

          sMemRow        This specifies the row of the memory clock.

                              Default:  25
                              Options:  1 to 25

          sMemCol        This specifies the column of the memory clock.

                              Default:  68
                              Options:  1 to 78  (depending on format)

          sMemFHue       This is the foreground color for the memory clock.

                              Default:  15  (bright white)
                              Options:  0 to 15  (16 to 31 for blink)

          sMemBHue       This is the background color for the memory clock.

                              Default:  5  (magenta)
                              Options:  0 to 7

          eMemFormat     This is  the format picture for  the memory clock.
                         It  may not  changed in  INIT1.CPY.   Instead, you
                         must modify this in  CLOCKFMT.CPY.  (Make sure you
                         copy this  file from your SUPER  directory to your
                         local application directory.)  Note that it starts
                         with an "e", not an "s".

                              Default:  @N3  (<<#)
                              Options:  Any valid Clarion numeric picture








                              BoxSoft Super Models 3.6G                2-20




          sMemDivisor    This is the  divisor that is applied to the amount
                         of free memory before it  is displayed.  The total
                         amount of free memory is divided by this number to
                         get the display amount.

                              Default:  1024
                              Options:  Any number

          sMemDesc       This  will  be  displayed  immediately  after  the
                         amount of free  memory to describe it to the user.
                         This would normally be  something like "K Free" or
                         " bytes memory remaining".

                              Default:  'K Free'
                              Options:  Any string

          sMemType       This specifies the type of memory reported.

                              Default:  0
                              Options:  0 or 1:  conventional
                                        2:  virtual
                                        3:  both

          sLClockTrim    This  is  the  character  that  will be  displayed
                         before  each  of the  clocks.   If you  placed the
                         clock  as part  of  your border  and wanted  it to
                         blend in,  you may assign a  T-border character to
                         this variable.   You  must have a  trim character,
                         even if it's just a space.

                              Default:  ' '  (space)
                              Options:  Any character

          sRClockTrim    This is the character that will be displayed after
                         each  of the clocks.   If you placed  the clock as
                         part of your border and wanted it to blend in, you
                         may assign  a T-border character to this variable.
                         You must have a trim  character, even if it's just
                         a space.

                              Default:  ' '  (space)
                              Options:  Any character

          sTimeout       This  options  controls  the   inactivity  timeout
                         period.   It is  the number of  minutes the system
                         will  sit idle  before it  exits to  dos.   If you
                         don't want the system  to timeout, then leave this
                         value  at its default of  zero.  When  it exits to
                         DOS,  it  automatically  closes  all  files  using
                         CloseAll_ and executes anything in  FINAL.CPY.  It
                         then  displays  a  window that  explains  what has
                         happened  and waits  for a  keystroke.   Once this
                         screen  has appeared,  you may  not return  to the
                         program without actually restarting it.

                              Default:  0  (zero minutes)
                              Options:  0-255 minutes


                              BoxSoft Super Models 3.6G                2-21






                                    Report Options

          sReRun         This  setting  specifies  whether  the  user  will
                         always be  asked whether to re-run  a report after
                         is finished.  If you are using GetDevice_, it will
                         ask for a new output device.

                              Default:  False
                              Options:  True = rerun report
                                        False = don't rerun
                              Local:    ReRun_ in all Reports

          sGetDevice     This  setting specifies  whether all  reports will
                         ask the user for  the output device before running
                         the report.

                              Default:  False
                              Options:  True = ask for output device
                                        False = use Mem:Device
                              Local:    GetDevice_ in all Reports



                               Batch Procedure Options

          sBtchScrType   This specifies  the type of screen  that should be
                         used while running batch procedures.

                              Default:  'D'
                              Options:  'D' = Designer-generated
                                        'S' = simple counting line
                                        'N' = no screen
                              Local:    BtchScrType_ in Batch Procedures




                                   Security Options

          sSecurity      This turns the entire  security system on and off.
                         If  this is  False, the logon  screen will  not be
                         displayed  and none  of the  entry points  will be
                         checked for proper access.

                              Default:  False
                              Options:  True = security on
                                        False = security off










                              BoxSoft Super Models 3.6G                2-22




          sLogOn         This specifies whether  the logon  screen will  be
                         presented to the user at start-up.  After logging-
                         on,  the user's  unique number  will be  stored in
                         UserNo_.

                         If you  are running  this from  a network  where a
                         user number is available (such as Novell), you may
                         want to turn this off and retrieve the user number
                         from  the  operating  system  at  run  time  using
                         INIT1.CPY,  INIT2.CPY or  LOADCFG.CPY.   (For more
                         information,  see  the  section  on  User  Include
                         Files.)

                         This setting has no effect if sSecurity=False.

                              Default:  True
                              Options:  True = use logon screen
                                        False = skip logon screen

          sSecType       This  specifies whether  the security  system will
                         use levels  or doors  when  determining access  to
                         procedures.   If  levels are  used, the  user must
                         have an access level  equal to or higher than  the
                         procedure's access level.   If doors are used, the
                         user must  specifically have  access to  that par-
                         ticular door.

                         The  default for this setting is ' ', a blank str-
                         ing.  This is actually an invalid setting.  If you
                         want to  use the security system,  you must decide
                         whether to use levels or doors.  If you don't, you
                         will encounter an error at runtime.

                         This switch used to be called "sSecLevels", but we
                         decided that it  wasn't entirely intuitive.   This
                         prompted the name  change.  For more  information,
                         see the section on Security.

                              Default:  ' '
                              Options:  'L':  levels
                                        'D':  doors

          sChkPrevLog    This specifies whether the system will check for a
                         previous logon  when starting  up.  Let's  pretend
                         you   have    sSecurity=True,   sLogOn=True,   and
                         sChkPrevLog=True.  When the application starts, it
                         will check  to see if  it was called  from another
                         Super  Models  application  before presenting  the
                         logon screen.  If  this is the case, then  it will
                         get  the UserNo_  from  the previous  application.
                         Otherwise, the logon screen will be displayed.

                         This is  very handy if you  have multiple applica-
                         tions calling each other.

                              Default:  True
                              Options:  True = check for previous logon


                              BoxSoft Super Models 3.6G                2-23




                                        False = don't check

          sPassEcho      This  is the character  that is  used to  echo the
                         user as he types in the password.

                              Default:  '.'
                              Options:  Any character

          sMaxTries      This  specifies  the number  of  times  a user  is
                         allowed  to fail the  logon attempt before exiting
                         to DOS.  If it is  set to 3, the application  will
                         abort after the third failed attempt.

                              Default:  3
                              Options:  1 or more

          sBackDoor      This is the "secret password" that will always get
                         you into the  system.  If you enter  this password
                         at the username prompt, the password field will be
                         skipped, and  you will  be logged onto  the system
                         with  a UserNo_ of -1 and full access rights.  The
                         case of the string is ignored.

                              Default:  'BOXSOFT'
                              Options:  Any valid string 
                                        (up to 10 characters)

          sShowDenied    This determines  whether  the  user  will  get  an
                         "Access   Denied!"   message   when  accessing   a
                         restricted  function, or whether  it simply aborts
                         the procedure without a whimper.

                              Default:  True
                              Options:  True = show "Access Denied!"
                                        False = skip message



          Default Doors

          The  following doors are  used as  defaults for the  various pro-
          cedures types.  I would suggest leaving these alone, and control-
          ling  access in the  separate procedures.   However, you may find
          that it's useful to restrict all deletes using  a form by setting
          sTblDelDoor=5 (or something like that).  For more  information on
          these doors, see the section on Security.













                              BoxSoft Super Models 3.6G                2-24




               sMenuDoor      Menu                Local:  RunDoor_
               sHMenuDoor     HorzMenu            Local:  RunDoor_
               sVMenuDoor     VertMenu            Local:  RunDoor_
               sFormDoor      Form                Local:  RunDoor_
               sMemFrmDoor    MEMORY Form         Local:  RunDoor_
               sOthrPrcDoor   OtherProc           Local:  RunDoor_
               sRptDoor       Report              Local:  RunDoor_
               sMemRptDoor    MEMORY Report       Local:  RunDoor_
               sBatchDoor     Batch               Local:  RunDoor_
               sTableDoor     Table               Local:  RunDoor_
               sTagTblDoor    TagTable            Local:  RunDoor_
               sPickTblDoor   PickTable           Local:  RunDoor_
               sTblAddDoor    Table:  Add         Local:  AddDoor_
               sTblChgDoor    Table:  Change      Local:  ChgDoor_
               sTblDelDoor    Table:  Delete      Local:  DelDoor_
               sTblViewDoor   Table:  View        Local:  ViewDoor_



                                     Form Options

          sLoopToTop     This controls  whether the  user will loop  to the
                         top field in  a form after  exiting the bottom  of
                         the form.  If  this is set to True,  the user must
                         press the Accept_Key to save the form.  For multi-
                         page forms, the last  field in the last  form will
                         loop to the first field in the first form.

                              Default:  False
                              Options:  True - loop to top after last field
                                        False - exit after last field
                              Local:    LoopToTop_ in Forms

          sMemLopToTop   This  is the  same as  sLoopToTop, except  that it
                         provides the  default for MEMORY forms,  which you
                         may want to act differently that normal forms.

                              Default:  False
                              Options:  True - loop to top after last field
                                        False - exit after last field
                              Local:    LoopToTop_ in Forms



                               Printer Control Options

          sPC_Upd_Ok     This  specifies whether  the  user  is allowed  to
                         update records in the PrnCtl_ file.

                              Default:  True
                              Options:  True = update allowed
                                        False = no updates







                              BoxSoft Super Models 3.6G                2-25




          sAskPrnName    This controls whether the user is asked to specify
                         the printer name in GetDevice_.   If you are load-
                         ing  the printer name  from a  configuration file,
                         you may want to set this to False.

                              Default:  True
                              Options:  True = ask for printer
                                        False = don't ask

          There are also eight  custom labels to help describe  the various
          control codes.   These are used on  the UpdPC_ screen  to distin-
          guish between custom codes.  The variables are called sCstm1Label
          through  sCstm8Label.   They  may contain  any  string up  to  15
          characters.



                                 Super Table Options

          sPrevTbl_Key   This  specifies the  key used  to change  from one
                         super table to the  previous super table listed in
                         the calling TableMenu.

                              Default:  Shft_Tab
                              Options:  any valid Clarion keystroke

          sNextTbl_Key   This  specifies the  key used  to change  from one
                         super  table to the next super table listed in the
                         calling TableMenu.

                              Default:  Tab_Key
                              Options:  any valid Clarion keystroke

          sMenuTbl_Key   This  specifies the  key used  to see  the calling
                         TableMenu.

                              Default:  Ctrl_O
                              Options:  any valid Clarion keystroke

          sWrap          This specifies whether the system should wrap from
                         the last table in the TableMenu to the first,  and
                         vice versa.

                              Default:  True
                              Options:  True:  wrap
                                        False:  don't wrap

          sKeepRec       This specifies  whether the system  should attempt
                         to keep  the current  record selected as  you move
                         from  table   to  table.    See   the  section  on
                         SuperTables for more information on this.

                              Default:  False
                              Options:  True:  attempt to keep current rec
                                        False:  discard current pointer
                                                   and start at top



                              BoxSoft Super Models 3.6G                2-26





                                  Field Help Options

          sHelpRow, sHelpCol, sHelpRows, sHelpCols
                         These  control the position of the field-sensitive
                         help text.  The system will automatically wrap the
                         text within this area.

                              Default:  all 0 (zero)
                              Options:  any valid screen position
                              Local     HelpRow_, HelpCol_, HelpRows_,
                                             and HelpCols_ in all screens

          sHelpFilenam   This controls the name of your help datafile.

                              Default:  'HELP_.DAT'
                              Options:  any valid filename 
                                           up to 50 characters

          sHelpEditKey   This is the keystroke  used to edit the field-sen-
                         sitive help text.

                              Default:  Alt_F1
                              Options:  any valid Clarion keystroke



                                Miscellaneous Options

          sCalcDepth     This is  the  global setting  for the  calculation
                         depth control.   If  most of your  screens contain
                         complex, intermediate, forwards-referencing calcu-
                         lations,  you may  want to  increase this  setting
                         from its default value of 1.

                              Default:  1
                              Options:  1 or more
                              Local:    CalcDepth_

          sBlankTime     This  specifies  when  the screen  blanker  should
                         blank the screen.   It will only occur if you have
                         place  the  required  call  to  the  blanker  into
                         IDLE_.CPY.   See the  screen blanker in  the Fancy
                         Utilities for more information.

                              Default:  5 (minutes)
                              Options:  1 or more












                              BoxSoft Super Models 3.6G                2-27




          sShadow        This  controls whether  the system  adds automatic
                         shadows to  screens as they  are opened.   See the
                         section of Automatic Shadows for more information.

                              Default:  False
                              Options:  True:  add shadows
                                        False:  don't add shadows
                              Local:    Use the following code 
                                           in your Setup Procedure:

                                        Source_(Init,sShadow_=0); sShadow=1
















































                              BoxSoft Super Models 3.6G                2-28



















                                      Chapter 3



                                  Using the Features






                              Designer's Building Blocks

          There are many features available in the super models.  Sometimes
          it's  difficult  trying to  remember  what  feature is  available
          where.  To clear-up some of this confusion I will offer a list of
          which  features are  available  when  using Designer's  different
          building blocks:   Menus, Tables, Forms,  Reports and Other  Pro-
          cedures.



                                                                     <Menu>
                                   Pull Down Menus

          There  are two  special model  procedures for  creating pull-down
          menus:  HorzMenu  and VertMenu.  These  menus are like the  menus
          that Windows uses  so often.   There are a  number ways in  which
          pull-down  menus are  different  from regular  Designer-generated
          menus.  One small  item is that they are immediate.  That is, you
          can press  the first  key of  the menu  option make a  selection.
          Therefore, you should exercise  caution when choosing your option
          descriptions.   Here  are the  steps required  to create  a basic
          pull-down menu:

          Create a Horizontal Menu

          1.   Create  a normal  menu  with the  options  aligned across  a
               single line of the screen.  These options may  be contain in
               a track box, or alone on a single line.  If you want you can
               prevent  the user  from pressing  the Esc_Key  or Reject_Key
               from  the   menu  by  placing  Esc_Ok=False   in  the  setup
               procedure.  If you do this, make sure you place an option on
               the menu to Exit.

          2.   Set the menu's position as fixed on the screen.

          3.   Specify that the model procedure name is "HorzMenu". 

          Example:




















                              BoxSoft Super Models 3.6G                 3-1




                       Ŀ
                        Directory  Print  Maintenance  Exit 
                       

                ͻ
                                        Menu                       
                                                                   
                  Procedure Name :MainMenu                         
                  Procedure Title:Main Menu                        
                * Setup Procedure:Esc_Ok=False; PutKbd('<0,80,0>') 
                  Help ID        :                                 
                  Hot Procedure  :                                 
                    Hot Key      :                                 
                * Position       :Fix       Float  Fix             
                  Combine With   :                                 
                * Model Procedure:HorzMenu                         
                                                                   
                ͼ

          In this  example the  Esc_Ok  is disabled,  so there  is an  Exit
          option on the menu.  As well, there is a call  to PutKbd to place
          a Down_Key  in the  keyboard buffer so  that the first  option is
          selected as soon as the application starts.

          Create the Vertical Menus

          1.   You MUST have  a vertical  menu for each  of the  horizontal
               menus  options.  Create a normal menu with a vertical orien-
               tation. (All of the options must be in one column.)  You may
               not disable the Esc_Key and Reject_Key in a Vertical Menu.

          2.   The default depth for a vertical menu is 1.  That is, if the
               user presses the Right_Key or  Left_Key, how many times must
               the Esc_Key be  pressed to get  back to the  main menu?   If
               this vertical menu is not directly off of the main menu, you
               must set increase this  value accordingly.  The name  of the
               control variable is  "Depth_", and  it is set  in the  Setup
               Procedure.

          3.   Fix the  menu in place.   You'll  want to position  the menu
               such that it appears close to the main  horizontal menu.  In
               fact, if you want to get artistic, you can make the previous
               menu choice  highlight itself.  Simply  overlay the vertical
               menu on the horizontal menu choice and either paint a trans-
               parent attribute over the choice or retype the choice in the
               highlighted color.  I prefer to retype it, myself.  As well,
               I often add shadows to the vertical menus.

          4.   Specify that the menu's model procedure is VertMenu.










                              BoxSoft Super Models 3.6G               3-1-2




          Example:

                                Print 
                               Ŀ
                                Phone Directory   
                                Mailing Labels... 
                               ٲ
                               

                      ͻ
                                        Menu                  
                                                              
                        Procedure Name :ReportMenu            
                        Procedure Title:Directory Menu        
                        Setup Procedure:                      
                        Help ID        :                      
                        Hot Procedure  :                      
                          Hot Key      :                      
                      * Position       :Fix       Float  Fix  
                        Combine With   :                      
                      * Model Procedure:VertMenu              
                                                              
                      ͼ

          You'll  notice that the second  option in this  vertical menu has
          three dots after  it.  This indicates that  there will be another
          menu  below this.   You can choose  whether you want  to use this
          convention.

          Creating Subordinate Vertical Menus

          This is  a special  type of  vertical  menu that  is called  from
          another vertical menu option.   The main difference is  that when
          you press the  Right_Key or  Left_Key, it presses  the Esc_Key  a
          number of times to get back to  the horizontal menu before moving
          to the  next "column".   The only real difference  is the Depth_,
          which is set to  2 or more.   If the vertical  menu is the  first
          below another vertical menu, Depth_ should have a value of 2.

          Finally,  if you  don't want  the user  to be  able to  press the
          Right_Key and  Left_Key from the  buried vertical menus,  set the
          Depth_ variable to  0.  This  will make the menu  immediate only.
          This technique takes the place of the old VertMenu2.
















                              BoxSoft Super Models 3.6G               3-1-3




          Example:

                             Mailing Labels... 
                            Ŀ
                             Dot Matrix Printer (1") 
                             Laser Printer     (3x7) 
                            ٲ
                            

                      ͻ
                                        Menu                  
                                                              
                        Procedure Name :LabelsMenu            
                        Procedure Title:Labels Menu           
                      * Setup Procedure:Depth_=2              
                        Help ID        :                      
                        Hot Procedure  :                      
                          Hot Key      :                      
                      * Position       :Fix       Float  Fix  
                        Combine With   :                      
                      * Model Procedure:VertMenu              
                                                              
                      ͼ



                                                                     <Menu>
                         Disabling the Esc_Key and Reject_Key

          When  the user presses  the Esc_Key  or Reject_Key from  the main
          menu of the  application, the  program exits to  DOS and must  be
          reloaded.  Rather that repeatedly sitting through this annoyance,
          I have added the ability to disable this keys for a menu.

          To  do this, simply  place the code  "Esc_Ok=False" in the menu's
          setup procedure.  For original  users of my model, references  to
          the  MainMenu model procedure  must be  changed, as it  no longer
          exists in the  model file.   For an  example, see the  horizontal
          menu in the previous section.

          If you want to disable these two keys for all your menus, use the
          global style switch, "sEsc_Ok".


                                                                     <Menu>
                               Clearing the Action Code

          I had noticed an  unpredictable thing occasionally happening when
          I  first entered a table.   If I pressed the  Enter_Key to edit a
          record, I was returned back to the menu.  Because I believed that
          there could not be a logical cause for this, I didn't spend a lot
          of time looking.

          Suddenly  it hit me!  The Action  code was not being cleared when
          passing through  a menu.  If  the previous Action  was eView, the
          table  would  exit when  I  pressed  the  Enter_Key, rather  that
          letting me edit the record.


                              BoxSoft Super Models 3.6G               3-1-4




          To alleviate this, I clear the Action variable in all  menus.  If
          need a particular menu  to leave Action alone, place  the command
          "ClrAction_=False" in the menu's setup  procedure.  If you  don't
          want the Action  touched in any  of your menus,  you can set  the
          value of the global style switch "sClrAction".


                                                                     <Menu>
                             Exiting a Menu Automatically

          If you  want  a menu  options  to  automatically exit  after  the
          selected  choice is  executed,  set AutoExit_=True  in the  Setup
          Procedure  of your menu  (or sAutoExit=True in  INIT1.CPY).  When
          the user selects the option,  the screen will disappear then  the
          chosen procedure will be executed.  When the procedure returns to
          the  menu, the  menu  will automatically  return  to its  parent.
          VertMenus with Depth_ > 1 will cascade up to the HorzMenu.


                                                                    <Table>
                          Adding Single and Multiple Records

          In a  normal Designer table you  must press the Ins_Key  to add a
          new record, whether  you like it  or not.   Well, I decided  that
          this was not acceptable,  and I have expanded this  functionality
          significantly.

          First, you  can redefine the which  key must be pressed  to add a
          single record.   As a default it's still the Ins_Key, but you can
          change this for  the entire system by  changing the global  style
          setting "sSinglAddKey", or  for each table by  changing the local
          variable  Add_Key.  I would suggest  changing it globally so that
          your interface is consistent throughout your application.

          Second, you can  add multiple records to a table without repress-
          ing the Add_Key each  time.  This is done through the  use of the
          MultiAdd_Key (sMultiAddKey globally).  The default is Ctrl_M.  If
          you press this key in  a table, it will repeated call  the update
          procedure  to add  more  records, until  the user  aborts  the by
          aborting the form.

          There  are  two  options to  control  multi-adds.   The  first is
          MultiShow_ (global: sMultiShow).  Part of the problem with multi-
          adds  is that it  takes so long  for the table  to update between
          each add.  If MultiShow_ is set to False (which happens to be the
          default), the table is not updated the last add is complete.













                              BoxSoft Super Models 3.6G               3-1-5




          The  other  option  is  MultiAddMem_.   This  setting  determines
          whether the record  values for  each add will  be remembered  for
          next add.  This can  save the user a  great deal of time.   These
          values  are remembered only while you are  in the table.  As soon
          as you  exit the  table, they  will be forgotten.   There  is one
          thing  that you must be  careful about, though.   Multi-add knows
          how  do  auto-increment a  key, but  it doesn't  understand other
          types of unique data file keys.  If you have a unique name field,
          for example, it  will attempt to  add two records  with the  same
          name, which will cause a system error and exit to DOS.  There are
          only three ways to alleviate this:

               -  Make the key non-unique
               -   Set MultiAddMem_=False  in the  Setup  Procedure of  the
                    Table.
               -  Use the PreCopy Source Point.

          Of  these, the  Source  Point method  is  the most  powerful  and
          flexible.   Let's  pretend  that there  is  a unique  key  called
          "NameKey" that  contains Pre:LastName  and Pre:FirstName.   We'll
          assume that  you want to keep  the last name for  each record, so
          you have to  clear the first name to make the record unique.  You
          would place the following code in your Setup Procedure:

               Source_(PreCopy,Pre:FirstName='')

          Or, if you wanted to clear both fields, your code would look like
          this:

               Source_(PreCopy,Pre:FirstName='';Pre:LastName='')

          DPP will automatically place  assignment statements at the proper
          position so that  the fields are cleared before the new record is
          added.   For  more information  on Source  Points, refer  to that
          section of the manual.
           
          A similar setting for remembering previous adds is also available
          for  the   single  add  mode.     It's  globally   controlled  by
          sSinglAddMem, and locally by AddMem_.  All  the same restrictions
          apply as for the MultiAddMem_.

          There is one final setting that you may want to change.   Many of
          my users commented  that they normally  use the multi-add  rather
          than single-add, and  they would like that to be the default mode
          for  an  empty  form.    To accomplish  this,  you  can  set  the
          EmptyAddMod_ switch to 'M' (global:  sEmptyAddMod).  It's default
          is currently 'S'.












                              BoxSoft Super Models 3.6G               3-2-6




          Example 1:

               Let's  pretend  you  want  to  completely  disable  the
               single-add key and always  use multi-add in it's place.
               As well,  because you  never use unique  fields (except
               for auto-numbered fields), you want previous adds to be
               remembered.  Finally, you want the  table to be updated
               after each  add.  To  accomplish this, you  would place
               the following lines into INTI1.CPY:

                    sSinglAddKey = 0
                    sMultiAddKey = Ins_Key
                    sMultiAddMem = True
                    sMultiShow   = True
                    sAddEmptyMod = 'M'

          Example 2:

               You want your entire system to operate normally, except
               for your invoice items screen, which you want always to
               start  in multi-add mode.  Also, you want each new item
               record to be blank.

              ͻ
                                        Table                         
                                                                      
                Procedure Name  :ShwItm_Inv                           
                Procedure Title :Show Items for an Invoice            
              * Setup Procedure :AddEmptyMod_='M'; MultiAddMem_=False 
                Update Procedure:UpdItm                               
                Access Key      :Itm:Inv_Key      of Item             
                Help ID         :                                     
                Record Selector :                                     
                Record Filter   :                                     
                Hot Procedure   :                                     
                  Hot Key       :                                     
                Position        :Fix       Float  Fix                 
                Combine With    :                                     
                Model Procedure :                                     
                                                                      
              ͼ

                                                                    <Table>
                                   Copying Records

          This  feature is actually similar to the MultiAddMem_ and AddMem_
          feature, except that the user  points to the desired record,  and
          presses the Copy_Key  (global: sCopy_Key).  The  default for this
          key is Ctrl_C.  All the same  restrictions apply for the Copy_Key
          as for the MultiAddMem_ feature (no unique  fields other than the
          auto-numbered field,  unless you make  use of the  PreCopy Source
          Point).







                              BoxSoft Super Models 3.6G               3-2-7




                                                                    <Table>
                                 Customizing Locators

          Although  the Locator Field  is in Clarion's  table procedures is
          nice, its response  time is not acceptable.   I have changed  the
          Locator  to accept keystrokes  while filling  the table.   If the
          user presses  an additional alpha-numeric key  or backspace while
          the records are being  displayed, the table is  re-displayed from
          the top using the new search value.

          Additionally,  there  is  a  control   variable  called  FindRow_
          (sFindRow globally).  It enables a table to locate to a row other
          than the first.  This is quite helpful when searching for a name.
          You can see  the last few names before the actual located record.
          Consequently, you don't  have to back up to check  if you've gone
          past the name for which you were looking.

          When using Filters, you should always set FindRow_=1.  Otherwise,
          you may find that your locator does not search to the proper row.


                                                                    <Table>
                                   Using Hot Tables

          There are situations where it would be nice to display individual
          fields from a record, while scrolling on its table.  You may have
          experimented with this by placing non-scrolling display fields on
          the table.  Unfortunately, the fields are not updated as you move
          about the table with the Up_Key and Down_Key.

          This has been alleviated by the  inclusion of hot tables.  If you
          want always want  to have the pointer  record current in  memory,
          simply  put HotTable_=True in your setup  procedure.  To make all
          of  the tables  in  your application  HotTables,  set the  global
          switch sHotTable=True in INIT1.CPY.

          If you  are able to fit  your entire update form  onto the screen
          with the table,  you may want to overlay the fixed-in-place table
          with  a fixed-in-place form.  For a  good example of this, take a
          look at the Phones program.


                                                                    <Table>
                        Simulating Scrolling Data Entry Tables

          Scrolling data-entry  tables are  very handy in  situations where
          your entire record  fits in the  scrolling region of  your table.
          In this case, it is preferable to edit the record directly on the
          table.   It is possible simulate  the effect of a  scrolling data
          entry table by using the following steps:

          1.   Place the command "LockForm_=True" in the setup procedure of
               your Table.

          2.   Design a form that has the same format as a single scrolling
               entry in the table.



                              BoxSoft Super Models 3.6G               3-2-8




          3.   Place the command  "NoMessage_=True" in the setup  procedure
               of the form.  This will  cause the PauseMsg_ line to be used
               for deletes in lieu of a message line.

          4.   Tell the form to float on the screen.

                   ͻ
                                        Table                    
                                                                 
                     Procedure Name  :ShwItm_Inv                 
                     Procedure Title :Show Items for an Invoice  
                   * Setup Procedure :LockForm_ = True           
                     Update Procedure:UpdItm                     
                     Access Key      :Itm:InvKey       of Item   
                     Help ID         :                           
                     Record Selector :Itm:InvSeqNo               
                     Record Filter   :                           
                     Hot Procedure   :                           
                       Hot Key       :                           
                     Position        :Fix       Float  Fix       
                     Combine With    :                           
                     Model Procedure :                           
                                                                 
                   ͼ

                      ͻ
                                        Form                  
                                                              
                        Procedure Name :UpdItm                
                        Procedure Title:Phone Invoice Item    
                      * Setup Procedure:NoMessage_ = True     
                        Next Procedure :                      
                        Filename       :Item                  
                        Secondary File :                      
                        Help ID        :                      
                        Hot Procedure  :                      
                          Hot Key      :                      
                      * Position       :Float     Float  Fix  
                        Combine With   :                      
                        Model Procedure:                      
                                                              
                      ͼ


                                                                    <Table>
                           Disabling Add, Change and Delete

          If you want to completely disable adds, changes or deletes in one
          of your  tables, set Add_Ok=False, Chg_Ok=False,  or Del_Ok=False
          in your  Setup Procedure.   These statements may  be used  in any
          combination on a given table.

          If  you have  disallowed adds  and there  are no  records  to the
          display, the user will be presented with the sNoRecsMsg.





                              BoxSoft Super Models 3.6G               3-2-9




                                                                    <Table>
                                   Using Tag Tables

          Tag tables  enable you  to mark  items in  a table  on an  ad hoc
          basis.   Once they are selected,  you may use them  for a Report,
          Batch  Procedure, Tag Report,  or Tag Batch  procedure.  Tags are
          stored in the order they were tagged.  This order will be used in
          the case of a subsequent TagBatch or TagReport.

          You will notice  that a TagTable is 2-3 times  slower than normal
          tables.  This  is because it is looking up the tags in a separate
          file.   Many users  want to use  TagTables for normal operations,
          and occasionally for tagging operations.  I have made a modifica-
          tion to the  TabTables so that the  tags are not  looked-up until
          the  user   performs  a  tagging  operation.    (If  you  specify
          WipeTags_=False  in the  Setup  Procedure  or sWipeTags=False  in
          INIT1.CPY, you will this feature will not have any effect.)

          Also, if you are on a network you may want to store the tags on a
          local drive or in a RAM drive.  For more information on this, see
          the section  on sSingMultTag and  sTagFilename in the  section on
          Application Style.

          Here's how you implement a tag table:

          1. Create a normal table procedure.  I usually  name my TagTables
             with the prefix "Tag", rather than "Shw".

          2. Add  a scrolling computed field called  Scr:Tag with a picture
             of @S1.  Its expression will be "Tag_".  Here's an example:

                            ͻ
                              Scrolling Computed Field  
                                                        
                              Name        :Scr:Tag      
                              Picture     :@S1          
                              Expression  :Tag_         
                              Result Field:             
                                                        
                            ͼ

          3. Specify the TagTableNo_ in the  setup procedure.  This  number
             should  be unique to  this tagging operation.   The number may
             correspond to a particular file (ie: Customer),  or a particu-
             lar task (ie: invoice printing).  This is to prevent the  tags
             from  multiple data  files getting  mixed  up, as  the tagging
             system references a file's physical record pointer.

             I normally  us  EQUATE's for  TagTableNo_'s.   This  makes  it
             harder to accidentally reuse numbers.  I always  prefix my tag
             equates with "eT_" (ie: eT_Customer,  eT_PrnInv, etc.).  These
             EQUATE's are defined  in MEM_VARS.CPY.  (See the  User Include
             Files section for more information.)

          4. Specify that the table's model procedure is TagTable.




                              BoxSoft Super Models 3.6G              3-2-10




          Here is an example from the Phones program:

                   ͻ
                                        Table                    
                                                                 
                     Procedure Name  :TagPhn                     
                     Procedure Title :Tag Addresses              
                   * Setup Procedure :TagTableNo_ = eT_Phones    
                     Update Procedure:UpdPhn                     
                     Access Key      :Phn:Name_Key     of Phones 
                     Help ID         :                           
                     Record Selector :                           
                     Record Filter   :                           
                     Hot Procedure   :                           
                       Hot Key       :                           
                     Position        :Fix       Float  Fix       
                     Combine With    :                           
                   * Model Procedure :TagTable                   
                                                                 
                   ͼ

          See  the  sections  on  Reports,  Batch  Procedures,  TagReports,
          TagBatch Procedures, and the Tag Appendix for more information on
          using tags.


                                                                    <Table>
                                  Using Pick Tables

          PickTables are merely  regular tables that have  been stripped of
          the ability to change, delete, multi-add and  copy records.  This
          results in a code reduction of over 50 lines per table.  The only
          operations  allowed  are  selecting  records  and  adding  single
          records.  You can restrict  adds as well by setting  Add_Ok=False
          in your setup procedure.

          In a  future version of the  models, DPP will be  smart enough to
          remove lines  of code for features  that are not being  used.  At
          that time the PickTable will be retired,  because the extra lines
          of code will be removed automatically.


                                                                    <Table>
                           Adding "More That-a-way" Arrows

          You can  add arrows to  your tables  to specify whether  there is
          more data above or below the currently viewed  records.  Here are
          the steps required to do this:

          1.   Create a normal table.

          2.   Create one  or more non-scrolling computed fields for the up
               arrows with a  picture of @S1 and an expression of UpArrow_.
               I  normally create  two myself  (one on  either side  of the
               scrolling region), and call then Scr:LUp and Scr:RUp for the
               left and right counterparts.



                              BoxSoft Super Models 3.6G              3-2-11




                    ͻ
                                   Computed Field               
                                                                
                      Name        :SCR:LUp                      
                      Picture     :@S1                          
                      Expression  :UpArrow_                     
                      Result Field:                             
                      Attribute   :Enhanced                     
                                                                
                    ͼ

          3.   Create  corresponding non-scrolling computed  fields for the
               down arrows.   The only difference is  the expression, which
               will be DownArrow_.  I normally call my fields Scr:LDown and
               Scr:RDown.

          4.   The default for sArrows is True.  This means that the arrows
               will automatically  be calculated.  If,  however, you've set
               sArrows=False  in  INIT1.CPY, you  will  have  to place  the
               command "Arrows_=True" in your setup procedure.

          5.   Depending where  your arrows  are  placed, you  may want  to
               change  the  NoArrow_  (global: sNoArrow)  character.   This
               field contains  the value  for UpArrow_ and  DownArrow_ when
               you are  at the  top or  bottom of  the data.   If you  have
               placed  the arrows as part  of your table's  border, you may
               want to  change  this  to  a  vertical  bar  character  with
               "NoArrow_=''" in your setup procedure.


                                                                    <Table>
                              Creating Batch Procedures

          A Batch  Procedure  is a  special type  of  table that  processes
          records  instead  of  displaying them.    It  uses any  specified
          selector and/or filter to reduce the number of records processed.
          For each record matching the selector and filter, it performs the
          table's update  procedure.   Remember, you must  still initialize
          the selector field before calling the Batch  Procedure, or in the
          setup procedure.

          The can be used in a number of situations, include deleting child
          records  when a parent  is deleted, or  changing values in corre-
          sponding  files when a  key field is  changed (like customer num-
          ber).

          You have your choice of three screen types for a batch procedure.
          You can use you own  Designer generated screen, a simple  counter
          line  at the  bottom of the  screen, or  no screen  at all.   The
          default is 'D' (Designer).  To change this, set BtchScrType_='D',
          'S' or 'N' in your setup procedure.  Or you can change the global
          setting (sBtchScrType).

          If you use the Designer screen type, you can create non-scrolling
          computed fields  that  will display  the  progress of  the  batch
          procedure.    There are  three  internal  counters.   TotalCount_
          contains the  total number records  in the file,  ReadCount_ con-


                              BoxSoft Super Models 3.6G              3-2-12




          tains  the number of records read so far, and DoneCount_ contains
          the number  of records  processed (which  will be  different that
          ReadCount_ if you are using a filter).

          If you specify  a TagTableNo_  in your setup  procedure, you  can
          filter based  upon tags as well.   In this case  your filter must
          contain  "Tag_<>''"  (or just  "Tag_".)   However,  if  your only
          selection  criterium is that the records be tagged, you should be
          using the TagBatch procedure.

          If you  want, you  can LOCK  file being processed.   To  do this,
          place the command "LockFile_=True" in your setup procedure.

          You can  pass an optional  parameter to a Batch  procedure.  This
          parameter is called "Parameter_".

          As a default,  the Action is set to 0  before calling each update
          form.   If you  want this  action to be  set to the  other value,
          specify this value  in the setup  procedure using the  UpdAction_
          setting.  (ie:   UpdAction_=eChange)   If you do  use this  tech-
          nique, the update procedure must reset the Action to 0 (or eDone)
          before  returning.    Otherwise,  the  batch  procedure  will  be
          aborted.

          If you are wondering why you would want to set the Action for the
          update  procedure, here's an example.   Let's say  that a manager
          has tagged a number of customers, then wants one of his employees
          to update those specific customers.  The update procedure for the
          Batch would be the standard form, and the Action would have to be
          set to eChange.

          Here's how to create a Batch procedure:

          1.   Start by creating a table

          2.   Input  any  required  setup  procedure.   This  may  include
               initializing  selectors,  assigning  a  TagTableNo_,  and/or
               indicating the screen type.

          3.   Specify the  update procedure  that will performed  for each
               processed record.  Remember,  if you are changing fields  in
               the record, you must PUT(Filename) to save the changes.  If,
               however, you are deleting child records for a deleted parent
               (ie:     Items   in   an  Invoice),   you  will   issue  the
               DELETE(Filename) command.

          4.   Indicate the key order for processing.

          5.   Specify any selector you may want.

          6.   Specify any filter.

          7.   Indicate that the model procedure is Batch.






                              BoxSoft Super Models 3.6G              3-2-13




          Here's an example  that determines the  total invoice amount  for
          the current customer in memory:

              ͻ
                                       Table                         
                                                                     
                Procedure Name  :TtlInv_Cst                          
                Procedure Title :Total Invoices for a Customer       
              * Setup Procedure :Inv:CstSeqNo=Cst:SeqNo; Mem:Total=0 
              * Update Procedure:Mem:Total += Inv:Total              
                Access Key      :Inv:CstKey       of Invoice         
                Help ID         :                                    
              * Record Selector :Inv:CstSeqNo                        
                Record Filter   :                                    
                Hot Procedure   :                                    
                  Hot Key       :                                    
                Position        :Fix       Float  Fix                
                Combine With    :                                    
              * Model Procedure :Batch                               
                                                                     
              ͼ


                                                                    <Table>
                             Creating TagBatch Procedures

          At TagBatch  procedure is no  different from  a Batch  procedure,
          except that it processes only the records that are tagged, rather
          than filtering through the entire file.

          You  must set a TagTableNo_ in the  setup procedure.  This number
          must  be  the  same  as  the  TagTableNo_  used in  the  original
          TagTable.  As well, you must specify a key  from the same file as
          the  original TagTable.  It does not have to be the same key, but
          merely  from the same file.   Records are  processed in the order
          that they were tagged.

          Selectors and filters are  still effective, except that selectors
          are treated as additional filters.


                                                                    <Table>
                               Placing Tables On Forms

          This actually done through using two table procedures.  The first
          is called a "ShowTable", and is displays the records on the form.
          If you  want to edit the  table on the  form, you would  create a
          second  table that  would be  a "Simulated  Scrolling  Data Entry
          Table".  I  would suggest setting AcptExitTbl_=True  in the setup
          procedure of this second table (see next section).









                              BoxSoft Super Models 3.6G              3-2-14




          The ShowTable simply loops through a fixed number of records with
          an optional selector and/or filter.   (This is actually something
          like a Batch procedure.)  For each record processed, something is
          displayed on the screen  using the SHOW()  command.  If you  have
          more  records  that fit  on the  table,  you can  optionally have
          arrows  indicating the  extra records.   Here's  how you  utilize
          ShowTable:

          1.   Begin by  deciding where on your form  you want the table to
               appear.  Determine the  Row and column of the  first display
               field in the  table by position the cursor over the start of
               the  field and pressing  Ctrl_R (ruler).   As well determine
               the  total  width  of  the  display  region.    Because  the
               ShowTable will  not apply any color, you should paint region
               of the screen that will hold the table.

          2.   To  make a  ShowTable,  start by  creating a  regular Table.
               However,  don't worry about designing the screen, as it will
               not be used.

          3.   Specify the  dimensions of  your ShowTable by  setting Row_,
               Col_,  Rows_, and Width_ in  the setup procedure.   Row_ and
               Col_  describe the  starting position,  Rows_  indicates the
               number  of rows to be  displayed, and Width_  is the display
               width of each entry.

          4.   If  you want to  have arrows indicating  extra records below
               those shown, add  "Arrows_=X" to your  setup procedure.   In
               this case "X" can be various numbers.  If you want one arrow
               displayed one column to the  left of the table, "X" is  "1".
               (ie: Arrows_=1).   If you want the  arrow two columns to the
               left, use "2".   Alternatively, if you want two  arrows, one
               on either side of the table,  simply change this to a  nega-
               tive number (ie:  Arrows_=-1 places an arrow directly adjac-
               ent to both sides of the table.  As well, you can modify the
               character  used by specifying  "DownArrow_='v'", or whatever
               other  character  you want.    NoArrow_ does  not  apply for
               ShowTable.

          5.   Specify the  display formula in the Update  Procedure of the
               Table.  The result of this formula will  be displayed on the
               screen for each  record.  This expression  could be anything
               from  a  field name  like "Cst:Name"  to an  expression like
               "CLIP(Cst:LName) & ', ' & Cst:FName".

          After creating the ShowTable,  you must have it displayed  in the
          form by  calling it  from the  setup procedure of  the form.   As
          well, if you are calling the real table with a dummy field on the
          form,  you must call the  ShowTable again after  exiting the real
          table so that any new entries will be revealed on the form.

          Here is a sample edit procedure from a dummy field  that could be
          used to call the table at the appropriate point in the form:

               ShwChi_Phn; ST_Chi_Phn; IF KEYCODE()=Esc_Key OR
                    KEYCODE()=Reject_Key THEN SELECT(?-1).



                              BoxSoft Super Models 3.6G              3-2-15




          This procedure  calls the  normal table (ShwChi_Phn),  then calls
          the  ShowTable (ST_Chi_Phn).   Because  the user  may want  to go
          backwards, the Esc_Key and Reject_Key are checked.   This example
          was taken from the Phones program, in UpdPhn2.


                                                                    <Table>
                                     Super Tables

          This  feature enables  you to  have  multiple sorting  orders and
          locators for  your tables.    It can  also be  used  to create  a
          "horizontally-panning" table.   In  reality, you have  a separate
          table for  each  desired key.    These tables  are  transparently
          managed by a "TableMenu".  As a default, you press Tab and Shift-
          Tab to switch  between tables.  You can control  whether the last
          wraps to the first, a  vice versa.  You can also press  Ctrl_O to
          see the TableMenu itself, and jump directly to a specific table.

          There  is an example  of a SuperTable  in QBE.APP.   Here are the
          steps required to set up a SuperTable configuration:

          1.   You may want to create a Background with the common informa-
               tion for the tables.  This might include the border, painted
               scrolling area, hot keys listed  along the bottom, etc.   To
               create  a Background,  create a  normal Form,  with whatever
               borders, paints and text you  desire, then tell the Form  to
               use the "Background" model procedure.  Sometimes, I  use the
               cut and paste features in DesqView (or  Windows) to copy the
               information from an existing table.

          2.   Create  a menu to  call each of  the tables.   (You may have
               already done  this in the  past to  let your users  select a
               variety of sorting orders.  You may start  with this menu if
               you have it.)   Then tell  it to use  the "TableMenu"  model
               procedure.   That's  all that  required.   There are  also a
               number of fine-tuning parameters that you can set.

               Prev_Key (global:  sPrevTbl_Key)
                    Go to the previous table.  If already on  the first, go
                    to the last table on the menu.

               Next_Key (global:  sNextTbl_Key)
                    Go to  the next table.   If already on the  last, go to
                    the first table on the menu.

               Menu_Key (global:  sMenuTbl_Key)
                    Show  the TableMenu  so the  user may  pick  a specific
          table.

               Wrap_ (global:  sWrap)
                    When the user reaches the last and  first tables in the
                    menu,  should he  wrap around  to the  first and  last,
                    respectively?






                              BoxSoft Super Models 3.6G              3-2-16




               KeepRec_ (global:  sKeepRec)
                    Should  the system try to  stay on the  same record and
                    line  when switching between tables?  If this is set to
                    "True",  the table  may not  be able  to keep  the same
                    record  displayed.   This would  happen if  the desired
                    record  is filtered in the  next table, or  if it's key
                    value  in the next table is null, and nulls are omitted
                    from the key.   To alleviate this, make sure  that none
                    of  the tables use filters,  and that all  of your keys
                    have "Exclude Nulls" set to "No".

          3.   Create the  tables for each of the menu choices.  If you set
               up  the Background  form  in step  #1,  then you  need  only
               include the screen items that are specific to each table.  I
               usually  start with a transparent screen, then add all of my
               items.    This  includes  items like  the  title,  scrolling
               fields,  locator, arrows,  painted scrolling  area, etc.   I
               also use  a different color  to paint  the area for  the key
               field in each table,  plus place the locator above  the cur-
               rently active column.  This makes it easier for the  user to
               determine which column is active.   Once you've created  the
               first table, it's  easy to make the  others.  Just  ^Get the
               existing  table to  create  the next,  change the  painting,
               change the key, change the locator, and you're done.

               You  can see Next_Key, Prev_Key and  Menu_Key in the tables.
               See  the description  of these in  step #2.   Of course, the
               setting of these should be the same for the tables  as it is
               for  the  TableMenu,  otherwise  the system  will  not  work
               properly.


                                                                    <Table>
                         Exiting a Table With The Accept_Key

          Sometimes  the Accept_Key  does not  work intuitively  in tables.
          Normally, it  displays  the update  form for  editing.   In  many
          situations,  it would  be nice  to have  the Accept_Key  exit the
          table.  This would be handy in lookup tables, TagTables, etc.

          To force the Accept_Key to exit a table, set AcptExitTbl_=True in
          the setup procedure, or  set the global setting sAcptExitTbl=True
          in INIT1.CPY.


                                                                    <Table>
                              Changing the Pointer Color

          If  you have  ever tried  it, you will  discover that  you cannot
          create  a Table Pointer Bar in  Designer with a bright foreground
          attribute, like  bright white on red.   To do this  in my models,
          place the  command PointHue_(15,4) in the setup procedure of your
          table.   DPP will see this directive, strip it out, and place the
          necessary SEL() attribute in the SCREEN definition.


                                                                    <Table>


                              BoxSoft Super Models 3.6G              3-2-17




                        Displaying the Table in Reverse Order

          To  make a table display  in reverse order,  put Reverse_=True in
          the Setup Procedure.


                                                                    <Table>
                                  Formatted Locators

          If  your  locators   are  formatted  fields  (ie:     phone  with
          @P(<<<)###-####Pb  or number  with @N8),  now your  locators will
          appear  as  right-justified  formatted fields  rather  than left-
          justified strings without format characters.


                                                                     <Form>
                    Looping From The Bottom To The Top Of The Form

          If you want to  force the user to press the  Accept_Key to exit a
          form, set LoopToTop_=True in the Setup Procedure of the Form.  If
          the user presses the Enter_Key or Down_Key from the last field on
          the form, they will be placed in the first field.

          There  are  two  global   settings  that  control  this  feature:
          sLoopToTop  and sMemLopToTop.   The  first is for  regular forms,
          which the  second is  for  MEMORY forms.   You  can modify  these
          defaults in INIT1.CPY.


                                                                     <Form>
                        Jumping Between Fields Using Hot Keys

          You can  define hot keys to  jump from field to field  on a form.
          The hot keys  must be Alt_A to Alt_Z, or Alt_0  to Alt_9.  If you
          have modified  field order through the use of SELECT() statements
          in your edit  procedures, this technique will  not work reliably.
          In a future version, DPP will let you shuffle the order of Screen
          fields.  Here are the required steps to implement hot keys:

          1.   Create a normal Form.

          2.   Add  a  computed  field  called Scr:Hot  with  a  picture of
               @PHotPb.  Its expression will something like:

                    0; Hot_(Alt_N,?Cst:Last_Name);
                         Hot_(Alt_A,?Cst:Address); Hot_(Alt_P,?Cst:Phone)

               The "b" picture  and value  of zero causes  the field to  be
               blank at run-time, but visible at the development stage.

          3.   Create a call to Hot_ for each hot key.  The procedure takes
               two parameters:   the key name  and a field  equate.  It  is
               very important that the field equate be prefixed by  a ques-
               tion mark (?).





                              BoxSoft Super Models 3.6G              3-2-18




                                                                     <Form>
                              Creating Multi-Page Forms

          To implement  a  multi-page form  you must  create a  MasterForm,
          which will call the individual PageForms.  The MasterForm handles
          tasks such  as saving the  record and moving  from page  to page.
          The PageForm deals with editing the data.

          If  you  want the  bottom  form  to loop  to  the  top form,  add
          "LoopToTop_=True" to the setup procedure of your MasterForm.  You
          cannot loop-to-top  within the  individual pages.   As well,  the
          ChkAbort_  switch  is  controlled   from  the  MasterForm.    The
          ChkDelete_ switch, however, is used in the PageForms.

          If  you wish  to prevent  a user  from seeing  a particular  page
          (perhaps because of a value entered in a previous page), then you
          can  use the  BlockPage_[]  array.   As a  default, all  of these
          elements are set  to False (0).  To  hide a page, set  the corre-
          sponding array element to True  (1).  Don't forget to  use square
          brackets, not parenthesis.  You must set this variable before you
          enter the page to be blocked.  If you set it while you are in the
          page, it will not take effect until you attempt to return to that
          page.

          For example, if page 3 is to be hidden because of a field entered
          on page  1, place the following  code into the Edit  Procedure of
          the field on page 1:

               BlockPage_[3] = True

          Finally, the Next Procedure has no effect in a page form.  If you
          have to have some  code processed at the end of a screen, place a
          Dummy field as the last  field on the form  and add your code  to
          the  edit  procedure  of  the dummy  field.    Consequently,  the
          ForceNext_ setting is not available in PageForm's.

          Here are the required steps to create a multi-page form:

          1.   Create  a master form.   It  doesn't matter what  the screen
               looks like, as it will never be displayed.

          2.   Add the  names of the PageForm's,  separated by semi-colons,
               in the Next Procedure of the MasterForm.

          3.   Specify that the form uses the MasterForm model procedure.

          4.   Create  the page  forms.   These are  the  actual data-entry
               forms.  Specify that the  form uses the PageForm model  pro-
               cedure.










                              BoxSoft Super Models 3.6G              3-3-19




                                                                     <Form>
                           Checking Before Aborting Changes

          The system automatically knows if  the user has changed the  data
          in a  form.  As a default, if the  user changes any fields in the
          form  then  presses  the  Esc_Key from  the  first  field  or the
          Reject_Key for anywhere in the  form, they will be asked  whether
          they want  to lose their changes.   To turn-off  this option, set
          "ChkAbort_=False"  in  the form's  setup  procedure,  or set  the
          global "sChkAbort=False" in INIT1.CPY.

          This feature is supported in  the MasterForm section of a  multi-
          page form.


                                                                     <Form>
                           Checking Before Deleting Records

          If you want the user to  be checked one last time before deleting
          a  record, set "ChkDelete_=True"  in the setup  procedure of your
          form, or set the global "sChkDelete=True" in INIT1.CPY.

          This  feature is support in the  PageForm section of a multi-page
          form.


                                                                     <Form>
                              Forcing The Next Procedure

          Normally  a form's next procedure is called only if the action is
          eAdd or  eChange.  In the case of  eAdd, the Action is changed to
          eChange before calling the next procedure.

          If  you want to force the next  procedure to be called, place the
          command "ForceNext_=True"  in the form's setup  procedure.  There
          is no global equivalent for this setting.

          If it  is important that  you know  the original Action  when the
          next procedure  is  executed, assign  the  Action to  a  implicit
          variable in the setup procedure.  For example, you could  put the
          command A#=Action in the Setup Procedure, and check for the value
          of A#  in your Next Procedure.  (Don't use Action# for the impli-
          cit variable.  It is already used internally by the system.)


                                                                     <Form>
                       Stopping The Form From Saving The Record

          If you  want the form not  to save the record  before calling the
          next  procedure, you can set  NoSave_=True in the Setup Procedure
          of the Form.  There is no global setting for this.

          If  you turn this  feature on, the Next  Procedure is called with
          the same Action as the original form.





                              BoxSoft Super Models 3.6G              3-3-20




                                                                     <Form>
                                 Creating OtherProcs

          There  are times when  there is so  much information to  put in a
          setup procedure, it  would be nice  to put  some of the  commands
          into a different procedure.  Other procedures  are ok, but typing
          it straight into Designer would be preferable.

          There is a new model procedure called  "OtherProc" that you setup
          like a  form.  The  difference is  that only the  Setup and  Next
          procedures are executed.  As well, any commands  that you type on
          the screen are  also executed.   (Make sure you precede  all com-
          ments with a "!".)  

          To make  a form into  an OtherProc,  specify that the  model pro-
          cedure name is "OtherProc".  The code  is executed in the follow-
          ing order:

                    1.   Setup Procedure
                    2.   Security Check
                    3.   Screen Code
                    4.   Next Procedure

          For a  good example  of OtherProcs,  take  a look  at the  Phones
          program.


                                                                   <Report>
                            Using Generic Printer Controls

          The standard  printer controls  contain support  for most  of the
          basic printer  options common to  all printers.   There are  also
          spaces for  up to eight custom codes that you can enter yourself.
          The names of the control fields in PrnCtl_ are:

                    CPI_10, CPI_12, CPI_15
                    LPI_6, LPI_8
                    BoldOn, BoldOff
                    ItalicsOn, ItalicsOff
                    UnderlineOn, UnderlineOff
                    Custom1, Custom2, Custom3, Custom4, 
                    Custom5, Custom6, Custom7, Custom8

          The  prefix for the  PrnCtl_ file is  PC_:.  This  prefix must be
          used when referencing the control codes in your reports.

          Rather than try  to explain how the printer control system works,
          I'll simply tell you what to do to use it:

          1.   Make sure you've imported the PrnCtl_ file  into your appli-
               cation using Ctrl_G.

          2.   Create a normal report.

          3.   Place "GetDevice_=True" in the Setup Procedure.




                              BoxSoft Super Models 3.6G              3-3-21




          4.   Set the number of lines per page to 59 or less.  This accom-
               modates all dot-matrix and laser printers.

          5.   Tell the report to generate a device attribute.

                  ͻ
                                       Report                    
                                                                 
                    Procedure Name :PrnCst                       
                    Procedure Title:Print Customer Records       
                  * Setup Procedure:GetDevice_ = True            
                    Access Key     :Cst:Name_Key     of Customer 
                    Record Selector:                             
                    Record Filter  :                             
                  * Page Length    :  59                         
                  * Report Device  :Yes       Yes  No            
                    Combine With   :                             
                    Model Procedure:                             
                                                                 
                  ͼ

          6.   Decide where you want your control codes on your report.  To
               place  a code, press Ctrl_F and select Control.  Specify the
               Control picture as  @S30, and  tell it to  Use your  desired
               control field.  (Don't forget the prefix.)

             ͻ
                                  Printer Controls                     
                                                                       
             * Control Before :@s30        Label:    * Use:PC_:BoldOn  
               Control After  :            Label:      Use:            
                                                                       
               Formfeed Before:No        Yes  No                       
               Formfeed After :No        Yes  No                       
               Overprint Next :No        Yes  No                       
                                                                       
             ͼ

          That's all  there is to  it.   When the  report is  run, it  will
          automatically  ask the user where  they want to  send the report:
          Printer, Screen or Disk.   If they select "Printer", it will  ask
          for  the  printer name  and  number of  copies.   If  they select
          "File",  it will ask for the filename.  If they specify "Screen",
          it  will immediately begin running the report to a temporary file
          to  be viewed on the screen when it is complete.  While viewing a
          report on the screen, the user may print a sub-set of the report,
          and  the system will ask whether to send  it to a Printer or Disk
          file (not Screen).   If  the user selects  "Printer", the  proper
          codes will be substituted for that printer.

          There is a program called CVTCTL.CLA  in the super directory.  It
          will convert an existing Report Writer .CTL file into the PrnCtl_
          format.  The system prompts for the input file and  output direc-
          tory.  Simply compile the program and run.





                              BoxSoft Super Models 3.6G              3-4-22




                                                                   <Report>
                                 Re-Running a Report

          If you  set ReRun_=True in the  setup procedure of a  Report, the
          system will run the report once, then ask if it is to  be printed
          again.   If GetDevice_=True is  also on the  Setup line,  it will
          presented  before each  report.   Otherwise,  a generic  PauseYN_
          screen is used.  The corresponding global variable is sReRun.


                                                                   <Report>
                                 Filtering with Tags

          If  you have previously tagged records,  then wish to print them,
          you must make  two modifications to the report to accomplish this
          task.   When processing the  report, all the  records in the file
          will  be read to determine if  they are tagged.   It the order of
          records is not important, consider using a TagReport instead.  It
          processes only tagged records in the order that they were tagged.

          1.   Put TagTableNo_=X in  your setup procedure, where "X" is the
               TagTableNo_ that was used in the original TagTable.

          2.   Make sure that you are using a key from the same file as the
               original TagTable.

          3.   Specify  Tag_<>'' or  just  Tag_" in  your filter.    If you
               already have a filter, place parenthesis around the existing
               filter statement and add " AND Tag_" " to the end.

                 ͻ
                                       Report                      
                                                                   
                   Procedure Name :PrnLbl_DM                       
                   Procedure Title:Dot Matrix Labels               
                 * Setup Procedure:TagTableNo_ = eT_Phones         
                 * Access Key     :Phn:Name_Key     of Phones      
                   Record Selector:                                
                 * Record Filter  :Tag_                            
                   Page Length    :   0                            
                   Report Device  :No        Yes  No               
                   Combine With   :                                
                   Model Procedure:                                
                                                                   
                 ͼ


                                                                   <Report>
                                 Creating a TagReport

          This  procedure  prints only  tagged  records from  a  file.   It
          processes records in the  order that they were tagged.   Here are
          the steps required to create a TagReport:

          1.   Put TagTableNo_=# in your Setup Procedure,  where "#" is the
               TagTableNo_ that was used in the original TagTable.



                              BoxSoft Super Models 3.6G              3-4-23




          2.   Make sure that you are using a key from the same file as the
               original TagTable.

          3.   Tell that report to use the TagReport model procedure.

                 ͻ
                                       Report                      
                                                                   
                   Procedure Name :PrnLbl_DM                       
                   Procedure Title:Dot Matrix Labels               
                 * Setup Procedure:TagTableNo_ = eT_Phones         
                 * Access Key     :Phn:Name_Key     of Phones      
                   Record Selector:                                
                   Record Filter  :                                
                   Page Length    :   0                            
                   Report Device  :No        Yes  No               
                   Combine With   :                                
                 * Model Procedure:TagReport                       
                                                                   
                 ͼ


                                                                   <Report>
                           Restricting Min/Max Memo Lengths

          If you  want  restrict the  minimum and  maximum  length of  memo
          fields  on your reports, you can  use MinMemoLen_ and MaxMemoLen_
          to  control the number of lines  printed.  Simply set these vari-
          ables in the Setup Procedure of your Report.  There  is no global
          equivalent for these variables.

          There are  two common situations where  you would use this.   You
          might want  to  restrict the  number  of  memo lines  printed  to
          conserve space  on your report.  In  this situation you would set
          MaxMemoLen_=# where "#" is the  maximum number of lines you  wish
          to have printed.

          The other scenario could be printing on  a pre-printed form where
          the memo  must always occupy  the same space.   In this situation
          you would set MinMemoLen_ and MaxMemoLen_ to the same value:  the
          number of lines in the memo area of the pre-printed form.


                                                                   <Report>
                          Printing Reports in Reverse Order

          To make a Report print in reverse order, put Reverse_=True in the
          Setup Procedure.











                              BoxSoft Super Models 3.6G              3-4-24




                                                                  <General>
                          Maintaining Referential Integrity

          "Referential  Integrity" is the  stuff that keeps  your data from
          falling apart at  the seams.   For  example, when  you delete  an
          invoice, you have to delete the items as well.  Or, if you change
          a customer ID, you have  to change the value  in the rest of  the
          files so the pointers are not lost.

          This is supported  in the Super Models by using  a combination of
          OtherProc's, Batch procedures, ForceNext_  settings, etc.  In all
          cases it is the responsibility of the developer to determine when
          this  is needed.   I'll provide a  couple of examples  to get you
          started.  For more examples, take a look at the Phones program.

          Example 1 - Invoices and Items

          You have two files called  "Invoice" and "Item".  Their  prefixes
          are "Inv:" and "Itm:".   The invoice file has a key  field called
          "Inv:SeqNo"  that contains  the invoice  number.   The  Item file
          contains a  corresponding field called "Itm:InvSeqNo".   The Item
          file also has a key comprised of "Itm:InvSeqNo" and "Itm:RowNo".

          The application contains the following procedures:

                    ShwInv         Table of Invoices
                    UpdInv         Update form for the Invoice
                    ShwItm_Inv          Table of Items in an Invoice
                    UpdItm         Update form for the Item

          If the user presses  the Del_Key in ShwInv,  they are allowed  to
          delete an Invoice record, but the corresponding Item records  are
          left stranded.    The trick  here  is  to intercept  the  Invoice
          deletion process so we can delete the corresponding Item records.
          Once we intercept the  deletion, we can use a  Batch procedure to
          delete the items.

          There are two methods  to intercept the delete.  Both  are valid,
          and it depends on your tastes as to which you use.

          1.   Put the command ForceNext_=True in UpdInv's Setup Procedure.
               Then we can check for a delete in the next procedure and act
               accordingly.  The Next Procedure for UpdInv would be:

                    IF Action=eDelete THEN RI_DelItmInv. Action=eDone

               RI_DelItm_Inv  is the name of  the Batch procedure that will
               delete  the Item records.   I use  this naming convention to
               make if very obvious to me what  the procedure's purpose is.
               In this  case, "RI_" means  "referential integrity support",
               "Del" means  "delete", "Itm" means "from the Item file", and
               "Inv" means "based  on the current invoice  number".  You'll
               also notice that I clear the Action.  This tells UpdInv that
               the next procedure is completed.





                              BoxSoft Super Models 3.6G              3-4-25




          2.   Wedge an "OtherProc" between ShwInv and UpdInv.  Because all
               calls from ShwInv  to UpdInv are intercepted  by this wedge,
               we would have no difficulty handling the delete.

               I  would call the OtherProc UpdInv_.  This name implies that
               it  is closely related to  UpdInv, but is  different in some
               special  way.   The  setup and  next procedures  for UpdInv_
               would be:

               Setup:  A#=Action; UpdInv
               Next:   IF A#=eDelete AND Action=eDone THEN RI_DelItmInv.

          The batch procedure, RI_DelItmInv, will use a selector to process
          the correct Item records.  Here is the complete procedure:

                  ͻ
                                        Table                     
                                                                  
                    Procedure Name  :RI_DelItmInv                 
                    Procedure Title :Delete Items for an Invoice  
                  * Setup Procedure :Itm:InvSeqNo = Inv:SeqNo     
                  * Update Procedure:DELETE(Item); ChkErr         
                  * Access Key      :Itm:InvKey       of Item     
                    Help ID         :                             
                  * Record Selector :Itm:InvSeqNo                 
                    Record Filter   :                             
                    Hot Procedure   :                             
                      Hot Key       :                             
                    Position        :Fix       Float  Fix         
                    Combine With    :                             
                  * Model Procedure :Batch                        
                                                                  
                  ͼ

          Example  2   -   Changed  Customer ID  or Deleted  Customer (with
          cascading deletes)

          I  would never  suggest that  you allow  your  users to  change a
          customer sequence number.   If the users want to define their own
          ID's, I would  recommend that you have two customer  numbers:  an
          internal SeqNo and an external ID.

          Anyway,  let's  pretend that  our Customer  ID  is also  used for
          internal pointers.  The user wants to change the customer ID, and
          all the  customer's invoices reference the  customer record using
          the ID field.  While we're at it, well also handle the concept of
          deleting a customer  and having  to delete his  invoices and  all
          corresponding items.  This is referred to as a cascading delete.

          We  have to make the same choices regarding intercepting the call
          as we  did in Example 1.   Again  I will describe  both types  of
          intercepts:







                              BoxSoft Super Models 3.6G              3-5-26




          1.   Next Procedure Method

               Because we  need to know if the user changed the ID, we must
               force the next procedure and also store the ID in the  setup
               procedure.   There is also  another problem:   if a customer
               has  been added,  it  will seem  like  the customer  ID  was
               changed  from  ''  to   something  like  "44324".    Because
               ForceNext_  does not  pass Action=eAdd  through to  the next
               procedure (eAdd is  changed to eChange), we must  also store
               the Action.  Consequently,  the setup procedure will contain
               the following commands:

                    Setup:  ForceNext_=True; ID"=Cst:ID; A#=Action

               The  next procedure will contain the following code.  I will
               write  the code  first  as regular  multi-line source,  then
               condense it into a single line.

               Multi Line:
                        IF A#=eChange
                          RI_ID_InvCst
                        ELSIF A#=eDelete
                          RI_DelInvCst
                        .
                        Action=eDone

               Single Line:
                        IF A#=eChange THEN RI_ID_InvCst(ID") ELSIF
                            A#=eDelete THEN RI_DelInvCst. Action=eDone

          2.   OtherProc Method

               In this case the  setup and next procedures would  be almost
               identical as the previous  example.  The only  difference is
               that the Action must be checked for form completion.

               Setup:
                        ID"=Cst:ID; A#=Action

               Next:
                        IF Action=eDone THEN IF A#=eChange THEN
                            RI_ID_InvCst(ID") ELSIF A#=eDelete THEN
                            RI_DelInvCst..

          You'll notice  in each  of these  examples that  I have  passed a
          parameter  to RI_ID_InvCst.   This  parameter represents  the old
          value of the customer ID, while the new value is obviously in the
          Cst:ID field.  Here's the RI_ID_InvCst Batch procedure:











                              BoxSoft Super Models 3.6G              3-5-27




             ͻ
                                        Table                          
                                                                       
               Procedure Name  :RI_ID_InvCst                           
               Procedure Title :Change ID in Customer Invoices         
             * Setup Procedure :Inv:CstID = Parameter_ !Old ID         
             * Update Procedure:Inv:CstID=Cst:ID; PUT(Invoice); ChkErr 
             * Access Key      :Inv:CstKey       of Invoice            
               Help ID         :                                       
             * Record Selector :Inv:CstID                              
               Record Filter   :                                       
               Hot Procedure   :                                       
                 Hot Key       :                                       
               Position        :Fix       Float  Fix                   
               Combine With    :                                       
             * Model Procedure :Batch                                  
                                                                       
             ͼ


          The RI_DelInvCst procedure is as follows:

             ͻ
                                        Table                          
                                                                       
               Procedure Name  :RI_DelInvCst                           
               Procedure Title :Delete Invoices for Current Customer   
             * Setup Procedure :Inv:CstID = Cst:ID                     
             * Update Procedure:RI_DelItmInv; DELETE(Invoice); ChkErr  
             * Access Key      :Inv:CstKey       of Invoice            
               Help ID         :                                       
             * Record Selector :Inv:CstID                              
               Record Filter   :                                       
               Hot Procedure   :                                       
                 Hot Key       :                                       
               Position        :Fix       Float  Fix                   
               Combine With    :                                       
             * Model Procedure :Batch                                  
                                                                       
             ͼ


          You'll notice that the update procedure  for this batch procedure
          calls another batch procedure,  "RI_DelItmInv", which we  defined
          earlier to delete all Item records for a particular Invoice.

          I  find  that I  always prefer  the  "OtherProc" method  over the
          "Force Next" method.  It disconnects the code from the form,  the
          code can be displayed on the form of the OtherProc  (which is not
          displayed at  run-time), and Next Procedures don't work in Multi-
          Page forms.

          Of  course there are thousands  of other possible  examples.  The
          best trick  is  to  try not  to  let users  modify  the  internal
          pointers, and you'll rarely have to handle anything but deletes.




                              BoxSoft Super Models 3.6G              3-5-28




                                                                  <General>
                           Intelligently Opening Data Files

          Have  you ever wondered  what the  Designer Post  Processor (DPP)
          does each time you exit Designer?  Well, one of the many tasks it
          accomplishes is  the placement of statements  for the intelligent
          opening of  files.  It does this by scanning every module in your
          application  for references  to the  data files.    If it  sees a
          particular file being referenced in a procedure, it adds an Open_
          statement at the start of  the procedure, and a Close_  statement
          at the end.

          DPP actually  processes only  modules in your  current directory.
          This  means that  it won't  go shooting  through the  Super Model
          procedures, or anything else in a remote directory.

          One   thing  that   will  stop   if  it   finds  more   than  one
          procedure/function in  a single module (except  for BIN modules).
          Because  this is  poor Clarion  programming practise  anyway, you
          should  not  hesitate to  break  up  your  application  into  the
          smallest possible  pieces.   This enables  overlays to  work much
          more efficiently.

          When  DPP has to place Open_ and Close_ procedure calls, it looks
          for a number markers to  determine where these should be  placed.
          The Open_ statements are  inserted after the "CODE"  statement or
          after  a "!DPP_OPEN" marker.  The  Close_ statements are inserted
          after the  "Quit ROUTINE"  line or after  a "!DPP_CLOSE"  marker.
          These markers are already in all of your Designer-generated code.

          Although your external Other procedures will always have a "CODE"
          statement,  they may  be missing a  Quit ROUTINE  or "!DPP_CLOSE"
          marker.   DPP will  automatically warn you of  this, and once you
          add them to your external  Other procedures you'll never have  to
          do it again.  DPP also adds the parameters to ChkErr (a task that
          used to be performed by the MrkErr utility).

          Adding these  markers to  your procedures  is not too  difficult.
          There are number of guidelines that I follow:

          P     r     o     c     e     d     u     r     e     s     :
                    In the case of a  procedure, there should be one  entry
                    point  and  one exit  point.    That means  you  should
                    replace every occurrence of  "RETURN" in your code with
                    a call to "DO Quit".   Then add a "Quit ROUTINE" with a
                    single statement:   "RETURN".   Of course  if there  is
                    other  clean-up code  in  your procedure  you may  want
                    place it here as well.  Finally make sure that the last
                    line in your procedure before the ROUTINEs begin is "DO
                    Quit".  This prevents  the procedure from exiting with-
                    out closing the files.

                    If your procedure is very  simple, you may want not  to
                    clutter it up with a Quit routine.   It simply executes
                    a few statements then drops out of the bottom.  In this
                    case, place  the statement "!DPP_CLOSE" after  the last
                    line in the procedure.


                              BoxSoft Super Models 3.6G              3-5-29




          Functions Functions  are a  little  different.   Because you  may
                    return  a variety of value  from a function,  it may be
                    difficult  to remove  the RETURN  statements.   In this
                    case,  create the  "Quit  ROUTINE", but  leave out  the
                    "RETURN" command.   Then insert a "DO Quit" before each
                    RETURN command  so that  the files are  properly closed
                    before exiting the function.

                    Of course, if  you have only one RETURN  statement, you
                    can  place it in the  Quit routine and  put a "DO Quit"
                    statement in its place.

                    Now, if you  have a many RETURNs  and want to have  one
                    entry point  and one exit  point, define a  variable in
                    your function  called RetVal.   Instead of  issuing the
                    command  "RETURN(X)",  use "RetVal=X; DO  Quit".   Then
                    place the statement "RETURN(RetVal)" at the end of your
                    Quit routine.

          There  can be only one  occurrence of !DPP_CLOSE  in your module.
          If you have more than one, only the first will be used.

          If  you've optimized the Open_ and Close_ positions in your other
          procedure, you may want to tell DPP to stop changing it.  You can
          do this by  placing a "!DPP_NO_OPEN"  directive somewhere in  the
          source  file.   If you  want  DPP to  ignore the  file completely
          (including  not  adding  ChkErr  parameters),  you  can  use  the
          "!DPP_STOP" command.  Both  of these directives, !DPP_NO_OPEN and
          !DPP_STOP, are  meta-switches.  That  is, they affect  the entire
          module, regardless  of where they are placed.  There is no way to
          temporarily turn off DPP for a portion of a module.   However, if
          I get a demand for this, I may add it to a future version.

          Now, on to  intelligent file opening.  What happens  is that each
          procedure/function attempts to open the files it needs.  If those
          files are  already opened, they  are left that way.   However, if
          the procedure  is able to open  a file, it clears  the record and
          remembers that it  opened it.   When the  procedure finishes,  it
          automatically closes any files it was able to open.

          Theoretically,  this means that there will be few files (or none)
          open at the main menu of the application.  As you go  deeper into
          the application, more files are opened at each level.  In a small
          application (5 data files), it is  not unusual for all the  files
          to be  open at the lowest  level in the program.   A medium-sized
          application (6-20  data files)  will have approximately  half its
          files open at the deepest point.  A large  application (more than
          20 data files), may have as few as one quarter of its files open.
          Considering there  is a memory reduction of  approximately 2K per
          unopened file,  the savings on  a large application  are signifi-
          cant.

          If you are using a Configuration record (ie:  Config  file), then
          you'll want to have  this present all the time.   The best way to
          do this is  to load the configuration  with in LOADCFG.CPY.   For
          more information, see the section on User Include Files.



                              BoxSoft Super Models 3.6G              3-5-30




          You may find that this cause  opening and closing of files causes
          some unexplained  phenomenon.   For example,  pretend you  have a
          menu  that calls  one  procedure to  allow the  user to  select a
          record in a file, then calls another to procedure to process  the
          chosen record.  The file is not open at  the menu itself.  Here's
          what will happen:

               1.   The menu calls procedure A.
               2.   Procedure A opens the file and clears the record.
               3.   The user selects a record from the file
               4.   Procedure  A closes  the file  before returning  to the
                    menu.  The  record is still in memory, but  there is no
                    valid record pointer.
               5.   The menu calls procedure B.
               6.   Procedure B opens the file and clears the record.
               7.   Procedure B attempts to process an invalid record.

          Unfortunately,  all you  can do  is keep  your eye  on this.   If
          fields are always seeming to  lose their values, this may be  the
          problem.   Once  you have  determined that  this is  the problem,
          there is  fairly simple fix.  You must trick DPP into opening the
          file for the parent procedure.  This is accomplished by assigning
          a field from the file to itself (ie:  Cst:ID=Cst:ID) in the setup
          procedure of the parent.  DPP will spot the reference to the file
          and open it at parent level.

          This addition  to the  setup procedure will  change the  previous
          scenario to this:

               1.   The opens the file and clears the record
               2.   The menu calls procedure A.
               2.   Procedure A  attempts to open the file but discovers it
                    is already open.  The record has not been modified.
               3.   The user selects a record from the file
               4.   Procedure A returns to  the menu.  The record  is still
                    in memory and the file is still open.
               5.   The menu calls procedure B.
               6.   Procedure B attempts to open  the file but discovers it
                    is already open.  The record has not been modified.
               7.   Procedure B processes a valid record the returns to the
                    menu.
               8.   The Menu exits after closing the file.

          You may also want to trick DPP into opening  the file in the case
          of a Table/Form situation  where the form has many  lookup fields
          not on the  table.  This would  cause a long pause  each time the
          update form  was called.  If  the files are opened  for the table
          first, there would be very little delay when calling the form.











                              BoxSoft Super Models 3.6G              3-5-31




                                                                  <General>
                   Providing An Extra Accept_Key/Reject_Key/Esc_Key

          Users sometimes have difficulty pressing  Ctrl_Enter and Ctrl_Esc
          if one of their hands is occupied.  As well, if they  are working
          with the numeric keypad, the Esc key may be awkward to reach.

          Three variables (sXtra_Accept,  sXtra_Reject and sXtra_Esc)  have
          been added.  The  defaults for these keys are F10_Key, F2_Key and
          GAst_Key, respectively.  You can assign a different value to them
          in INIT1.CPY.


                                                                  <General>
                               Placing On-Screen Clocks

          Designer has the facility to display date and time using computed
          fields.   However, it is a tedious  job to create these fields on
          every screen.   In addition, these fields  are updated only  when
          the user  moves around the  screen, not  when he  sitting on  one
          field for an extended period of time.

          I  have implemented  a  better method  by which  the  Date, Time,
          Current DOS Path, and Free Memory are displayed on the screen all
          the time.  You can control these clocks through global variables,
          and by EQUATEs found in CLOCKFMT.CPY.

          The one unfortunate thing is that the clocks are printed over the
          screen,  covering everything  underneath.   Because of  this, you
          will  have to  be careful  when designing  your screens  that you
          don't have the clocks messing up the screens.

          The  default is  to have all  four clocks on,  occupying all four
          corners of  the screen.   For more  information on modifying  the
          appearance  of the  clocks,  read the  description  of the  Clock
          Options in the chapter on Application Style.


                                                                  <General>
                  Using Tab_Key/Shft_Tab For Field-To-Field Movement

          As a default, the Tab_Key and Shft_Tab keys have been implemented
          as field-to-field  movement keys,  whenever this applicable.   To
          disable this  feature, set "Tab_Ok=False" in  the Setup Procedure
          of any Table, Menu or Form.  Or change the setting for sTab_Ok in
          your INIT1.CPY file.













                              BoxSoft Super Models 3.6G              3-5-32




                                                                  <General>
                           Making The Up_Key Work Properly

          In  normal Clarion,  pressing the  Up_Key in  a field  causes any
          changes to be  lost and the cursor  moves to the previous  field.
          Oh well . . . at least they got the second part right!

          I have  fixed this in Forms,  Tables and Menus.   If, however, it
          gets in your way, place  the command "Up_Ok=False" in your  Setup
          Procedure, or change the setting for sUp_Ok in INIT1.CPY.


                                                                  <General>
                                Dialing a Phone Number

          There is a procedure called Dial_ that will use an attached modem
          to dial any  phone number that is passed to it.   If you pass two
          or three numbers, it will display  a menu of the numbers, letting
          you choose which  number to dial.   As  well, you can  optionally
          pass it  a description of  each number  to help  the user  decide
          which number to dial.  The format of the call is:

                    Dial_(Num1, Desc1, Num2, Desc2, Num3, Desc3)

          To  use Dial_ you  must create an  Other procedure  to call Dial_
          with the  appropriate parameters.   Keep in  mind the problem  of
          long-distance-dialing prefixes and local area codes.

          There are  a variety of  style settings  to aid the  dialing pro-
          cedure.  These  defaults correspond to a standard Hayes modem and
          should not have  to be changed.  There are,  however, a couple of
          these settings you many want  to modify.  In most cases  you will
          do this after  reading a personal  configuration record, as  they
          are hardware specific.  The first is DialPort_, which defaults to
          COM1.   The other is  DialHangup_, which  is used to  hang-up the
          modem.   Some  modems  automatically hang-up  when the  extension
          phone is picked up.  Sometimes these modems will get  confused by
          the hang-up command when they are already hung-up.

          I would  suggest you put all  of these settings into  a configur-
          ation  file.   I  have had  an unbelievable  number  of headaches
          regarding conflicting hardware setups not working as expected.

          For an  example of using Dial_, look at the Phones example appli-
          cation.  It handles the concept of long-distance-dialing prefixes
          with  a  separate  "Long Distance"  yes/no  field.   As  well, it
          eliminates the local area code by comparing it to the user's area
          code  stored in the configuration file.   The style variables are
          changed in LOADCFG.CPY.










                              BoxSoft Super Models 3.6G              3-5-33




                                                                  <General>
                                  Utilizing Security

          The  security system is  used to prevent  unauthorized users from
          accessing various functions on the system.  There is a main logon
          screen to verify that the person  is a registered user.  As well,
          there are many points throughout the system  that where access to
          procedures can be restricted.

          When you first install the Super  Models, the Security is not on.
          That is, "sSecurity=False".  There  will be no logon screen,  and
          no access checks in the individual procedures.   sSecurity can be
          turned on in INIT1.CPY.

          Once the security system has been activated,  a logon screen will
          be  presented each time  the application  is started.   After the
          user logs-on,  he will have  his unique ID  in a  global variable
          called UserNo_.   This number is used when  storing tags, so that
          different users' tags do not get confused.

          You can logon to the system using the back door ("BoxSoft" is the
          default).   In this  case, the UserNo_  will be -1,  and the user
          will have clearance for all processes.

          If you are running on a network, you  may want to use a operating
          system  call  to  get determine  UserNo_,  because  the user  has
          already  logged-on to  the network  as a  unique individual.   To
          accomplish  this, set  sLogOn=False in  INIT1.CPY to  disable the
          logon  screen.  Then  add the  necessary network system  calls to
          INIT1.CPY.   The trouble  with this  method is that  the security
          system  uses  a  file  called Access_  to  determine  user access
          rights.   Access_  is normally updated  from USEREDIT,  which get
          it's usernames from the User_ file.  This means that you must has
          have  an entry  in the  User_ file  for each  person who  will be
          logging-on.  In each of these User_ records, the user number must
          match the network's user number.

          If  you haven't  assigned values  to any  doors in  your program,
          having the security on with only check to see if the user exists.
          Every user will still have access to every function.  This may be
          all you want your security system to do.

          The default access right for everything is  0, which means anyone
          can access it.  You can control the global defaults for different
          types of procedures in INIT1.CPY.

          Each procedure  has  a RunDoor_.    To  restrict access  to  that
          procedure, set the RunDoor_ to some  value higher than 0.  Tables
          are the only procedures  that have more than the RunDoor_.   They
          also have a  AddDoor_, ChgDoor_, DelDoor_,  and ViewDoor_.   Nor-
          mally you would set an access door for a particular procedure  in
          its setup procedure.







                              BoxSoft Super Models 3.6G              3-5-34




          The system can  process access rights in two different  ways:  as
          levels and as doors, of which levels  is the default.  If you are
          using  levels, you assign  only one door  to a given  user.  That
          door  represents the  user's access level,  and they  are allowed
          into any procedure where the  door has a value equal-to  or less-
          than the user's access level.

          If, however, you decide to use doors rather than levels, the user
          must have specific  rights to each  door for which  he must  have
          access.   You  can  change the  system  from levels  to  doors by
          setting "sSecLevels=False" in INIT1.CPY.  User rights are updated
          using the USEREDIT program.

          If  you  have a  number of  Clarion  applications that  call each
          other, the  security system  will automatically sense  a previous
          logon and skip the logon screen.  This is known as sChkPrevLog.


                                                                  <General>
                                   Action EQUATE's

          Instead of referencing the various values of  the Action variable
          as 0, 1,  2, etc., there  are EQUATE's that  make your setup  and
          next procedures much easier to read.  These EQUATE's are:

                    eDone          EQUATE(0)
                    eAdd           EQUATE(1)
                    eChange        EQUATE(2)
                    eDelete        EQUATE(3)
                    eView          EQUATE(4)
                    eAutoNum       EQUATE(5)


                                                                  <General>
                               Improving Error Checking

          Throughout  the models you will find  calls to a procedure called
          ChkErr.  This small routine is used to check for an error if none
          were expected.  If an error does occur it will warn the user with
          a big  red STOP!  screen, and  it informs the  user of  the error
          message  and source code  position.   (This source  code position
          information was added to the ChkErr calls by DPP.)  You will find
          that this  error checking catches a variety of problem situations
          such  as  lost referential  integrity  and  unexpected hard  disk
          problems.


                                                                  <General>
                                Adding Extra Hot Keys

          This features lets you have unlimited hot keys in  any procedure.
          (Currently there  is a physical limit of  16 ALERT'ed ranges that
          may be  active at any time.   This constraint will  be removed in
          the next version.)  This feature is actually implemented much the
          same as Hot_ keys for jumping across a form.  The only difference
          is that  you specify a Procedure name,  INCLUDE filename, or list
          of commands, rather than specifying a field equate label.


                              BoxSoft Super Models 3.6G              3-5-35




          The main difference is  that the Hot_ procedure command  that you
          place in your  Setup procedure  or Computed field  is actually  a
          directive to  DPP to convert it to a real  hot procedure.  If DPP
          spots  a Hot_  command  with a  field  equate (ie:    Hot_(Alt_A,
          ?Cst:Address)),  it leaves it in the computed field.  However, if
          the   second  parameter   begins   with  a   single  quote   (ie:
          Hot_(Ctrl_P,'PRNINV.CPY')), it will remove the call and place the
          necessary  hot procedure later in the code with an INCLUDE direc-
          tive for the  specified file.   In all other  cases, DPP  assumes
          that the second parameter is Clarion code, and merely transplants
          it to the proper location.

          The second parameter need  not be a single procedure name  (as is
          the case  with normal hot procedures).   It can be  any number of
          commands, delimited by semi-colons.

          Hot_  keys  for jumping  between fields  must  be specified  in a
          computed field.   All the other hot procedure types  may be spec-
          ified  anywhere, including the Setup  procedure.  Here  are a few
          examples:

               Hot_(Alt_A,?Cst:Address)    !Jump to Address field
               Hot_(Alt_I,'SHWINV.CPY')    !Hot Proc: INCLUDE('SHWINV.CPY')
               Hot_(Alt_P,PrnInvoice)      !Hot Proc: PrnInvoice
               Hot_(Alt_P,PrnInv;DO Quit)  !Hot Proc: PrnInv; DO Quit


                                                                  <General>
                             Utilizing Fast Range Filters

          As you already know, selectors are fast and filters are not.  For
          example, if  you want to see  all transactions for a  given date,
          you can use a selector and your  records will appear immediately.
          If, however, you want see  the records for a range of  dates, you
          must use a filter, which is maddeningly  slow.  Now you can see a
          range  of records as fast as you do  when using a selector.  (For
          you LPM users, it is equivalent to Ranger.)

          This  feature works  in  any procedure  that utilizes  selectors.
          This includes tables, reports, batch procedures, ShowTables, etc.
          Here's how to make it work:

          1.   Make sure that you've selected  the key containing the field
               for the range.

          2.   Tell Designer to use the range field  as the Selector Field.
               If there are  any other fields in  the key before  the range
               field, they automatically become selectors too.

          3.   In  the Setup  Procedure, initialize  any of  the "automatic
               selector fields" from #2.   (You may have initialized  these
               values  before calling the  table or report.)   Then add the
               following code to the Setup Procedure:

                    Range_(<Range Field>, <Lo Limit>, <Hi Limit>)




                              BoxSoft Super Models 3.6G              3-5-36




               where "Range Field"  is the field controlling the range, and
               "Lo Limit" and "Hi Limit" are the lower and upper limits for
               the range, respectively.


                                                                  <General>
                               Accessing Source Points

          You can  embed source code at  any point in your  procedures.  If
          you look  in the model file,  you will find numerous  places with
          "!DPP_SOURCE(PointName)",  ie:  !DPP_SOURCE(Init).    This  is  a
          Source Point marker.  If you  wanted to embed source code at that
          point,  you would  simply add  the following  code to  your Setup
          Procedure:

                    Source_(PointName,<some code>)
               or   Source_(PointName,'<INCLUDE filename>')

               ie:  Source_(Init,Action=eView)
                    Source_(PostAccept,'SKIP_SEL.CPY')

          When DPP sees the Source_  directive, it automatically strips  it
          from the Setup Procedure and  places the code in the  appropriate
          location.   Because of  this, you  can  place Source_  directives
          anywhere in your procedure.  If you run  out of room on the Setup
          Procedure,  you  can  place the  Source_  directive  in the  Next
          Procedure, or trail it after the expression of a computed field.

          If you want to add your own Source Point, go ahead.  Just place

               !DPP_SOURCE(<PointName>)

          at any point in the  model, and it will automatically be  spotted
          by DPP.  Here's a list of the currently available  source points.
          It may not be immediately obvious why each of them are there, but
          when you need them they will be a godsend.

          LocVars        Local Variables may be  placed here.  Normally you
                         would use an INCLUDE file for these.

          Init           This is the first  thing that's done upon entering
                         a procedure

          Final          This is the last  thing that's done before exiting
                         a procedure.

          PostOpenScreen This  is the  first  thing that's  done after  the
                         screen is opened.

          PreAccept      This  is performed  immediately before  the ACCEPT
                         procedure.

          PostAccept     This  is  performed immediately  after  the ACCEPT
                         procedure.





                              BoxSoft Super Models 3.6G              3-5-37




          PreCopy        This is performed before  a copied record is added
                         to the file.  This is useful  if you have an auto-
                         numbered  key that  requires a  placeholder record
                         when adding  new records.  If another  key in your
                         file  is also unique, you will not be able to copy
                         the record.  With this source point, you can clear
                         the duplicate fields before the record is added to
                         the file.

          ModifyLocator  This  is called  after the  Locator has  found the
                         first   record,  but   before   the  records   are
                         displayed.

          SeeLocator     This  is called  as  the Locator  and records  are
                         being displayed on  the screen.  It  allows you to
                         display some extra information  as the locator  is
                         being displayed.

          PostSetFile    This  is found in reports.   It occurs between the
                         SET(...) command and the first DO Next_Record.

          PreDetail      This  is performed immediately before printing the
                         detail section of a report.

          PostDetail     This is performed  immediately after printing  the
                         detail section of a report.

          PreBrkHdr      This  is performed  in  the  Prt_Brk_Hdrs  ROUTINE
                         before the headers are printed.

          PostBrkHdr1    This  is performed  in  the  Prt_Brk_Hdrs  ROUTINE
                         after the headers are printed, but before the save
                         variables are initialized for the new group.

          PostBrkHdr2    This is last  thing performed in  the Prt_Brk_Hdrs
                         ROUTINE.

          PreBrkFtr      This  is  performed  in the  Prt_Brk_Ftrs  ROUTINE
                         before the footers are printed.

          PostBrkFtr     This  is  performed  in the  Prt_Brk_Ftrs  ROUTINE
                         after the footers are printed.

          PreFieldLookup This is  performed during a "lookup for validation
                         of a field".  If your lookup key has more than one
                         field, you can use this source point to initialize
                         the additional field before  the GET().  This code
                         will actually  be placed in every  field lookup on
                         the form,  so you  should  do some  kind of  field
                         checking  before  haphazardly changing  the lookup
                         fields.  For example:

                              CASE FIELD()
                                OF ?Prd:No;  Prd:Job=Itm:Job
                                OF ?Prd:Cst; Cst:Job=Itm:Job
                              .



                              BoxSoft Super Models 3.6G              3-5-38




          PreFree        This is the last thing done in the Quit ROUTINE of
                         a  table before  the  FREE(Table) and  FREE(Cache)
                         commands.

          PreNextProc    This is  performed before the Next  Procedure of a
                         form.

          PreScrLookup   This is similar to the PreFieldLookup, except that
                         it is used for  display lookups.

          RangeBrkHi     This is used by the Range_ feature.
          RangeBrkLo     This is used by the Range_ feature.
          RangeCycHi     This is used by the Range_ feature.
          RangeCycLo     This is used by the Range_ feature.
          RangeSetHi     This is used by the Range_ feature.
          RangeSetLo     This is used by the Range_ feature.

                         If  you are using  Range_() in a  report, DPP will
                         report two missing Source  points.  You can ignore
                         these errors,  as the report  does not use  all of
                         Range_ Source points.

          UpdateProc     If you  are using a different form for Editing and
                         Querying, use  this  source point  to define  your
                         edit  form.   For  more information,  look at  the
                         Query by Example section.


                                                                  <General>
                                   Query By Example

          This  enables you to  search for data  using your standard update
          form.  To do this,  place "QBEForm" in the Model Procedure  field
          in the Options screen of the Form.

          You press [^S]  (the default) in the  calling table and  the form
          pops up with the message "Enter Search Criteria".  You proceed to
          enter the various fields.  If you press [Enter] after a field, it
          assumes that you want "BeginsWith"  for a string, "Equals" for  a
          number,  date, time or  picture field, and  "Ignore" for a choice
          field.

          To process special comparisons (LessThan, BeginsWith, NotEqualTo,
          Range,  etc.), press [^S] while still in  the field.  You will be
          presented with a number of options for comparing values.  Depend-
          ing on  the type of field you are entering, you will have differ-
          ent options for the match.  When entering dates, you  can ask for
          "in  this  month".   Picture  fields  can BeginWith  and  EndWith
          something.  Choice  fields can  only equal  or not  equal.   Time
          fields, however, are treated like @N fields.  Try pressing Ctrl-S
          in each of the fields in the QBE demo program.








                              BoxSoft Super Models 3.6G              3-5-39




          When performing queries,  the system will automatically use a key
          file  if possible.  This  is done for  the following comparisons:
          exact  match, range, begins with,  more than, more  than or equal
          to, less than, and less than or equal to.  It checks each key for
          useability  in the  order  they appear  in  the file  definition.
          Therefore, you should  define your  keys in an  order that  makes
          sense for querying.

          All  tables  recognize  the  Query_Key  (Ctrl_S),  regardless  of
          whether  the table's update form  can support it.   Non-QBE forms
          will simply display  a message  then abort when  called with  the
          Action set to "eQBE".

          A progress bar is used to  inform the user of the query's status.
          There  is also  a counter  in  the bottom  right corner  with the
          number of records matched so far.

          Quick  &  Easy Queries  -  Tell  your  regular  form to  use  the
               "QBEForm"  model procedure.  To  search for data, press [^S]
               in your table.   Enter the search criteria in  the form.  To
               specify  a particular  comparison, press  [^S] while  in the
               field.    When  your   done  entering  your  criteria  press
               [^Enter].   The  system  will begin  searching for  records.
               When it finds a  match, it shows it to  you on the form  and
               asks if  you wish to edit it.   You press [Enter] to edit or
               [Esc] for the next record.

               If you choose to edit a record, you will be  returned to the
               table after completing your edit.   If you get to the end of
               the file without choosing  a record, you will remain  in the
               form  so  you can  modify your  criteria  or press  [Esc] to
               abort.

          Find Them  and Tag Them - The  next step is to  start tagging the
               matches.  Just put "TagTableNo_=x" in the Setup Procedure of
               the Form.  ("x" is a number from  -32000 to +32000.  See the
               guidelines for TagTableNo_'s in the regular docs.)  When you
               finish entering  your criteria, the  system will ask  if you
               wish  to "Edit" or "Tag".  If  you choose "Edit", the system
               works as it  did in  the previous example.   Choosing  "Tag"
               will  force the system to  go and tag  all matching records,
               after which it returns to the table.

               If there are existing  tags, you will be presented  with the
               additional option  of "Untagging".   If you  choose this,  a
               record  must be  tagged and  match all  the criteria  on the
               form.  The  system will  still use an  index if  applicable.
               If, however, no indices are relevant, the  system will check
               just the previously tagged records.

               If there are existing tags and you choose to "Tag", you will
               be asked if you wish to clear the existing tags first.

               Of  course tags are useless without a TagReport, TagBatch or
               TagTable somewhere else in your system.




                              BoxSoft Super Models 3.6G              3-5-40




          View Just  the Found Records Using  a Table - If you  want to see
               only the  tagged records  after returning  from a  form, set
               "QBETagTblNo_=x"  in  the  Setup  Procedure  of the  calling
               Table, where  "x" is  the same number  as you  used in  your
               QBEForm.    When  the  form finishes  tagging  the  matching
               records, the table will show you only those records.

               Be forewarned, because the  table uses a filter to  find the
               tagged records,  it can be terribly slow.   If your file has
               10000  records  and your  queries  find  only  a  couple  of
               matches, then you probably won't want to use this method.

               If  you enter a Table with previous query results, they will
               be  cleared   if   WipeTags_=True   (the   default).      If
               WipeTags_=False, you  will be  given the option  of clearing
               them (and seeing all the records), or not clearing them (and
               seeing just the records from the previous query).

          Use  a TagTable - You can use  a TagTable for your calling table.
               In this case, it will still show all records after  a query,
               and  the tagged records will, of course, be tagged.  Immedi-
               ately after  the query, you are  asked if you want  to go to
               the first tagged record in table  order.  You can always use
               [^N] and [^P] to go to the  Next and Previous tags, respect-
               ively.

          Use a  Different Form  for Querying  than for Editing  - This  is
               particularly  useful if  your  normal form  is a  multi-page
               form.   Tell your table to  call the Query form,  then place
               the following code in the Setup Procedure of the Query form:

               Source_(UpdateProc,EditFormName;DO Quit)

          The query processes all records in the file.  It  does not recog-
          nize the selector in a calling table.   The system will automati-
          cally copy selector fields from the Table (all fields  in the key
          up to and including the Selector field itself), but the user will
          be  allowed to  change these fields.   Also, many  forms will not
          contain all the selector  fields from the table.   To get  around
          this  problem, create a special  form just for  QBE that contains
          all of the Selector fields Have the table call this form in place
          of  the original  form.  Place  the following  code in  the Setup
          Procedure of the QBEForm:

               Source_(UpdateProc,OrigFormName;DO Quit)


          If  you  want to  restrict the  user  from entering  the selector
          fields, add the following code to the Setup Procedure:

               ; Source_(PreAccept,'SKIP_SEL.CPY')


          Then create  a file called  SKIP_SEL.CPY.  If  you have just  one
          selector field, use the following code:

               IF SELECTED()=?Pre:SelField THEN SELECT(SELECTED()+1).


                              BoxSoft Super Models 3.6G              3-5-41






          If all of the fields are together, use the following code:

               IF INRANGE(SELECTED(),?Pre:FirstSel,?Pre:LastSel)
                 SELECT(?Pre:LastSel+1)
               .


          If the fields are scattered about, use the following code:

               LOOP
                 CASE SELECTED() OF ?Pre:FirstSel OROF ?Pre:NextSel 
                     OROF ?Pre:LastSel
                   SELECT(SELECTED()+1)
                 ELSE
                   BREAK
               . .


          See QBE.APP for an example of the QBE features.


                                                                  <General>
                                  Inactivity Timeout

          You can have the system automatically exit  to DOS after a period
          or  user  inactivity.    The  timeout  period  is  controlled  by
          sTimeout, which should be set in INIT1.CPY.   This setting repre-
          sents the  number  of minutes  of  inactivity  before exit.    To
          prevent the timeout, leave sTimeout at its default of zero.

          When the  system exits it  disables the IDLE  procedure, includes
          FINAL.CPY,  then closes  all files  using CloseAll_().   Then  it
          displays an information screen and waits for  a keystroke.  While
          waiting  for the  keystroke,  the screen  is automatically  moved
          around to prevent screen burn-in.  After pressing a key, the user
          must restart the program.


                                                                  <General>
                                  Extra Memo Fields

          As you know, a  file may have  only one memo  field.  Of  course,
          there are many situations where it is necessary to have more than
          one memo field.   The one real memo  per file rule is  actually a
          restriction dictated by the Clarion data files.

          If  you were hand-coding your screens,  you could use a TEXT(#,#)
          field instead of  an ENTRY(@S#) field for  a normal STRING  vari-
          able.  Unfortunately, this has not been available in Designer.

          Through the  magic of DPP, you can not perform this ENTRY to TEXT
          conversion with a simple directive.  Here's how you add an  extra
          memo field to your file:




                              BoxSoft Super Models 3.6G              3-5-42




          1.   Create a  GROUP field in  your datafile.   Give it  any name
               that makes sense to you.
          2.   Create  a STRING  field within  the group.   Name  the field
               based on the name of your GROUP.  For example, if your group
               is  called Comment, call the field CommentLine.  If you want
               your memo to be  60 columns wide, make this field 60 charac-
               ters long with a picture of @S60.   If you want a maximum of
               10 rows in your memo, specify the dimension is 10.
          3.   On your form, place the GROUP field in the desired position.
               It will appear with the width of your embedded STRING field.
               Make sure you leave  enough space beneath the field  for the
               TEXT field to expand.
          4.   If  you want the TEXT field to  occupy 5 rows on the screen,
               place the following code into its Edit Procedure:

                    Text_(Comment,5)   !GROUP's name is "Comment"

          That's all there is to it.  Printing is a little tougher, though.
          Because it's not  a regular memo, Designer doesn't understand how
          to print only lines that have been entered.  Therefore,  you must
          always print  the same number of lines from your text field.  You
          don't however,  have to print all  the lines.  If  only the first
          three lines are necessary for the report, then you can place only
          three lines on the report.

          Create a computed field  on the report.   Using the example  from
          above,  specify  the  field  name is  "Rpt:CommentLine1".    It's
          picture is @S60, and  its expression is Pre:CommentLine[1] ("Pre"
          is the prefix of your data file).  Repeat this for each  row that
          you wish to print, incrementing the array index each time.


                                                                  <General>
                                 Field-Sensitive Help

          All of  your  screens may  have help  text  associated with  each
          field.  This  includes forms, tables and menus.   (Unfortunately,
          you may  not have different text  for each menu option.)   As you
          move  from field to field on  the screen, the help text automati-
          cally changes.   It is not changed while  going backwards, but it
          will work again once you continue down the screen.   Also, if you
          hit a hot key from a field, it will update the help text.

          The help  always appears at the  same point of a  screen within a
          given procedure.  This  region is defined by you, and it may be a
          single line  at the bottom  of the screen,  a rectangle of  three
          rows by 30 columns,  or any other shape that you prefer.   If you
          wish to  use the bottom row  for all screens, then  you would set
          the global options in INIT1.CPY:

               sHelpRow=25; sHelpCol=1; sHelpRows=1; sHelpCols=80

          If, however,  you wanted  to use  the third  row of your  current
          window, you  would  place  the  following code  into  your  Setup
          Procedure:




                              BoxSoft Super Models 3.6G              3-5-43




               HelpRow_=ROW(Screen)+2; HelpCol_=COL(Screen)+1; HelpRows_=1;
                    HelpCols_=COLS(Screen)-2

          If you wanted to use the second-last row of your current  window,
          only one option would change:

               HelpRow_=ROW(Screen)+ROWS(Screen)-2

          If  you are confused by this arithmetic, you could also associate
          the  position of  the  help text  with  the position  of  a dummy
          computed field.  Create a  computed field called Scr:HelpPos with
          a picture  of @P*Pb and an expression of 0 (zero).  Let's pretend
          that you want to help text to  occupy 3 rows and 30 columns, with
          the computed field at the top-left corner of the region:

               HelpRow_=ROW(Scr:HelpPos); HelpCol_=COL(Scr:HelpPos);
                    HelpRows_=3; HelpCols_=30

          Because the help system uses the SHOW command to display the text
          (much  like a  ShowTable),  you must  paint  your help  area  the
          desired color.  The help text itself may be up to 240 characters.
          It will automatically be word-wrapped within your display region.
          Any excess text is not displayed.

          To  make it  easier for you  to create  the help  text, there are
          three scopes that are  available.  The displayed help  text could
          be  associated with the current  field on the  current screen, or
          with the current field  on any screen, or  just with the  current
          screen.   This is also the  order in which it  attempts to locate
          the help text in the HelpFile_.

          The sHelpEditKey is used to edit  the help text.  The default for
          this key  is Alt_F1, which can be changed in INIT1.CPY.  This key
          is available  in Processor and the  final .EXE file.   This means
          that your users can also update the help text.  While editing the
          text, you  can press Alt_L  to lookup existing  help by  field or
          procedure name.

          Because the help system can  potentially perform three GET  oper-
          ations against  the help file  each time  you move from  field to
          field, you should not turn on the help globally unless you really
          plan on adding  help text to  the vast majority of  your program.
          If you intend on using help in only a couple of screens, then use
          the local settings to turn on help in the screens.  Then the rest
          of the system will not suffer performance penalties.














                              BoxSoft Super Models 3.6G              3-5-44



















                                      Chapter 4



                                  User Include Files












          There are many instances where you cannot accomplish something in
          Designer.   You  can come  very close,  but it's  just not  quite
          possible.   It would be nice, in these frustrating situations, if
          you could use Designer's  framework, but put in your  own special
          touches.   This is why  Designer has Other  Procedures.  However,
          even they cannot solve all of the problems.

          To help you out in these troublesome areas, I have placed INCLUDE
          directives  in key  locations  throughout the  model and  related
          procedures  and functions.   If  you require  special code  to be
          processed at a particular time, there's a good chance that one of
          these INCLUDE directives will save the day.

          There  are default versions of  these INCLUDE files  in the SUPER
          directory.     If  you  don't   define  a  given   file  in  your
          application's directory, the  compiler will automatically  search
          the path and find the default file in the SUPER directory.

          If you  look at a list of the  .CPY files in the SUPER directory,
          you'll  discover that some of the files have an underscore ending
          the name, while some don't (as in:  LOGO.CPY and PASS_.CPY).  The
          names  without the underscores are  the user files,  and the ones
          with the underscore are internal control files.

          INIT1.CPY      As  you  probably already  know,  this  is a  very
                         special INCLUDE  file.   It is executed  after the
                         screen  is blanked,  but  before anything  else of
                         consequence is done.   This is  the best place  to
                         change global settings.

          INIT2.CPY      This file is performed  after the files are opened
                         and  the user has logged-on.  It is the last thing
                         to be done before the application's main procedure
                         is called.

          FINAL.CPY      This file  is included as  the last thing  that is
                         performed before the application exits to DOS.  If
                         you want to record  a time stamp of when  the user
                         exited, this would be the place to do it.

                         You  may  also  want  to  perform  a Clarion-style
                         "Good-bye" screen  that stays on the  screen after
                         the program has exited to DOS.  To do this, simply
                         create  a screen  in  MEM_VARS.CPY that  is not  a
                         window.   Call this screen GoodbyeScrn.   Then add
                         the command "OPEN(GoodbyeScrn)" to FINAL.CPY.

          GINIT1.CPY     The  commands   in  this  file   are  executed  in
                         G_OpenFiles before the files are opened.




                              BoxSoft Super Models 3.6G                 4-1




          GINIT2.CPY     The  commands  in   this  file  are  executed   by
                         G_OpenFiles after the files are opened.

          LOADCFG.CPY    This file is included  in two places, but performs
                         the same  function in  each case.   Any statements
                         that  are needed  to load  a configuration  record
                         should be placed  in this file.   Because this  is
                         executed after  Logon, you can use  the UserNo_ if
                         required.  This file is executed when the applica-
                         tion begins,  as well as each  time G_OpenFiles is
                         called other than the  first.  (This includes each
                         time G_RunProc  is called to RUN  an external pro-
                         gram.)

                         Example:

                              GET(Config,1)  !No ChkErr
                              IF ERROR()
                                EMPTY(Config); ChkErr
                                CLEAR(Cfg:Record)
                                Cfg:Port     = sDialPort
                                Cfg:InitWait = sDialInitW
                                Cfg:DialWait = sDialWait
                                ADD(Config); ChkErr
                                UpdCfg
                              ELSE
                                sDialPort  = Cfg:Port
                                sDialInitW = Cfg:InitWait
                                sDialWait  = Cfg:DialWait
                              .

          EXTRAMAP.CPY   This  file is compiled as part of the MAP.  If you
                         have a  bunch of Other Procedures  that are shared
                         by many  applications, now  you can  develop these
                         applications  in their  own  directories.   Simply
                         refer to the modules in  their remote directories,
                         and they will automatically be compiled as part of
                         the application.  Because the applications  are in
                         separate  directories, they  each will  have their
                         own  .PRO version  of  the common  modules.   This
                         means no  more lengthy recompiles due  to "changed
                         global data".

          MEM_VARS.CPY   This  is the oldest of  the INCLUDE files.   It is
                         used  to define  any  global data  that cannot  be
                         declared   in  Designer.    This  includes  Memory
                         Tables, items with the OVER attribute, global  DOS
                         files,  etc.   Any  items  declared  here will  be
                         available throughout the entire application.

          DOOR.CPY       This file  includes a list of equates declarations
                         for the security doors.  You  can create this file
                         manually, or have DOOREDIT do it for you.






                              BoxSoft Super Models 3.6G                 4-2




          IDLE.CPY       This  file  is   executed  each  time  the   Idle_
                         procedure  executes.   If you  have  anything that
                         needs to be done as  an idle procedure, place  the
                         statements in  this file.  Remember,  you can con-
                         trol the idle delay using sIdleDelay.

          LOGO.CPY       This  file  contains  the  screen  definition  for
                         G_OpenFiles.   It is opened before  the opening is
                         started and closed  after it is done.   This means
                         that while  the files  are being opened,  the user
                         can look  at your logo screen,  rather than black-
                         on-black.    Remember,  you  can  have G_OpenFiles
                         pause after opening the files to wait for the user
                         to press a key.   To do this, set  sLogoPause=True
                         in INIT1.CPY.  This  pause is especially useful if
                         sOpenAtStart=False.

          PASSLOG.CPY    This file is included in Pass_() immediately after
                         a successful logon.   You may  use this to  record
                         that the user logged-on at that time.

          CHKPRN.CPY     Statements  in  this file  are executed  each time
                         before the printer  is used.   It can  be used  to
                         check printer  status  and abort  the  report,  if
                         necessary.

          VIEWKEY.CPY    This  file  is included  as  part  of the  keycode
                         checks  in the View_ procedure.   If you feel like
                         experimenting  and  you  are  not happy  with  the
                         options available  in the View_ procedure, you can
                         use this to disable existing keystrokes or add new
                         ones.  For example, if all of your reports were 80
                         characters or  less, you  may want to  disable the
                         Right_Key, Left_Key, Home_Key  and End_Key.   This
                         would  be  done with  the  following statement  in
                         VIEWKEY.CPY:

                              OF Right_Key OROF Left_Key
                              OROF Home_Key OROF End_Key
                                !Do Nothing

                         One of my users is  using this to individual fixed
                         length sections of  his report using the  function
                         keys.  You could  even do variable length sections
                         with a little extra  work.  Be forewarned, though.
                         This is not for the meek of heart.

          CLOCKFMT.CPY   These are  the picture  EQUATEs for  the on-screen
                         calendars.   If you don't like the  default of @D1
                         for the  date clock, @T3  for the time  clock, and
                         @N3 for the free memory  clock, then you must copy
                         this file from the  SUPER directory to your appli-
                         cation directory and modify it there.






                              BoxSoft Super Models 3.6G                 4-3





















                                      Chapter 5



                           Support Procedures and Functions







































                              BoxSoft Super Models 3.6G                 4-5












          There  are a large number of support procedure and functions that
          are included  in the Super Models.   If you are  not ever leaving
          Designer,  you will probably not need to understand everything in
          this section.  However,  I've provided this section for  those of
          you that like experiment.

          I  place each of these functions in  their own source file.  They
          are listed in a  file called SUPERMAP.CPY, which is  INCLUDE'd in
          the model  file.  If you  are not overlaying your  code, you will
          find a dramatic increase in memory requirements, although I think
          that most  of you are already  using overlays.  For  those of you
          that  aren't, consider purchasing  a copy of  FastMap from Viking
          Software at  011-44-909-569-269 (represented in  North America by
          Intelliscan  at  (510)820-6061),   Overlay  Manager  from  Mitten
          Software at  (612)593-5019 or  Automatic  Overlay Generator  from
          Cook Database Design at (502)863-2086.

          To minimize naming conflicts with procedures in your own applica-
          tion, I  have suffixed the  names of  most of  my auxiliary  pro-
          cedures with an underscore.  The procedures I have added are:

          PutKbd         This  LEM procedure  stuffs  keystrokes  into  the
                         keyboard buffer.  You must  pass it a string para-
                         meter with ascii characters or encoded keystrokes.
                         For format for the keystroke encoding is

                              <0, scan code, ascii code>

                         For example, to stuff "BoxSoft" and the Enter_Key,
                         you would create a procedure call like this:

                              PutKbd('BoxSoft<0,28,13>')

                         You can use the Fancy Utility called "SeeKbd".  It
                         will show the exact  call for PutKbd as you  enter
                         the desired keys.

          Proper         This  LEM function  returns  a  passed  string  in
                         proper mixed case.  It also understand conventions
                         like  "McDonald's" (both the "Mc" and apostrophe).
                         You might use it in an Edit Procedure to make sure
                         a  field is entered  in mixed case.   For example,
                         your  Edit Procedure  for a field  called Cst:Name
                         may look like this:

                              Cst:Name=Proper(Cst:Name); DISPLAY(?)







                              BoxSoft Super Models 3.6G                 5-1




                         This makes it  easier for your users if they don't
                         have to  enter mixed case.   However, I  would not
                         suggest using  this  for company  name fields,  as
                         they often have long  sequences of upper case let-
                         ters.

          ChkErr         You   will  find  this  procedure  call  scattered
                         throughout the models.  It is used to check for an
                         error  when an specific error is not expected.  If
                         a  error does  occur, it  will open  with  a large
                         "STOP" screen,  informing the user that  he should
                         record some extra information found in a box below
                         and to call  his support person  as soon as  poss-
                         ible.   It  also  prompts  the  user  to  enter  a
                         description  if his  actions  at the  time of  the
                         error.    He may  also  press Alt-P  or  Ctrl-P to
                         "peek" at the screen behind the ChkErr window.

                         The box contains  the error message as well as the
                         source module name and line number where the error
                         occurred.   This  information  is  placed  in  the
                         ChkErr statement by DPP  when it scans your source
                         code.

                         The  errors occurrence  is also  stored in  a file
                         called  ERROR.LOG in  the  current directory.   It
                         saves the error number, error message, source code
                         name  and line number, and  the date and time when
                         it occurred.

                         Feel free to use ChkErr in all of your procedures.

          ChkErrSave_    This procedure is used by ChkErr to save the error
                         in ERROR.LOG.

          GetDevice_     This function is  asks the  user what  destination
                         they want for their report.  It takes two external
                         parameters:  a Destination variable of BYTE, and a
                         Copies variable of SHORT.  Copies should be set to
                         a  default  value  before  the  call  (usually 1).
                         After the  call, Destination will contain  1, 2 or
                         3,  which  stands  for  eToPrinter,  eToScreen  or
                         eToDisk.   Copies will be  set to at  least 1.  In
                         the  case of  eToScreen  and  eToDisk,  Copies  is
                         always set to 1.

                         GetDevice_  returns  a  value  of  True  or False,
                         depending upon whether the  user aborted the oper-
                         ation by  pressing Esc_Key or Reject_Key.   If the
                         user completed the GetDevice_ function, it returns
                         True.








                              BoxSoft Super Models 3.6G                 5-2




                         There is actually a third  parameter to GetDevice_
                         that is only used  in the case of a call  from the
                         screen Viewing  system.   This  existence of  this
                         parameter  (regardless  of  the value),  indicates
                         that  the report  is already  being viewed  on the
                         screen,  and  to allow  the  user  to select  only
                         Printer or Disk.  Here's an example of the call:

                              IF NOT GetDevice_(Dest,Copies) THEN DO Quit.

          ShowCancel_    This procedure displays a "Report Cancelled" mess-
                         age at the end of a  report if the user aborts the
                         report.  It uses  Mem:Device to determine where to
                         send the output.

          AbortEditYN_   This function  is called  if the user  attempts to
                         exit from a form after making changes to the data.
                         It returns "Y",  "N" or " ", depending  on whether
                         the chose to Yes: save then exit, No: exit without
                         saving, or Cancel: do not exit.

          ChkAddEmpty_   This function is called from a table if there  are
                         no  records  for  display and  the  programmer has
                         specified  sChkAddEmpty=True  in INIT1.CPY.   (See
                         the  Application Style  section for  more informa-
                         tion.)

          ExtraKeys_     This  procedure  is called  at  the  start of  the
                         application to invoke any additional keys that the
                         programmer  has  specified  for   the  Accept_Key,
                         Reject_Key and Esc_Key.  As a  default F10=Accept,
                         F2=Reject and GrayAst=Esc_Key.

          PauseMsg_      This procedure displays a  string on the bottom of
                         the  screen and  waits  for the  user  to press  a
                         keystroke.  Only  the first parameter, the  string
                         itself, is required.  The remaining parameters are
                         defaulted  from INIT1.CPY.   (See  the Application
                         Style  section for  more information.)   The  full
                         call has the following parameters:

                              PauseMsg_(<message string>,
                                   <justification: 'L'/'R'/'C'>,
                                   <beep: True/False>, <foreground color>,
                                   background color>)

                         ie:  PauseMsg('Done!')

                         ie:  PauseMsg('Error!',,eBeepOn)

                         ie:  PauseMsg_(
                                   'Record was updated.  Press a key...',
                                   eJustCenter,  eBeepOn, 15, 1)

                         For a description  of eBeepOn, eJustCenter,  etc.,
                         see the section on Global Equates.



                              BoxSoft Super Models 3.6G                 5-3




          PauseYN_       This  function  displays  a  programmer  specified
                         string and waits  for the user to  select "Yes" or
                         "No", or to press the Esc_Key.  It return "Y", "N"
                         or " " accordingly.  Only the first parameter, the
                         string itself, is required.  The remaining parame-
                         ters  are  defaulted  from INIT1.CPY.    (See  the
                         Application Style section  for more  information.)
                         The full call has the following parameters:

                              PauseYN_(<question string>, <justification:
                                   'L'/'R'/'C'>, <beep: True/False>,
                                   <initial choice: 'Y'/'N'>)

                         ie:  IF PauseYN_('Delete Customer Record?')='Y'
                                DELETE(Customer); ChkErr
                              .

                         The only way to change the color of the screen for
                         PauseYN_() is  to modify the  screen structure  in
                         PAUSEYN_.CLA, found in the SUPER directory.

          PauseChoice_   This  function  displays  a  programmer  specified
                         string and waits for  the user to select one  of a
                         series  of acceptable keystokes.   It  returns the
                         letter of the  choice, or an  empty string if  the
                         user presses  the Esc_Key.  The  first two parame-
                         ters,  the  display  string   and  the  string  of
                         choices,  is required.   The  remaining parameters
                         are defaulted from  INIT1.CPY.  (See the  Applica-
                         tion  Style section  for more  information.)   The
                         full call has the following parameters:

                              PauseChoice_(<display string>, <choices>
                                   <justification: 'L'/'R'/'C'>,
                                   <beep: True/False>)

                         ie:  CASE PauseChoice_(
                                   'Do you want to Add or Change?', 'AC')
                                OF 'A';  DO AddRec
                                OF 'C';  DO ChgRec
                                ELSE     DO Quit
                              .

                         The function automatically  scans the display str-
                         ing for  each  choice, and  highlights  the  first
                         uppercase letter matching each choice letter.  The
                         only way  to change  the color  of the  screen for
                         PauseChoice_()  is to modify  the screen structure
                         in PAUSCHC_.CLA, found in the SUPER directory.










                              BoxSoft Super Models 3.6G                 5-4




          SetMessage_    This procedure  is used to set  the message string
                         in  MessageScrn_.    You  must  open  MessageScrn_
                         before calling SetMessage_, and close MessageScrn_
                         when you are finished.   Only the first parameter,
                         the  string itself,  is  required.   The remaining
                         parameters are defaulted from INIT1.CPY.  (See the
                         Application Style section  for more  information.)
                         The full call has the following parameters:

                              SetMessage_(<question string>,
                                   <justification: 'L'/'R'/'C'>,
                                   <beep: True/False>,
                                   <initial choice: 'Y'/'N'>)

                         You  would  most commonly  use SetMessage_  if you
                         have a  time-consuming procedure  and you want  to
                         keep  the user informed as to  the progress of the
                         task.  Here  is a small example code  segment that
                         uses SetMessage_ properly:

                              OPEN(MessageScrn_)
                              LOOP X# = 1 TO 5
                                SetMessage(X# & ' done')
                              .
                              CLOSE(MessageScrn_)

          ActionMsg_     This  function returns a  message string depending
                         on the current value of Action.  It is used in the
                         Forms to set  Mem:Message to "Record Will  Added",
                         "Record Will Be Changed", etc.

          Open_          This  procedure is  the  intelligent  part of  the
                         Intelligent  Opening.   It is  used to  open files
                         when they  are needed.  The  Open_ procedure takes
                         up to seven parameters,  depending on what you are
                         doing.  The first four are required.  The fifth is
                         optional  for display purposes, the sixth controls
                         Open_'s  operation  for  creating files,  and  the
                         existence  of a  seventh specifies  that Open_  is
                         being called from G_OpenFiles.  Here is the format
                         of the call:

                              Open_(<filename>, <global flag>,
                                   <local flag>, <file record>,
                                   '<filename>', <create: True/False>,
                                   <called from G_OpenFiles>)

                         Parameters:

                         <filename>     The name of the data file itself









                              BoxSoft Super Models 3.6G                 5-5




                         <global flag>  The  name of the data file prefixed
                                        with "Mem:" and suffixed with "_O".
                                        This variable is created by DPP and
                                        its  declaration  can  be found  in
                                        FILEFLAG.CPY.   This external para-
                                        meter is set to  True when the file
                                        is opened.

                         <local flag>   Usually  the name of  the data file
                                        suffixed  with "_O#".    It  is  an
                                        external  variable  that is  set by
                                        Open_ to reflect  whether the  data
                                        file  was already  open.   The flag
                                        will  be True  if the file  was not
                                        opened  before  the call  to Open_.
                                        This variable is  used in the  call
                                        to  Close_  to  determine when  the
                                        file should be closed, or left open
                                        for  parent procedures  that opened
                                        the file earlier.

                         <file record>  This  is the  record  area  of  the
                                        file, as in Cst:Record.  The record
                                        is  cleared when the  file is first
                                        opened.

                         '<filename>'   This  is  a  string containing  the
                                        name  of  the file.    If the  file
                                        needs  to  be  rebuilt, Open_  will
                                        display the name of the  file while
                                        it  is being rebuilt.  Otherwise, a
                                        generic message is used.

                         <create>       This parameter indicates whether to
                                        attempt  to create  the file  if it
                                        does  not  exist.    Normally  this
                                        parameter is only used  when called
                                        from G_OpenFiles.

                         <called from G_OpenFiles>   This parameter is only
                                        included  if  the  Open_  is  being
                                        called from G_OpenFiles.  In normal
                                        operation  of Open_, a file will be
                                        opened  if it  is closed,  and left
                                        open.  When this parameter is pres-
                                        ent, the file is closed after open-
                                        ing, unless the global flag is set.

                         ie:  !Sample from standard procedure
                              Open_(Log, Mem:Log_O, Log_O#, Log:Record)

                         ie:  !Sample from G_OpenFiles
                              Open_(Customer, Mem:Customer_O, Customer_O#,
                                   | Cst:Record, 'Customer', eCreate, True)





                              BoxSoft Super Models 3.6G                 5-6




          Close_         This procedure closes  a file that was  previously
                         opened with  the Open_ procedure.   It takes three
                         required parameters.  Here is the format:

                              Close_(<filename>,<global flag>,<local flag>)

                         Parameters:

                         <filename>     The name of the data file itself

                         <global flag>  The name of  the data file prefixed
                                        with "Mem:" and suffixed with "_O".
                                        This variable is created by DPP and
                                        its  declaration  can  be found  in
                                        FILEFLAG.CPY.    If  the   file  is
                                        closed  by  Close_,  this  external
                                        parameter is set to False.

                         <local flag>   Usually the name  of the data  file
                                        suffixed with "_O#".  If this para-
                                        meter  was earlier  set to  true by
                                        Open_,  the  file  will be  closed.
                                        Otherwise, the file is not closed.

                         ie:  Close_(Customer, Mem:Customer_O, Customer_O#)

          WarnCreate_    This procedure is  used by Open_ to warn  the user
                         that a file  needs to  be created.   It takes  the
                         name of the file for display purposes:

                              WarnCreate_('<filename>')

                         ie:  WarnCreate_('Customer')

          ClrErr         Clear   any   value   returned   by   ERROR()   or
                         ERRORCODE().

          ClrKcd         Clear the current KEYCODE() to zero.

          SetKcd         Set the value returned by KEYCODE().  This can  be
                         any number, including zero.

                              SetKcd(<new keycode>)

                         ie:  SetKcd(Esc_Key)
                              SetKcd(0)  !functionally equivalent to
          ClrKcd()

          LocateBreak_   This  function is  used  by the  fast locators  to
                         determine whether the  user has pressed additional
                         locator  characters, which will  reset the locator
                         operation to start again.

          RJustLocate_   This function  is used by  tables with  right-jus-
                         tified numeric  locators.  It formats  the display
                         value for the screen.



                              BoxSoft Super Models 3.6G                 5-7




          LJustLocate_   This function is used by tables with regular left-
                         justified locators.   It formats the display value
                         for the screen.

          View_          This  procedure  is  the  entrance  to  the screen
                         viewer.  It takes one parameter:  the disk file to
                         be  viewed on screen.  If it cannot find the file,
                         it displays  an error  message and returns  to the
                         calling procedure.

          ViewHelp_      This procedure display a Help Screen for View_.

          ViewSearch_    This function  asks the user for  a search string,
                         then  scans  the displayed  file  from that  point
                         onwards, searching for the desired string.  If the
                         string  is found, ViewSearch_ returns True, other-
                         wise it returns False.

          ViewSearchA_   This function  is called by  ViewSearch_ after the
                         user  has specified  the search  criteria.   It is
                         also called by View_ if the user wishes to "Search
                         Again".   It returns True if the  target string is
                         found.

          ViewMsg_       This  function returns  a message  to the  various
                         procedures and functions associated with the view-
                         ing  process.   Rather than  scatter the  messages
                         across all  of the procedures, I  decided to place
                         them in one area and have each procedure call this
                         routine to display a message.

          ViewPoint_     This function is used to point to rows and columns
                         for marking  areas to  be locked  or printed.   It
                         returns True if the user selected a row or column,
                         and False if the user aborted the operation.

          ViewLock_      This procedure  locks a user-specified row or col-
                         umn for scrolling.

          ViewUnlock_    This procedure reverses the work of ViewLock_.

          ViewPrint_     This procedure  prints a subset of  lines from the
                         on-disk report.  It can only be called from within
                         VIEWKEY_.CPY (see  the User Include Files for more
                         information).  Its format is as follows:

                              ViewPrint_(<device or filename>, <top line>,
                                   <bottom line>, <total lines so far>,
                                   <found end? True/False>)

                         Parameters:

                         <device or filename>     This is the  name of  the
                              output device or  file.  To send this  to the
                              printer, in should be LPT1, PRN, etc.  Other-
                              wise, it must  be a valid DOS  filename.  Any
                              existing file will be deleted.


                              BoxSoft Super Models 3.6G                 5-8




                         <top line>   This is the first line to be printed.
                              It  cannot be  greater than  <total  lines so
                              far>.

                         <bottom  line>     This is  the  last line  to  be
                              printed.   It cannot  be greater  than <total
                              lines so far>.

                         <total lines to far>   This is an external parame-
                              ter containing the totals lines read from the
                              file so far.  The View_ procedure reads lines
                              from  the file only  when it needs  them.  It
                              keeps the  furthest line  read in  a variable
                              called  "T_:NLines_".     Any  call   to  the
                              ViewPrint_ procedure must  not request  lines
                              that have not yet  been printed.  To  get the
                              system to read to the end of the  file, issue
                              the following command:

                              Dummy# = ViewRead__(eBigNumber, '', 1, 0,
                                   NLines_, FoundEnd_)

                         <found end>    This is also an external parameter.
                              It is a  flag to remember whether  the end of
                              the file has been reached.   The name of this
                              variable   in   the   View_    procedure   is
                              "T_:FoundEnd_".

          FixFile_       This procedure is called after a report is sent to
                         the disk.  It fixes the CR-LF-CR commonly found in
                         Clarion  reports,  as   well  as  removing   NULLs
                         inserted  by the  Printer  Control  support.   Its
                         format is as follows:

                              FixFile_(<filename>)

                         ie:  FixFile_(Mem:Device)
                              FixFile_('TEMP.PRN')

          FixFile__      This  LEM procedure  is  called from  FixFile_  to
                         perform the actual file fixing.

          ViewOpen__     This LEM procedure opens the file to be viewed, as
                         well as  creating a  temporary index file  of line
                         offsets.

          ViewClose__    This  LEM procedure  closes  the viewing  file and
                         deletes  the  temporary  index  file   created  by
                         ViewOpen__.

          ViewLen__      This  LEM  function  returns  the  length  of  the
                         longest line currently on the screen.   It is used
                         to support the End_Key processing.

          ViewPrint__    This LEM  procedure sends  the specified  lines to
                         the output device during the ViewPrint_ procedure.



                              BoxSoft Super Models 3.6G                 5-9




          ViewRead__     This LEM function  attempts to read the  requested
                         line, and returns False if it is not found.

          ViewSearch__   This LEM function searches  for the desired string
                         and returns  the line number of where it is found.
                         Otherwise, it returns False.

          GetText__      This procedure saves a portion of the screen.   It
                         used  by the  system for  the sticky  pointers and
                         automatic shadows.   All parameters  are required,
                         and  the first is most  important.  It  is used to
                         hold the pointer to the saved structure so that it
                         may be accessed later by PutText__, and it must be
                         a LONG.  Its format is as follows:

                              GetText__(<save ptr>, <row>, <col>, <rows>,
                                   <cols>)

                         ie:  GetText__(SavePtr#, ROW(?Point), COL(?Point),
                                   ROWS(?Point), COLS(?Point))
                              GetText__(SavePtr#,1,1,25,80)  !Save the
          Screen

          PutText__      This  procedure restores a  portion of the screen.
                         It is used by  the system for the  sticky pointers
                         and  automatic  shadows.      All  parameters  are
                         required,  and the  first is  most important.   It
                         points to the saved structure created by GetText__
                         and must be the same variable that was used in the
                         original  call to  GetText__.   Its  format is  as
                         follows:

                              PutText__(<save ptr>, <row>, <col>, <rows>,
                                   <cols>)

                         ie:  PutText__(SavePtr#, ROW(?Point), COL(?Point),
                                   ROWS(?Point), COLS(?Point))
                              PutText__(SavePtr#,1,1,25,80) !Restore the
          Screen

          ProgressBar_   This procedure is used  to display the incremental
                         progress bar during reports and  batch procedures.
                         All parameters are required.

                              ProgressBar_(<done count>, <total count>,
                                   <row>, <col>, <cols>,
                                   <done color attribute>,
                                   <remaining color attribute>)

                         ie:  ProgressBar_(Count#, Total#, 23, 4, 74, 32,
                                   79)








                              BoxSoft Super Models 3.6G                5-10




          ProgressPos_   This procedure  is used  to pass the  position and
                         color attributes  to the FixFile__ LEM  so that it
                         knows where to place  the ProgressBar_.  All para-
                         meters are required.

                              ProgressPos_(<row>, <col>, <cols>,
                                   <done color attribute>,
                                   <remaining color attribute>)

                         ie:  ProgressPos_(23, 4, 74, 32, 79)

          ClipLen_       This  function is  used  to determine  the clipped
                         length of a string.  It is functionally equivalent
                         to CLIP(LEN(<string>)), except that it will handle
                         strings beyond 255 characters.

                              Result# = ClipLen_(<string>)

                         ie:  Result# = ClipLen_(Mem:Device)

          ShadowOn__     This procedure is used to place the shadows on the
                         screen.    All parameters  are  required.   (Don't
                         forget   that  there   are   two  underscores   on
                         ShadowOn__.   There  is another  procedure  called
                         ShadowOn_, with one  underscore, that is  normally
                         used to call ShadowOn__.)   The "shadow ptr" para-
                         meter must be a LONG.

                              ShadowOn__(<screen row>, <screen col>,
                                   <screen rows>, <screen cols>,
                                   <shadow ptr>)

                         ie:  ShadowOn__(ROW(Screen), COL(Screen),
                                   ROWS(Screen), COLS(Screen), Shadow_#)

          ShadowOff_     This procedure is used  to remove the shadows dis-
                         played  by ShadowOn__.   It  takes  one parameter:
                         the  LONG variable  used in  the original  call to
                         ShadowOn__.  

                              ShadowOff_(<shadow ptr>)

                         ie:  ShadowOff_(Shadow_#)

          InString_      This  function  is   functionally  equivalent   to
                         Clarion's  INSTRING()  function,  except  that  it
                         searches string larger than 255 characters, and it
                         ignores letter case  All parameters are required.

                              Result# = InString_(<sub-string>,
                                   <main string>, <search step>,
                                   <starting pos>)

                         ie:  Result# = InString_('the','Look at the
                                   dog',1,1)




                              BoxSoft Super Models 3.6G                5-11




          WrapLine_      This function returns a single line from a string,
                         after  it has  "word  wrapped" the  string to  the
                         specified   dimensions..     All   parameters  are
                         required.

                              Result" = WrapLine_(<string>, <line #>,
                                   <width>)

                         ie:  Result" = WrapLine_(Pre:Memo, 4, 60) !get
                                   line 4

          ShadowOn_      This procedure is normally called as an intermedi-
                         ary  between  your procedure  and  ShadowOn__ (two
                         underscores).   Its sole  purpose  is to  simplify
                         parameter  passing.   The  first parameter  is the
                         name of  the currently-open screen structure.  The
                         second must  be a LONG variable.   Both parameters
                         are required.

                              ShadowOn_(<screen>, <shadow ptr>)

                         ie:  ShadowOn_(Screen, Shadow_#)

          Progress_      This procedure is similar to ShadowOn_, in that it
                         is used to simplify parameter passing.  It assumes
                         that you  want the progress  bar to appear  on the
                         global  ProgressScr_.    It  also  increments  the
                         <count> variable.  All parameters are required.

                              Progress_(<done count>, <total count>)

                         ie:  ProgressBar_(Count#, Total#)

          GetPrnCtl_     This function is used to verify input of a printer
                         contained in the PrnCtl_ data file.  It  takes two
                         optional  external parameters:   printer  name and
                         port.  If  you pass the printer name parameter, it
                         will  use the passed  parameter for lookup; other-
                         wise, it  uses  Mem:PrnName_, which  contains  the
                         most recently accessed  printer for this  session.
                         If the passed printer is not found in the file, it
                         calls  GetPrnCtl__,  which  provides  a   list  of
                         printers  from which  to choose.   If  the printer
                         selected does not have  an output port  specified,
                         then it will ask for port.

                         If  you wanted to store the printer name in a con-
                         figuration file,  you would  place a call  to this
                         procedure in the configuration field that contains
                         the printer  name.  Let's assume that the field is
                         called Cfg:Printer; the Edit Procedure  would look
                         like this:

                              IF NOT GetPrnCtl_(Cfg:Printer) THEN
                                   SELECT(?).




                              BoxSoft Super Models 3.6G                5-12




                         When you load your configuration record, make sure
                         that  you   assign  your   printer  name  to   the
                         Mem:PrnName_  field.   (For more  information, see
                         the section on User Include Files.)

                         If you've  decided to  store your  default printer
                         name in a configuration file, you may also want to
                         prevent  the  user from  selecting the  printer in
                         GetDevice_.  This can  be done by setting sAskPrn_
                         to False in INIT1.CPY.  (For more information, see
                         the section on Application Style.)

          GetPrnCtl__    This  procedure displays  a list  of printers  for
                         selection.  If  works in  much the same  way as  a
                         regular Clarion Table.   You set the  Action=eView
                         before calling  it, and check if Action=eDone when
                         it returns.  It  simply pulls the selected PrnCtl_
                         record into memory.

          UpdPrnCtl__    This  procedure   is  the  update   procedure  for
                         GetPrnCtl__.   To  prevent the user  from changing
                         PrnCtl_    records,   set    sPC_Upd_Ok=False   in
                         INIT1.CPY.  (For more information, see the section
                         on Application Style.)

          OpenPC_        This procedure opens the PrnCtl_ file.

                              OpenPC_(<local open flag>)

                         ie:  OpenPC_(PrnCtl__O#)

          ClosePC_       This procedure closes the PrnCtl_ file.

                              ClosePC_(<local open flag>)

                         ie:  ClosePC_(PrnCtl__O#)

          InitPC_View_   This procedure  initializes the fields  in PrnCtl_
                         so that  the View_ procedure can  filter them when
                         they  are displayed  to  the screen.   After  this
                         procedure is  called, each  field in  PrnCtl_ will
                         begin with  a unique  ascii  character and  padded
                         with character 255.  If the  users elects to print
                         a  portion   of  the   report  from  the   screen,
                         GetDevice_  calls InitPC_Prn_ to  reset the fields
                         to their proper values.

          InitPC_Disk_   This  procedure initializes the  fields in PrnCtl_
                         to NULLs.   After  the  report finishes,  FixFile_
                         filters these NULLs.

          InitPC_Prn_    This procedure replaces all trailing spaces in the
                         PrnCtl_ fields with NULL characters which will not
                         appear on the printer.





                              BoxSoft Super Models 3.6G                5-13




          RandomFile_    This  function  returns a  random filename  in the
                         form of  "$TR#####.TMP".  It  automatically checks
                         for the CLATMP and TEMP DOS  environment variables
                         and uses the specified directory if either of them
                         exists.

                              Mem:Device = RandomFile_()

          SetDest_       This procedure is used  by the reports to properly
                         initialize  the  printer control  fields  once the
                         user has chosen the destination for the report.

                              SetDest_(<destination>)

                         ie:  SetDest_(eToPrinter)

          CleanRpt_      This procedure is used  by the reports to properly
                         clean-up the destination after  the report is fin-
                         ished.  If the  report was sent to the  screen, it
                         deletes  the temporary  file.   If the  report was
                         sent  to the disk,  it calls FixFile_  to clean up
                         the  CR/LF/CR  line termination  sequences  and to
                         remove  null  character   padding  caused  by  the
                         printer control codes.

                              CleanRpt_(<destination>)

                         ie:  CleanRpt_(eToPrinter)

          Hot_           This  procedure checks  to  see  if  a  developer-
                         assigned hot  key has  been  pressed.   If so,  it
                         either takes  the necessary  steps to jump  to the
                         specified field.   If the new field  is before the
                         current  field, it  issues a  SELECT(<field>) com-
                         mand.  If  the field  is after, it  saves the  new
                         field number in Selected_ and puts the system into
                         full-screen mode by issuing a SELECT command with-
                         out parameters.  The form of the Hot_ procedure is
                         as follows:

                              Hot_(<keycode>, <field equate>)

                         ie:  Hot_(Alt_A, ?Cst:Address)

          HotStop_       This procedure  turns off full screen  mode if the
                         system is  searching forward for a  hot field, and
                         that  hot field  has been  reached.   It takes  no
                         parameters.

          MenuAlert_     This  procedure  initializes  the ALERT  keys  for
                         menus.

                              MenuAlert_(<vert menu>)

                         ie:  MenuAlert_(0)  !not in a vertical menu
                              MenuAlert_(1)  !in a vertical menu



                              BoxSoft Super Models 3.6G                5-14




          FormAlert_     This  procedure initializes  the  ALERT  keys  for
                         forms.

                              FormAlert_(<alert Up_Key>, <alert tab keys>)

                         ie:  FormAlert_(Up_Ok,Tab_Ok)

          TableAlert_    This  procedure  initializes  the ALERT  keys  for
                         tables.

                              MenuAlert_(<vert menu>)

                         ie:  MenuAlert_(0)  !not in a vertical menu
                              MenuAlert_(1)  !in a vertical menu

          Spin_          This  procedure  spins character  in  the external
                         parameter.   It uses the series:   |/-\.  Normally
                         you would call this  procedure with a single char-
                         acter screen field as the parameter.

                              Spin_(<spin field>)

                         ie:  Spin_(Scr:Spinner)

          OpenTF_        This procedure opens the TagFile_ file.

                              OpenTF_(<local open flag>)

                         ie:  OpenTF_(TagFile__O#)

          CloseTF_       This procedure closes the TagFile_ file.

                              CloseTF_(<local open flag>)

                         ie:  CloseTF_(TagFile__O#)

          Tag_           This  function  handles  various  TagTable-related
                         functions.  For more  information on the Tag func-
                         tion, see the section of TagTables.

          NewTag_        This  procedure clears  all tags  for a  specified
                         TagTable.  The format of its call is:

                              NewTag_(<tag table no.>)

          GetTag_        This  function returns  either sTagChar  (a global
                         setting) or an empty string, depending on  whether
                         the requested record is tagged.  The format of its
                         call is:

                              Result" = GetTag_(<tag table no.>,
                                   <record pointer>)

                         ie:  IF GetTag_(eT_Customer, POINTER(Customer))
                                DO Process
                              .



                              BoxSoft Super Models 3.6G                5-15




                         In the above example,  eT_Customer is equated to 1
                         in MEM_VARS.CPY.  (See the section on User Include
                         Files.)

          SetTag_        This procedure is used to set a tag for a particu-
                         lar tag table no. and record pointer.  There is an
                         optional  Value parameter, for storing the tags in
                         a particular order for e1stTag/eNxtTag processing.
                         The format of its call is:

                              SetTag_(<tag table no.>, <record pointer>,
                                   <value>)

                         ie:  SetTag_(eT_Product, POINTER(Product))

                         ie:  SetTag_(eT_Customer, POINTER(Customer),
                                   Cst:LName)

                         In the above example,  eT_Product is EQUATE'd to 1
                         and eT_Customer is EQUATE's  to 2 in MEM_VARS.CPY.
                         (See the section on User Include Files.)

          ClrTag_        This procedure is used  to clear a tag for  a par-
                         ticular  tag table  no. and  record pointer.   The
                         format of its call is:

                              ClrTag_(<tag table no.>, <record pointer>,
                                   <value>)

                         ie:  ClrTag_(eT_Customer, POINTER(Customer))

                         In the above example,  eT_Customer is equated to 1
                         in MEM_VARS.CPY.  (See the section on User Include
                         Files.)

          RvsTag_        This  procedure is  used to  reverse  a tag  for a
                         particular tag table no. and record pointer.  That
                         is, if the tag  is set before the call  to RvsTag_
                         it will be cleared,  and vice versa.  There  is an
                         optional Value parameter, for storing the tags  in
                         a particular order for e1stTag/eNxtTag processing.
                         The format of its call is:

                              RvsTag_(<tag table no.>, <record pointer>,
                                   <value>)

                         ie:  RvsTag_(eT_Product, POINTER(Product))

                              RvsTag_(eT_Customer, POINTER(Customer),
                                   Cst:LName)

                         In the above example,  eT_Product is EQUATE'd to 1
                         and eT_Customer is EQUATE's  to 2 in MEM_VARS.CPY.
                         (See the section on User Include Files.)





                              BoxSoft Super Models 3.6G                5-16




          CntTag_        This function  returns the  number of tags  in the
                         specified TagTable.  The format of its call is:

                              Result# = CntTag_(<tag table no.>)

          FstTag_        This  function  returns  a pointer  to  the  first
                         tagged record  in the  specified TagTable.   It is
                         functionally equivalent to Tag_(e1stTag,<tag table
                         no.>).  If  there are no records in  the specified
                         TagTable, the function returns zero.  It processes
                         the tags in TF_:ValKey order, which is usually the
                         order that the records were tagged.

                         There are  a number of situations  where you would
                         use FstTag_().  You may want to check if there are
                         any tagged records available.   You would also use
                         FstTag_() in conjunction with NxtTag_() to process
                         all tagged records.  The format of its call is:

                              Result# = FstTag_(<tag table no.>)

          NxtTag_        This function returns a pointer to the next tagged
                         record in  the specified TagTable.  FstTag_() must
                         be  called first for this function to work.  It is
                         functionally equivalent to Tag_(eNxtTag,<tag table
                         no.>).  If there are no more records, the function
                         returns zero.  The format of its call is:

                              Result# = NxtTag_(<tag table no.>)

          LstTag_        This function returns a pointer to the last tagged
                         record  in   the  specified   TagTable.     It  is
                         functionally equivalent to Tag_(eLstTag,<tag table
                         no.>).  If there  are no records in  the specified
                         TagTable, the function returns zero.  It processes
                         the tags in reverse TF_:ValKey order

                         There are  a number of situations  where you would
                         use LstTag_().  You may want to check if there are
                         any tagged records available.   You would also use
                         LstTag_() in conjunction with PrvTag_() to process
                         all tagged records.  The format of its call is:

                              Result# = LstTag_(<tag table no.>)

          PrvTag_        This function returns a pointer to the next tagged
                         record in the specified TagTable.  LstTag_()  must
                         be  called first for this function to work.  It is
                         functionally equivalent to Tag_(ePrvTag,<tag table
                         no.>).  If there are no more records, the function
                         returns zero.  The format of its call is:

                              Result# = PrvTag_(<tag table no.>)

          Pass_          This function performs the following three duties:

                         1.   User log-on (including checking  for previous


                              BoxSoft Super Models 3.6G                5-17




                              log-on)
                         2.   Prepare  for a  RUN  command (setup  previous
                              log-on for called program).
                         3.   Clean-up after RUN command

                         It takes the following form:

                              Result# = Pass_(<job>)

                         ie:  Result# = Pass_(eIniPass)  !Log-on
                              Result# = Pass_(eSavPass)  !Prepare for RUN
                              Result# = Pass_(eDelPass)  !Tidy-up after RUN

                         The   return  value  is  only  important  for  the
                         eSavPass call.   In the  case of eIniPass,  if the
                         user isn't value, Pass_() aborts the program.  For
                         eDelPass, it  always  returns "True"  and  can  be
                         ignored.  The return  value for eSavPass, however,
                         is  placed on the command  line of the RUN command
                         so that the called program  can check for the pre-
                         vious logon.

          ChkPass_       This function  returns True or False, depending on
                         whether the user has  access to the specified door
                         or level.  The  first parameter is required.   The
                         default for  the second is "Access  Denied!".  The
                         default  for the third  is "True".   The format of
                         its call is:

                              Result# = ChkPass_(<door or level>,
                                   <access denied message>,
                                   <show access denied message: True/False)

                         ie:  Result# = ChkPass_(eD_Manager)
                              Result# = ChkPass_(eD_Wages,
                                   'You may not change salaries!')
                              Result# = ChkPass_(eD_Salary,,False)

                         The  first example is a simple call.  It will dis-
                         play  "Access Denied"  if  the user  doesn't  have
                         access and  will return "False".   The second will
                         display "You may not change salaries!" if the user
                         doesn't have  access.  The third  example will not
                         display any messages, but will just return "False"
                         if the user doesn't have access.  This is good for
                         conditional  computed fields  that should  only be
                         visible if the user has access to the data.












                              BoxSoft Super Models 3.6G                5-18




          Dial_          This  function is most often  used to dial a phone
                         number  using  an  attached modem,  which  must be
                         connected to COM1 or COM2.  All transfers are done
                         at  300 baud.   If  you pass  more than  one phone
                         number to  Dial_, it will allow the user to select
                         which number they wish  to dial.  If you  are pas-
                         sing  multiple numbers,  I would suggest  that you
                         also  pass  descriptions for  the  numbers  in the
                         accompanying parameters.   This allows the user to
                         better select the  desired number to call.  If you
                         pass only one  number to Dial_, it  will dial that
                         number without pausing.

                         Once a  number is  dialed, the system  counts down
                         for a  number of  seconds, then sends  the hang-up
                         command to the modem.   The user must  pick-up the
                         phone before this on-screen time expires.

                         After hanging-up,  Dial records the  time at which
                         the  call was  made.   If you  call Dial_  with no
                         parameters after  the call  is  finished, it  will
                         return the  duration of the call  in hundredths of
                         seconds (the Clarion standard for time).

                         Because  Dial_  is  a function,  you  must  always
                         retrieve the return value,  even though it is only
                         useful in the case of a time retrieval.

                         The Dial_ function  is not aware of  long-distance
                         dialing prefixes  or area  codes.  Therefore,  you
                         must add  any of  these required elements  in your
                         call to  Dial_.  It will  automatically format the
                         numbers based  on then number  of digits  received
                         (maximum characters).  If  Dial_  finds 011 at the
                         start of  the number, then it  displays the number
                         without any formatting.

                         The Dial_ parameters are as follows:

                              Dial_(<number 1>, <description 1>,
                                   <number 2>, <description 2>,
                                   <number 3>, <description 3>)

                         ie:  IF Dial_(14169204714, 'Administration',
                                   14165122250, 'Tech. Support')
                                PauseMsg_('Press a key when done...')
                                PauseMsg_('Duration:  '
                                   & FORMAT(Dial_(),@T4)
                              .










                              BoxSoft Super Models 3.6G                5-19




          Dial__         This  procedure is used by  Dial_ to send the data
                         out the COM port.  It simply transmits any charac-
                         ters passed to it  through its single string para-
                         meter.  This function can also be used to  control
                         other  devices that  require  output from  the COM
                         ports, such as cash  register drawers.  The format
                         of the command is:

                              Dial__(<string to transmit>)

                         ie:  Dial__('ATDT 1-(416)512-2250;<13>')

          Idle_          This is  the main idle procedure  for the applica-
                         tion.   As a default, it is called every 1 second.
                         This delay can be modified  in INIT.CPY.  (See the
                         Application Style section for more information.)

                         Idle_  repeatedly  executes the  Clock_ procedure.
                         If you have  other idle procedures that need to be
                         called, you can  add their names to  a file called
                         IDLE.CPY  in your  application's directory.   (For
                         more information on  IDLE.CPY, see the section  on
                         User Include Files.)

          Timeout_       This  procedure is  responsible  for  exiting  the
                         program if  the user is  inactive for a  period of
                         time.    The  amount  of  time  is  controlled  by
                         sTimeout, which  holds the number of  minutes.  If
                         sTimeout is  set to zero,  then this field  has no
                         effect.     This  setting  can  be  controlled  in
                         INIT1.CPY.  (See the Application Style section for
                         more information.)

          Clock_         This procedure displays the various system clocks,
                         including date,  time, available memory,  and cur-
                         rent  path.  The position, color and format of the
                         clock  displays  can be  controlled  in INIT1.CPY.
                         (See the Application Style section for more infor-
                         mation.)

          AskMtchType_   This  function is  used in  the QBE  form.   It is
                         called  when the  user  presses the  QBE_Key in  a
                         QBEForm.   Depending on  your field type,  it will
                         call    one    of   AskMtchTypS_,    AskMtchTypN_,
                         AskMtchTypP_,   AskMtchTypD_,   AskMtchTypC_,   or
                         AskMtchTypM_,  for   strings,  numbers,  pictures,
                         dates, choice fields, or memos, respectively.   It
                         returns the chosen comparison type to the QBEForm.

          QBETask_       This function  asks the  user whether he  wants to
                         edit, select or unselect records.

          QBESetFile_    This function prepares the file for QBE searching.
                         It uses keys, if possible.





                              BoxSoft Super Models 3.6G                5-20




          QBEWipe_       This procedure asks the  user whether they wish to
                         clear existing tags before beginning a new search.
                         It is called from the table, not the form.

          HelpEdit_      This procedure is used to edit the field-sensitive
                         help messages.

          HelpShow_      This procedure is used to display the field-sensi-
                         tive help messages.

          OpenHelp_      This procedure opens the Help_ file.

                              OpenHelp_(<local open flag>)

                         ie:  OpenHelp_(Help__O#)

          CloseHelp_     This procedure closes the Help_ file.

                              CloseHelp_(<local open flag>)

                         ie:  CloseHelp_(TagFile__O#)






































                              BoxSoft Super Models 3.6G                5-21


















                                      Appendices






                               Appendix A - Tag Tables


          This  is the  documentation  for  the  Tag_() function  found  in
          TAG_.CLA.   Remember,  because  Tag_() is  a  function, you  must
          always retrieve a value from  it, even though there may not  be a
          useful  return  value.   Don't  forget, there  are  various other
          procedures and  functions available  as substitutes for  the Tag_
          function.   They  offer stand-alone  support  for several  of the
          jobs.   The  other  routines are:    NewTag_,  GetTag_,  SetTag_,
          ClrTag_, and RvsTag_.


          Parameters:    Tag_( JobType, TagTableNo, RecPtr, KeyVal )

          JobType   This is  the requested action.  See below for a list of
                    types.

          TagTableNo     This is the  table number.  Each tag table, report
                         and batch process  uses a default of  1, unless it
                         is changed in the setup procedure.   Some may wish
                         to use  only one table number for  each data file,
                         while others may assign more than one per file for
                         different uses.  

          RecPtr    This  is  a pointer  to the  record.   Use  the POINTER
                    function to determine this value.  (Designer tables are
                    somewhat different.)

          KeyVal    This is an optional key value for the record.  It helps
                    support 1st/Nxt processing.



          Usage for each Job type:


          eGetTag   This   is    used   to   check   for    the   tag   for
                    User/Table/Pointer.  Normally this  call is made by the
                    model  to give a  variable Tag_  a value.   Tag_ always
                    holds a  tag character (eTag) or a  space, depending on
                    whether the current record is tagged.

                         Tag_ = Tag_(eGetTag, TagTableNo, RecPtr)

          eOpnTag   Open tag file at program start-up.  Create is missing.

                         <dummy> = Tag_(eOpnTag)

          eIniTag   Clear all tags for the current user (all tables).

                         <dummy> = Tag_(eIniTag)

          eNewTag   Clear all tags for the specified User/Table.

                         <dummy> = Tag_(eNewTag, TagTableNo)



                              BoxSoft Super Models 3.6G                 A-1




          eSetTag   Add the tag  for the specified record pointer.  Returns
                    the  tag character.   The  KeyVal is  an optional  five
                    character  string that will be placed with the tag.  It
                    is  used for  order processing  when using  e1stTag and
                    eNxtTag.

                         Tag_ = Tag_(eSetTag, TagTableNo, RecPtr, KeyVal)

          eClrTag   Clear the specified tag.

                         Tag_ = Tag_(eClrTag, TagTableNo, RecPtr)

          eRvsTag   Flip the tag for the specified record pointer.  Returns
                    the tag character is it is newly set.  The KeyVal is an
                    optional five character string that will be placed with
                    the  tag.  It is  used for order  processing when using
                    e1stTag and eNxtTag.

                         Tag_ = Tag_(eRvsTag, TagTableNo, RecPtr, KeyVal)

          eLckTag   Lock the tag file for faster file processing.

                         <dummy> = Tag_(eLckTag)

          eULkTag   Unlock the tag file after processing is finished.

                         <dummy> = Tag_(eULkTag)

          e1stTag   Get the 1st tag in User/Table/Value order.  KeyVal from
                    eSetTag is used for this ordering.

                         Ptr = Tag_(e1stTag, TagTableNo)

          eNxtTag   Get the next tag in User/Table/Value order.

                         Ptr = Tag_(eNxtTag, TagTableNo)























                              BoxSoft Super Models 3.6G                 A-2




                          Appendix B - DoorEdit and UserEdit


          This appendix offers additional specific information not found in
          the earlier section on User Security.

          You  will  have two  directories  called  USEREDIT and  DOOREDIT.
          Depending on  your configuration, these  may be found  within the
          SUPER  directory,  or  with  a SECURITY  directory  under  SUPER.
          Rather  than distributing translated .EXE  files, I am giving you
          the .APP files.   Once  you create the  executable programs,  you
          should  copy USEREDIT.EXE  into  your application  directory, and
          DOOREDIT.EXE into your  SUPER directory.   UserEdit will be  dis-
          tributed to your users, while DoorEdit is for the developer's use
          only.

          The security  system uses three  files to  perform its  function:
          User_,  Door_  and Access_.   The  User_  file contains  the user
          number,  username, password, and level.   The Door_ file contains
          declarations for all the doors the system will require.  Finally,
          the  Access_ file  contains records  indicating which  doors each
          user may access.

          If you are using level-oriented security (sSecType='L'), then you
          will  be using  the Level field  in the  User_ file,  and you can
          ignore  the Door_ and Access_  files.  Alternatively,  if you are
          using  door-oriented security  (sSecType='D'), then  you will  be
          ignoring the Level  field in  the User_ file,  and the Door_  and
          Access_ files are necessary.

          Using  level-oriented security is  much easier than door-oriented
          security.  If you are using levels, you will probably divide your
          security into 3 or  4 levels, maybe 1-4.  Level  1 has the fewest
          rights.  In a point-of-sale system, a level 1 user may be allowed
          to enter sales, but not to close cash at the end of the day.  The
          level 2  user can close  cash, but may not  view revenue reports.
          Level  3 can  see  these reports,  but  may not  update  employee
          information.   Level 4 can do  anything.  Users at  each of these
          levels can do everything assigned to the lower levels.

          If this concentric approach is not suitable for your application,
          then you  may need  to  use doors  instead.   In a  door-oriented
          system, each door can be individually assigned to any user(s).  A
          lowly clerk  may be allowed  to perform  a particular  management
          function, while an administrator may not have access to that same
          function.   This is a much more flexible system, and consequently
          more complex.

          The  nice aspect of both of these  approaches is that they may be
          used  to protect only the things that  need protecting.  When you
          decide to use the security system, you can begin by simply having
          the  user log-on when  they begin.   Then, as  you determine what
          areas need  to be protected, you can  assign security for each of
          them.   By the way, regardless of whether you are using levels or
          doors, the local setting is always RunDoor_.




                              BoxSoft Super Models 3.6G                 A-3




          The  DoorEdit program is used  to create and  update door declar-
          ations.  There must  be a corresponding door record in  this file
          for each  door number used  in your  application.   To make  this
          easier, DoorEdit  will generate create a file  called DOOR.CPY in
          your  current  directory.   This file  will  contain a  series of
          EQUATE's for  the doors you have defined.  It is included in your
          application at compile time.

          You must create your doors before creating your users.   (You can
          call UserEdit  from DoorEdit to help  you in this task.)   If you
          are not using  the logon  screen (maybe you're  getting the  user
          number  from the  network), you  must still  create corresponding
          user records so that the Access_ records may be setup.

          The UserEdit program  allows you to create and  update users.  If
          you are using levels, the user's level will be on the user update
          screen itself.   If you are using doors, you  must press Alt-A in
          the  update form to access a TagTable of available doors (created
          by  DoorEdit).  Although this access information is stored in the
          Access_ file, I  have used  an interesting series  of batch  pro-
          cedures so that you can simply tag/untag the doors for each user.
          All of the join records in the Access_ file are handled internal-
          ly.   I strongly  urge you  to study the  techniques used  in the
          UserEdit program, as  it is  making marvellous use  of the  Super
          Model features.

          UserEdit should  be given to your  clients, as they  will have to
          maintain the user database.   They should not  require a copy  of
          DoorEdit, though, as the doors  are application code specific and
          will not need to be changed by the user..

          Both DoorEdit and UserEdit handle their own referential integrity
          issues.   When you delete a  user, all of his  access records are
          deleted.  Changed user numbers are handled with equal aplomb.

























                              BoxSoft Super Models 3.6G                 A-4




                              Appendix C - Default Keys

          Throughout the system, many special keys have been defined.  This
          list contains all keys used in system with their global and local
          variables, as well as their default values.


             Global       Local        Default     Description

          Everywhere

             Accept_Key   -            Ctrl_Enter  Complete the form
             Reject_Key   -            Ctrl_Esc    Exit from the screen
             sXtra_Accept -            F10_Key     Extra Accept_Key
             sXtra_Reject -            F2_Key      Extra Reject_Key
             sXtra_Esc    -            GAst_Key    Extra Esc_Key
             sHelpEditKey -            Alt_F1      Edit help text

          All Tables

             sSinglAddKey Add_Key      Ins_Key     Add a single record
             sMultiAddKey MultiAdd_Key Ctrl_M      Add multiple records
             sCopy_Key    Copy_Key     Ctrl_C      Copy a record in a table
             sChange_Key  Change_Key   Enter_Key   Change the record
             sView_Key    View_Key     Enter_Key   View the record
             sDelete_Key  Delete_Key   Del_Key     Delete the record
             sQBE_Key     QBE_Key      Ctrl_S      Call form in QBE mode

          TagTables

             sTag_Key     Tag_Key      Ctrl_T      Tag the record
             sUntag_Key   Untag_Key    Ctrl_U      Untag the record
             sTog_Key     Tog_Key      Ctrl_F      Toggle (flip) the tag
             sTagAll_Key  TagAll_Key   Alt_T       Tag all records
             sUntagAllKey UntagAll_Key Alt_U       Untag all records
             sTogAll_Key  TogAll_Key   Alt_F       Toggle (flip) all tags
             sNextTag_Key NextTag_Key  Ctrl_N      Go to next tagged record
             sPrevTag_Key PrevTag_Key  Ctrl_P      Go   to   prev.   tagged
          record

          SuperTables

             sNextTbl_Key Next_Key     Tab_Key     Go to next SuperTable
             sPrevTbl_Key Prev_Key     Shft_Tab    Go      to      previous
                                                            SuperTable
             sMenuTbl_Key Menu_Key     Ctrl_O      Display TableMenu

          Forms

             sQBE_Key     QBE_Key      Ctrl_S      Get MatchType









                              BoxSoft Super Models 3.6G                 A-5





          Available Ctrl Keys:      Menus   ABCDEFGHIJKLMNOPQRSTUVWXYZ
                                    Tables  AB.DE.GHIJKL....QR...VWXYZ
                                    Forms   ABCDEFGHIJKLMNOPQR.TUVWXYZ

          Available Alt Keys:       Menus   ABCDEFGHIJKLMNOPQRSTUVWXYZ
                                    Tables  ABCDE.GHIJKLMNOPQRS..VWXYZ
                                    Forms   ABCDEFGHIJKLMNOPQRSTUVWXYZ

          Available Function Keys:  Normal  ..3456789.
                                    Shift   1234567890
                                    Ctrl    1234567890
                                    Alt     .234567890














































                              BoxSoft Super Models 3.6G                 A-6




                      Appendix D - Removing Features with STRIP


          The Super Models contain the code for all of the  features all of
          time.  Unfortunately, this can lead the code bloat.  To alleviate
          this problem  somewhat, there  is a  program called  STRIP.EXE in
          your SUPER directory.  This program is used to selectively remove
          a variety of major and minor features from your application.

          You  must run STRIP from your application directory.  It will ask
          you which features  you would like to remove.   It then creates a
          file call STRIP.OPT which  contains a list of the  features which
          are to be removed.  DPP (the  Designer Post Processor), uses this
          setting  file  to remove  the code  itself  as it  processes your
          files.

          If you rerun STRIP  it will remember your answers from before, so
          you need answer only the questions which concern you.

          As  far as memory savings go, STRIP will reduce your applications
          memory  requirements by 0 to 50K, depending on which features you
          remove.





































                              BoxSoft Super Models 3.6G                 A-7































































                              BoxSoft Super Models 3.6G                 A-8




                         Appendix E - Miscellaneous Programs


          CLEANTRN.BAT   This program will is  called by SUPERTRN.EXE after
                         CTRN.EXE has translated your program.  It  deletes
                         all  the temporary  files created  by CTRN.EXE  to
                         keep  your  directory  listing  from  growing  too
                         large.   You can also use  it in your STANDARD.MDL
                         applications to clean up your  directory, although
                         you're more likely to use CLEAN_.BAT.

          CLEAN_.BAT     This program  will delete all files  that are cre-
                         ated by CCMP.EXE  during your compilation  process
                         (.PRO, .SYM, .SUM) as  well as other scratch files
                         (.BAK, .BAP,  etc.).  If  you specify the  name of
                         your application  file, then  it will also  delete
                         the    designer-generated   files    (SALES01.CLA,
                         SALES02.CLA,  etc.).   Make  sure  that you  don't
                         start  the name  of any  of your  Other Procedures
                         modules with  your application name, or  they will
                         be deleted by the second form of CLEAN_.

                              clean_
                              clean_ sales

          SFM.BAT        This  program calls  FastMap for  your application
                         then calls CCMP.EXE.  You must specify your appli-
                         cation name.  You may also add the parameter "/NC"
                         to  prevent  compilation.    Of course,  once  you
                         called this the first time, DPP will automatically
                         call it in the future if your main module changes.
                         (It  does this because it sees APPNAME.FMM.)

                              sfm sales /nc

          SAOG.BAT       This program  calls  AOGPro for  your  application
                         then calls CCMP.EXE.  You must specify your appli-
                         cation name.  You may also add the parameter "/NC"
                         to  prevent  compilation.   Of  course,  once  you
                         called this the first time, DPP will automatically
                         call it in the future if your main module changes.
                         (It  does this because it sees APPNAME.AOG.)

                              saog sales /nc















                              BoxSoft Super Models 3.6G                 A-9































































                              BoxSoft Super Models 3.6G                A-10































































                              BoxSoft Super Models 3.6G                A-11
