This manual was typed in by OMEGA V/Australian Crackers United Contact us: G.P.O Box 1280 Hobart, Tasmania 7000 Australia Welcome to the dBMAN Tutorial. dBMAN is easy to use. In just a few short minutes this tutorial will show you how to CREATE, USE, APPEND, DISPLAY, LOCATE, EDIT, DELETE, SORT, and INDEX your new data base. To select a menu item, simply use the arrow key to highlight the command you would like to see, then press the return key. Each section will discuss the different dBMAN commands necessary for you to create and use your own data base. Some sections will even let you enter your own data! THE dBMAN SCREEN The dBMAN screen is divided into two sections, with the command window at the top and the data window below. These two sections will allow you to see dBMAN prompts and messages without disrupting your data display. The command field is where you enter commands for execution. dBMAN places the cursor at the "CMD:" caption when it is ready to receive a command. THE dBMAN SCREEN The message field is where you will receive messages from dBMAN. The message is posted after the "MSG:" caption; if the message is reporting an error, a beep will sound. The message is automatically erased when you press any key. The file ID field displays the name and file ID of the current data file. dBMAN will display FP (Primary) when it is first started. The current record field displays the record number that was last accessed by dBMAN. THE dBMAN SCREEN The key summary field is a second message field that displays a reminder of which control keys apply to the current command. F7 will display all the memory variables in use. F8 will display dBMAN "switches" and the data files in use. F9 will give an extended explanation of an error message. F10 will provide HELP based on the command in the command line. Create Mailing List The first thing you will need to do is to create a data base. The command you will use is CREATE . You will insert your own file name instead of the <>'s. (Please refer to your DOS manual if you are not sure of what a proper filename should be.) If you do not specify an extension, dBMAN will use a ".DBF" extension. Here we will define the data base structure. We'll tell dBMAN the name of each field and the type of data we will store in it (Character, Number, Date, Logical), how many places to reserve in the record for the data, and if it is a number type, how many decimal places we will need. NOTE: Although the phone and zip fields contain numbers, we'll use the "C" (Character) type. This will allow us to have leading zero's and use the "-" character. You will want to set up your data base structure to allow you to store any data you might want to find later. Don't worry though, if you don't get it right the first time you can always come back and add, delete , insert , and rename the fields. This can be done by using the commands MODIFY STRUCTURE and MODIFY FIELDNAME. Once you have created a data base, you will want to put information into it. But first you will need to USE a data base. The command is quite easy. Just type: USE , where filename is the name of your data base. We'll use the MAIL.DBF again. When a file is in use, dBMAN will display the selected area ID (FP is the default) and the name of the file. You can have only one file open in each area. If you have more than one file in use and would like to see the file names, you can press the F8 key. Try it! ********************************************************************** * Create Mailing List * * You will want to set up your data base structure to allow you to * * store any data you might want to find later. Don't worry though, * * if you don't get it right the first time you can always come back * * and add, delete , insert , and rename the fields. This can be * * done by using the commands MODIFY STRUCTURE and MODIFY FIELDNAME. * ********************************************************************** To add records to your data base, you will use the command APPEND. APPEND will add new records to the bottom of your file Here you will enter the information in each field. ^S will save the record on the disk and return you to the CMD: line. ^Q will abandon the data on the screen and return you to the CMD: line. ^N will save the data and ready the screen for the next record. ^P will allow you to edit the previous record. (Note: A ^N will take you to the end of the file.) ^C will copy (carryover) all the data in the record to a new record at the end of the file. If you would like to add some of your own records to the database, please type a ^A. (Hold the control key down while pressing the "A" key.) There are several commands you can use to look at your data. One is the LIST command. If you type LIST, dBMAN will print the current record on the screen . LIST ALL will print the entire data base on your screen in a continuous scrolling fashion. Another command is DISPLAY ALL. DISPLAY ALL will print one screen of records at a time. You can use the ^right-arrow and the ^left-arrow to move right or left (pan) through the fields. If you would like to see the DISPLAY ALL command work on the MAIL data base, please type ^D. (Hold the control key down and press the "D" key.) There are several commands you can use to look at your data. One is the LIST command. If you type LIST, dBMAN will print the current record on the screen . LIST ALL will print the entire data base on your screen in a continuous scrolling fashion. Another command is DISPLAY ALL. DISPLAY ALL will print one screen of records at a time. You can use the ^right-arrow and the ^left-arrow to move right or left (pan) through the fields. If you would like to see the DISPLAY ALL command work on the MAIL data base, please type ^D. (Hold the control key down and press the "D" key.) Let's say you want to do something with a record, such as change it. (More on the EDIT command later.) In order to use a record, you will need to make it the current record. One way to do this, if you know the record number, is to use the command GOTO. Just type GOTO , and fill in the record number. For example GOTO 12. Another way to go to a record is to LOCATE it. Here are a few examples: LOCATE FOR STATE = "CA" ; LOCATE FOR LAST_NAME > "D"; LOCATE FOR STATE = "CA" AND LAST_NAME > "D". dBMAN will try to find the first record that matches. If there is no match, dBMAN will display the message: Err05 - End Of File...No More Records. Don't worry about getting an error; there are just no more records. Here you will enter the information in each field. ^S will save the record on the disk and return you to the CMD: line. ^Q will abandon the data on the screen and return you to the CMD: line. ^N will save the data and go to the next record. ^P will save the data and allow you to edit the previous record. ^D will mark the record for deletion. ^U will remove the deletion mark. To permanent remove a deleted record use the PACK command. If you would like to EDIT press ^E. If you want to look at your data base in a certain order, dBMAN provides two ways to organize your file: SORTing and INDEXing. SORTing your file creates a new data file and physically rearranges the records into the specified order. To sort your file, simply type SORT ON TO . Some examples: SORT ON STATE TO STFILE; SORT ON NAME TO NAFILE. Then to see the new sorted data, you will type USE . To see a sort press ^S. If you want to look at your data base in a certain order, dBMAN provides two ways to organize your file: INDEXing and SORTing. INDEXing your file creates a new file that will make your data file appear in the desired order. It does not physically rearrange the records in the data base. To INDEX your file, simply type INDEX ON TO . Some examples: INDEX ON STATE TO STFILE; INDEX ON NAME TO NAFILE. Then to see the new sorted data, you will type USE INDEX . To see an index type ^I. Thank you for joining us through this simple tutorial. There is so much more to dBMAN that we could ever include in a disk based tutorial. In this short tutorial we have tried to give you enough information to get you started using and enjoying dBMAN. HELP Docs 1At the "CMD:" prompt, type any of these names and press the "F10" key: ? COMPARE DO FORMFEED LOCATE READ SET ?? CONTINUE EDIT GO LOOP RECALL SKIP @ CONVERT EJECT IF MODIFY REINDEX SORT ACCEPT COPY ELSE IGNORE MODINDEX RELEASE STORE APPEND COUNT ENDCASE INC NOTE RENAME SUM ASSIGN CREATE ENDDO INDEX OTHERWISE REPLACE þ UNDENY BEEP DEC ENDIF INPUT PACK RESTORE UNPEND CANCEL DELETE ERASE INT21 PAUSE RETRY UPDATE CASE þ DENYRW EXIT INTXX PRINT RETURN USE CLEAR þ DENYW FIND JOIN þ PURGEDIR SAVE WAIT CLOSE DISPLAY þ FLUSH LIST QUIT SELECT ZAP Key: þ Multi-User Only; Single-User Only ^D ¯ Edit Keys, Syntax, Functions ³ ^U ¯ Functions ³ Esc ¯ CMD: ~84 85~ CREATE Create a new database file. The default file extension is ".DBF". FIELDNAME: 1..10 characters ( A..Z 0..9 _ : ) TYPE: 1 character ( C = Character, N = Numeric, D = Date, L = Logic ) WIDTH: 1..3 chars ( C = 1..254 N = 1..17 D = 8 L = 1 ) DECIMAL: 1..2 chars ( 0..15, Digits to right of the decimal ) ... move to next entry in the current FIELD DEFINITION ^N ... move to Next FIELD ^I ... Insert blank FIELD ^P ... move to Prior FIELD ^E ... Erase current FIELD ^S ... Save FILE and exit CREATE ^Q ... Quit CREATE without saving FILE ^D ¯ MODIFY ³ ^U ¯ CONVERT ³ Esc ¯ CMD: ~9 64~ DISPLAY [] MEMORY Display variable names and contents for Global (the default area) or "Fm" (FX, FY, FZ) memory area. DISPLAY [] STRUCTURE Display the structure of the file used in area "Fi" (FJ..FS) or in the current area. Information displayed includes: FieldName, Type, Width, Decimal, Record Size, and Number of Fields. DISPLAY FILE [] Display the file names in the DOS directory which match the optional "". The may contain: drive id, wild-card characters ("*" and "?") and file extension. "*.DBF" is the default "". ^D ¯ DISPLAY records ³ ^U ¯ LIST ³ Esc ¯ CMD: ~83 58~ APPEND (direct entry from keyboard) ^N ... save & append Next blank ^P ... save & move to Prior record ^C ... Save & Carryover data to next ^S ... Save all records and exit APPEND ^Q ... Quit without saving current (appended) record APPEND FROM [FOR ] Append all records (or selected by "FOR") in the "FROM" file to current file. APPEND { DELIMITED | DIF | SDF } FROM Append all records in DELIMITED (comma delimited, quoted fields) or DIF (Data Interchange Format) or SDF (System Data Format) files. APPEND [Fi] BLANK ...to end of the current or "Fi" (FJ..FS) area file. ^D ¯ UNPEND ³ Esc ¯ CMD: ~55 0~ SELECT [ | PRIMARY | SECONDARY] Make one of the ten file IDs ("Fi" = FJ..FS) the current file ID. Its associated file becomes the current file. The initial "Fi" is FP. PRIMARY and SECONDARY are equivalent to "FP" and "FS" respectively. SELECT (without an argument) resets the selected file ID to "FP". Most dBMAN file-reference commands allow the use of an optional "Fi" file ID so that operations which move the record pointer may be used without doing an explicit area SELECT command first. The commands which may require a prior SELECT are: APPEND, COPY, CREATE, EDIT, JOIN, MODIFY, PACK, SORT, UPDATE USE [] [INDEX ] Close any open files in the current (or "Fi") file ID area & open the new DBF (and index files). If a file extension is not specified, ".DBF" and ".NDX" are assumed for the database (and index files). If the "INDEX" phrase is used, access to the DBF file is in the order determined by the first NDX file in the list. Examples: USE Maillist | MAILLIST.DBF opened in current file ID area USE FQ Costs.BAK | COSTS.BAK opened in ID area "FQ" USE Inv INDEX Inv, Qty | open INV.DBF in current area with INV.NDX & | QTY.NDX indexes. INV is the "master NDX" ^D ¯ CLOSE ³ ^U ¯ REINDEX ³ Esc ¯ CMD: ~7 57~ CLOSE [ ALL | [] [INDEX []] ] Close the DBF file (or NDX files) used in the current or "Fi" (FJ..FS) area. When the INDEX phrase is used, the index files listed are closed rather than the DBF file. Index files which are not listed will remain open. If the "master index" is on the list of indexes to close, the lowest numbered index remaining open becomes the new "master". Using "INDEX" without arguments will close all NDX files in the current (or "Fi") area. CLOSE ALL will close every DBF & NDX file in all areas. Examples: CLOSE ALL | Close all DBF & NDX files in all file IDs (FJ..FS) CLOSE FJ INDEX | Close all NDX files in file ID area FJ CLOSE INDEX Qyt | Close only the QTY.NDX file in the current ID area ^D ¯ INDEX ³ ^U ¯ USE ³ Esc ¯ CMD: See also: CLEAR & SET INDEX TO ~47 6~ UPDATE FROM ON [] [FOR ] Note: WITHList = WITH [, WITH ] ... etc. Update fields in the current DBF file using the "" expressions. Fields of the "FROM " file may be used in expressions by use of a "T." file ID prefix to the fieldname. The "FROM" file must be pre-sorted on the "ON ". The current DBF file must be sorted or indexed on the same . The "" and "FOR " phrases qualify which records in the current DBF file are updated. Example: USE InvTotal | use the InvTotal file to be updated in the current area UPDATE FROM InvUpdt ON Part:No On:Hand WITH On:Hand + T.On:Hand,; Cost WITH T.Cost * 1.1 ^D ¯ SORT ³ ^U ¯ JOIN ³ Esc ¯ CMD: ~14 20~ MODIFY STRUCTURE dBMAN saves the current file to a temporary file ($TEMP1) while the new structure is being defined from the keyboard. After the structure has been modified, the records from $TEMP1 are appended to the new file and $TEMP1 is deleted from the DOS file directory. Field data types may be changed. MODIFY FIELDNAME ... very fast, but only the fieldnames can be changed. ÄÄÙ ... move to next entry in the current FIELD DEFINITION ^N ... move to Next FIELD ^I ... Insert blank FIELD (Modify Structure only) ^P ... move to Prior FIELD ^E ... Erase current FIELD (Modify Structure only) ^S ... Save FILE and exit MODIFY ^Q ... Quit MODIFY without saving changes ^D ¯ COPY ³ ^U ¯ CREATE ³ Esc ¯ CMD: ~10 2~ The structure of all (or "") fields is copied to "". COPY [DELIMITED | DIF | SDF] TO [] [] [FOR ] All undeleted records within the specified "" and "FOR" conditions are copied to "" in any of four formats: DBF (the default), DELIMITED, DIF (Data Interchange Format) or SDF (System Data Format). All fields (the default) or only field COPY FILE TO Copy the contents of to . Any file type can be copied. The default file extensions are ".DBF". ^D ¯ CONVERT ³ ^U ¯ MODIFY ³ Esc ¯ CMD: ~64 9~ º Close all open files, terminate dBMAN, and return to DOS. º ^D ¯ CANCEL ³ ^U ¯ PAUSE ³ Esc ¯ CMD: ~53 62~ Change data in the current record (or record "") of the currently selected DBF file from the keyboard. Esc ........ clear current FIELD Ret ....... move down one FIELD DnArw...... move down one FIELD UpArw...... move up one FIELD ^N ... save & move to Next RECORD ^D ... Delete RECORD ^P ... save & move to Prior RECORD ^U ... Undelete RECORD ^S ... Save changes to RECORD and exit the EDIT command ^Q ... Quit EDIT without saving changes to current RECORD Esc ¯ CMD: ~0 0~ REPLACE [] [] WITHList [FOR ] Note: WITHList = WITH [, WITH ] ... etc. Replace information in the current record (or all records within the specified "" and "FOR" condition) for fields listed in the "WITHList" clause. The optional file ID ("Fi" = FJ..FS) and field ID prefixes ("J." .. "S.") allow replacements in unselected databases. Esc ¯ CMD: see also: SET RELATION TO ~0 0~ SORT ON TO [{ASCE | ASCENDING} | {DESC | DESCENDING}] Sort on specified fields of the current file and put the sorted records into the new "TO" file. If a file name extension is not specified, dBMAN uses a ".DBF" extension. Sorting can be done in ASCENDING order (low value to high value) or in DESCENDING ^D ¯ JOIN ³ ^U ¯ SORT ³ Esc ¯ CMD: ~20 8~ STORE TO Create one or more variables (contained in varList) and assign the value of the "" to them. If any of the variables already exist, they are assigned the new value. The type (N,C,L,D) is changed as required. STORE may also be used to assign values to fields in any open database. If the data type of the field is different than the "", a Syntax Error occurs. Use file ID prefixes ("J.".."S.") when the field is not in the currently selected area. Other dBMAN commands which create memory variables are: ACCEPT, COUNT, INPUT, SUM, RESTORE and WAIT. Esc ¯ CMD: see also: RELEASE, SAVE ~0 0~ DELETE FILE Delete the named file from DOS directory. When no filename extension is specified, dBMAN assumes that ".DBF" is the file extension. Files that are in use can not be deleted. DELETE [] [] [FOR ] Mark the current record (or all records that satisfy the optional "" and "FOR" conditions) for deletion. Deleted records are not physically removed from the DBF file until a PACK command is executed. Deleted records are displayed with a "*" character following the record number; can be made "invisible" by SET DELETED ON; can be tested for by the DELREC() function; and can be undeleted with the RECALL command. ^D ¯ RECALL ³ ^U ¯ ZAP ³ Esc ¯ CMD: see also: SET DELETED, EDIT ~18 67~ GO [] { | TOP | BOTTOM } GOTO [] { | TOP | BOTTOM } Move the record pointer in the current file (or in the file selected with the file ID "Fi" = FJ..FS). The record pointer can be moved to the record number given by "", or the record pointer can be moved to the first (TOP) or last (BOTTOM) record in the file. Note that TOP and BOTTOM are often NOT the first or last "physical" record if the file is indexed. Esc ¯ CMD: see also: SET RELATION TO, FIND, LOCATE ~0 0~ RECALL [] [] [FOR " and "FOR" conditions) in the currently selected file area or in the area specified by the optional file ID ("Fi" = FJ..FS). Records that have been removed by the PACK command can not be recalled. ^D ¯ PACK ³ ^U ¯ DELETE ³ Esc ¯ CMD: ~19 16~ PACK Physically remove all records in the current file ID which are marked as "deleted" records. ^D ¯ ZAP ³ ^U ¯ RECALL ³ Esc ¯ CMD: ~67 18~ JOIN TO FOR [] Create a new database "" from two currently open DBF files (one in area FJ..FR and the other in area FS). The new file structure is defined by the optional "" or combines all fields in both files. Each record in the currently selected DBF file (FJ..FR) is compared with EVERY record in the FS file according to the "FOR" expression. If the "" is true, a new record is appended t Example: SELECT | force current area to FP USE InvA | USE 1st file in FP USE FS InvB | USE 2nd file in FS JOIN TO NewInv FOR Price = S.Price Item,Supplier,Cost ^D ¯ UPDATE ³ ^U ¯ SORT ³ Esc ¯ CMD: see also: SET RELATION TO ~8 14~ SUM [] [] [TO ] [FOR ] SUM [] [TO ] [FOR ] Add the numeric values in the "" and store the total in the variables specified in the "". The expressions must yield a numeric result. The variables in the "" can also be a field name (in some other use area). The number of expressions in the "" must match the number of variables in t ^D ¯ COUNT ³ Esc ¯ CMD: ~54 0~ IF | executed only if is TRUE [ELSE ] | executed only if is FALSE ENDIF The "" logic expression is evaluated for a TRUE or FALSE result. If it is TRUE, all commands between the "IF" and "ENDIF" (or optional "ELSE" command) are executed. If it is FALSE, all commands between the optional "ELSE" command and "ENDIF" command are executed. If there is no "ELSE" command, execution continues with the first line following the "ENDIF". ^D ¯ ELSE ³ ^U ¯ ENDIF ³ Esc ¯ CMD: ~23 24~ [ ELSE ] [" is FALSE. ELSE is optional. Comments may be used following ELSE without the "|" comment character. (see also: NOTE for rules on use of comments) ^D ¯ ENDIF ³ ^U ¯ IF ³ Esc ¯ CMD: ~24 22~ ENDIF [] Terminate the prior IF command. Every IF command must have a corresponding ENDIF command or misleading error messages may result. e.g. "ENDDO without matching DO WHILE" can result from a missing ENDIF command. Comments may be used following ENDIF without the "|" comment character. (see also: "NOTE" for rules on use of comments) ^D ¯ IF ³ ^U ¯ ELSE ³ Esc ¯ CMD: ~22 23~ DO Execute the "" command file. The default file extension is ".PRG". see also: RETURN DO WHILE Execute all commands between DO WHILE and matching ENDDO while "" is TRUE. When "" is FALSE, execution continues after the ENDDO command. DO CASE Like IF...ELSE...ENDIF conditional command except DO CASE allows testing of many different conditions with selective execution of commands only for the first CASE which is TRUE. ^D ¯ ENDDO ³ ^U ¯ CASE ³ Esc ¯ CMD: ~27 34~ RETURN [TO ] Return control to the previous command file at the line following the calling DO command. When the "TO " phrase is used, dBMAN returns to the specified file (if it was in the calling "DO " program chain. If the "" i Esc ¯ CMD: see also: DO, CANCEL, QUIT ~0 0~ ENDDO [] Syntax: DO WHILE [LOOP] | force evaluation of the [EXIT] | force exit from the DO WHILE ENDDO Termination of a DO WHILE loop. The "" is evaluated the first time the DO WHILE command is executed. If it is FALSE, execution continues at the next line following ENDDO. If it is TRUE, all commands following the DO WHILE are executed until a LOOP o ^D ¯ LOOP ³ ^U ¯ EXIT ³ Esc ¯ CMD: ~29 63~ SKIP [] [] Move the record pointer forward or backward in the current file or the area specified by the optional file ID ("Fi" = FJ..FS). The record pointer moves forward if the "" is positive; backwards when negative. If no "" is specified, the record pointer advances one record. A SKIP beyond the TOP of file will set BOF() to TRUE; beyond the BOTTOM will set EOF() to TRUE. Esc ¯ CMD: ~0 0~ LOOP [] Used inside a command file DO WHILE ... ENDDO loop to force the immediate re-evaluation of the prior DO WHILE "" (as specified by the ""). When the is not specified, dBMAN loops back to the prior DO WHILE. DO WHILE DO WHILE LOOP | re-evaluate LOOP 2 | exit inner loop & re-evaluate ENDDO ENDDO ^D ¯ EXIT ³ ^U ¯ ENDDO ³ Esc ¯ CMD: ~63 27~ RENAME TO Change the old file name to a new file name in the DOS directory. The default file name extensions are ".DBF" if no extensions are specified. Esc ¯ CMD: ~0 0~ COMPARE TO [] Perform a comparison of all records in the currently selected DBF file with another specified database file. If a "" is specified, fields which are not in the list are ignored. COMPARE is for use at the CMD: prompt or for programmed applications which can not continue normal processing if the files do not compare correctly. Esc ¯ CMD: ~0 0~ LOCATE [" and "FOR" conditions until a record matching the "FOR " is found. That record becomes the current record. If the "" is large enough (ALL, NEXT 65000, REST, etc) and a matching record is not found, the EOF() flag is set to TRUE. To locate the next record that sa LOCATE saves the "FOR" expression and "" independently for each open file. i.e. CONTINUE can move each file record pointer independently. LOCATE with no "" and "FOR" arguments moves the record pointer to record 1. ^D ¯ CONTINUE ³ ^U ¯ FIND ³ Esc ¯ CMD: ~33 56~ CONTINUE [] Used in conjunction with the LOCATE command. CONTINUE moves the record pointer of the specified file to the next record satisfying the LOCATE expression associated with that file. A LOCATE command must be executed before using CONTINUE or an error message will result. ^D ¯ FIND ³ ^U ¯ LOCATE ³ Esc ¯ CMD: ~56 32~ CASE Select one of several possible choices, based on the result of the ""expression associated with each CASE. Only those commands between the first CASE that is TRUE and the following CASE, OTHERWISE or ENDCASE are executed. DO CASE CASE | Execute if is TRUE CASE | Execute if is TRUE [OTHERWISE Execute if every CASE is FALSE ] ENDCASE ^D ¯ OTHERWISE ³ ^U ¯ ENDCASE ³ Esc ¯ CMD: ~35 36~ [OTHERWISE []] An optional command used with the DO CASE..ENDCASE commands. The commands between OTHERWISE and ENDCASE are executed when all the prior CASEs are FALSE. Use of the OTHERWISE command without a DO CASE command is invalid. DO CASE CASE CASE [OTHERWISE Execute only if every CASE is FALSE ] ENDCASE ^D ¯ ENDCASE ³ ^U ¯ CASE ³ Esc ¯ CMD: ~36 34~ ENDCASE [] Every DO CASE command must be terminated by a corresponding ENDCASE. Comments may be used following ENDCASE without the "|" comment character. see also: NOTE for rules on use of comments DO CASE CASE CASE [OTHERWISE ] ENDCASE ^D ¯ CASE ³ ^U ¯ OTHERWISE ³ Esc ¯ CMD: ~34 35~ @ [{SAY | ESAY} [ = where "x" = line number 0..24, "y" = column number 0..79 SAY displays the result of the expression using the optional "USING" format at "". ESAY erases the line from "" to the end of line before the "" data is displayed. Both use the VSAY() video attributes. GET will display the variable or field specified using the VGET() video attributes. When a READ command is issued, the cursor will go to the GET and allow data entry. GET can not be used to create a new variable or change its data type. Use the "Esc" @ ERASE Erases the display to the right of and below the "" position. ^D ¯ READ ³ ^U ¯ CLEAR ³ Esc ¯ CMD: ~38 40~ READ Used in a command file to read user input from the screen. You create input prompts and screen displays by using @ SAY and GET. The READ command can be used to get user data for up to 64 GETs. READ automatically CLEARs all GETs. Example: STORE SPACE(20) TO Var1,Var2 | initialize variables @ 3,0 SAY "First Name: " GET Var1 | write prompts & @ 4,0 SAY "Last Name: " GET Var2 | variables to screen READ | get user input ^D ¯ CLEAR ³ ^U ¯ @ GET ³ Esc ¯ CMD: ~40 37~ ERASE The ERASE command clears the display in the data window. The coordinates associated with the "@" command ( ROW() and COL() ) are reset to 0, 0. ^D ¯ CLEAR ³ Esc ¯ CMD: ~40 0~ CLEAR RELEASE ALL memory variables and CLOSE ALL open database files. CLEAR { GET | GETS } Clear all of the previously issued GET commands. Each time a READ command is executed, data may be entered into all open GETs. When the last field is entered, the GETs are automatically CLEARed. The CLEAR GETS command is optional for compatibility with dBASE. ^D ¯ @ GET ³ ^U ¯ READ ³ Esc ¯ CMD: ~37 38~ ACCEPT { [""] [TO [PICTURE ]] } Read a character string from the keyboard into the named variable or field- name. If "" is not a field (and no variable with that name exists) a new variable is created automatically. The "TO " is always a character data type. The optional "PICTURE" clause allows programmed control of data entry in the same way th ^D ¯ INPUT ³ ^U ¯ WAIT ³ Esc ¯ CMD: ~42 43~ INPUT { [""] [TO ] } Read any type of data from the keyboard and store it in the "TO ". Date, Logic and Numeric data may be entered directly. Character type data must be surrounded by quotation marks or square brackets ([ ]). Date type data may be entered using curly b ^D ¯ WAIT ³ ^U ¯ ACCEPT ³ Esc ¯ CMD: ~43 41~ WAIT [""] [TO ] Command file execution to wait until any key is pressed. The key can be stored in the "TO " variable as a character data type. If the "TO " does not exist, the WAIT command will create it. If the optional "" is specified, it will be ^D ¯ ACCEPT ³ ^U ¯ INPUT ³ Esc ¯ CMD: ~41 42~ ? [ [USING ]] [,ESC()] The "" is evaluated and displayed on the next line. (A CR/LF is issued before displaying the result.) The display location is the line following the current cursor position. The "" and "ESC()" phrases may be repeated but must be separated by c The "ESC" phrase is used to send a string of control codes to the printer. ESC() does not display these codes on the screen. Non-printable codes must be enclosed in angle brackets "<", ">". e.g. ESC("<27>D<0>") will send the byte sequence 27, 68, 00 to the printer. Use SET PRINT ON command to output to the printer. SET CONSOLE OFF to suppress output to the data window. ^D ¯ ?? ³ Esc ¯ CMD: ~60 0~ PRINT not supported for Amiga!!! ^D ¯ EJECT ³ ^U ¯ FORMFEED ³ Esc ¯ CMD: ~46 59~ EJECT Send a page eject (Form Feed code) to the printer. Set the values of the dBMAN internal line and column counters to zero. see also: SET FOOTER, SET HEADING, SET LINE COUNT, SET PRINT ^D ¯ FORMFEED ³ ^U ¯ PRINT ³ Esc ¯ CMD: ~59 45~ INDEX [] ON TO [{ASCE | ASCENDING} | {DESC | DESCENDING}] Create an index "" for the current database file or the DBF file specified by the optional "Fi" file ID phrase. The components of the index key "" must be of the same data type. see also: CLEAR, SET INDEX TO, SET SAFETY ^D ¯ REINDEX ³ ^U ¯ CLOSE ³ Esc ¯ CMD: ~57 7~ RELEASE { [] ALL | } Memory variables are deleted explicitly (by the "") or in groups. If ALL is used without a "Fm" memory area phrase (FX, FY or FZ) then the GLOBAL memory variables are deleted. FY memory variables are released when execution returns to the callin see also: CLEAR, STORE, SAVE, RESTORE Esc ¯ CMD: ~0 0~ SAVE [FY | FZ] TO Store all global (or local FY or FZ) memory variables to the specified "" file. dBMAN assigns a filename extension of ".MEM" when one is not specified by the user or program. Note: A special file ($MEM.MEM) is used by dBMAN to retain local "Y." variables for programs which call subprograms two or more levels deep. ^D ¯ RESTORE ³ Esc ¯ CMD: ~50 0~ RESTORE [] FROM Read the "" of memory variables previously saved with the SAVE command and place them all into the memory area specified. The default area is GLOBAL memory. If you specify "Fm" (FX, FY or FZ), the memory variables are restored to that area rather than to the GLOBAL area. Note: Before memory variables are restored, ALL existing variables are released in the memory area selected by the RESTORE. ^D ¯ SAVE ³ Esc ¯ CMD: ~49 0~ NOTE [] * [] | [] The NOTE and "*" commands allow comment lines in a program ".PRG" file. The comment "" can consist of any ASCII printing characters. The entire line following the "NOTE", "*" or "|" is dedicated to comments. The "|" character may be used anywhere in a command line to indicate that the remainder of the line is comments only. When the "|" character occurs within a quoted character string, the character is treated as normal text. Note: DO NOT use "|" following the ";" line continuation character. Esc ¯ CMD: ~0 0~ SET Switches: SET BREAK {on|OFF} ON enable debug SET CONFIRM {on|OFF} ON require ÄÄÙ to accept data to READ & EDIT SET CONSOLE {ON|off} OFF suppress "?/??" output to screen SET DELETED {on|OFF} ON ignore deleted records SET ESCAPE {ON|off} OFF disable "Esc" key sensing SET EXACT {on|OFF} ON force full compare SET PRINT {on|OFF} ON enable "?/??" output to printer SET SAFETY {ON|off} OFF enable overwrite of existing files SET TALK {ON|off} SET BREAK TO [,] SET DATE TO 0=MM/DD/YY 1=DD/MM/YY 2=YY/MM/DD SET DEFAULT {DBF|NDX|TXT|MEM|PRG|SYSTEM} TO [:] SET DEVICE TO {SCREEN | printer} ^D ¯ SET page 2 ³ Esc ¯ CMD: ~92 0~ Terminate the execution of a "DO" program file. Return dBMAN to the interactive keyboard "CMD:" mode. ^D ¯ PAUSE ³ ^U ¯ QUIT ³ Esc ¯ CMD: ~62 11~ COUNT [] [] [FOR ] [TO ] Count the number of records (qualified by the optional "" and "FOR" conditions) in the current file (or the DBF file specified by the "Fi" file ID). The result is stored in the variable specified by the optional "TO" phrase. ^D ¯ SUM ³ Esc ¯ CMD: ~21 0~ UNPEND [] Physically remove the last record of the current file, or from the file specified by the optional file ID ("Fi" = FJ..FS). This allows fast removal of unwanted blank records from the end of the file and is much faster than DELETE and PACK for such removal. Note: Not supported in the Multi-User version. ^D ¯ APPEND ³ Esc ¯ CMD: ~4 0~ FIND [] Search for the first index key matching the "" in the current DBF file using the "master" INDEX file. If no matching records are found, then EOF() is set to TRUE and the record pointer is set to one greater than the number of records in the file. Note: The first index file in the USE command or the latest index file in a SET INDEX TO command is the "master index". ^D ¯ LOCATE ³ ^U ¯ CONTINUE ³ Esc ¯ CMD: see also: SET INDEX TO ~32 33~ REINDEX [] Rebuild all index files used with the current DBF file. The optional "Fi" file ID (FJ..FS) permits reindexing files in unselected DBF areas. ^D ¯ USE ³ ^U ¯ INDEX ³ Esc ¯ CMD: see also: SET INDEX TO ~6 47~ LIST [] [] [] [FOR ] [OFF] [TO PRINT] List all records that satisfy the "" and "FOR" condition in the specified file. The OFF option shuts off display of record numbers. LIST [] MEMORY [TO PRINT] List the GLOBAL (or selected "Fm" = FX, FY or FZ) memory variables and contents. The "F7" key in debug or command mode will also display memory. LIST [] STRUCTURE [TO PRINT] List the record structure (fieldname,type,width,decimal) of the DBF file. LIST FILE [] List files in DOS directory according to . "*.DBF" is default. ^D ¯ DISPLAY MEMORY/STRUCTURE/FILE ³ ^U ¯ DISPLAY Records ³ Esc ¯ CMD: ~3 83~ FORMFEED Issue carriage returns until the line count equals the sum of the current TOP MARGIN, BOTTOM MARGIN and LINE COUNT settings. see also: SET LINE COUNT, SET PRINT TO ^D ¯ PRINT ³ ^U ¯ EJECT ³ Esc ¯ CMD: ~45 46~ ?? [ [USING ]] [,ESC()] Identical to the "?" print command except no CR/LF sequence is output before the print expressions and/or ESC() codes are sent to the screen and/or the selected printer device. BEEP Output a brief "beep" sound. Esc ¯ CMD: ~0 0~ PAUSE Suspend execution of the command file on the next command. PAUSE is used for program debugging. When command file execution is paused, you can display variables with the "F7" key, display environment switches and files with the "F8" key, edit and save program line changes with the "^F1" key, delete the program lines wit ^K ... KILL program execution ^L ... reLoad the line (unparsed) from the PRG file ^R ... Resume normal execution ^T ... execute the current program line (single step) see also: SET BREAK ~11 53~ EXIT [] Used inside a DO WHILE...ENDDO loop (or "nested" loops) in a command file. EXIT unconditionally terminates the DO WHILE loop and execution resumes on the command following the ENDDO statement. When is specified, dBMAN unconditionally exits out of the Nth level of DO WHILE nesting. Note: When EXIT is executed within a trapfile, the effect is the same as if it was executed in place of the command which invoked the error trap. CONVERT TO Convert a dBASE II DBF file to dBMAN DBF file. "" is the dBASE II database file name and "" is the dBMAN file name. When a file is specified without an extension, dBMAN will assume the extension is ".DBF". If both file names are the same, dBMAN will rename the dBASE II file using a ".DBB" file name extension. ASSIGN Execute any dBMAN function where output to the screen, printer, a variable or a DBF field is not required. It is intended primarily for use with the dBMAN machine code interface functions. Example: ASSIGN AH(205), BX(3) INT21 INT21 Execute DOS interrupt 21 (hex). Used in conjunction with the dBMAN machine code interface functions. DOS calls which require changing the value of the DS or ES registers are not supported. ZAP [] Equivalent to DELETE ALL and PACK. Eliminates all records from the current DBF file or the file in the specified file ID (FJ..FS). All unused file space is returned to the DOS directory. INTXX Execute the BIOS/DOS interrupt specified by the previous "SET INTXX TO" command. Used in conjunction with the dBMAN machine code interface. The programmer has raw access to the machine. Example: SET INTXX TO 20 | 20 decimal = 14 hex ASSIGN AH(0), AL(162), DX(1) | Set COM2: RS-232 port to 2400 baud, INTXX | 7bits/char, no parity bit, 1 stop bit COL()........................... Cursor Location DAY()..................... Day of Month (1..31) DOW()..................... Day of Week, 1..7 (Sun..Sat) ERRCODE([])............... Error Status FRAC().................... Nexp - INT(Nexp) INKEY([])................. Get KeyCode INT()..................... Integer LASTKEY()....................... Last Key Pressed in READ LASTREC([])................. Last Physical Record LEN()..................... String Length LOG()..................... Log base 10 LN()...................... Log base e MAX(,)............ Max of Two Expressions MIN(,)............ Min of Two Expressions MONTH()................... Month 1..12 NLIST(,)........... Which Item of List is Nexp PAGENO().................. Current Page & inc by Nexp PROW().......................... Print Line Number RANK().................... Decimal Value of Char RECNO([])... and "#"........ Current Record RETRYCNT([]).............. Multi-User ONLY ROW()........................... Cursor Location, 0..24 SRCH(, [,]). Location of [nth] Sexp1 in Sexp2 TIMECNT([])............... Multi-User ONLY TOKENS(,)......... Occurrences of Sexp1 in Sexp2 HOW TO GENERATE REPORTS To generate a report, you must: 1) group the data that you want to put in the report 2) define the format of the report 3) use the database 4) and output the report. 1. Group the data with the SORT or INDEX command. USE INDEX ON TO or SORT ON TO Ex: USE INVENT INDEX ON CATEGORY TO INVENT 2. Define the format of the report with the CREATE REPORT command. CREATE REPORT Ex: CREATE REPORT INVENT Use MODIFY REPORT to edit the format of the report: The CREATE REPORT command allows you to define the page definition, how the data are grouped, and the content and format of each column. You can format up to 20 columns in your report. The command saves the definitions in the format file . Each part of the report definition is described below. Use UpArw and DnArw to move from field to field and ^U (PgUp) and ^D(PgDn) to move from page to page. The "Page Definition" screen defines the page layout of your report. In this section, you define page headers, footers, margins, etc. Heading, Heading2 -- This are the page heading and the text appear at the beginning of every page. You can have up to two lines in your heading. Leave these blanks if you don't need it. If you want the page number to be in the heading, use one of these for page numbers. Footer: -- This is the page footer and the text appears at the bottom of every page. Leave these blanks if you don't need it. For example, page numbers or version numbers can be put in the footer. Title 1, 2, 3, 4: -- This text is like heading/heading2 except it is automatically centered, and appear after heading/headings on every page. The report title can be up to four lines. Page width (# chars): -- Defines the page width, in number of characters. A typical 8 1/2" x 11" piece of paper is 80 characters wide. Left margin (# chars): -- Defines the size of the left margin in number of characters. Top margin (# lines): -- Defines the top margin of the page in number of line spaces. Bottom margin (# lines): -- Defines the bottom margin of the page in number of line spaces. # lines per page: -- Defines how many lines of text per page. Column spacing: -- Defines how many spaces between columns. Double space report? (Y/N): -- Enter a "Y" for a double-spaced report, an "N" for a single-spaced report. NOTES: 1. ALL titles (Heading,Heading2,Footer, Title 1,2,3,4) MUST use string expressions. Example: "ANNUAL REPORT.." Y.memtitle + "1986" 2. Margins, and line count work exactly like the SET MARGIN and SET LINECOUNT commands. Press ^D (PgDn) to define how the data are grouped, the group heading and footer and the grand total text. Group on: -- Use the same field here that you used to sort or index your database. The report puts a blank line after each group. Summary report only? (Y/N): -- Enter "Y" if you only want a summary of the group without listing each record of the group. Enter "N" if you want the individual records listed as well as the summary. Eject after each group? (Y/N): -- Enter "Y" to start a new page for each new group. Group heading: -- The text appears at the beginning of each new group. Group footer: -- The text appears at the end of each group. If a Group footer is not specified (blank), the subtotals for the group are not displayed. If you want subtotals but do not want the footer text enter a blank string (" ") for the footer. Total heading: -- The text appears at the end of the report. If the Total heading is not specified (blank), the grandtotals for the groups are not displayed. NOTES: 1. ALL titles (Group heading,Group footer, Total headings) MUST BE string expressions. Example: "ANNUAL REPORT.." Y.memtitle + "1986" Press ^D (PgDn) to define the format of the columns of your report. You can have up to 20 columns in your report. Field contents: -- Defines the data that appears in each column. Use the same name of the field that you used in the database. DO NOT enclose field names in quotes. Note: The REPORT command automatically inserts commas, for Numeric fields. Use STR() function if you do not want the commas. Ex: STR(QTY,4) Width: -- Defines the width of the column in characters. A zero (0) in this field means there are no more columns in the report. # decimal places: -- Defines the number of decimal places if the field is numeric. Total? (Y/N): -- Enter a "Y" if you want a subtotal or grand total of the group in the column, an "N" if you do not. Field header 1,2,3, or 4: -- The titles of the column. The text is not centered, and you can have up to four lines of text per title. Enter an asterisk (*) in any of these headers in the FIRST COLUMN definition, to suppress the line. If the header is not specified (blank) it shows up as a blank line. NOTES: 1. Field header 1,2,3,4 MUST BE string expressions. Example: "ITEMS.." Y.memtitle + "===" + SPACE(4) Press the ^D (PgDn) key to define the next column. Press ^U (PgUp) to go back to previous page. This is an example of a report generated by grouping on a field called "category" from a database called "INVENT". First you see the screens from the CREATE REPORT command, then the report as it looks when output. The text in square brackets in the output corresponds to the formatting field of the CREATE REPORT command. Use only string expressions for the headings, footer, and titles. You can use valid string operators or functions in the headings, footer and titles. Do not use macros. Page Definition Heading: Heading2: DTOC(DATE()) Footer: "Page"+STR(PAGENO(1),3) Title 1: Title 2: "Inventory for ABC Grocery" Title 3: "=========================" Title 4: Page width (#chars): 75 Left margin (#chars): 5 Top margin (#lines): 1 Bottom margin (#lines): 1 # lines per page: 16 Column spacing: 2 Double space report? (Y/N): N Note: Heading2, Footer, Title 1,2,3,4 are string expressions. Note: If the heading is already set with SET HEADING TO command, the REPORT command IGNORES the following parameters in the report form file: Heading Heading2 Footer Left margin Top margin Bottom margin Lines per page This feature allows you to use the same headings which you have used in the previous output. For example, include the report with other reports. To use the parameters in the report form file clear the heading register with SET HEADING TO command before executing the REPORT command. Note: The REPORT command will NOT clear the parameters after the REPORT command is completed. 07/05/86 [Heading2] Inventory for ABC grocery [Title 2] ========================= [Title 3] QTY UNIT Items ONHAND PRICE SUPPLIER ===== ====== ===== ======== ***** Category = BAKING CAKE:MIX 1,234 1.75 PILLSBURY SUGAR 3,456 2.39 BROTHERS:DIST FLOUR 999 1.09 GOLD:MEDAL ***** subtotal... 5,689 5.23 ***** Category = BREAD WHEAT:BREAD 400 1.23 HVNLY:BKRY RAISIN:BREAD 470 0.67 HVNLY:BKRY Page 1 [Footer] The second screen of the CREATE REPORT command defines the group format. Group on: category Summary report only?(Y/N): N Eject after each group?(Y/N): N Group heading: "*****Category="+category Group footer: "*****subtotal..." Total heading: "*****grandtotal..." (The "*****grandtotal..." text appears after the last group) 07/05/86 Inventory for ABC grocery ========================= QTY UNIT Items ONHAND PRICE SUPPLIER ===== ====== ===== ======== ***** Category = BAKING [Group heading] CAKE:MIX 1,234 1.75 PILLSBURY SUGAR 3,456 2.39 BROTHERS:DIST FLOUR 999 1.09 GOLD:MEDAL ***** subtotal... [Group footer] 5,689 5.23 ***** Category = BREAD [Group heading] WHEAT:BREAD 400 1.23 HVNLY:BKRY RAISIN:BREAD 470 0.67 HVNLY:BKRY Page 1 The next screen of the CREATE REPORT command defines the format of each column of the report: Field 1 Field contents: item Width= 25 # decimal places: 0 Total? (Y/N): N Field header 1: Field header 2: "Items" Field header 3: "===" Field header 4: * [suppress blank line] The width of the column is 25 characters wide. "item" is the field name of your database. Up to 20 columns can be specified in the report. When you enter a width of 0, there are no more columns in the report. 07/05/86 Inventory for ABC grocery ========================= QTY UNIT Items [Field header 2] ONHAND PRICE SUPPLIER ===== [Field header 3] ====== ===== ======== ***** Category = BAKING CAKE:MIX 1,234 1.75 PILLSBURY SUGAR 3,456 2.39 BROTHERS:DIST FLOUR 999 1.09 GOLD:MEDAL ***** subtotal... 5,689 5.23 ***** Category = BREAD WHEAT:BREAD 400 1.23 HVNLY:BKRY RAISIN:BREAD 470 0.67 HVNLY:BKRY Page 1 3. Use the database. USE (if sorted) or USE INDEX (if indexed) Ex: USE INVENT INDEX INVENT 4. Output the report with REPORT command. REPORT FORM (to display on the screen) or SET PRINT TO (to ouput to a disk file) REPORT FORM TO PRINT (to print on the printer or a disk file) Ex: REPORT FORM INVENT TO PRINT ***** NOTE: ****** If the heading is already set with SET HEADING TO command, the REPORT command IGNORES the following parameters in the report form file (fileFRM): Heading Heading2 Footer Left margin Top margin Bottom margin Lines per page This feature allows you to use the same headings which you have used in the previous output. For example, include the report with other reports. To use the parameters in the report form file clear the heading register with SET HEADING TO command before executing the REPORT command. Note: The REPORT command will NOT clear the parameters after the REPORT command is completed. dBMAN for Amiga version 2.02 Note: To ensure dbman of enough stack space, execute STACK 9000 before executing dbman. The following commands/functions ar e not supported in this version inorder to make DBman can run with 512K ram. Commands: * JOIN * MERGE * MODINDEX * UNINDEX Functions: * BYTE * LN * LOG * LOGOUT * SAVESCREEN * WORD * STK * PRNFLG * OFFSET * EXP * FLAGS * WORD The following specifications were also changed for memory requirement. Database file specification Fields per record 64 Bytes per record 2000 Records per file 2 billion Active database files 10 Local memory variables Number of variables 32 Total number of bytes 1000 BEEP command does not produce a beep sound but it will flash the screen. Use Shft-> and Shft<- keys instead of ^-> and ^<- keys. DISKSPACE function requires different parameter. DISKSPACE() The function returns the number of free bytes on the disk. You need to specify the drive name. Ex: ?DISKSPACE("df0:") 33184 REPORT.DOC A text file (REPORT.DOC) is included on the disk to describe in detail on how to generate a report.