• Keine Ergebnisse gefunden

MDBS QUERY RETRIEVAL SYSTEM MANUAL

N/A
N/A
Protected

Academic year: 2022

Aktie "MDBS QUERY RETRIEVAL SYSTEM MANUAL"

Copied!
99
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)MDBS QUERY RETRIEVAL SYSTEM MANUAL. MDBS QRS MANUAL Version. Micro. Data. Base. P.. ljafayette,. O.. 3.08. Systems, Inc.. Box. Indiana. 248 47902. USA. Telex:. (312). 209147. 303-6300. December. ISE. UR. (in Illinois). 1985. Copyright Notice This entire. employees. Inc . , and agreement. (C). and is provided for the use of the customer the custorner ' s entire contents have been copyrighted by Micro Data Base Systems, reproduction by any means is prohibited except as permitted in a written with Yicro Data Base Systems, Inc. manual. The. COPYRIGHT. 1981. Micro. Data. Base. Systems,. Inc .. Rev.. 85A 3252335.

(2) NEW. RELEASES,. VERSIONS,. AND. A WARNING. of the magnitude of the MDBS software will Realizing this, Micro Data over time. necessarily continue Base Systems, Inc., provide its users with updates to this version for a nominal handling fee. Any. programming. endeavor. to evolve vows to. versions of MDBS software will be considered as separate products. bona fide owners of previous versions are generally entitled a preferential to rate structure.. New. However,. Finally,. each copy of our software is personalized to identify the some There are several levels of this personalization, licensee. of which involve encryption methods guaranteed to be combinatorially Our products have been produced with a very decipher. difficult to investment of to say nothing of the capital and labor, substantial base management of involvement in the data area by our prior years we Accordingly, concerned about any principals. are seriously unauthorized copying of our products and will take any and all available legal action against illegal copying or distribution of our products.. (C). COPYRIGHT. 1981. Micro. Data. Base Systems,. Inc..

(3) FIDBS. QRS. Table of Contents. MANUAL. FIDBS. MANUAL. QRS. Ea'lq CHAPTER A. .. OVERVIEW. Us incc. C. Query. . .. E. CHAPTER A. B. C. .. d. CHAPTER A. 13. C D. . .. lCHAPTER A. B. C. D. .. CHAPTER A. El. C D. . .. CHAPTER A. B. C. . D .. CHAPTER A. E. C D E. . . .. CHAPTER A. B. C D. . .. CHAPTER A. IJ. C. .. CHAPTER CHAPTER A . E!.. CHAPTER. . . . .. Introduction.. B. d. (C). I.. QRS . . Commands. . . . .. . . . .. . . . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. 0. D. 0. 0. 0. 0. 0. 0. 0. 0. 0. *. 0. 0. 0. .. . . . .. . . . .. . .. . . . . . . . . . . .. . . . . . . . . . . .. . . . . . . . . . . .. . . . . . . . . . . .. . . . . . . . . . . .. . . . . . . . . . . .. . . . . . . . . . . .. . . . . . . . . .. . .. . . . .. . . . . . . . . .. . . . . . . . . . . .. . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . .. . . . . .. . . . . .. . . . . .. . . . . .. . . . . .. . . . . .. . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . .. . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .. . . . .. Notational Conventions. Query Length. . . . . . II. THE DISPLAY Syntax . . . . . Synops is . . . .. Description. .. .. COMMAND. . . . .. . . . .. . . . .. Examples. . . . III. THE LIST COMMAND. Syntax . . . . . . . . . Synops is . . . . . . . .. oescription. Syntax. . . Synops is . . Description. Examples. . V. COMPUTE Syntax . . .. Synopsis. . Description. . .. . .. . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . . . . . . .. . . . . . . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . .. Examples. . IV. WRITE,. SPEW,. . . . .. COMMAND. Examples . . VI. SET COMMAND. Syntax. . . Synopsis. . Descript ion. Examples . . VII. DEFINE Syntax . . . Synops is . .. DescriptÁon. . . . .. STATS,. COMMAND. Examples . . Advanced Usage of íáacros VIII. READ COMMAND. Syntax . . . . . . . . . Synops is. . . . . . . .. Déscription Examples. IX. OPEN, Syntax . . Synops is .. Description X.. . . .. . .. . .. . .. CLOSE . . .. . . .. . . .. . .. . .. AND. . . .. . . . · . .. . . . . . · . .. . . . . . . . . . . . . . . . . . .. .. QUIT. QUERY NESTING XI. STARTUP FILE Overview. . . . . . Creating the STARTUP XII. QRS ERROR MESSAGES. COPYRIGET. 1981. file. COMMANDS. with Parar: ieters.. . . . . .. . . . · . .. DBSTAT. . . . · . . .. . . . . . . . .. COMMANDS. . . . . . . . .. . . . . . . . .. i4icro Data Base Systew,s,. . . . . . . . .. .. .. . . . . .. . . .. . . . . . . . .. Inc.. .. . . . . . . . .. . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . .. .. . . . . . . . . . . . . . . .. . . .. . . .. .. Rev. .. . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. . . . .. . . . . .. .. l. l. 2 2 a j 4 5 5 5 5 6. lili lili. 20 27 27 27 27 29 31 31 31 31 31 33 3 3 33 3 3 4 5 51 51 51 51 5 4 5 8. 59 5 9. 59 59 59 61 61 61 61 63 67 67 67 69. BSA. i.

(4) MDBS. QRS. MANUAL. MDBS. QRS. MANUAL. FIGURES FIGURE. II-I.. Sample. Schema. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. 3. .. APPENÍJICES APPENDIX APPENDIX. ii. A B. Rev.. List of QRS Keywords . - Decimal-ASCII Conversion -. 85. A. (C). COPYRIGHT. .. 1981. .. .. Table. .. píicro. . .. . .. . .. Data. . .. . .. . .. . .. . .. . .. . .. Base SysteL\s,. . .. Al Bl. Inc..

(5) MDBS. QRS. MDBS. MANUAL. QRS. MANUAL. I.. OVERVIEW. Introduction. A.. data is designed for use with MDBS MDBS a module furnishes bases. Called this optional language a nonthat allows query English-like nonprocedural, basis. áñY MDBS data base on an ad hoc programmer to interrogate a a data Armed nonbase's logical structure, with the picture of non-programming) user can quickly begin formulating technical (i.e., powerful queries for data retrieval. In addition to the standard QRS QRS new customize by commands, defining is allowed to the user commands via a built-in macro facility. Numerous utility commands are available for tailoring the query environment to the user's needs. The Query. Retrieval. III. System. III. QRS,. report generated in response to a query can be displayed in a by a report can customize standard format. Alternatively, the user One QRS invoking the report writer feature report writer features. with options allows a user to specify control breaks in a report, permitting statistics (such as mean, variance, etc.) to be printed at each break Another and allows labels to be at aggregate levels. Value specified for data item values. associations are automatically performed by QRS (e.q., the pre-assigned value "Hispanic" may be when a "H" encountered printed automatically value of for the RACE is More elaborate reports can be generated data item). with the optional RDL module MDBS of III. The. a report generated by QRS can be displayed At the user's option, the a a saved for later use, or on on screen, routed to printer, and common used Guru, input to programs such as KnowledgeMan, as spreadsheet With QRS a user can devise arbitrarily complex packages. expressions. Wildcard and "match-one" features are allowed for string comparisons. An optional conditional clause (the FOR clause) can be included for highly selective data retrieval. A path clause (the THRU which clause) is used in each retrieval query data to indicate should a the example, be used For relationships to answer query. 35 numbers) females phone under (and years of query to all 43 would be: their age in Department. file. list. LIST. NAE!E,PHONE. FOR. SEX="F",DEPT=43. AND. AGE<35. THRU. DEPTS,EMPLOYEES. Complex Boolean expressions are permitted in the conditional A each query clause. can expressions, also contain arithmetic Of course, data involving one or more data items. extraction is all contingent upon a user having read access to the data items and sets referenced in a query. The user. choose to print out the total record accesses for a a him allowing thus "fine tune" given query's to query efficiency by reordering relationship paths or including additional selection criteria.. given. may. is valuable not only to non-programming in the users QRS is also valuable to developers of generation of ad hoc reports. systems, reduces application in that the programming effort involved in the development of such systems. QRS. it. (C). COPYRIGHT. 1981. Micro Data Base Systems,. Inc.. Rev.. 85A. l.

