Digital PDFs
Documents
Guest
Register
Log In
AA-CL61A-XV
2000
26 pages
Original
7.2MB
view
download
OCR Version
3.7MB
view
download
Document:
Rainbow dBASE II Command and Reference Pocket Guide
Order Number:
AA-CL61A-XV
Revision:
0
Pages:
26
Original Filename:
OCR Text
Q , % . g dBASE II An MSTM-DOS Application Command and Reference Pocket Guide dBASE II° An MSTM-DOS Application for the RainbowTM Command and Reference Pocket Guide Developed by: Ashton-Tate, Inc. 10150 West Jefferson Blvd. Culver City, CA 90230 Digital Equipment Corporation Maynard, MA 01754 First Printing The software described in this manual is distributed as part of Digital Equipment Corporation’s Digital Classified Software (DCS) Program. This program enables software developers to submit their software products to Digital for testing according to Digital quality standards for third party software. This software product has met the DCS standard specified in the software product description (SPD) for this product. You should refer to the SPD for information about these standards, the hardware and software required to run this product, and warranties (if any warranty is available). The software described in this-manual is furnished under a license and may only be used or copied in accordance with the terms of that license. This manual is reproduced with the permission of Ashton-Tate, Inc. Copyright © 1984, by Ashton-Tate, Inc. All Rights Reserved. Except as may be stated in the SPD for this product, no responsibility is assumed by Digital or its affiliated companies for use or reliability of this software, or for errors in this manual or in the software. Additional support and/or warranty services may be available from the developer of this software product. Digital has no connection with, and assumes no responsibility or liabilities in connection with these services. This manual is subject to change without notice and does not constitute a commitment by Digital. dBASE II is a registered trademark of Ashton-Tate, Inc. MS-DOS is a trademark of Microsoft Corporation. The following are trademarks of Digital Equipment Corporation: DEC DECmate DECnet DECsystem-10 DECSYSTEM-20 DECUS DECwriter DIBOL MASSBUS PDP P/0OS Professional Rainbow RSTS RSX VAX VMS VT Work Processor ilgliltlall dlilgliltall Contenis InfroductoryNote ......................... 1 Conventions ................ e 1 Typographical Conventions . ................. 1 File NamingConventions . ................... 1 Field Naming Conventions . .................. 1 Limitations . .......... . coiiiiiiiiiinn.. 1 ABASENDAtaTYPES ... oovv i eeeieeieennnnn 2 Cursor Movement and Control Keys ...... 2 Full ScreenOperation ..........cccvivivenn... 2 dBASENlFleTypes ........cvvvvvnunennnS 2 TemMminology .. .vvi it 3 Operators Used for Data Manipulation ......... 4 Functions ................................. 5 dBASEICommands ...................... 7 SetCommands ................ccovviinn. 14 Structured Programming Commands. . ... 17 i Introductory Note This Pocket Guide is designed to supplement the dBASE II User’s Guide and dBASE II Reference Manual as well as the HELP file. The Guide has been created to give you immediate access to information vital to the operation of the dBASE II program. Where necessary, references to the dBASE II User’s Guide and Reference Manual have been placed in parenthesis. ‘G’ (for Guide) indicates a reference to the User’s Guide; ‘R’ (for Reference) indicates a reference to the Reference Manual. (Because the Reference Manual is alphabetically ordered, page referrals for dBASE II commands have been omitted.) Conventions Typographical Conventions Lowercase user-supplied information UPPERCASE explicit portions of dBASE Il commands [...] optional portions of dBASE 11 commands <...> user-supplied portions of dBASE 11 commands File Naming Conventions File names may be up to 8 characters (no spaces) long (See G2-2) Field Naming Conventions Field names may be up to 10 characters (no spaces) long, must start with a letter, but can include digits and embedded colons (see G2-3) Limitations (See RB-1) dBASE |l Data Types (See GZ»S,I R1-5) C Character data. Includes any printable console (ASCII) character. N Numeric data for calculation. Includes numbers, +, —. L Logical data. Includes Y,y, T,t for True, or N,n,F.f for False Cursor Movement and Control Keys Full-Screen Operation (all modes): For special controls used in conjunction with Edit, Modify, Append, Create or Insert, see (G2-34, 2-35 or R5-1 - 5-5. PREVIOUS RECORD ;Qfiag?g; FIELD wa&afg DATA 7 / ——— ?;XETMNGSAQX’E“M{{QE; CINSERT/OVERWRITE NEXT RECORD dBASE Il File Types PRG command file (See R1-9, G4-1) .DBF database file (See R1-7, G2-2) FMT format file (See R1-10, G5-16) FRM report form file (See R1-10, G3-44) 2 .MEM memory file NDX index file (See R1-9) (See R1-10, G3-38) JTXT text output (See R1-10, G3-27, 3-31, 5-11) Terminology (See R6-1) <commands> or any valid dBASE command or <statements> function <cstring> character string(s) In most instances must be delimited with single quotes (‘ '), double quotes (““ ), or brackets ([ ]) <estring exp> an <exp> whose contents is defined as Character in type. May be a cstring, a memvar or field with character content, or any combination of these items and operators. <delimiter> any non-alphanumeric character used to demarcate data, e.g., single quotes (‘ ), double quotes (*“ '), brackets ([ ]), colons (: :), commas (,,), etc. <exp> or <expression> an item or group of items and operators whose value can be determined by dBASE II. <exp>s may be defined as C, N, or L depending upon the “type” of data they contain. <exp list> a list of expressions delimited with commas. <field> a record field name. <field list> a list of field names delimited with commas. <file> | name of file you wish to create or access. <Index file> name of index file you wish to create or access. <key> the portion(s) of a database file used to create an index file. the name of a memory variable. <memvar> <memvar list> list of memory variables delimited with commas. a number which dBASE II regards <n> as a literal value. <numeric exp> an <exp> whose content is defined as Numeric. command option specifies range of <scope> records dBASE II must treat in executing command. <scope> has three possible values: ALL records in file, NEXT n records in file; and RECORD n. Default value varies from command to command. <skeleton> allows batch manipulation of files of same type and/or with matching cstring in filename; allows batch manipulation of groups of <memvars> with matching cstring In name. Operators Used for Data Manipulation (See G3-8, R2-10) Logical Operators (listed in order of precedence) () parentheses for grouping NOT. logical not (unary operator) 4 AND. logical and OR. logical or $ substring logical operator Arithmetic Operators (listed in order of precedence) () parentheses for grouping * multiplication / division + addition - subtraction Relational Operators < less than > greater than = equal to <> or # not equal to <= less than or equal to” >= greater than or equal to String Operators + - string concatenation string concatenation blanks moved to far right Functions (See R2-1 - 2-9, G5-1 - 5-7) * deleted record function evaluates as a logical True if current record is marked for deletion. —— T # record pointer (a system memory variable) stores the number of the current record. & macro function permits the use of a <memvar>’s stored value in a command line. (<memvar>’s value must be a ‘cstring’) I(<cstring exp>) upper case function converts all lower case characters to upper case. $(<exp>, <start>, <length>) substring function extracts the specified part of <exp=> from the given starting position for the given length. @(<cstring exp 1>, <cstring exp 2>) substring search function yields an integer value indicating where the first string appears in the second. CHR?({’mzmeric exp>) yields the ASCII character equivalent of a numeric expression. DATE () name of system variable containing the system date EOF End-Of-File function evaluates as a logical True when last record of USE file has been surpassed. FILE (<file>) file function evaluates as a logical True if named file exists on disk in use. INT (<numeric exp>) integer function truncates everything to the right of the decimal to form an integer. LEN (<cstring exp>) length function returns the number of characters in the specified <cstring exp>. 6 RANK (<cstring exp>) returns the (ASCII numeric) value of the leftmost character of <cstring exp>. STR (<numeric exp>, <length>, [<decimals>]) string function converts specified portion of <numeric exp> into a cstring. TEST (<exp>) test can be used to determine if an expression is valid. TRIM (<cstring exp>) trim function removes trailing blanks from specified cstring. TYPE (<exp>) type function indicates data “type” of indicated <exp>. VAL (<cstring exp>) value function converts a cstring (composed of numerals) into a numeric expression. dBASE || Commands ?<exp> evaluates and displays value of <exp>. (See G2-23) @<coord> [SAY <exp> [USING ‘picture’]][GET <var> [PICTURE ‘picture’]] format console screen or printer output. (See G4-11, 5-13) ACCEPT [‘prompt’] TO <memvar> prompts user to input cstring into specified <memvar=>. Input requires no quotes. (See G4-10) APPEND [BLANK] add record(s) or blank, formatted record to database file. (See G2-26) APPEND FROM«<file> [SDF] or [DELIMITED][FOR<exp>] appends data from a database or system data format file into database file in use. (See (G3-26) BROWSE [FIELDS<field list>] allows full screen “window” viewing and editing of database file in use. (See G2-8) CANCEL aborts command file execution. CHANGE [<scope>] FIELD <list> [FOR <exp>] permits selective editing of records by field. (See G3-34) CLEAR “resets” dBASE. (See G4-20) CONTINUE continues a LOCATE command. (See G3-42) COPY TO <file> STRUCTURE [FIELD <list>] copies structure of file in use to designated file. (See G3- 21) COPY TO <file> [<se§pe>}[FIELD <list>] [FOR <exp>] copies file in use to designated database file. (See G3-22) COPY TO <file> [<scope>] [FIELD<list>] [SDF] [DELIMITED [WITH <delimiter>]] [FOR <exp>] copies data from file in use to file with designated name and format. (See (G3-29) | COPY TO <file> STRUCTURE EXTENDED creates a database file whose records represent the structure of the file in use. (See G3-23) COUNT [<scope>][FOR <exp>][TO <memvar=>] counts records that satisfy some condition. Default value is all records. (See G3-49) CREATE |[<file>] initiates creation of database file. (See G2-2) CREATE <newfile> FROM <oldfile> EXTENDED creates database file whose structure is determined by the data contained in the records of the <oldfile>. (Used with COPY STRUCTURE EXTENDED. (See G3-25) DELETE [<scope>][FOR <exp>] marks specified records for deletion. (See G2-28) DELETE FILE <file> deletes specified file. (See G2-28-2-29) DISPLAY [<scope>][<field list>][FOR <exp>][OFF] displays records of database file in use. (See G2-18) DISPLAY FILES [ON <disk drive>] [LIKE <skeleton>] | displays files on disk. Default values: database files, logged drive. (See G2-20) , DISPLAY MEMORY displays current <memvars>s. (See G3-7) DISPLAY STATUS displays system information: e.g., system date, files open, index files and keys, and all SET parameters. DISPLAY STRUCTURE displays structure of file in use. (See G2-20) EDIT [n] initiates selective editing of database file in use. (See G2-7) e EJECT commands printer to perform a form feed (eject page) ERASE clears console screen. (See G4-17) FIND <cstring> locates first record in indexed database file whose <key> matches the specified <cstring>. (See G3-41) GO or GOTO <n> or <TOP>, or <BOTTOM> positions to specific record or place in the database file in use. (See G4-20) HELP [<command verb or other entry>] accesses Help File overview or specific Help File entry for brief explanation of specified command mode, function, etc. INDEX ON <key> TO <file> creates an index file for the database in use. (See (G3-38) INPUT [‘prompt’] TO <memvar> prompts user to enter <exp> into already named <memvar>. (See G4-11) INSERT [BEFORE][BLANK] inserts a new record anywhere in database file. (See G2- 26) JOIN TO <file> FOR <exp> [FIELDS <list>] creates new database file by merging records of files in use in Primary and Secondary areas for which FOR <exp> evaluates as logical True. (See G5-12) LIST [<scope>][<field list>][FOR <exp>][OFF] lists records of file in use. (See G2-13) LIST FILES [ON <disk drive>][LIKE <skeleton>] lists files on disk. Default values: logged drive, database files. (See G2-17) 10 LIST MEMORY lists current <memvars>. (See G3-7) LIST STATUS lists system information e.g., system date, files open, index files and keys, and all SET parameters. LIST STRUCTURE displays structure of file in use. (See G2-17) LOCATE [<scope>][FOR <exp>] finds first record which satisfies specified condition. Use Continue to reach next such record. (See G3-43) MODIFY COMMAND <file> calls dBASE II's text editor and brings up designated file for modification. (See G4-2) MODIFY STRUCTURE allows structural modification of database file in use. (See (G3-16) NOTE or * commands dBASE II not to read the rest of command line. Used to insert programming comments in command files. (See G4-15) PACK eliminates records marked for deletion. (See G2-29) QUIT [TO <list MS-DOS level commands or .COM files>] terminates dBASE II and returns control to operating system. Optionally calls system level programs. (See G1-5) READ initiates full-screen editing of a formatted screen, and accepts data into GET commands. (See G4-13) RECALL [<scope>][FOR <exp>] reinstates records previously marked for deletion. (See G2-29) REINDEX updates index files not in use during alteration of corresponding database file. RELEASE [<memvar list>] or [ALL] or [ALL LIKE <skeleton>] or ALL EXCEPT <skeleton>] “eliminates unwanted <memvars> from current memory. (See G3-5) REMARK permits display of following characters. In command file is used to output comments to screen or print. (See G4-20) RENAME <oldfile> TO <newfile> permits renaming of file. (See G4-20) REPLACE [<scope>] <field> WITH <exp> [,<field2> WITH <exp2>... ][FOR <exp>]- replaces the value of specified fields of specified records with stated values. (See G3-32) REPORT [FORM <filename>][ <scope>][FOR <exp>][TO PRINT] generates or accesses existing Report Form File for output of data in user-defined format. (See G3-44) RESET [<drive>] reset MS-DOS after disk swap. RESTORE FROM <file> [ADDITIVE] retrieves and activates <memvars> previously saved in .MEM file. Deletes all current <memvars> unless Additive option employed. RETURN terminates a command file and returns control to calling file or interactive mode. 12 SAVE TO <file> [ALL LIKE <skeleton>][ALL EXCEPT <skeleton>] | saves all current (designated) <memvars> to .MEM file. SELECT [PRIMARY] or [SECONDARY] switches between dBASE II's primary and secondary work areas. (See G4-19) SET see below for all SET commands. SKIP [+/—n] moves forward or backwards through the records of the file in use. Default value: +1, +n. (See G2-21) SORT ON <key> TO <file> [ASCENDING] or [DESCENDING] creates a version of the database file in use whose records are arranged alphabetically or numerically according to the information contained in the field specified as the SORT <key>. Default value: ascending. (See G3-36) STORE <exp> TO <memvar> computes the value of <exp> and stores it to the designated <memvar>. (See G3-4) SUM <field list> [TO <memvar list>] [<scope>] [FOR <exp>] computes and displays the sum of numeric fields. (See G3-50) TOTAL TO <file> ON <key> [FIELDS <field list>] [FOR <exp>] generates a summary version of an indexed or pre-sorted database file which contains the totals of numeric fields for records (in the use file) bearing the same <key>. (See G3-51) UPDATE FROM <filename> ON <key> [ADD <field list>] or [REPLACE <field list>] allows batch update of file in use by drawing upon information from designated FROM file. 13 (See G5-11) USE <file> [INDEX <file list>] opens a database file and (optionally) engages desired index files. (See G4-18) WAIT [TO <memvar>] suspends dBASE II operation until a single console character is entered; optionally stores the latter to a designated <memvar>. (See G4-10) Set Commands (See G5-8) The default value of each SET command of ON/OFF type is indicated by order of presentation: OFF/ON indicates default value of OFF; ON/OFF a default value of ON. SET ALTERNATE TO [<file>] creates designated file (type .TXT) for saving screen output to disk. Repeated without [<file>], closes . TXT file. SET ALTERNATE OFF/ON ON sends screen output to disc file created with previous command; OFF shuts off output. SET BELL ON/OFF ON rings bell when invalid data entered or field boundary passed; OFF turns off bell. SET CARRY OFF/ON When using APPEND (full-screen), ON enters data from last record into present record; OFF turns off function. SET COLON ON/OFF ON displays colons which delimit or bound input variables; OFF hides colons. SET CONFIRM OFF/ON ON waits for <return> before skipping to next field in full-screen mode; OFF skips to next field as soon as present field is filled. SET CONSOLE ON/OFF ON sends all output to screen; OFF suspends all output to screen. SET DATE TO <MM/DD/YY> sets or resets system date. SET DEBUG OFF/ON ON sends output from SET ECHO and STEP to print; OFF sends output to screen. SET DEFAULT TO <drive> commands dBASE II to regard specified drive as default drive for all future operations. SET DELETED OFF/ON ON prevents dBASE II from reading/processing any record marked for deletion following a command which has <scope> as an option. OFF allows dBASE II to read all records. SET ECHO OFF/ON ON allows monitoring of command file execution by echoing all commands to screen; OFF suppresses echo. SET EJECT ON/OFF ON causes REPORT command to trigger a form-feed (page eject) before sending report to print; OFF disables the page eject. SET ESCAPE ON/OFF ON enables user to abort command file execution by hitting ESCape key; OFF disables ESC key. SET EXACT OFF/ON ON requires exact match in any comparison between two strings (e.g., in use of FOR <exp> or FIND command); OFF allows matches between strings of different lengths. 15 SET FORMAT TO [<file>] accesses specified file (type .FMT) containing custom made screen/print format for use in conjunction with APPEND, EDIT, INSERT, etc. SET FORMAT TO <screen/print> directs output from format file to screen or printer. SET HEADING TO <cstring> saves <cstring> internally and inserts it as REPORT header line. (cstring limited to 60 chars.) SET INDEX TO [<file list>] sets up index files for use with corresponding database file. First listed .NDX file will be engaged as the active index; all other NDX files will be automatically updated to reflect any changes to the database file. SET INTENSITY ON/OFF ON enables inverse video or dual intensity during fullscreen operations (if hardware permits); OFF disables these features. SET LINKAGE OFF/ON ON enables simultaneous movement of record pointers in both Primary and Secondary work areas in response to commands which only permit downward movement through a file (i.e., commands with <scope>). OFF suspends pointer linkage. SET MARGIN TO <n> sets left hand margin of printer to <n>. SET PRINT OFF/ON ON directs output to printer; OFF cuts off output to printer. SET RAW OFF/ON ON LISTs and DISPLAYSs records without inserting spaces between fields; OFF inserts an extra space between fields. 16 SET SCREEN ON/OFF ON enables full-screen operation with APPEND, EDIT, CREATE, etc. OFF disables full-screen operation. SET STEP OFF/ON ON aids debugging of command files by halting execution after performing each command; OFF disables STEP. SET TALK ON/OFF ON displays results of commands on screen; OFF suppresses display of results. Structured Programming Commands DO <file> | v accesses and executes a command file (type .PRG). (See G4-2) DO CASE CASE <expl> <statements> CASE <exp2> <statements> permits choice of one and only one of several possible execution paths, i.e., CASE <expl> through CASE <expN>. When CASE <exp> evaluates as logically True, CASE <expN> the following statements and <statements> commands will be performed. OTHERWISE <statements> ENDCASE OTHERWISE clause for alternate execution path is optional. DO CASE structure must be terminated with ENDCASE. 17 Lie i- s DO WHILE <exp> <statements> LOOP <statements> ENDDO opens a structured command loop. The following commands and statements will be executed until <exp> evaluates as a logical False. An optional portion of DO WHILE, LOOP causes command file to jump back and re-evaluate DO WHILE <exp>. Structure must terminate with ENDDO. IF <exp> <statements> ELSE <statements> ENDIF (See G4-7) permits conditional execution of following statements and commands. Optional ELSE provides an alternate path of execution. Structure must terminate with ENDIF. (See G4-4) TEXT <any text> ENDTEXT allows the output of text information from a command file. dBASE II will read everything as text for output until it encounters an ENDTEXT command. e Rs SR N AA A L e R e A A e e e (See G5-13) 18
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies