IMD 1.18: 15/07/2013 9:11:26 dbase II msdos APC R2.0@o  @`! #@%`')+-/1 3@5`79;=?AC@E`GIKMOQ S@U`WY[]_a c@e`ikmoq s@u`wy{} @` O o / O ` O @ `  O/@o  @`! #@%`')+-/1 3@5`79;=?AC@E`GIKMOQ S@U`WY[]_a c@e`ikmoq s@u`wy{} @` O o / O ` O @ `  O/ADDM PRG 'm EMP-TERMPRG I CHXMENU PRG oM~DBASEMSGTXT /(DBASEOVRCOM /(BDBASE COM L(g~CMAIN PRG 3/(E'BYNMBRNDX mt~DATER PRG K/( KEYWORD NDX ֑/(INVREAD PRG S/(LABELS PRG [/(SETS PRG ]/(IMAIN PRG c/(INVQUAN PRG h/(CHXINPUTFMT k/(CREATE PRG !CHANGEDMPRG vmVIEWDM PRG {EMP-CONSFRM /(DELETEDMPRG &t} ESETUP PRG ZDEMO PRG \ISETUP PRG /(EMAIN PRG /(INV'CONSFRM /(TICKLE FRM /(INV'PRTRFRM /(EMP-PRT FRM /(CHXDEPOSFMT /(APPECARDFMT ő/(EDITCARDFMT ʑ/(EMP-UPD FMT ϑ/(E'BYNAMENDX JI'BYNMBRNDX ~CPRINT PRG qn}I'BYDESCNDX ~TICKLE NDX (/(EMPLOYEEMEM Vt~CHXBOOK MEM ~DEPOSITSDBF t~CHECKS DBF DEMP DBF JINVENT DBF ~NAMES DBF t~TEXT DBF }~INVRPRT PRG nz~INVMAINTPRG \EMPLOYEEDBF t~EMPSCRN FMT M/(EMP-ENTRPRG o} EMP-UPD PRG *o}EMP-RPRTPRG Ho} REPT1DM PRG nJOBDET DBF t~MAILINFOPRG Jt}MAIL PRG Lt}MAILLTTRPRG Mt}MAILENTRPRG Ot}MAILLAB PRG Pt}MAILFMT FMT Rt}MAIL DBF /~MIDFORM FRM Ut}REPT2DM PRG nREPT3DM PRG tAUTOEXECBAT ]IREPORTDMPRG pt}SALINCR FRM yt}UPDATEDMPRG t} * ADDM: This program adds records to the database chosen in UPDATEDM. select secondary use select primary copy structure extended to structx select secondary use structx do while t set colon off erase * line counter store 1 to accum select primary append blank @ accum,1 say 'Record #' + str(#,5) select seco go top * display field names do while .not. eof store accum + 1 to accum @ accum, 1 say field:name + ': ' skip enddo .not. eof go top store 1 to accum * loop until all fields have been entered do while .not. eof store field:name to field store accum + 1 to accum do case * get character field case field:type = 'C' store t to true2 do while true2 store spaces to charin @ accum,len(field:name) + 3 get charin ; picture 'XXXXXXXXXXXXXXXXXXXX' read if len(trim(charin)) <= field:len store f to true2 select primary replace &field with trim(charin) select secondary endif <= field:len enddo true2 * get logical field case field:type = 'L' store t to INLOG @ accum,len(field:name) + 3 get INLOG picture 'A' read select primary replace &field with INLOG select secondary * get numerical field otherwise store t to true2 do while true2 store 0 to numin @ accum,len(field:name) + 3 get numin picture '99999.99' read if (NUMIN < 100000) select primary replace &field with numin select secondary store f to true2 endif enddo true2 endcase skip enddo .not. eof set colon on store t to true2 do while true2 erase @ 5,30 say 'ADD MENU' @ 8,25 say '1) Add another record' @ 10,25 say '2) Return to UPDATE MENU' @ 12,25 say '3) Return to MASTER MENU' @ 15,18 say 'Please choose one ' get menu:num2 picture '9' read do case case menu:num2 = 1 store f to true2 case menu:num2 = 2 erase return case menu:num2 = 3 store 0 to menu:num2 return endcase enddo true2 enddo t say '2) Return to UPDATE MENU' @ 12,25 say '3) Return to MASTER MENU' @ 15,18 say 'Please choose one ' get menu:num2 picture '9' read do case case menu:num2 = 1 store f to true2 case menu:num2 = 2 erase return case menu:num2 = 3 store 0 to menu:num2 return endcase enddo true2 enddo t * 03/02/83 for Ashton-Tate by joe stegman * demonstration programs Employee Termination, EMP-TERM.CMD * for dBASE II(tm) release 2.4 * This is command file may be changed and enhanced to fit your application * * Here is where we are going to select employees for termination. * We need to know the name of the employee to terminate and the * date of termination... I don't think that we will ever really * remove the employee from the database. Not even as far as marking * for deletion. * * Local variables begin with 'Met' * Called from EMAIN.CMD * Uses EMP.DBF * E'BYNAME.NDX * E'BYNMBR.NDX SET talk OFF * open the database file USE emp ERASE DO WHILE T @ 0,0 SAY ' ' TEXT To select an employee for termination, enter the employee number or the employee name(First Last). To view the main menu enter a single >return<. ENDTEXT @ 6,0 @ 5,0 SAY ' ' ACCEPT 'Enter employee data for termination ? ' TO Met:srch STORE !(Met:srch) TO Met:srch IF Met:srch = ' ' * time to return to the menu, Release the local var., clear the screen RELEASE ALL LIKE Meu* ERASE * close the database file, and return to the menu USE RETURN ENDIF * initialize the record found variable STORE F TO Met:recfnd IF VAL(Met:srch) > 0 * it must be an employee number. SET index TO e'bynmbr * have to make the search string 3 characters for the find * because the index key is STR(emp:name,3) STORE STR(VAL(Met:srch),3) TO Met:srch * have to put the macro within quotes because of leading spaces... FIND '&Met:srch' IF #=0 * no record was found for the employee number entered @ 20,5 SAY 'Employee number not found. Please try another.' ELSE * since a record was found for the search data. set a flag TRUE STORE T TO Met:recfnd ENDIF ELSE * the search data must be an employee name...  SET index TO e'byname FIND &Met:srch IF #=0 * must not be anybody on the file with the name used for the search @ 20,5 SAY 'Employee name is not on the file.' ? ' You may correct the name and try again.' ELSE * the employee name is on the file. so set up for the edit... STORE T TO Met:recfnd ENDIF ENDIF * if the record was found then edit it. IF Met:recfnd ERASE * display employee data... SET colon OFF DO emp-upd.fmt SET colon ON Clear gets STORE ' / / ' TO Met:tdate @ 20,10 SAY "Please enter termination date, or return to keep active ? "; GET Met:tdate PICTURE '99/99/99' READ * using replace with NOUPDATE, skips checking the index, much faster REPLACE termdate WITH Met:tdate NOUPDATE ERASE ENDIF Met:recfnd... terminate test ENDDO loop until program is ended return SE * display employee data... SET colon OFF DO e* CHXMENU.CMD MAIN MENU FOR CHECKBOOK MANAGEMENT SYSTEM * Copyright 1983, Ashton-Tate and RSP, Inc. * written by Jim Taylor and Wayne Ratliff * - turn off display of commands to screen SET TALK OFF * PULL RETAINED VARIABLES FROM MEMORY FILE RESTORE FROM CHXBOOK.MEM DO WHILE T * DO WHILE T means DO WHILE TRUE I.E. DO FOREVER * The DO WHILE will be terminated by a RETURN command ERASE @ 3,20 SAY ' CHECK BOOK MANAGEMENT MENU' @ 5,10 SAY 'LAST CHECK #'+STR(LASTCHK,6) @ 5,45 SAY 'CURRENT BALANCE $ '+STR(BALANCE,8,2) @ 7,10 SAY ' 0 - EXIT' @ 9,10 SAY ' 1 - ENTER NEW CHECKS ' @ 11,10 SAY ' 2 - ENTER DEPOSITS ' @ 13,10 SAY ' 3 - ENTER CANCELLED CHECKS ' @ 15,10 SAY ' 4 - RECONCILE BANK STATEMENT ' @ 17,8 SAY 'ENTER NUMBER OF DESIRED ACTION 0 1 2 3 4' * - reading user response WAIT TO ACTION * process user's response DO CASE * - test for exit condition CASE ACTION='0' SET TALK ON RELEASE ACTION * RETAIN VARIABLES  SAVE TO CHXBOOK * - return to CALLING PROGRAM OR dBASE SYSTEM RETURN * - test for new checks CASE ACTION='1' * - enter new check data * DO CHXNEW * +++++ from here to the next ++++ could be a seperate command file * CHXNEW COMMAND FILE TO ENTER NEW CHECKS * OPEN DATABASE FILE AND FORMAT FILE USE CHECKS SET FORMAT TO CHXINPUT.FMT * REMEMBER WHERE WE START GO BOTTOM STORE CHKNO+1 TO FIRSTCHK STORE # TO FIRSTREC * NOW ADD THE NEW DATA APPEND * WHEN FINISHED, HOLD ON TO LAST CHECK NUMBER STORE CHKNO TO LASTCHK * CALCULATE HOW MUCH WE JUST SPENT SUM AMT TO SPENT FOR CHKNO >= FIRSTCHK .AND. CHKNO <= LASTCHK STORE BALANCE-SPENT TO BALANCE * CLOSE OUT OPEN FILES AND VARIABLES USE SET FORM TO RELEASE FIRSTCHK,FIRSTREC,SPENT * NEW BALANCE, LASTCHK, AND PROGRAM EXECUTION PASSED BACK TO CHXMENU.CMD * ++++ * - test for new deposits CASE ACTION='2' * - enter new deposit data * OPEN DEPOSITS AND FORMAT FILES USE DEPOSITS SET FORMAT TO CHXDEPOS.FMT * REMEMBER WHERE WE ARE GO BOTTOM STORE #+1 TO FIRSTDEP * ADD THE NEW DATA APPEND * ADD UP ALL THE NEW DEPOSITS SUM AMT TO DEPOSIT FOR #>= FIRSTDEP STORE BALANCE+DEPOSIT TO BALANCE * CLOSE OUT DEPOSIT ROUTINE SET FORM TO USE RELEASE DEPOSIT,FIRSTDEP * NEW BALANCE AND PROGRAM EXECUTION PASSED BACK TO CHXMENU.CMD * - test for cancelled checks CASE ACTION='3' * - enter cancelled check data USE CHECKS STORE T TO MORE ERASE DO WHILE MORE ERASE STORE 0 TO C:CAN @ 4,5 SAY "CHECK CANCELATION ROUTINE. " @ 11,10 SAY "ENTER 0 TO EXIT " @ 12,5 SAY "ENTER CHECK NUMBER TO BE CANCELLED "; GET C:CAN PICTURE "####" READ * - testing for exit condition IF C:CAN=0 STORE F TO MORE LOOP ENDIF * - search for cancelled check number LOCATE FOR CHKNO=C:CAN IF .NOT. CAN .AND. .NOT. EOF * - if not already cancelled or at end of file, display check data @ 15,20 SAY 'Paid to '+TRIM(PAYTO)+' on '+DATE @ 17,20 SAY 'Amount of check is $' @ 17,40 SAY AMT @ 19,20 SAY 'for '+MEMO * - ask if this is the right check STORE Y TO ANSWER @ 21,10 SAY 'Is this the one? (Y/N) ' GET ANSWER READ IF ANSWER * - change logical flag for cancelled check REPLACE CAN WITH T @ 21,50 SAY "CANCELLED" ENDIF ELSE * - message to tell the user that the check is not in file. @ 15,5 SAY "Check "+STR(C:CAN,4)+;  " cannot be found or is already cancelled." ACCEPT " to continue " to WAIT ENDIF ENDDO MORE ERASE ? " LIST OF REMAINING UNCLEARED CHECKS " ? ? "CHKNO PAID TO AMOUNT DATE MEMO" ? DISPLAY OFF ALL FOR .NOT. CAN CHKNO, PAYTO, AMT, DATE, TRIM(MEMO) WAIT USE RELEASE C:CAN, ANSWER, MORE, WAIT * NO VARIABLES PASSED BACK TO CHXMENU.CMD * - test for reconcile with bank statement CASE ACTION='4' * - compute balances * COMMANDS TO RECONCILE BALANCE WITH BANK STATEMENT ERASE USE CHECKS @ 5,5 SAY ' PROGRAM TO RECONCILE WITH BANK STATEMENT ' @ 8,15 SAY 'CALCULATING BALANCE NOW ' SUM AMT TO OUTSTAND FOR .NOT. CAN * - display total of outstanding checks @ 13,0 SAY 'TOTAL OUTSTANDING CHECKS = $' @ 13,33 SAY OUTSTAND STORE 0.00 TO BANK:BAL  * - request ending balance from check book @ 15,0 SAY 'ENTER ENDING BALANCE FROM BANK STATEMENT' GET BANK:BAL READ @ 17,0 SAY 'APPARENT BALANCE = $' @ 17,20 SAY BANK:BAL-OUTSTAND DO CASE CASE BANK:BAL-OUTSTAND > 0 @ 19,10 SAY 'OPTION 3 OF MAIN MENU WILL LIST UNCLEARED CHECKS ' CASE BANK:BAL-OUTSTAND = 0 @ 19,10 SAY 'CHECKS.DBF AND BANK STATEMENT EXACTLY BALANCE ' CASE BANK:BAL-OUTSTAND < 0 @ 19,10 SAY 'USE OPTION 2 (DEPOSITS) TO ADJUST ACCOUNT FOR ; INTEREST OR FEE CHARGES' @ 21,10 SAY 'LAST 12 DEPOSITS LISTED HERE ' USE DEPOSITS GO BOTTOM SKIP -11 LIST OFF NEXT 12 DATE,'$',STR(AMT,8,2),PAIDFROM ENDCASE RELEASE BANK:BAL, OUTSTAND USE ? ? ' ready to return to main menu ' WAIT * NO VARIABLES PASSED BACK TO CHXMENU.CMD * - non-valid entry to the menu and ring bell OTHERWISE ERASE @ 20,5 SAY 'ENTRY MUST BE BETWEEN 0 AND 4 '+CHR(7) ENDCASE ENDDO RETURN * EOF CHXMENU.CMD SITS AND FORMAT FILES USE DEPOSITS SET FORMAT TO CHXDEPOS.FMT * REMEMBER WHERE WE ARE GO BOTTOM STORE #+1 TO FIRSTDEP * ADD THE NEW DATA APPEND * ADD UP ALL THE NEW DEPOSITS SUM AMT TO DEPOSIT FOR #>= FIRSTDEP STORE BALANCE+DEPOSIT TO BALANCE * CLOSE OUT DEPOSIT ROUTINE TRUE() the logical value True.##VALUE(t) The text t must contain# the representation of anumeric constant. The value ofthat constant is returned.%Formulas are made by combining values%$(text and numbers) and references to$%other cells with the usual arithmetic%operations and other functions.!Numeric values are stored with 14!"digits of precision (mantissa) and"&a decimal exponent ranging from -64 to&+62. Numeric constants may be typed as integers (123), decimal &fraction*DBASE HELP TEXT FILE DBASEMSG.TXT VERSION 1.16 FOR dBASE II v2.4 Copyright 1983 Ashton-Tate and RSP, Inc. Written by Wayne Ratliff, Jim Taylor, and Howard Dickler INTRODUCTION This entry is intended to give you on-line information about your dBASE II Database Management System. It explains the disk files you have received, and gives suggestions on tapping the power now available to you for data management. Using the on-line HELP in conjunction with your Manual, you will soon be creating databases and writing command procedures to do your work. >>>>>>> type any key to continue <<<<<<< HOW TO USE THE 'HELP' FACILITY Information about your dBASE II system can be obtained by typing HELP and the name of a dBASE II command or HELP and any of the following key words. UTILITIES FULL SCREEN LIMITS NEW ERRORS  EXAMPLES FUNCTIONS DBASE GLOSSARY HELP INSTALL RUNTIME >Note: Entire key words need not be entered. dBASE will then look up the entry for the key word and display it. If there is no information on the subject then dBASE will say "NO HELP MESSAGES FOUND". When there is more text to display beyond what's shown, then you will see the word WAITING (like this). >>>>>>> type any key to continue <<<<<<< The essential dBASE II files on this disk are: DBASE.COM -- main system program file DBASEOVR.COM -- all overlays and system messages DBASEMSG.TXT -- this HELP file (only necessary if you use HELP) INSTALL.COM -- terminal installation program (not necessary after terminal is installed). Other files on the disk (or on other disks included with the system) are not essential, but are useful as described below: *UTILITIES UTILITY FILES TO WORK WITH YOUR dBASE II SYSTEM: STARTUP.PRG -- this command file is intended to help you deter- mine if your terminal is properly installed. Type DO STARTUP after bringing up dBASE. SETS.PRG -- this command file will restore dBASE to all the default values of the SET parameters. You may modify this file to restore your own list of parameters. LABELS.PRG -- this command file prints mailing labels. NAMES.DBF -- database used by LABELS. CREATE.PRG -- this command file creates a command file with the usual and suggested command file documentation. DATER.PRG -- this command file will convert calendar date to julian date and vice-versa. VIP.COM -- special program run from DOS will speed up creation of customized formats for data input and display. (Ashton-Tate will send program to user upon receipt of license agreement.) *EXAMPLES Some files that are present with dBASE II are EXAMPLE files (occassionally on a separate disk). These files are intended to be useful as they are, and are internally documented well enough for you to customize them to suit your own purposes. Each suite of programs listed is progressively more involved, so you can start at a level comfortable to you and work up. The master program of each group is marked with a '>'. TICKLE FILE MANAGEMENT FILES (CARDFILE) > CMAIN.PRG TEXT.DBF CPRINT.PRG KEYWORD.NDX APPECARD.PRG TICKLE.NDX TICKLE.FRM EDITCARD.FMT CHECKBOOK MANAGEMENT FILES > CHXMENU.PRG CHXINPUT.FMT CHXDEPOS.FMT CHXBOOK.MEM CHECKS.DBF DEPOSITS.DBF INVENTORY MANAGEMENT FILES > IMAIN.PRG INVENT.DBF ISETUP.PRG I'BYNMBR.NDX INVMAINT.PRG I'BYDESC.NDX INVQUAN.PRG INV'CONS.FRM INVREAD.PRG INV'PRTR.FRM INVRPRT.PRG PERSONNEL MANAGEMENT FILES > EMAIN.PRG EMPLOYEE.DBF ESETUP.PRG EMPSCRN.FMT EMP-ENTR.PRG EMP-UPD.FMT EMP-UPD.PRG EMP-PRT.FRM EMP-TERM.PRG EMP-CONS.FRM EMP-RPRT.PRG E'BYNMBR.NDX EMPLOYEE.MEM E'BYNAME.NDX *EXIT *FULL SCREEN FULL-SCREEN CURSOR MOVEMENT CODES -- ALL COMMANDS ctrl-X moves cursor DOWN to the next field (also ctrl-F) ctrl-E moves cursor UP to the previous field (also ctrl-A) ctrl-D moves cursor AHEAD one character ctrl-S moves cursor BACK one character ctrl-G deletes character under cursor or deletes character to left of cursor ctrl-Y blanks out current field to right of cursor ctrl-V toggles between overwrite and INSERT modes ctrl-W save changes and returns to "." prompt IN EDIT MODE ctrl-U toggles the record DELETE mark on and off ctrl-C writes current record to disk and ADVANCES to next record ctrl-R writes current record to disk and BACKS to previous record ctrl-Q ignores changes to current record and returns to "." prompt ctrl-W writes all changes to disk and returns to "." prompt IN BROWSE MODE ctrl-B pans the window RIGHT one field ctrl-Z pans the window LEFT one field IN MODIFY MODE ctrl-T DELETES current line, moves all lower lines up ctrl-N INSERTS new line at cursor position ctrl-C scrolls down a half page ctrl-W writes all changes to disk and returns to "." prompt ctrl-Q ignores all changes and returns IN APPEND MODE terminates APPEND when cursor is in first position of first field ctrl-W writes record to disk and moves to next record ctrl-Q ignores current record and returns to "." prompt CONTROL KEY STROKES OPERABLE WHEN NOT IN FULL SCREEN ctrl-P toggles your printer ON and OFF ctrl-R repeats last executed command ctrl-X clears the command line without executing command ctrl-H backspace ctrl-M emulates a carriage return ctrl-S starts/stops CPU operation *INSTALL In order to use dBASE II's Full-screen editing facility, your terminal must be properly installed. Many dBASE formats are pre- installed. If yours is not your screen will appear jumbled when you attempt to perform such full screen operations as APPEND or EDIT. To correct this you must install dBASE II by running the dBASE II installation program, INSTALL.COM, called from your system as INSTALL. Since you may diagnose your terminal's status at any time by running STARTUP.PRG (called from the dBASE II "." prompt by entering the command DO STARTUP), you would be wise to use it before attempting to INSTALL dBASE II. It will tell you if you need to run the installation program, and can be used later to check the results if you do. *EXIT *NEW > New commands and changes to dBASE II New commands: HELP -- user aid command. REINDEX -- realigns and updates existing index file. SET F -- sets value of function key on IBM PC, Victor, TI Professional, and IBM PC compatible terminals. SET COLOR -- alters display color on terminals listed above. TEXT -- displays multiple lines of text, terminated by ENDTEXT. RANK( ) -- function returns ASCII value of first character. TEST( ) -- function determines validity of Supplemented Commands: APPEND,INSERT,EDIT,CREATE -- can now use a format file for screen control. BROWSE -- can now be given a list of fields to work with. DISPLAY STATUS -- shows databases and indexes in use and SET settings. READ & REPLACE -- can be directed not to perform disk accesses when non-key data is changed. RELEASE -- can now release subsets of memory variables. RESTORE -- can restore additively to existing memory variables. SAVE -- can now save subsets of memory variables. SET RAW ON -- eliminates extra spaces in DISPLAY and ? commands. UPDATE -- replace clause can now include WITH phrases. *EXIT *GLOSSARY dBASE II TERMINOLOGY or - any valid dBASE command or function. -- character string(s). In most instances must be delimited with single quotes (''), double quotes (""), or brackets ([]). -- an whose content is defined as Character in type. May be a cstring, a memvar or field of type C or any combination of these items concatenated with the dBASE operators. -- any non-alphanumeric character used to demarcate data, e.g., single quotes (''), double quotes (""), brackets ([]), colons (::), commas (,,), etc. or -- an item or group of items and operators whose value can be determined by dBASE. s may be defin- ed as C,N, or L depending on the "type" of data they contain. -- a list of expressions delimited with commas. -- a record field name. -- a list of field names delimited with commas. -- name of file you wish to create or access. -- name of index file you wish to create or access. -- list of field(s) or portion(s) thereof used to create index files or sorted databases. -- the name of a memory variable. -- list of memory variables delimited with commas. -- a number which dBASE regards as a literal value. -- an whose content is defined as Numeric. -- command option specifies range of records dBASE must treat in executing command. has three possible values: ALL records in file; NEXT records in file; and RECORD . Default value varies from command to command. -- allows batch manipulation of files of same type and/or with matching characters in filename using operating system "wild cards," ? and *. Also allows batch manipulation of groups of with matching characters in name. -- the name of a database field or . *EXIT *? *?? > ? -- Evaluates and displays the value of an expression. In command files (and elsewhere) can be used without expression to space down a line at output. . ? 6/3 2 . ? 'CITY' CITY . ? CITY (field of file in use) Managua > ?? -- Same as ?, but displays result on same line as entry. *EXIT *@ > @ -- Displays user formatted data on screen or printer at spec- ified x,y coordinates (x=line,y=column). Syntax: @ [SAY [USING '']] [GET [PICTURE '']] Examples: @ 3,23 SAY AMOUNT * 1.06 USING '$$$,$$$.99' @ 14,23 SAY "ENTER PHONE" GET PHONE PICTURE '(###)###-####' @ LINE+2,45 SAY TOTAL USING '99999.99' *EXIT *ACCEPT > ACCEPT -- Prompts user to enter character string information into a designated memory variable. Syntax: ACCEPT [''] TO Example:. ACCEPT "What is your name?" to NAME What is your name?: [user's response stored to SIN] . ? NAME [user's response displayed] *EXIT *APPEND > APPEND FROM [FOR ] or APPEND FROM [SDF] [DELIMITED] [FOR ] -- appends data FROM a database or file in System Data Format file to the database in use. Records marked for deletion in FROM will not be appended. e.g., APPEND FROM MAILLIST FOR NAME='N' APPEND FROM TEST.TXT DELIMITED > APPEND BLANK -- appends a blank record to file in use. > APPEND -- allows user to add new records to database in use. (If index is also in use, the index file is automatically updated). *EXIT *BROWSE > BROWSE [FIELDS ] -- Brings up Full-screen viewing and editing of the database in use. *EXIT *CANCEL > CANCEL -- In a command file, stops command file execution and returns user to dBASE "." prompt. Command file fragment: ACCEPT "What should this humble machine do next?" to NEXT IF NEXT = 'Q' CANCEL ENDIF *EXIT *CHANGE > CHANGE -- Permits Non-Full-Screen editing of database in use by field. Hit ESCape key to terminate CHANGE mode. Syntax: CHANGE [] FIELD [FOR ] Example: CHANGE ALL FIELD ZIP FOR ZIP = '90045' RECORD: 00001 ZIP: 90045 CHANGE? (Enter the characters to be changed and hit return. Add new data at the TO prompt, or hit return to go to the next appro- priate record.) *EXIT *CLEAR > CLEAR -- closes all database in use, releases all memory vari- ables, and Selects Primary work area. > CLEAR GETS -- commands dBASE to forget all GET statements still active without erasing the screen. *EXIT *COPY > COPY -- Copies the database in use or only its structure TO another file. COPY will create the TO if it does not yet exist, but will destroy an already existing file of that name. Will not copy records marked for deletion. Command has three forms: COPY TO [] [FIELD ] [FOR ] COPY TO [SDF] [DELIMITED [WITH ]] [FOR ] COPY TO STRUCTURE [FIELD ] > COPY TO STRUCTURE EXTENDED -- special form of COPY creates database whose records represent the structure of file in use. *EXIT *COUNT > COUNT -- Counts the number of records in database in use which satisfy specified criteria. Default value is COUNT all records. Syntax: COUNT [scope] [FOR ] [TO ] Example: COUNT NEXT 25 FOR GRADE > 'B-' TO DEANLST *EXIT *CREATE > CREATE [] -- Creates a new database. User will be prompted for file structure. > CREATE FROM EXTENDED -- creates database whose structure is determined by the data contained in the records of . (Used with COPY STRUCTURE EXTENDED.) *EXIT *DELETE > DELETE FILE -- deletes specified file. > DELETE [] [FOR ] -- marks record(s) for deletion. Records marked for deletion (with *) will not be erased until the PACK command is given. Records may also be marked for deletion by record number. Examples: DELETE ALL FOR COMPANY = 'ZMB' DELETE RECORD 15 *EXIT *DISPLAY > DISPLAY FILES [ON ] [LIKE ] -- lists files on drive. For example, DISPLAY FILES ON B LIKE *.MEM. > DISPLAY [][][FOR][OFF] -- displays records of file in use. > DISPLAY STRUCTURE -- displays field names, types, lengths, and decimals (structure) of file in use. > DISPLAY MEMORY -- display names,types, and values of all cur- rently defined memory variables. > DISPLAY STATUS -- lists databases in use, system date, indexes in use, and current parameters SET. *EXIT *DO *ENDCASE *ENDDO *LOOP > DO -- opens and executes specified command file. > DO WHILE -- used in command files to open a structured loop. Commands in between are executed so long as the DO WHILE is found to be true. Syntax: DO WHILE Example: USE MAILLIST DO WHILE .NOT. EOF [LOOP] ? NAME ? PHONE ENDDO SKIP ENDDO > LOOP -- causes command file to jump processing back to the DO WHILE command. Example: USE MAILLIST DO WHILE .NOT. EOF IF ZIP = '90005' SKIP LOOP ENDIF  ? NAME ? PHONE SKIP ENDDO *CASE > DO CASE -- used in command file to choose one and only one of several possible execution paths. OTHERWISE clause optional, and executes when no CASE is true. ENDCASE is needed to close command. Example: USE MAILLIST ACCEPT "WHICH MENU OPTION DO YOU PREFER?" to Choice DO CASE CASE Choice = '1' DO Clabels CASE Choice = '2' DO Cappend CASE Choice = '3' DO Cedit OTHERWISE Return ENDCASE *EXIT *EDIT > EDIT [] -- enables selective editing of database in use by record number. Requests record number if not supplied. When edit of particular record has been  com- pleted, ctrl-W brings back EDIT's record number prompt (ENTER RECORD #:). To terminate EDIT mode, answer record number query with a return. *EXIT *EJECT > EJECT -- causes printer to do a form feed (page eject) if PRINT is SET ON or FORMAT is SET TO PRINT. When using @ SAY commands for direct page formatting, EJECT will zero out line and column counters. *EXIT *ERASE > ERASE -- clears the screen. In interactive mode, "." prompt will appear at top left corner of screen. *EXIT *FIND > FIND -- when using indexed files, positions to first record indexed by . *EXIT *GO *GOTO > GO or GOTO -- positions to a specific record or place in the database in use. Also positions to record number contained in memory variable. Syntax: GO or GOTO [RECORD ],,[TOP],[BOTTOM], or *EXIT *HELP dBASE II ON-LINE HELP FACILITY Below you will find a list of all dBASE commands. Each entry in this list corresponds to an entry in the HELP file proper. In the latter, you will find a brief synopsis of each command as well as a picture of that command's correct syntax. Please remember, however, that HELP file information is limited, and is only meant to cut down on the number of trips you will have to make to the dBASE II Manual. To access the entry for the dBASE command (or other Help File entry) you wish to review, simply respond to the dBASE "." prompt by entering HELP and a return (e.g. HELP CREATE ). dBASE will access the information you wish to see, and then return you to the "." prompt so you can go right back to work. In some cases the entry will take up more space than is provided by a single screen. (This is one of them.) To bring up the next screen of information, just hit any console character: this will tell dBASE to stop "WAITING." If you wish to exit the HELP file before viewing an entire entry, simply hit ESCape. >>>> Type 'HELP dBASE' for other <<<<<< >>>>> important information <<<<< > ? -- displays an expression, variable, or field. > ?? -- displays an expression list without a preceeding line feed. > @ -- displays user formatted data on screen or printer. > ACCEPT -- allows input of character strings into memory vari- ables. > APPEND -- append information from another dBASE II database or files in Delimited or System Data format. > BROWSE -- full screen window viewing and editing of database. > CANCEL -- cancels command file execution. > CHANGE -- Non-Full-Screen edit of fields of database. > CLEAR -- closes databases in use and releases current memory variables. > CONTINUE -- continue the searching action of a LOCATE command. > COPY -- creates a copy of an existing database. > COUNT -- counts the number of records in file which meet some criteria. > CREATE -- creates new database. > DELETE -- deletes a file or marks records for deletion. > DISPLAY -- display files, database records or structure, memory variables, or status. > DO -- executes command files or structured loops in same. > EDIT -- initiates edit of records in a database. > EJECT -- ejects a page on the printer. > ELSE -- alternate path of command execution within IF. > ENDCASE -- terminates a CASE command. > ENDDO -- terminates DO WHILE command. > ENDIF -- terminates an IF command. > ENDTEXT -- terminates a TEXT command. > ERASE -- clears the screen. > FIND -- positions to record corresponding to key in index file. > GO or GOTO -- positions to specific record or place in file. > HELP -- access help file overview or specific help file entry. > IF -- allows conditional execution of commands. > INDEX -- creates an index file. > INPUT -- allows input of expressions into memory variables. > INSERT -- insert new record in database. > JOIN -- joins output of two databases. > LIST -- lists files, database records or structure, memory variables, and status. > LOCATE -- find a record that fits a condition. > LOOP -- skips to beginning of DO WHILE command. > MODIFY -- create and/or edit command file or modify structure of existing database. > NOTE or * -- allows insertion of comments in command file. > PACK -- erases records marked for deletion. > QUIT -- exits dBASE and returns to operating system. > READ -- initiates full-screen editing of formatted screen by accepting input into variables accessed with @ GET. > RECALL -- erases mark for deletion. > REINDEX -- update existing index file. > RELEASE -- eliminates unwanted memory variables and releases memory space. > REMARK -- permits display of any characters. > RENAME -- rename a file. > REPLACE -- change information in record(s) or entire database field by field. > REPORT -- format and display a report of information. > RESET - reset operating system after placing new disk in drive. > RESTORE -- retrieves memory variables stored in MEM file. > RETURN -- ends a command file. > SAVE -- copies current memory variables to disk file. > SELECT -- switches between USE files in PRIMARY and SECONDARY areas. > SET -- sets dBASE control parameters. > SKIP -- position forwards or backwards in database. > SORT - write copy of database sorted on one of the data fields. > STORE -- creates memory variables. > SUM -- compute and display the sum of database field(s). > TEXT -- allows output of block of text from a command file. > TOTAL -- creates summary copy of database combining information from specified fields of records meeting some criteria. > UPDATE -- allows batch updates of a database. > USE -- specifies database to USE until next USE command is issued. > WAIT -- suspends command file processing until user input received. >>>>> Other key words <<<<<  (e.g. type 'HELP EXAMPLES' ) UTILITIES FULL SCREEN NEW ERRORS GLOSSARY EXAMPLES FUNCTIONS INSTALL DBASE LIMITS RUNTIME *EXIT *IF *ELSE *ENDIF > IF -- in command file, IF structure permits conditional exe- cution of commands. ELSE clause is optional. Syntax: IF Example: IF STATE = 'CA' DO INSTATE (CMD file) [ELSE ELSE ] DO OUTSTATE (CMD file) ENDIF ENDIF *EXIT *INDEX > INDEX ON TO -- creates an index file for database in use based upon content of field(s) or portion(s) of field(s) specified by the or index . *EXIT *INPUT > INPUT [""] TO -- prompts user to enter numeric or logical information into the designated memory variable.  Example: INPUT 'Prompt user for input' TO X Prompt user for input: 12 [user input, 12, stored to X] . ? X 12 *EXIT *INSERT > INSERT [[BEFORE] [BLANK]] -- inserts a record into the database in use immediately after or -- with BEFORE -- before the current record. Presents user with data entry format for use file unless BLANK record is requested. *EXIT *JOIN > JOIN -- creates a new database by combining the records of files in use in Primary and Secondary areas. Records are added where FOR evaluates as True. Command must be executed from primary area. Default value for FIELD is ALL. Syntax: JOIN TO FOR [FIELDS ] Example: . USE NAMES . SELECT SECONDARY . USE MAILLIST . SELECT PRIMARY . JOIN TO NAMEJ FOR LAST <> S.LAST *EXIT *LIST > LIST FILES [ON ] [LIKE ] -- lists all files on designated disk. Default to logged disk. Example: LIST FILES ON C LIKE *.FRM > LIST [][] [FOR ][OFF] -- displays records of file in use. Default value is ALL records. Example: LIST NEXT 25 NAME, PHONE FOR CONTRIB > 100 (i.e., NAME and PHONE of next 25 who contributed more than $100.) > LIST STRUCTURE -- displays structure of database in use. > LIST MEMORY -- lists names and values of all currently defined memory variables. > LIST STATUS -- lists databases open, indexes in use, system date, and current parameters SET. *EXIT *LOCATE *CONTINUE > LOCATE [] FOR -- finds first record of database for which FOR is True. Use CONTINUE to find next such record. (User may manipulate record before resuming search with CONTINUE.)  . LOCATE ALL FOR ZIP >= '95000' .AND. ZIP < '96000' RECORD: 00123 . DISPLAY . CONTINUE RECORD: 00232 *EXIT *MODIFY > MODIFY STRUCTURE -- allows user to alter the structure of database in use. This command will destroy all data in the file in use. (To alter structure without loss of data, use COPY STRUCTURE, USE, and APPEND as illustrated below.) . USE NAMES . COPY STRUCTURE TO TEMP . USE TEMP . MODIFY STRUCTURE -- no data lost since file is empty . APPEND FROM NAMES -- brings data into modified database . DELETE FILE NAMES . USE -- close TEMP in order to: . RENAME TEMP TO NAMES > MODIFY COMMAND -- calls dBASE's text editor and brings up or creates designated file. Primarily used for creating and editing command (.PRG), text (.TXT), and format (.FMT) files, but may be employed as a simple full screen word processor. *EXIT *NOTE > NOTE or * -- permits the insertion of comments into a command file. Comments following NOTE or * will not be read when file is executed. *EXIT *PACK > PACK -- erases records marked for deletion in database in use. If index files are in use, they will be automatically updated. *EXIT *QUIT > QUIT [TO ] -- terminates dBASE and returns control to operating system. Optionally calls programs from system level. *EXIT *READ > READ -- initiates full-screen mode for entry or editing of variables. The Full-screen prompts and window are created by @ SAY commands with GET phrases. Command file fragment: STORE ' ' TO name STORE ' ' TO phone @ 4,4 SAY 'Name' GET name @ 6,4 SAY 'Phone' GET phone PICTURE '(###)###-####' READ *EXIT *RECALL > RECALL [] [FOR <exp>] -- reinstates record(s) marked for deletion within use file. Default value is current record. *EXIT *REINDEX > REINDEX -- allows update of index files not automatically 'reindexed' after alteration of database file. Example: . USE MAILLIST INDEX INDEXA . APPEND [append operations performed] . SET INDEX TO INDEXB,INDEXC . REINDEX *EXIT *RELEASE > RELEASE -- erases unwanted memory variables and opens memory space for further use. ( uses ? to mask any single character, * to mask all remaining characters. Syntax: RELEASE [], or [ALL] RELEASE ALL LIKE RELEASE ALL EXCEPT Examples (where N, N1, N2, N10, V7 are variables in use): RELEASE ALL LIKE N? [N10 and V7 will remain] RELEASE ALL LIKE N?? [V7 will remain]  RELEASE ALL EXCEPT ?1* [N1 and N10 will remain] *EXIT *REMARK > REMARK -- permits the display of any characters. In command file character entry is output. Example: . REMARK abracadabara!!! abracadabara!!! *EXIT *RENAME > RENAME TO -- renaming of file in DOS directory. Unless otherwise indicated, dBASE assumes that file type is DBF. Example: . RENAME REVIEW.FRM TO REVIEW2.FRM *EXIT *REPLACE > REPLACE -- allows user to replace contents of specified fields of database in use. If index file is keyed on field targeted for update, index in use will be automatically updated. Default is current record. Syntax: REPLACE [] WITH [, WITH ][FOR ] Example: . USE MXPROJ . REPLACE ALL COST WITH COST * 6.1 FOR ITEM = 'ELEC' *EXIT *REPORT > REPORT -- used for creating a Report Form File (FRM) for dis- playing specified information from a database in a user- defined format. Outputs results to screen or printed page. Syntax: REPORT [FORM
] [][TO PRINT] [FOR ] [PLAIN] *EXIT *RESET > RESET [] -- use this command after changing disks on any drive other than that containing dBASE. Command resets the DOS bit map, allowing uninterrupted operation of dBASE program. Close all files before issuing a RESET. *EXIT *RESTORE > RESTORE FROM [ADDITIVE] -- retrieves and activates the set of memory variables previously SAVEd to a memory file. ADDITIVE allows you to keep currently defined variables intact; otherwise they are lost. *EXIT *RETURN > RETURN -- may be used in a command file to return control to the command file which called it or to dBASE "." prompt if user called it. *EXIT *SAVE  > SAVE TO [ALL LIKE ] or [ALL EXCEPT ] -- copies all memory variables currently in use, or only those specified by , to designated memory (MEM) file. uses ? to mask any single characters and * to mask all remaining characters. Examples (where N1, N2, N10, V1, V2, V10 are current variables): . SAVE TO NUMBER ALL LIKE N* [saves N1, N2, N10] . SAVE TO NUMBER ALL LIKE N? [saves N1, N2] . SAVE TO NUMBER ALL EXCEPT ?1* [saves N2, V2] *EXIT *SELECT *PRIMARY *SECONDARY > SELECT [PRIMARY / secondary] -- allows user to move between the two work areas dBASE provides, thus permitting user to work with two databases simultaneously and maintain record pointers in both. Primary area is active upon bringing up dBASE. *EXIT *SET > SET -- sets dBASE control parameters. Syntax: SET [ON or OFF] SET TO