(6) MDBS. QRS. B.. Using. MANUAL. - I.. OVERVIEW. MDBS. -. QRS. MANUAL. QRS. QRS Simple instructions are included in the system installation Once QRS has been installed, from specific manual. can be executed The disk containing the main data base the operating system. area QRS can be invoked must be on-line. with a -b argument on the command argument line fo explicitly allocate the page buffer region. If thismemory is not specified, approximately half of the available is The remainder allocated. automatically of available memory is reserved as a non-data base working space (e.g., control blocks, file is used, this argument has the form stack, sort work areas). If where nnnnn is the (decimal) number of bytes to be allocated -bnnnnn This number should be at least as large for the page buffer region. the "minimum DMS buffer region size" reported by the DDL Analyzer, as a otherwise DMS command status error 31 results. page If too large"excessive buffer region is requested, an error message indicating The remaining memory request" is displayed. memory reserved for nondata base However, in rare working space is normally sufficient. may be various working in space resulting cases this insufficient, kinds of error conditions and situations where the data base may be In such a case, -b can be used to allocate a smaller page left open. buffer reqion to allow a larger non-data base working space.. it. it. the. is executed (as described in the system processor manual), specific the QRS banner message appears on the console be banner suppressed by a argument This including can -m on screen. QRS prompts the command used invoke query the the to processor. line user for the file name of the main data base area, user name, and user QRS can be invoked these prompts are not desired, password. with If The -d argument must be immediately followed -d, -u and -p arguments. by the file name, the -u by the user name, and the -p by the password. when. QRS. checks to see whether the user name and password are valid they are valid, then the --> prompt for the indicated data base. If that QRS is ready prompt This means issued. to accept a query is command A command. query is terminated by pressing the carriage After QRS displays its response to a query command, the return key. prompt is again issued to show that QRS is ready to accept the --> next query. QRS. A. session can control to the. query. returns. interrupt" QRS activity. terminated by entering QUIT or BYE. operating system. Pressing the key (Escape key on most operating systems) interrupts and results in the --> prompt. be. Chapter XI explains how to create and make use of a STARTUP QRS can automatically which utilize to and identify the data base and and to set various environment options parameters. C.. Query. Commands. The. QRS. language supports sixteen user is allowed to define command consists of a sequence of clauses. within a command; some may be optional. then the user specifies the clauses that make. addition,. still. a. If. 2. Rev.. 85A. (C). COPYRIGHT. 1981. Micro. This. "soft. the. file,. user. standard commands. In other commands. Each QRS Some clauses are required a user defines a command, up the command. Data. Base Systems,. Inc..

(7) MDBS. The. QRS 16. I) 2). MANUAL. standard. QRS. help. :. 3) 4). WRITE. :. 5). SPEW. :. 6). STATS. :. 7) 8) 9). DBSTAT : COEIPUTE: SET :. DEFINE. li) 12). DATFORM: READ ECHO OPEN CLOSE. 13) 14) 15) 16). :. QUIT. QRS. MANUAL. effects:. provides on-line help about the following commands display selected data dictionary contents selected data base contents in a report list write selected data base contents to a disk file, without report headings to adisk file using a special write selecteddata DIF) format (e.g., perform statistical analyses on numeric data retrieved from data base show various data base processing statistics compute a numeric value set environmental parameters, options, or column headings to control subsequent query processing define value labels or new commands (macros) choose an alternative form for presenting dates read and execute the queries on a disk file echo a message to the console screen open a data base area for QRS processing close a data base area to QRS processing stop processing QRS commands. DISPLAY: LIST :. IQ). MDBS. OVERVIEW. I.. commands have the following -. : : : : :. clauses used flor each of these commands are described in chapters The commands are presented in the order shown above. that follow.. The. Appendix used in QRS commands. a provides a list of the keywords when defining names (and synonyms) is advisable, in the Data Language, Description select names (synonyms) to that are distinct A data from QRS keywords. record type, set or area that has the item same name as a QRS keyword cannot be referenced in a QRS command. Synonyms, as defined with the DDL, can be used interchangeably with corresponding data item record type, area and set names. their Figure II-1 shows the sample logical structure presented in Chapter One of the MDBS DDL Manual (in Figures II-3 and III-1,2). II additional set (ISKL) has been added to this schema. manual, this In all example queries are based on the logical structure of Figure II-I.. It. IEMP. ; DEPT. EMPLOYEE. BIOGRAPH. ID DNUMBER IDEP µ. LASTNAME HAS. NAME. ,. LOCATION. FNAME. JET:. lLS. PASTJOBS. LINE. YTDEARN SYSTEM A. ;POSSESS. F1LLEDBY JOB. IJOB. JOBCODE. '. (C). COPYRIGHT. SKILL. 1981. MEEDS. SKILCODE DESCRIPT. DESCRIPT. RATING. Figure. II-I.. Micro. Data. Sample. JISKL. Schema. Base Systems,. Inc.. Rev.. 85A. 3.

(8) MDBS. QRS. MANUAL. D.. Notational. -. OVERVIEW. I.. MDBS. -. QRS. MANUAL. Convention8. the syntax of a QRS command, each describing clause is the symbols These and symbols two >. within are not used a to separate clauses within a query itself. stating In actually command a separated two be by clauses in can either blanks or a query, When. enclosed. <. comma.. and purposes of syntactic documentation, keywords other are indicated with bold faced type. User-determined elements literals the For example, of a command are not in bold faced type. display command has the syntax: For. <display><parameter><list>. display command must literally begin with the word display; the user determines the parameter and list that are to be used in a particular display command. A. quoted. In. query,. manual,. practice, parts of. QRS translates when accepting a command, nonThus when a user query to upper case. states a and lowercase desired. upper can be intermixed as In this non-quoted portions of example queries are in upper case.. all. a. in the outside margin indicates that the feature being described is for experienced QRS users. This does not complex necessarily imply that the feature is difficult or to use. It does imply that the feature could be skipped on an initial pass through this manual, without a loss of continuity. A. vertical. On-Line. E.. bar. Help. To get a provides an on-line help facility. display of QRS commands, about any of the helpful information type the word help The syntax of each command in response to the --> prompt. is conventions similar to those described displayed using notational QRS. above. F.. Length. Query The. maximum. blanks.. 4. Rev.. 85A. length. (C). of. a. query. COPYRIGHT. 1981. is. 255. characters,. including. Micro Data Base Systems,. Inc..

(9) MDBS. QRS. MDBS. MANUAL. QRS. MANUAL. II. THEDISPLAYCOMMAND A.. Syntax. <display><parameter><list> or. <disp><parameter><list> B.. Synopsis. DISPLAY command can be used to obtain information from the data can dictionary about areas, record types, sets, or data items. be used the about acquire information query also to current (Chapter environment as specified with the SET command This VI). headings, about column environment parameter includes information A DISPLAY command cannot be option settings. values and environment used data the data base was obtain dictionary information to MDBS DDL Manual, Chapter o the (see VI). with option initialized A. It. if. C.. Description There. used. in. a. are six permissible DISPLAY command:. one-character parameters. that can. be. inEorInation disp1.aYed. aPmút areas all column heaáings all environment parameter values all language used for sorting all environment options settings. <parameter> a. c e. l o. all record types all sets. r. 8. list can order to. specified with the a, r and s paranieters the displayed in information to a particular area, restrict This results in more detailed record type, or set (respectively). information than what is obtained without specifying the list. a parameter Furthermore, an names of can be specified with the record type and one of its data items to display detailed information about that data item. a. optionally. be. i. a. <1Ást> area name. r. record type. s. set. i. record type name,data. <paraineter>. f11.n.ctjc)n.. name. name. item. name. display information about the indicated area display information about the indicated record type display information about the indicated set display infcrmation about the indicated data item the in indicated record type. area, record type, set or data item can be indicated by specifying either its name or a synonym for that name (as declared in the data base's ddl specification).. An. (C). COPYRIGHT. 1981. Micro Data Base Systems,. Inc.. Rev.. 85A. 5.

(10) MOBS. QRS. MANUAL. If. both the. command,. - II.. DISPLAY. and <parameter> user is prompted. parameters.. COMMAND. <list>. are. with. a. MDBS. omitted list of. QRS. from. the. MANUAL. DISPLAY. a. permissible. Virtually. information is available to a user through all schema The only kinds of data dictionary DISPLAY command. information with the DISPLAY command names, that are not available are user and Read and write access codes passwords, user access codes. for However, areas, data items, record types, or sets are not displayed. he has read and/or write access the user is informed whether to the data being displayed. or item, record set type area, the. D.. Examples DISPLAY R. DISPLAY. displays. SKILL. SKILL. DISP DISP. S. for. all. detailed information record type. for. the. detailed. information. for. the. summary. information. for. all. displays summary record types. R. displays set. IEMP. displays. A. information. IEMP. areas DISP. I. DEPT,. LOCATION. displays. detailed. data. LOCATION. record type. 6. O. displays. DISP. C. displays user-defined. DISP. E. displays. DISP. L. displays. all the. for all. 85A. (C). COPYRIGHT. 1981. the. for the. DEPT. all environment option settings. DISP. Rev.. information item within. column. environment. headings. parameter. values. used as a basis that takes place. language. sorting. Micro. Data. Base Systems,. Inc..

(11) MDBS. QRS. Sample. MANUAL. query. -->disp. -. session. II.. DISPLAY. COMMAND. MDBS. -. QRS. MANUAL. using the DISPLAY command:. r. SYSTEM. (none) (none) (none). title: synonyms:. owned by: owner of:. $SYSSET,. items:. (none). title: synonyms:. (none) (none). IEMP,. idep, IJOB. NAME,. LOCATION. DEPT. owned by: owner of:. IDEP HAS DNUMBER,. items:. EMPLOYEE. (none) (none) IEMP, FILLEDBY, HAS POSSESS, DETAILS FNAME, ID, LASTNAME,. title: synonyms:. owned by: owner of:. items:. PASTJOB,. YTDEARN. BIOGRAPH. items:. (none) (none) DETAILS (none) LINE. title: synonyms:. (none) (none). title: synonyms:. owned by: owner of: SKILL owned by: owner of:. POSSESS,. title: synonyms:. (none) (none) IJOB FILLEDBY,. items:. JOBCODE,. NEEDS. (none) SKILCODE, DESCRIPT,. items:. RATING. JOB. owned by: owner of:. (C). COPYRIGHT. 1981. Micro. Data. NEEDS DESCRIPT. Base Systems,. Inc.. 7.

(12) MDBS. QRS. MANUAL. -->disp r. skill. -. II.. QRS. MANUAL. (none) (none). owned by: owner of:. POSSESS,. NEEDS. (none). items:. s. MDBS. -. skill. title: synonyms:. -->disp. COMMAND. DISPLAY. SKILCODE UNSIGN 55 DESCRIPT STR 2 RATING REAL. 2. iemp. iemp (none) (none) N:m. title: synonyms: type: owner owner owners:. insertion: order:. member member. members:. -->disp. MANUAL IMMAT SYSTEM AUTO SORTED EMPLOYEE. insertion: order:. a. JOBS. (none) (none). title: synonyms:. READ,. access:. WRITE. JOBI (none) (none). title: synonyms:. READ,. access:. WRITE. JOB2. (none) (none). title: synonyms:. READ. access:. -->disp. i. dept. location. dept.location. (none) (none). title: synonyms:. STR. type:. 8. (C). COPYRIGHT. 35. 1981. Micro. Data. Base Systems,. Inc..

(13) MDBS. QRS. MANUAL. -->disp. STATUS OFF ON ON OFF OFF OFF OFF OFF OFF OFF OFF OFF ON OFF OFF OFF ON OFF ON ON ON ON ON ON ON OFF. l. 2 3 4 5 6 7 8 9. 10. li 12 13 14 15 16 17 20 21. 22 23 24 25 26 27 28. MS QC CC SO SC CL OF PC PD PM. QRS. MANUAL. IF ON echo to. sum of observations print mean of observations print of observations print variance print std dev of observations suppress statistics (opt2l..27). depth margin open page eject. printer printer printer printer width printer column spacing. PP PW. es. scale factor. SE TL. title name list file printer utility. fn. PU. COPYRIGHT. MDBS. echo one term per line column headings suppress suppress value labels macro recognition suppress echo macro expansion output suppress printer form feed perform sort on query output pause after each report page ignore case in conditionals (a-z) order sort in ascending record access count print number print maximum of observations print minimum observation observation print. close class select open select close comment leader output format printer close. PC). (C). -. interactive I/O printer report output displayed on console suppress printer output spool printer output to disk (FN) echo alternate input write output to console print output from WRITE. class negation. Ml. Language. MEANING. depth console console page eject console width match one char match string open class. CW. -->disp. COMIQAND. e. CN CD CP. ". DISPLAY. o. OPTION. -->disp. - II.. " 24 O, 80. O,. O,. O. O,. O,. O. O,. O,. O,. $. * {. ] { } ; 89 O, 60 O. O, O. 120 2 O. lpr. L. is: 1981. FRENCH. Micro Data Base Systems,. Inc.. Rev.. 85A. 9.

(14) MDBS. QRS. MANUAL. - II.. This page. 10. (C). DISPLAY. COMMAND. -. MDBS. QRS. MANUAL. intentionally left blank.. COPYRIGHT. 1981. Micro Data Base Systems,. Inc..

(15) MDBS. QRS. MDBS. MANUAL. QRS. MANUAL. III. THELISTCOMMAND Syntax. A.. <list><find B.. clause><path. clause><conditional. clause><break. clause>. Synopsis Other QRS retrieval query. that perform retrieval are presented in the next chapter. stating a retrieval query, the QRS user utilizes the find clause The items whose be those. The commands When. command. LIST. is one kind of. QRS. retrieved. indicate data values are to which data interrelationships are user also specifies to be used in accomplished the path clause. with This the data. is retrieving MDBS (or many Since between pair interrelationships any supports QRS be a group) able user to is crucial for to of data items, specify which of those interrelationships is of interest for a given may Using very well yield different interrelationships query. QRS a Suppose wants that user to obtain a list of different results. The user needs a concise method a given supplier. for all parts for indicating which supplier-part relationship is of interest: parts all been have or all parts that that can be supplied by the supplier, received from the supplier, on back-order from or all parts currently supplier. that to. it. find and path clauses must appear in a LIST command. If On the the query is obviously ambiguous. other is omitted, hand, the The break and conditional break clauses are optional. breaks used be in the of control clause can to specify the occurrence be being The used conditional clause can generated. report to place conditions on the retrieval that is to be performed, thereby providing a selective data Synonyms (as declared in the retrieval capability. be used base's DDL specifications) in any of these clauses. can The. either. a virtual table retrieval command (flat effectively defines command does a The by specified or table not "relation"). a data base, file by physically exist in but is automatically generated QRS. A multitude of tables virtually exist in any MDBS data base and QRS provides the means for viewing of them. A find clause defines all Rows by the columns of a virtual table. in that table are generated The clause and A. QRS. qrs, subject to the conditional using the path clause. LIST command also allows extensive wildcard and match-one comparisons. C.. Description T11listrqation The. used. within. LIST. NAME. (C). following a. LIST. LASTNAME. COPYRIGHT. 1981. LIST commaná command:. illustrates all clauses that. BY. DNUMBER. DNUMBER. Micro. Data. FOR. IN. Base Systems,. Il. 2. Inc.. 41. THRU. can. be. IDEP,HAS. Rev.. 85A. li.

(16) MDBS. QRS. This. command. MANUAL. lists. - III.. LIST. the department. employees in departments As query is IDEP,HAS.. l,. COMMAND. name. 2. or 4. shown below,. DNUMBER.. NAME R R R R R. & & & &. and employee The path used the report has. MDBS. QRS. MANUAL. names for the last answering. in control. breaks. the on. LASTNAME d D D D D. &. -. Grant Gagster Madison Fiskum Russet no. of observations:. production production. 5. Sellet. Goeld. no. of observations:. 2. no. of observations:. 7. The remainder of this description section examines each of the clauses individually. Several LIST command examples appear at the end The select keyword can be substituted of this chapter. for the list keyword desired.. if. EÁM. cj. MIRC. A term a find clause consists of one or more terms. is a data item or an arithmetic expression involving zero, one, or more data items. Within an arithmetic expression, the +, -, % and / arithmetic Traditional operators are allowed. operator precedence conventions observed: evaluation with * and / being evaluated left-to-right are before + or -. Qüite complex arithmetic expressions containing nested parentheses, integer or real constants, and data items from different When nested parentheses used, record types are supported. the are Blanks within an arithmetic innermost is evaluated first. expression are ignored.. blanks can be used to separate the terms in a find clause. Tlíe order in which terms are specified in a find clause DNUMBER determines the order of columns in the resultant report. If DNUMBER form then a the find of clause, values is first first in column of the report. Commas. or. reference to a data item can be prefaced by the name of the refer to NAME as record type that contains that data item (e.g., DEPT.NAME). This feature is used to avoid the ambiguity that would name the schema has two data items with the same otherwise arise JOB DESCRIPT name unique a and in SKILL). is in (e.g., If data item within the record types along the command's path, then the record type is not unique, then either the preface preface may be omitted. If a synonym must be used. or Each. if. it. 12. Rev.. 85A. (C). COPYRIGHT. 1981. Micro Data Base Systems,. Inc..

(17) MDBS. COMMAND. QRS. MANUAL. - III. LIST In addition to terms, character constants can also appear in a a character constant is a string of characters enclosed clause. finddouble in quotes. This literal string will appear in every row of the A character constant consisting of a backslash (\) output table. decimal number causes the ASCII a by of that equivalent followed B) example, number (see Appendix be For "\10" forces a performed. to which mailing in labels. is useful printing line feed. MDBS. QRS. MANUAL. of terms (and constants) that can appear in a find clause is restricted by the width of the terms. a term's width is the maximum possible length of any of its values. For numeric terms, the environment the parameter by "OF" term specified as of the is width For a non-numeric (described in Chapter VI). data item, the width is the number of display characters that could be required for a value of that data item. clause If the sum of the widths of terms in a find where the printer width (or the console width in the case a exceeds used) exceeded" is then an message "Output length is not printer QRS. error Tlíe maximum number of terms (and constants) permitted issued by The maximum number of items regardless of width is 25. referenced within a query is 20. Some find clause examples are: The. number. JOBCODE DNUMBER,NAME. JOBCODE,SKILCODE,RATING ID,DNUMBER+(YTDEARN-2)/1000,YTDEARN,"\10",LOCATION DNUMBER,"* ",ID,JOBCODE LOCATION. SKILCODE. JOBCODE,JQB.DESCRIPT,SKILL.DESCRIPT. conqitinna],. c1a11¶e. The optional conditional clause begins with the keyword: for. A in the virtual table defined by the find clause will appear in the output report only satisfies the conditions stated in the conditional clause. For instance, the query row. if it. LIST. ID,. DNUMBER. FOR. LASTNAME="Lehr". all employee identifiers and their will numbers,list but only for those employees with the this. example,. the. conditional. expression. is:. respective. department. last LASTNAME="Lehr".. FOR. name. of Lehr.. In. a conditional In general, clause is a Boolean expression formed A .re.l.,Atjonal expressiQn one more expressions. or relational consists of: <term> <relational operator> <term>.. from. The. full host LT(<), GT(>),. EQ(=), NE(<>), of relationa.1 Qperators is supported: QRS, GE(>=). Under these operators have their LE(<=), Numeric terms cannot be compared with character traditional meanings. Terms involving string, binary, character, date and time data terms. The group item types are referred to as character terms. inclusion IN, The IN operator is satisfied is also supported. operator, the by value of the left term is in the group of values specified the right term.. if. (C). COPYRIGHT. 1981. Micro Data Base Systems,. Inc.. Rev.. 85A. 13.

(18) MDBS. QRS. MANUAL. - III.. A teFIn in the the for find clause. also be a character. COMMAND. LIST. MDBS. -. QRS. conditional. MANUAL. does clause has the same meaning as a a may term in conditional clause, a (e.g., "Smith"), character group of 1Smith,jones,Lehr]), constants (e.g., or a group of numeric constants (e.g., 15,7,91). The character constants or numeric constants within A group a group by either blanks or commas. can be separated begins and and terminates with left brackets, respectively. square right a Whereas stand-alone character constant must be quoted, character constants within a group do not need to be quoted (unless they contain match-one symbols, or character classes, wildcard symbols, all of which are described below). Some. examples. it. However, cQñstant. of relational. expressions are:. LASTNAME="Smith" DNUMBER >= 17 YTDEARN<(5+DNUMBER)*1OOO LASTNAME IN YTDEARN/lOOO. 1Smith,jones Lehrl GE. 13.2. In stating a relational expression, a blank must precede and follow Exceptions are the =, <>, <, >, <=, >= operthe relational operator. which blanks are not needed. ators for wj1.dca..rd. constants. if. and the. match-Qne. symbols. can. relational operator is. be. IN,. used =, eq,. within <>,. or. character. NE.. any combination of zero or more As an example, we characters. default wildcard symbol is *. the whose employees d, names begin with interested only in are first conditional clause will contain the relational expression: our whose we FNAME="D*". biography interested in employees are If then mentions term computer, clause will contain our conditional the the relational expression: LINE="*computer*". The. wildcard. symbol. matches. if. The. if. matches any one character. For instance, have 66666666 employee we as wish to find all the identifiers that the contain the conditional clause their last eight digits,ID="$66666666". symbol The default match-one relationalTo expression: 6666 have four as the find is $. identifiers that The match-one. symbol. will. all the conditional digits, ID="6666$$$$$".. clause. will. contain the. first relational expression. if. the Character classe$ can be used within character constants match-one EQ, ne. <>, Uñlike the or relational operator is IN, =, a character class allows the feature which matches any one character, a match a class of of with any one particular user to specify [ where denoted by A is the character class is characters. ] is the and class close default class character, open default such a A characters, of may simple list consist of character. list such the as a IaeiouAEIOW, characters, of range or the vowels as and a simple of combination lists lower-case alphabet [a-zj, or employees whose names begin with As one example, last to find ranges. would contain the relational A through M, the conditional clause As example, second a LASTNAME="IA-M1*". to find all expression:. llistl,. 14. Rev.. 85A. (C). COPYRIGHT. 1981. Micro. Data. Base. Systems,. Inc..

(19) MDBS. QRS. - III.. MANUAL. LIST. first. MDBS. COMMAND. like. QRS. MANUAL. whose name the conditional employees Karen, is pronounced FNAME="*Kar[aeiy1n". clause would contain the relational expression: As a third example, on the north, odd-numbered to find all departments contain the the conditional clause would side of Kossuth Street, Kossuth LOCATION="Nl35791 Street*". expression: relational. is for a the first character of a list is " then the list made for any This means that a match is character class. For instance, to find character that is not in the character class. employees whose last name does not begin with a capital letter, all contain the relational expression: clause would the conditional LASTNAME="1"A-ZI*". This is particularly valuable for rapidly detecting faulty data entry.. If negated. that the character - can be used in a character class is the first character of a list (or first to look for a -, A " be the negation) or the last character of the list. can after " a when searched is not the first character of for as a list. a Ai)" addresses example containing of this is to find ali department The conditional contain the clause for this would . or or -. a Note SADD="*{."-]*". within expression: that also relational character class, the wildcard and match-one characters lose their 'G and specialness, Nesting of so they may be searched for as character classes is not allowed. Note. here. if it. it. $. character class is different from a group as discussed A group previously. refers to a collection of constants to be matched A character class contains a for to terms. list of single characters which match is accepted. a may Note that a character class occur For example: within a group. A. LASTNAME. IN. [Schultz,"Sm[i,y]th"]. The match-one, Default sYmbo].s can he chanqed. wildcard, open class, close class, and negate class default symbols can all be changed by means of the SET command This described in Chapter VI. whose allows users character sets do not contain the default characters to use these facilities.. still. expressio.ns Relationaj can he colnhinea into a single CONDITIONAL AND the clause using any of following Boolean operators: ("), OR, XOR NOT OR), a comma two (exclusive or blank separates ("). If relational Parentheses expressions the AND operator is assumed. (possibly nested) can be used to govern the precedence used in evaluating the Expressions within the innermost parentheses relational expressions. The precedence pairs are evaluated first. conventions used in and Boolean a arithmetic, evaluating operators within relational conditional clause are as follows:. (C). COPYRIGHT. 1981. Micro. Data. Base Systems,. Inc.. Rev.. 82B. 15.

(20) MDBS. QRS. l) 2). MANUAL. - III.. parentheses NOT, unary. (. EQ, AND, OR,. Some. conditional. +,-. /. =,. and. QRS. MANUAL. ). NE,. <>,. LT,. <,. LE,. GT,. <=,. >,. GE,. >=. XOR. clause examples 11,5,l4,321. LOCATION="*Chicago*". DNUMBER. FOR. LINE="*Ciata JOB.DESCRIPT base*", SKILL.DESCRIPT NE "*data base*". IN. (YTDEARN/IO00>18.9. FOR. JOBCODE=49. FOR. FNAME. IN. XOR. AND. are:. FOR. for. MOBS. -. negative sign, IN. 3) 4) 5) 6) 7). *V. COMMAND. LIST. OR JOBCODE. "*Ciata. NE. base*",. <32) and NA!qE="*data*". SKILCODE=14. l"K*",Deb,"M1o,aKk", Eákh. "IT-W]*"]. AND. LASTNAME="T$$$". cl (rll1,"|e. with path clause appears in every LIST command. It can begin the thru or from keyword. the path As explained previously, either clause allows a QRS user to specify the data interrelationships that Two queries should exist among entries in the desired report. that path clauses will typically yielá different differ only in their To use the path clause, examine all data items specified in reports. the and find conditional clauses of a given query. In the schema, place a check mark on every record type that contains at least one of these data items. In order to answer the query, QRS will have to examine occurrences of each of the checked record types. In the path clause we need to specify a path of sets that will allow QRS to reach QRS automatically each accesses only of the checked record types. those records along the path that are needed in order to produce the QRS (member to owner) and can move both upstream desired report. (owner to member) through a set. downstream If the path requires an movement for some set, upstream then that set's name is prefaced with the > symbol. A. A. path. i). ii). iii) For. will. always. begin with a SYSTEM-owned set connect all checked record types be cQmpIete.lY connected. example, IDEP,HAS,POSSESS. is. a. completely connected. IDEP,HAS,>FILLEDBY,NEEDS IDEP,POSSESS. 16. Rev.. 85A. is completely connecteá. is not completely connected. (C). path of sets. COPYRIGHT. 1981. Micro. (it. skips. Data. HAS). Base Systems,. Inc..

(21) MDBS. QRS. MANUAL. III.. -. IJOB,>POSSESS,>HAS. LIST. COMMAND. MDBS. -. is not completely connected. IEMP,DETAILS,POSSESS. (it. QRS. skips. MANUAL. NEEDS). is completely connected. IEMP,>HAS,>FILLEDBY,POSSESS. is completely connected. This means that in a path is not allowed to contain loops. be may legitimate path of sets, no record type entered more than once. E'or instance, the sets A. IJOB,NEEDS,>POSSESS,>FILLEDBY They form a loop, legitimate path. since the record and IJOB >FILLEDBY. Notice that entered through type is a fornís IJOB,NEEDS,>POSSESS,FILLEDBY also loop rather than a path EMPLOYEE record type is entered through both FILLEDBY anct since the >POSSESS. The sets. do. not form. a. JOB. IJOB,NEEDS,>POSSESS,>HAS,DETAILS form. a. legitimate. path;. no. record type. is entered. more. than. once.. order in which sets are specified in a path is important. ValuesIt indicates to QRS the way in which the path is to be traversed. of data items at the outer reaches of the last set are the last to be examined or evaluated. In contrast, occurrences of the record type owned by the first set in a path are examined or evaluated earliest. When moving downstream through a set, the member record type is at the set's outer reach; when moving upstream, the owner record type is at the set's outer reach. The. The QRS the path: IDEP,HAS,POSSESS. finds a DEPT first IDEP) whose reaches data values satisfy the of occurrence (outer EMPLOYEE occurrence for that department next finds an query. It DEPT) reach whose there of data values satisfy the query. (outer If QRS DEPT a are finds the next satisfying none, occurrence. If EMPLOYEE QRS each examines SKILL satisfying occurrence was found, For each of these SKILL occurrences that owns. (outer occurrencePOSSESS) reach of that satisfies the query, a report line is printed. The next satisfying employee is then found and its skill occurrences are evaluated, and so forth until all satisfying employees for the have been examined. The next department current satisfying department the that found, occurrence satisfies Thus query is its employees and their the ordering of entries in the report etc. skills are examined, member is determined by the orders for the idep, HAS, and POSSESS sets respectively. Consider. it. (C). COPYRIGHT. 1981. Micro Data Base Systems,. Inc.. Rev.. 85A. 17.

(22) MDBS. QRS. MANUAL. - III.. LIST. COMMAND. MDBS. -. QRS. MANUAL. a given find and conditional clause, the path selected may the only the not of content resulting but also the report, affect speed should As a general with which is generated. one rule, based attempt to place those records on which conditionals as are Suppose we need a early in the path as possible. of the IDS of list 5 and 9. employees The appropriate find and in departments all l, conditional clauses are:. For. it. LIST. FOR. ID. IN. DNUMBER. 11,5,91. possible paths that could be specified with this query. path would generate the appropriate of ids, list HAS The IDEP, ordered according to the member order of IEMP. path same would a They IDS, the of in but order. yield list on the basis of thedifferent be ordered primarily would member order of IDEP and secondarily on the basis of the HAS member The order. path first QRS search ALL determine employees whether and each causes is in a to des1red The second path causes QRS to find department. only the desired departments (1,5,9) and to list the employees of these. QRS the second path allow Clearly, the more report to generate will rapidly than the first path. There are The IEMP,. many >HAS. feasible to place additional conditions clause in order to reduce the size of the For example, suppose we desire to list those people who have earned over $10,000. those Suppose that we know that only employees 2, 3, or 7 could possibly have year-to-date in departments We might then earnings that exceed $10,000. state the query In within. it conditional cases. some. may. be. the retrieval tree.. LIST. LASTNAME. FOR. YTDEARN. >. 10000. AND. DNUMBER. 10000. THRU. IN. 12,3,71. THRU. IDEP,HAS. rather than LIST. LASTNAME. in order to. FOR. YTDEARN. significantly. >. reduce. IEMP. retrieval time.. aided The in "fine tuning" is further user retrieval by environment option 20 (Chapter VI), which causes a count of the record The best formulation for retrievals for each query to bebe displayed. The determined with this option. queries can run frequently for resulting query might then be preserved as a macro (Chapter VII) times. future at recall. allows the user to traverse a set in reverse (last to first) a To do this, order. well as in the normal order (first to last) sets for which negative sign (-) is placed before those reverse Suppose, for instance, that we need a list of traversal is desired. The path clause would be: employees in reverse alphabetic order. THRU -IEMP. Traversal through the sorted IEMP set would normally list Using this facility, one can also the names in alphabetic order. (and from FIFO LIFO vice versa). as information sets extract QRS. as. 18. Rev.. 82A. (C). COPYRIGHT. 1981. Micro Data Base Systems,. Inc..

(23) MDBS. QRS. MANUAL. - III.. LIST. mr'ík. rj. COMMAND. MOBS. -. QRS. MANUAL. mi rm. a control break can be declared for any data item. This means that whenever the value of that data item changes during the query The precise effect of a control a control break occurs. evaluation which break depends upon of the environmental options (21 - 27) are on Chapter VI The or off. how default is to have all of these options on. these parameters on or off. explains to easily turn any of. options 21-27 are on, then full statistics on term in the find clause are included in the every each break point. Reporting of a statistic can be control report at QRS generates suppressed by turning its option off. two sets of break the each observations point, one for all control statistics at and one for all the observations since the last control break point, since the beginning of the report. environment If numeric-valued. contain more than one control break for control breaks are specified after with the word by. For instance,. a query items used are prefaced LIST. ID,YTDEARN. BY. DNUMBER. THRU. Data item. find clause and. data. may. a. IDEP,HAS. number. LIST operates just as specifies a control break by department and IDS earnings) except described previously (giving year-to-date that each time QRS detects a different department number, statistics generated are for YTDEARN across all employees of that department.. setting. environment or console. a options and parameters correctly, each break's occur after clear will printer E'or automatic printer form feeds, the PP parameter should statistics. be set correctly and options 3 and 13 should be off. For automatic the CP parameter should be set correctly and option 2 console clears,. By. form. should. feed. page. be on.. prrnrt. pprlrt1r?¶. are printed out at titj,es The command.. ,ansi. nrric'nq. top of each page generated by by the LIST printed is as specified the title (Chapter environment parameter automatically centered VI). Titles are This positioning can be adjusted right or left at the top of pages. by padding the title with leading or trailing blanks. the. tl. coll?mn headirjqs by a LIST appear on the output table generated command. There heading each term is one for specified in the find clause. The heading produced for a term depends on the composition of a term that term. consists of a single data item, then the name of the that item is used as the corresponding column heading. nth term is an arithmetic expression, then the default heading "TERM n" is produced. heading a is longer than the particular item values the heading being printed in its column, is truncated to the item command SET The QRS (Chapter VI) can be used length. to specify alternative column headings.. If. If. If. (C). COPYRIGHT. 1981. Micro Data Báse Systems,. Inc.. Rev.. 85A. 19.

(24) MDBS. QRS. - III.. MANUAL. COMMAND. LIST. MOBS. -. QRS. MANUAL. The oraer of rows in a report produced by the LIST command is consistent with the ordering conventions of the sets appearing in the path clause. the user can turn on If a different order is desired, (Chapter environmental option 14 with the SET command VI). This will QRS cause to perform a line sort on the output before display or Of course, performing this internal sort incurs additional printing. overhead. processing. analYsis of any numeric terms in the find clause is statistical produced These analyses automatically at the end of the report. can be command suppressed by turning off options 21-27 with the SET as Chapter a. described in. VI.. Mta iteTns are allowed in find and conditional clauses. repeating data item is in a find clause, each of its values (that When a repeating clause) is retrieved. data satisfies the conditional a the conditional clause, condition is evaluated for item appears in each individual value of the repeating data item.. I If d.. Repeat,i,pq. a. Examples 1.. For. each. employee,. produce ID,. a. listing the employee's description. LIST 2.. ID,YTDEARN,JQB.DESCRIPT. Produce employee LIST. a. report (i.e., virtual table) year-to-date earnings, and job THRU. IEMP,>FILLEDBY. report listing the ID, name in departments l, 3 and 12. FOR. ID,FNAME,LASTNAME,PASTJOBS IDEP,HAS. and. DNUMBER. past jobs of each IN. 1l,3,l21. THRU. 3.. a produce report of job codes and the employees that whose each code employees year-to-date job for those 10000. earnings are less than. fill. LIST 4.. Rev.. a. 85A. ID,JOBCODE,SKILCODE IEMP,>FILLEDBY,NEEDS. ID,JOBCODE,SKILCODE IEMP,POSSESS,>NEEDS (C). COPYRIGHT. last. name. that employee's. each employee having a For produce a report listing that that need those skills. LIST. 20. YTDEARN<I0OOO. FOR. each employee having For a report produce listing skills needed by that job. LIST. 5.. ID,LASTNAME,FNAME. 1981. FOR. THRU. IJOB,FILLEDBY. beginning with A-NI, job and all of the. LASTNAME="IA-M1*". THRU. name beginning with A-M, last employee's skills and the jobs FOR. LASTNAME="1A-MI*". Micro Data Base Systems,. THRU. Inc..

(25) MDBS. QRS. 6.. MANUAL. each. For. a. LIST. a. jobs. MDBS. -. QRS. MANUAL. A-M, last name beginning with and that listing that employee's job. report. a. ID,JOBCODE,SKILCODE IEMP,>FILLEDBY,POSSESS. Produce. all. COMMAND. havinq. skills.. employee's. LIST. LIST. employee. produce. 7.. III.. -. FOR. LASTNAME="1A-MJ*". THRU. report listing the skill code and description for descriptions begin with the term "data base".. whose. SKILCODE,SKILL.DESCRIPT IJOB,NEEDS. FOR. jOB.DESCRIPT="data. base". THRU. 8.. produce. a. report. each employee and "systems LIST. 9.. ID,DNUMBER LINE="*data. For each employee. 10.. the List has the LIST. (C). ID. COPYRIGHT. PASTJOBS. LINE="*systems analysis*data base*" OR base*systems analysis*" THRU IEMP,DETAILS,HAS. FOR. in department 5, FOR. DNUMBER=5. THRU. list. Micro. FOR. Data. Ijjandpast jobs. of every employee who past job description.. PASTjOBS="*student*". Base Systems,. the. IDEP,HAS. ID and year-to-date earnings word "student" appearing in a. ID,YTDEARN. 1981. number of "data base". analysis".. of that employee. LIST. the ID and department listing biography contains the terms. whose. Inc.. THRU. IEMP. 21.

(26) MDBS. QRS. MANUAL. Sample. -. query. -->list. III.. session. lastname. using NAME. Grant Gagster Madison Fiskum Russet. Milwright More Ramsey. no. -->list. R R R. R. r R. R R. no. &. D. &. D. R. &. D. R. &. D. r. &. D. LIST. name. thru idep has >filledby DESCRIPT. programmer programmer group manager manager group manager salesman salesman group manager group manager. for dnumber=l. D. Duranger. d. Ferston. programmer programmer programmer programmer programmer programmer manager manager group manager. Fiskum. Laisler. Hanson Madison Koelder Stokes Russet Gagster. D D. d D D D. l0. descript for dnumber thru idep has >filledby. R R R. r R. and and and and and and no. 22. lastname. =. LASTNANIE. DESCRIPT. D. Duranger. D. Ferston. programmer programmer programmer programmer programmer programmer. NAME. D. Fiskum. D. Laisler. d. Hanson Madison. D. of observations:. (C). >filledby. vice president. of observations:. name -->Iist ogrammer". R. thru idep has. DESCRIPT. D. MANUAL. command:. LASTNAME. D. QRS. li. descript. lastname. MDBS. -. vice president vice president. of observations:. NAME. r. R R. COMMAND. production production sales sales sales cust support. Sellet. Goeld Dayton. and and and and and and and and and and. the. descript. name. LASTNAME. R. LIST. l. and. descript. =. "pr. 6. COPYRIGHT. 1981. Micro. Data. Base Systems,. Inc..

(27) MDBS. QRS. MANUAL. idep. NAME. rR r. and and and and. III.. D. d D. name. programmer programmer programmer. 800000000 700000000 600000000 222222222. Duranger. clerical staff group manager clerical staff salesman. lll000000. clerical staff clerical staff. Fiskum Gagster Court Goeld Crooner Durman Boumer. Gilvaston Dayton Grant. Burley. Dahl. 14. id for id. =. "$$$2*". thru iernp >has. 2. of observations:. -->list NAME. Ferston. 222200000 222222222. R. name. id for id. =. "$$$3*". ID. thru iemp >has. 333333333. sales no. LASTNAME. 555555555 222000000 660000000 550000000 440000000 110000000 333333333 222200000 555000000. MANUAL. "IA-G]*" thr. ID. ID. clerical and d. =. QRS. DESCRIPT. of observations:. -->list NAME. for lastname. vice president. clerical. no. id, lastname,. MDBS. -. salesman salesman salesman. tech support no. COMMAND. vice president. d. production production sales sales sales sales sales sales. of observations:. -->list iemp. lastname. l. id pastjobs for pastjobs. =. "*lSsltudent*". thru. LASTNAME. ID. PASTJOBS. Burley. 222200000 800000000 660000000 222222222 400000000 400000000 500000000 345665825 220487197 880000000. Student, Ball State Univ Student, Purdue Student, ISU ph student Student, Cornell Student, Taiwan Univ Student, Harvard Student, Univ of Illinois Student, Purdue Univ. Duranger Durman Gagster Hanson Hanson. Laisler. Ramsey Russet Woods. no. (C). LIST. name, descript, has >filledby. -->list u R. -. COPYRIGHT. of observations:. 1981. Micro. D. Student. 10. Data. Base Systems,. Inc.. Rev.. 82A. 23.

(28) MDBS. QRS. MANUAL. -->list LASTNAME. lastname. Duranger Duranger Duranger. Ferston Ferston Ferston Fiskum Fiskum Fiskum. Laisler Laisler Laisler. Hanson Hanson Hanson Madison Madison Madison Koelder Koelder Koelder Stokes Stokes Stokes Russet Russet Russet Gagster Gagster Gagster no. 24. Rev.. - III.. COMMAND. MDBS. -. id, pastjobs for dnumber. QRS. PASTJOBS. l. 800000000 800000000 800000000 700000000 700000000 700000000 600000000 600000000 600000000 500000000 500000000 500000000 400000000 400000000 400000000 300000000 300000000 300000000 100000000 100000000 100000000 999999999 999999999 999999999 220487197 220487197 220487197 222222222 222222222 222222222. Micro. Base Systems. (C). =. Data. MANUAL. thru idep has. ID. of observations:. 82A. LIST. Student, Purdue Staff,. Purdue University Telephone A & p food stores Northrup Defense Systems Hughes Aircraft Boeing Corp Mellon Bank Student, Harvard. General. Analyst Student, Cornell Student, Taiwan Univ. Digital. Technology. Data General U. S. Navy WBAA. Radio. Station. I.B.M Student, Purdue Univ. General. Telephone. Professor, Purdue Univ Ph d student Proqrammer. 30. COPYRIGHT. 1981. Micro. Data. Base Systems,. Inc..

(29) MDBS. QRS. MANUAL. - III.. -->list thru. lastname idep has. COMMAND. MDBS. -. id pastjobs for pastjobs. LASTNAME. ID. PASTJOBS. Duranger Duranger. 800000000 800000000 700000000 700000000 700000000 600000000 600000000 600000000 500000000 500000000 500000000 400000000 400000000 300000000 100000000 100000000 999999999 220487197 220487197 220487197 222222222 222222222 222222222. Micro. Ferston Ferston Ferston Fiskum Fiskum Fiskum. Laisler Laisler Laisler. Hanson Hanson Madison Koelder Koelder Stokes Russet Russet Russet Gagster Gagster Gagster no. (C). LIST. of observations:. COPYRIGHT. 1981. Micro. ne. QRS. MANUAL. "*" and dnumber. =. l. Data Base Systems Student, Purdue University Staff, Purdue Telephone General A & P food stores Northrup Defense Systems Hughes Aircraft Boeing Corp Mellon Bank Student, Harvard. Analyst Student, Cornell Student, Taiwan Univ Technology Digital General Data U. S. Navy WBAA Radio. Station. I.B.M Student, Purdue Univ. General. Telephone. Professor, Purdue Univ Ph student D. programmer. 23. Data. Base Systems,. Inc.. Rev.. 82A. 25.

(30) MDBS. QRS. MANUAL. -->list NAME R R R. R. r R. R R. R R. and and and and and and and and and and no. name. Duranger. Ferston. D. d d D. d D. D D. tech tech tech tech tech. 26. COMMAND. MDBS. -. QRS. MANUAL. thru idep has. Fiskum. Laisler. Hanson Madison Koelder Stokes Russet Gagster. of observations:. 10. Court. Sellet Goeld. of observations:. 3. Crooner Durman Boumer. Gilvaston Lowder. Milwright. Dayton More Grant. of observations: Lochinan Handee. 3. Burley Hollinger Norlady. of observations: support support support support support. 9. Woods. of observations:. clerical clerical clerical no. LIST. by dnumber. D. accounting accounting accounting no. lastname. D. sales sales sales sales sales sales sales sales sales no. III.. LASTNAME. production production production no. -. 3. Schutz DaPíl. Whistler Ramsey. Holst. no. of observations:. 5. no. of observations:. 33. (C). COPYRIGHT. 1981. Micro. Data. Base Systems,. Inc..

(31) MDBS. QRS. IV. A.. MOBS. MANUAL -. WRITE,. STATS,. DBSTAT. MANUAL. COMMANDS. Syntax. <write> <. spew>. <stats> <dbstat> B.. SPEW,. QRS. <find clause><conditional clause><path <find clause><conditional c1ause><path <find clause><conditiona1 clause><path. clause> clause> clause>. Synopsis. (special write), and STATS (statistics) commands They retrieve are constructed in the sanie way as the LIST command. handle the retrieved command. a LIST However, the sanie data as they The T'7RITE command writes the data differently than the LIST comnand. without any titles, headings, o r retrieved Gata on a disk then file used as input to various programs. be statistics. This file can The special write command (i.e., the SPEW commaná) has the sanie effect as the WRITE command, except that the retrieved data is written on the disk file in a special format that allows to be directly input to Qr packaqes available within popular graphics spread-sheet software the host operating system The STATS corrtmand generates statistics for the retrieved data, on a terra-by-term basis. Individual data values that are retrieved in order to generate tiÁé statistics are not OZ the None displayed. three commands uses a break clause. The WRITE,. SPEW. it. The. DI3STAT. statistics C.. Desc. l.. is. command. pertaining. to. used. to obtain. retrievals. data. data base. performed. by Crs.. processing. ription W?TTF. is formulated in the same way as a LIST and no that write is substituted for A command same break clause is used. the write retrieves data as a LIST command. The retrieved data is written onto the disk file indicated by the FN environment parameter. The SET command is used to assign a disk file name to the WRITE command command except. A. list. F2'1. (Chapter. parameter. VI). .. format of a file generated by a I'IRITE command i s qoverned by the sequence of terms in the find clause and the types of those data iteIns. Term values are written out one the table of retrieved elata has n virtual per line. columns, thenIf the n lines of the file are formed from first The next n lines the first row of the virtual table. consist of the data values in the second row of the virtual Each data value is written on the disk table, and so forth. would exactly displayed through a LIST as appear file. The. command. it. .. if. file produced by the WRITE command can be incorporateá into a Knowleáget4an or Guru table without any intermediate processing. This incorporation is accomplished with the A. (C). COPYRIGHT. 1981. t4icro. Data. Base Systems,. Inc.. Rev.. 85A. 27.

(32) MDBS. QRS. - IV.. MANUAL. 17RITE,. SPEW,. CObll.IANDS. STATS. -. 64DBS. QRS. MANUAL. Knowledge!2an. command. Once the data is or Guru ATTACE!!·1DBS the data base and incorporated extracted f rom central a be can processed with the various into table, Knowledqei4an (e.g., third generation or Guru facilities spreadsheet, relational data management, screen I/O manager, report forms manager, etc.). The file that results from a WRITE command can also be utilized tQ other as input programs, (e.g., a DI4L program that loads the file's data into another data base).. it. that a tabular usual printer form Chapter VI) Note. by. may file turning. be on. created according to the environment option 4 (see. .. 2.. SEM SPEll command command except. A. is formulated that spew is. in the same way as. LIST and no substituted for A SPEF'I command retrieves the sanie break clause is used. data as a LIST command. The retrieved data is written onto indicated by the FN environment paranaeter. the disk The set comraand is used to assign a disk name to the FN (Chapter parameter VI). a. list. file. file. format of a file generated by the SPEW command is operating system depenccent and is described in the var ious Systerú Specific Manuals. Generally, the fiormattinq is e .g . , format DIF) used by consistent with the spreadsheet and/or graphics packages available within an This command is unavailable in operating operating system. systems that do not support such packages.. The. 1.1Dl3S. file. (. that year-to-date earnings represents 5 and that we in departrüent a spread-sheet ?resent that will use Then desire to build cowmissiQñs t o project future commissions. t he command SPEW is appropriate Suppose, for example, commissions for sales. SPEW. 3.. LASTNAI'IE. employees. ,YTDEARN. FOR. DNU61BER=5. THRU. ,E!AS. ST?T5. is formulate¿ in the same way as a LIST and no is substituted for except that stats STATS A command used. sanie the retrieves break clause is T h e s command. a data i ri q t LIST retrieved data as data the on only are retrieved displayeá; statistics of values that For each numeric term, the displayed. is sub jected to satisfies the find and conditional Tclauses maxiAtum, minimum, he analyses. standard statistical aná number deviation, variance, suit., are computedoE average, standard each term's retrieved values observations for For data iteras having non-numeric values, and displayed. displayeá. only the number of observations is computed and suppressed be the can preceding of statistics Display of any by turning off the appropriate environment options (21-27) with the set command (Chapter VI). COPYRIGHT (C) Micro Data Ease Systems, 1981 Inc. Rev. 85A A. STATS. command. list. command,. list. 28. IDEP.

(33) MDBS. QRS. MANUAL. WRITE,. - IV.. STATS. SPEW,. COMMANDS. instance, to obtain statistical analyses earnings of all employees working for Indianapolis, the appropriate query is:. For date. STATS. 4.. YTDEARN. FOR. MDBS. a. MANUAL. QRS. of the year-todepartment in. LOCATION="*Indianapolis*". IDEP,HAS. THRU. I2J3STAT command has the same effect as The DBSTAT invoked from within a DML application program DBSTAT shows the following the OMS Manual).. a). the number memory,. b). the. of page buffers currently. statistics:. data. when XI of. in. main. base). that. allocated. number of times (since opening the most recent page access was to a the last page access,. the than. does it(Chapter. different. number of read requests issued by the system since opening the data base, control. C). the. d). the number of write requests issued since the data base that were due to DBSAVE or to background was opened processing in a multiuser environment,. e). the base. This. command. number of write requests issued control system since opening the data. total. is invoked. by. data. page base. by the base.. data. simply typing:. DBSTAT. D.. Examples WRITE. LASTNAME,FNAME,ID,YTDEARN. WRITE. DNUMBER,JOBCODE. FOR. SPEW. LASTNAME,YTDEARN. THRU. SPEW. LASTNAME,YTDEARN. FOR. STATS. DNUMBER<13. IEMP THRU. IDEP,HAS,>FILLEDBY. IEMP. LOCATION="*Indianapolis*". YTDEARN. FOR. JOBCODE=5. YTDEARN. FOR. LINE="*data. STATS. THRU. THRU. THRU. IDEP,HAS. IJOB,FILLEDBY. base*". AND. DNUMBER=7. THRU. IDEE',. HAS,DETAILS DBSTAT. (C). COPYRIGHT. 1981. Micro. Data. Base Systems,. Inc.. Rev.. 83A. 29.

(34) MDBS. QRS. MANUAL. Sample. - IV.. query. -->stats. SPEW,. WRITE, using. session. the. STATS. STATS. COMMANDS. MDBS. -. QRS. MANUAL. command:. ytdearn thru iemp. YTDEARN:. no of observations: sum 20410.00 4000.00 max 10.00 min 1855.45 ave 1579027.27 var 1256.59 std. -->stats. ytdearn for. li. name. "sales" thru idep has. =. YTDEARN: no. of observations:. 22800.00 4000.00 100.00 2533.33 1612500.00 1269.84. 9. sum max. min ave var. std. for name -->stats ytdearn/lOOO idep has >filledby thru. =. "R. and D" and. descript. Micro. Base Systems,. =. "progra. mmer". l:. Term no of observations: 17.00 sum 4.40 max 0.50 min 2.83 ave 2.95 var 1.72 std. 6. __>. 30. (C). COPYRIGHT. 1981. Data. Inc..

(35) MDBS. QRS. MDBS. MANUAL.. QRS. MANUAL. -. V. A.. COMPUTECOMMAND. Syntax <compute>. B.. Synopsis. expressions is used to evaluate arithmetic be a The can computation result of that not involve data items. SPEW, and used in the next computation or in subsequent LIST, WRITE, STATS Simply put, the compute command commands. provides the user with an ínteractive calculator. The do. C.. compute. command. Description. The system To enter the compute mode, compute. simply type: then prompts (with C:) for an arithmetic expression to be evaluated. The evaluation is returned to the console and the user is result prompted mode, the compute To for another arithmetic expression. exit type Q. QRS responds with the --> prompt.. preceding of the If the user desires to use the result symbol computation in the next computation, then the is used (e.g., #+5 # The will add 5 to the result of the preceding computation).clauses symbol can similarly be used in the find and/or conditional of SPEW, subsequent Computations and STATS commands. LIST, WRITE, are 7 More precisiQn is accurate to at least significant digits. available under some operating systems. #. d.. Examples. -->. COMPUTE. C:. 7/5 1.4000000 #+0.6 2.0000000. C: C:. Q. --> LIST íD(YTDEARN+#)/l0O0. FOR. YTDEARN/IO00>6.2*#. THRU. IEMP. ...report.... -->. STATS YTDEARN THRU YTDEARN: 15780.00. 3010.76. (C). COPYRIGHT. 1981. IEMP AVE STD. Micro Data Base Systems,. Inc.. Rev.. 85A. 31.

(36) MDBS. QRS. MANUAL. -->. COMPUTE. C: C:. -. V.. COMPUTE. COMMAND. -. MDBS. QRS. MANUAL. 2*3010.76+15780. 2l80l.5200000. Q. --> LIST. NAME. FOR. YTDEARN># . .. THRU. . report.. IEMP. . .. .. 32. Rev.. 85A. (C). COPYRIGHT. 1981. Micro Data Base Systems,. Inc..

(37) MDBS. QRS. MDBS. MANUAL. QRS. MANUAL. VI. SETCOMMAND A.. Syntax <set><parameter><value> or <set><opt><number><status> or <set><heading list>. B.. Synopsis. within which a is used to specify the environment environment be executed. The is described in terms query willparameters Environment and environment options. of environment be parameters can set to have various numeric or character values. Environment options have a status of either on or off. The. SET command. command. that also be used to replace column headings for a LIST command, with alternative headings. SET commands can be used any time during a query session to alter the environment. The values of individual parameters can be altered SET The status of an option can be command. whenever desired with the changed whenever aesired with the SET command. Column headings can be revised whenever desired. Tlíe. would. C.. SET. command. normally appear. can. Oescription Setting Environment. Parameters. &umau The parameters. following. is proviaed parajrleter CC CD CL CN CP. es CW. FN. Ml MS QC OF PC. (C). is a summary of the A default values.. their after this. and. summary.. descriptiQn. defaült value. close character class symbol. console depth . . . . . . . comment leact. symbol. .. .. character class negation page eject. . . spacing. . . . . width . . . . .. console column console. file. name. .. .. .. .. .. .. .. .. . .. . . .. . . . . .. . . . . .. . . . . .. . . . . .. . .. . .. . .. . . .. .. symbol. match-one character . . match string (wilácará) symbol. open character class symbol .. output format printer close. COPYRIGHT. 1981. environment available full description of each. . .. . .. . .. . .. . .. . . . . . . . . . . . . .. Micro Data Base Systems,. . . . . . . . . . . . . .. . . . .. . . . .. . . . . . . . O,. . . . . . . .. o,. Inc.. . . . .. . . . .. o,. o,. . . . . . . . O,. . .. ]. 24 ;. " o 2 80. none. $. . * . [ . 89 . O, O. Rev.. 85A. 33.

(38) MDBS. QRS. MANUAL. SET. - VI.. COMMAND. KDBS. -. c1e5cripr.iDn. parAmet.er. defa1}1t.. printer depth . . . . . . printer margin. . . . . . printer open. . . . . . . printer page eject. . . . printer utility . . . . . width . . . . . . printer nested select close symbol. scale factor. . . . . . . nested symbol. pd PM PO PP PU PW SC SE SO. . . .. select open. title. TL. . . . . . .. .. .. .. .. .. .. .. .. .. .. . . . . . . . . . .. . . . . . . . . . .. To set any of these parameters the default value, the syntax is. . . . . . . . . . .. . . . . . . . . . .. . . O,. . . . . . . .. .. .. MANUAL. Vá1ñe. . . . . . . O, O, .. QRS. 60 O O. o. various. . . . . .. 120. . . . . .. to have. . . .. } O. {. none a. value other than. <set><parameter><value>. when setting theFN, Ml, MS, and TLparameters, thevalue mustbe enclosed in quotes. When setting the CP, PC and PO parameters, a of one, two, three, or four values can be specified. sequence The values specified These values are separated by commas. for the CD, CP, CW, OF, PC, PD, PM, PO, PP, PW, SP and SF parameters must be integers.. parameters allow all QRS features tobe terminal character sets. The absence of a default from a terminal character set does not character preclude a user from utilizing the corresponding QRS feature. The SET command can be used to specify values other than the default values for these parameters.. The CC, CN, Ml, MS and QC used with widely diverse. EnyirQnm!mk. itsl. SET. 1.1. s. Symbol. CC. parameter indicates the close class class. For example, to change this symbol defaultto), the following SET command is used:. The value of the symbol for a character. from. u inmte r mm. Character Class. Close. CC. Pn. CC. CC. ). Deptií. Console. CD. CD. indicates the depth, in lines, value of the CD parameter example, For to change the console depth from console page. 26 lines the following SET command is present value to, say, The. of. a. its. used:. SET. 34. CD. The. default. Rev.. 85A. 26. value for. (C). CD. is 24.. COPYRIGHT. 1981. Micro. Data. Base Systems,. Inc..

(39) MDBS. QRS. - VI.. MANUAL. COMMAND. SET. MDBS. -. QRS. CL. Comment Lead Symbol. CL. MANUAL. parameter indicates the comment lead and the symbol this appears in a command, has this same remainder also of the line are ignored by QRS. It effect when appears in macro text (Chapter VII), a READ file (Chapter VIII, or a startup file (Chapter XI). As an example, thecomment lead symbolcanbechanged from itsdefaultof ; to \ with the following SET command: The. value of the. symbol.. CL. it. Whenever. it. SET. CL. \ Negation. Character Class. CN. The value of the CN parameter use within a character class. for symbol from its " default value to is used: SET. CN. CN. indicates the negation symbol For instance, to change this SET command -, the following. Console. CP. The. Symbol. Page. Eject. cp. value. of the CP parameter is used to indicate the console page eject sequence. This can consist of up to four integer values, any of which can be changed from its default The permissible value. is through 255. range for each value B) that correspond These should be the ASCII numbers (Appendix to Each time the console depth the console's page eject sequence. (see CD) is reached, the CP character is used to clear sequence the screen. For example, the console's page eject character is ESC [ 2 sequence (e.g., under MSDOS), then the appropriate SET command is: O. O. if. j. SET. CP. 27,91,50,74. is left If eject will occur CP. at. default its the. when. generation of a report. cleared before the start scroll upward instead. CS. value of 0,0,0,0 then no page during the QRS screen is In other words, the screen is not of a new page. Its contents simply. Column. full. Spacing. CS. The value appear between. of the es parameter specifies how many spaces will columns in reports generated by the LIST command. For instance, to set the column spacing at 4 spaces, the following SET command is used: SET. The. (C). es. default. COPYRIGHT. 4. value for es is 2.. 1981. Micro Data Base Systems,. Inc.. Rev.. 85A. 35.

(40) MDBS. QRS. MANUAL. - VI.. CW. SET. Console Tlie. COMMAND. MDBS. -. QRS. Wiáth. MANUAL CW. parameter of the specifies how many display 79, cnaracters are permitted per console line. rather than the default of 80, characters are desired per Ifconsole line, then the appropriate SET command is: SET. The. value. CW. aefault. CW. 79. value of. CW. is 80. File. FN. Name. FN. value of FN specifies the name of a file that is to be Using to hold the output from a WRITE or SPEW command. environmental option 4 (described below) output f r om a LIST When command can also be written to the named file. assigning a FN name name the be fully parameter, must the to f lle file quoted and be must system within the operating host qualifiea There is no default value for FN. For within the set command. instance , to set the FN parameter to be the file named WFILE on the proper SET command drive A under the PCDOS operating system, is : The. used. SET. FN. "A: WFILE" Match-One. Ml. Symbol. Ml. value of the Ml parameter indicates the match-one symbol is to t)e used by QRS in evaluating relational expressions. a 2, As noted in Chapter is the default match-one symbol. If SET then match-one symbol ?, is desired, the say different command is used (quoting the new match-one symbol) The. that. $. :. SET. Ml. ". ?" Match. MS. String. (wildcard). Symbol. MS W. parameter indicates the wildcará symbol value of the QRS De by used in evaluating relational expressions. that is to Chapter noted 2, * As is the default match-string symbol. in If then the SET symbol is desired, a different match-string say : command is used (quoting the new match-string symbol) : Tlíe. MS. ,. SET. MS. ". · 0. ". Open. QC. .Character Class. Symbol. QC. The value of the QC parameter indicates the open class change example, a symbol for to character class. For this symbol command SET used: [ is from its default to (, the following SET 36. Rev.. 85A. CC. (. (C). COPYRIGHT. 1981. Micro Data Báse Systems,. Inc..

(41) MDBS. QRS. MANUAL. - VI.. OF. SET. Output. COMMAND. MOBS. -. QRS. MANUAL OF. Format. The value of the OF parameter is two digits. The two digits data indicate the format that QRS will use in displaying numeric The shows number of values. that are the to first digit of a decimal point. digits The second be displayed to the digit ind1cates the number left of digits that are to be displayed to the right of the decimal point (and counting the decimal point as one of these) . An OF value of 30 will result in the display of the 3 low (no decimal order digits to the left of the decimal point OF value of 31 has the An same point is displayed) . ef fect An OF value of except that the decimal point is also displayed. 32 yieíds the display of 3 digits to the left and the to digit The OF default is 89. of a decimal point. This is the right As an example, maximum display precision allowed. an output 2 6 the ormat and consisting of to digits f digits to the left SET command needed, then is the appropriate right is:. l. if. SET. OF. 27.. Printer. PC. Close. PC. The PC parameter has a sequence of four integer values, any The permisof which can be changed f rom Oits O default value. sible range for each value is through 255. Integer equivalents These to the various ACSII characters are given in Appendix B. values ar e routed to the printer at any point where printer by setting environment option 3 to on (as output is suppressed, described later in this chapter) . The values are used to control operations when QRS is informed that printer output is to printer be suppressed. The default values have no effect on printer the close control sequence for the As an example, operations. 23 4 (Control-l)) can be set to 2 (Control-B) , (Control, printer IN) O SET by using the command: , SET. PC. 2,. 4,. 23,. O.. The va.Lues can. be. separated. by. Printer. PD. commas. or. blanks.. Depth. PD. The. value of the pd parameter specifies how niany lines to The default is before the next printer page eject occurs. print 60 To cause a page eject after each 40 lines of printer output, . the appropriate SET command is: SET. (C). COPYRIGHT. PD. 40. 1981. Micro Data Base Systeíns,. Inc.. Rev.. 85A. 37.

Referenzen

ÄHNLICHE DOKUMENTE

This report describes the processing of raw data acquired by position sensors on board RV Po- larstern during expedition PS89 to receive a validated master track which is used

This report describes the processing of raw data acquired by position sensors on board RV Po- larstern during expedition PS90 to receive a validated master track which is used

Grain size distribution analyses were routinely performed on Deep Sea Drilling Project cores at the project's shore-based labs through leg 79. Detailed discussions on

Since the maximum stress value chosen to calculate the shipboard shear strengths is not known, minor discrepancies between the shipboard and DSDP shear strengths

The data base approach to information systems evolved, in large measure, in response to the problems associated with what can be termed the

or a non-existent record type is specified, a list of If a existing recorci types is displayed and the user is again all When prompted to enter the name of the area to be deleted..

For each record type declared in a data base's logical structure, there can exist zero, one, or more occurrences of that record type in An occurrence of a record type consists of a

A form or organization of records in a data base management system in which extensive use is made of secondary index capability to provide alternative access