ug_ch8.htm
来自「db.* (pronounced dee-be star) is an adva」· HTM 代码 · 共 1,833 行 · 第 1/5 页
HTM
1,833 行
value, the scanning will begin from the first key.</font></p><p>The records located by the scan will be paged and displayed in ahorizontal packed format. This is similar to the format that wouldresult if the <b>struct</b> variable corresponding to the recordwere statically initialized in a C program. That is, it would beenclosed in braces, { }, with each sub-field grouping separated bycommas. For more information about the display of various<b><i>db.*</i></b> data types, see section 8.3.3.</p></div><blockquote style="MARGIN-RIGHT: 0px"><blockquote style="MARGIN-RIGHT: 0px"><p>Figure 8-11 shows a sample record scan display.</p></blockquote></blockquote><hr><div style="margin-left: 6em"><pre><font color="#0000FF">Record: EMPLOYEE Key: EMP_ID Page: 1<br>ENTRY RECORD CONTENTS 1. {"7901",{"Pfeil","Carl","L."},"MGR1"} 2. {"7902",{"Rogers","Jim",""}, "MGR1"} 3. {"7903",{"Fleagle","Jenifer","C."},"MGR2"} 4. {"7904",{"Smith","Stephen","P."},"MGR1"} 5. {"7906",{"Warren","Wayne","L."},"MGR1"} 6. {"7907",{"Merilatt","Randall","L."},"MGR1"} 7. {"8001",{"Bryant","John","W."},"MGR2"} 8. {"8002",{"Willis","Kirt","L."},"MGR2"} 9. {"8003",{"Mureen","Chris",""}, "ENGR"} 10. {"8101",{"Temple","Anita","J."}, "ADMN"} 11. {"8102",{"Rodovsky","Eliska",""}, "ENGR"} 12. {"8102",{"Marsh","Kyle","G."}, "ENGR"} 13. {"8103",{"Carlson","Bob","C."}, "MGR1"} 14. {"8104",{"Bustamante","Tina","L."}, "ENGR"}</font></pre></div><hr><p align="center"><font size="2"><b>Fig. 8-11. A SampleKeyscan/Scan Display</b></font></p><p>Keyfind<br>Quickly finds and displays one record. When you select a key fieldfrom the displayed list and enter a value, this command displayseither the record associated with the specified key value, or ifthe key is not found, the record associated with the next key.Compound key and <b>struct</b> fields must be enclosed by braces ({}). Character strings do not need to be delimited by quotationmarks except when included as part of a <b>struct</b> field.</p><p>First<br>Finds and displays the record associated with the first key in thekey file.</p><p>Last<br>Finds and displays the record associated with the last key in thekey file.</p><p>Next<br>Finds and displays the record associated with the next key in thekey file. If a <b>Next</b> command causes a "no more keys" messageat the end of a file, a subsequent <b>Next</b> command will returnthe first key.</p><p>Previous<br>Finds and displays the record associated with the previous key inthe key file. If a <b>Previous</b> command causes a "no more keys"message at the end of a file, the next <b>Previous</b> command willreturn the last key.</p><h4>Get command</h4><div style="margin-left: 2em"><p><font size="2">Displays the record located at a specifieddatabase address. When prompted for the database address, enter itas:</font></p><pre><font color="#0000FF">enter database address: [<b><i>f</i></b> :<b><i>r</i></b>] </font></pre><p><font size="2">where <b><i>f</i></b> is the file number and<b><i>r</i></b> is the record number. Refer to section 14.2.2,"Data File Organization," for a description of databaseaddresses.</font></p></div><h4>Enter command</h4><div style="margin-left: 2em"><p><font size="2">Enters new records into the database. From thedisplayed list, select the record type to be entered. The<b>Display/Edit Record</b> submenu is then invoked. Section 8.4.1,shows the <b>Display/Edit Record</b> submenu and describes itsfunctions in detail.</font></p></div><h4>Modify command</h4><div style="margin-left: 2em"><p><font size="2">Invokes the <b>Display/Edit Record</b> submenu,which provides a set of tools for modifying the current record,which may be selected in a variety of ways. For detailedinformation, about the <b>Display/Edit Record</b> submenu, seesection 8.3.2.</font></p></div><h4>Delete command</h4><div style="margin-left: 2em"><p><font size="2">Deletes the current record from the database. Therecord must have been previously disconnected from all sets ofwhich it was an owner or a member.</font></p></div><h4>Recscan command</h4><div style="margin-left: 2em"><p><font size="2">Invokes the <b>Scan and View Record Based onDatabase Address</b> command submenu. The commands in this submenuuse the <b>d_recfrst</b>, <b>d_recnext</b>, <b>d_reclast</b> and<b>d_recprev</b> functions to locate the records, instead of thekey traversal functions.</font></p></div><hr><div style="margin-left: 4em"><pre><font color="#0000FF">Scan and View Record Based on Database AddressScan First Last Next Previous X_exit</font></pre></div><hr><p align="center"><font size="2"><b>Fig. 8-12. Scan and View RecordBased on Database Address Submenu</b></font></p><div style="margin-left: 4em"><p>Scan<br>Scans records based on their database address (their order isdetermined by their physical appearance in a data file). A list ofall record type names will be displayed, from which you shouldselect the type to be scanned.</p><p>The records located by the scan will be paged and displayed inthe same horizontal packed format as the <b>Keyscan</b> command.For more information about the display of various<b><i>db.*</i></b> data types, see section 8.3.3.</p><p>First<br>Finds and displays the first record of the selected type in thedata file.</p><p>Last<br>Finds and displays the last record of the selected type in the datafile.</p><p>Next<br>Finds and displays the next record in the data file. When itreaches the end of the file, it displays a "no more records"message. A subsequent <b>Next</b> command will begin with the firstrecord.</p><p>Previous<br>Finds and displays the previous record in the data file. When itreaches the top of the file, it displays a "no more records"message. A subsequent <b>Previous</b> command will begin with thelast record.</p></div><h3>8.4.2 Using the Access Set Commands</h3><p><font size="2">Selecting the <b>Set</b> command from the<b>Database Access Commands</b> submenu, accesses the <b>SetManipulation Functions</b> submenu, which provides a set of toolsfor managing sets. This submenu is shown in Figure 8-13, followedby a description of its functions.</font></p><hr><div style="margin-left: 4em"><pre><b><font color="#0000FF">Set Manipulation Functions</font>Scan Owner First Next Last Previous Connect Disconnect Total X_exit</b></pre></div><hr><p align="center"><font size="2"><b>Fig. 8-13. Set ManipulationFunctions Submenu</b></font></p><h4>Scan command</h4><div style="margin-left: 2em"><p><font size="2">Scans and displays all member records connectedto the current owner of a set. The set to be scanned is selectedfrom the displayed list of set names.</font></p><p>The records located by the scan will be paged and displayed in ahorizontal packed format. This is similar to the format that wouldresult if the <b>struct</b> variable corresponding to the recordwere statically initialized in a C program. That is, it would beenclosed in braces, { }, with each sub-field grouping separated bycommas. For more information about the display of various<b><i>db.*</i></b> data types, see section 8.3.3.</p></div><h4>Owner command</h4><div style="margin-left: 2em"><p><font size="2">Finds the owner of the current record, throughthe set selected from the displayed list of set names. Note thatthis function serves a different purpose than the Owner functionunder the Display/Edit Record submenu.</font></p></div><h4>First command</h4><div style="margin-left: 2em"><p><font size="2">Finds the first member connected to the currentowner of the set selected from the displayed list of setnames.</font></p></div><h4>Next command</h4><div style="margin-left: 2em"><p><font size="2">Finds the next member of a set. The first time(or after a "no more records" message), <b>Next</b> displays thefirst member of the set.</font></p></div><h4>Last command</h4><div style="margin-left: 2em"><p><font size="2">Finds the last member connected to the currentowner of the set selected from the displayed list of setnames.</font></p></div><h4>Prev command</h4><div style="margin-left: 2em"><p><font size="2">Finds the previous member of a set. The firsttime (or after a "no more records" message), <b>Prev</b> displaysthe last member of the set. A <b>Last</b> or <b>Next</b> commandmust have preceded the call to <b>Prev</b>.</font></p></div><h4>Connect command</h4><div style="margin-left: 2em"><p><font size="2">Connects the current record to the current ownerof the set selected from the displayed list of setnames.</font></p></div><h4>Disconnect command</h4><div style="margin-left: 2em"><p><font size="2">Disconnects the current record from the setselected from the displayed list of set names.</font></p></div><h4>Total command</h4><div style="margin-left: 2em"><p><font size="2">Displays a count of the members connected to thecurrent owner of the set selected from the displayed list of setnames.</font></p></div><h3>8.4.3 Using the Access Currency Commands</h3><p><font size="2">The <b>Currency</b> command, selected from the<b>Database Access Commands</b> submenu, accesses the <b>CurrencyTable Manipulation Functions</b> submenu (shown in Figure 8-14 andfollowed by a description of its functions).</font></p><hr><div style="margin-left: 4em"><pre><b><font color="#0000FF">Currency Table Manipulation Functions</font>Owner Member Record Auto_set Display Timestamp X_exit</b></pre></div><hr><p align="center"><font size="2"><b>Fig. 8-14. Currency TableManipulation Functions Submenu</b></font></p><h4>Owner command</h4><div style="margin-left: 2em"><p><font size="2">Sets the current owner of the set selected fromthe displayed list of set names. This function then invokes the<b>Change Current Owner of Set</b> submenu, from which you selectthe record you wish to be made current. The submenu is shown inFigure 8-15, followed by a description of its functions.</font></p></div><hr><div style="margin-left: 8em"><pre><b><font color="#0000FF">Change Current Owner of Set</font>Record Owner Member Change X_exit</b></pre></div><hr><p align="center"><font size="2"><b>Fig. 8-15. Change Current Ownerof Set Submenu</b></font></p><div style="margin-left: 4em"><p>Record<br>Changes the current owner of the selected set to the currentrecord.</p><p>Owner<br>Changes the current owner of the previously selected set to thecurrent owner of the set selected from the displayed list ofsets.</p><p>Member<br>Changes the current owner of the previously selected set to thecurrent member of the set selected from the displayed list ofsets.</p><p>Change<br>Changes the current owner of the selected set to the databaseaddress entered in response to the prompt:</p><pre><font color="#0000FF">enter database address: [</font><b><i><font color="#0000FF" size="1">f </font></i></b><font color="#0000FF">:</font><b><i><font color="#0000FF" size="1">r</font></i></b><font color="#0000FF">]</font></pre><p><font size="2">where <b><i>f</i></b> is the file number and<b><i>r</i></b> is the record number. Refer to section 14.2.2,"Data File Organization," for a description of databaseaddresses.</font></p></div><h4>Member command</h4><div style="margin-left: 2em"><p><font size="2">Sets the current member of the set selected fromthe displayed list of set names. It then invokes the <b>ChangeCurrent Member of Set</b> submenu, shown in Figure 8-16, todetermine the record to be made current.</font></p></div><hr><div style="margin-left: 10em"><pre><b><font color="#0000FF">Change Current Member of Set</font>Record Owner Member Change X_exit</b></pre></div><hr><p align="center"><font size="2"><b>Fig. 8-16. Change CurrentMember of Set Submenu</b></font></p><div style="margin-left: 4em"><p>Record<br>Changes the current member of the selected set to the currentrecord.</p><p>Owner<br>Changes the current member of the previously selected set to thecurrent owner of the set selected from the displayed list ofsets.</p><p>Member<br>Changes the current member of the previously selected set to thecurrent member of the set selected from the displayed list ofsets.</p><p>Change<br>Changes the current member of the selected set to the databaseaddress entered in response to the prompt:</p><pre><font color="#0000FF">enter database address: [<b><i>f</i> :</b>r</font>]</pre><p><font size="2">where <b><i>f</i></b> is the file number and<b><i>r</i></b> is the record number.</font></p></div><h4>Record command</h4><div style="margin-left: 2em"><p><font size="2">Changes the current record. This selectioninvokes the <b>Change Current Record</b> submenu, shown in Figure8-17, to determine the record to be made current.</font></p></div><hr><div style="margin-left: 12em"><pre><b><font color="#0000FF">Change Current Record</font>Owner Member Change X_exit</b></pre></div><hr><p align="center"><font size="2"><b>Fig. 8-17. Change CurrentRecord Submenu</b></font></p><div style="margin-left: 4em"><p>Owner<br>Changes the current record to the current owner of the set selectedfrom the displayed list of set names.</p><p>Member<br>Changes the current record to the current member of the setselected from the displayed list of set names.</p><p>Change<br>Changes the current record to the database address entered inresponse to the prompt:</p><pre><font color="#0000FF">enter database address: [<i>f :r</i>] </font></pre><p><font size="2">where <b><i>f</i></b> is the file number and<b><i>r</i></b> is the record number.</font></p></div><h4>Auto_set command</h4><div style="margin-left: 2em"><p><font size="2">Toggles the automatic set connection flag within<b>ida</b>. When turned on, this flag causes newly entered recordsto be connected automatically to the current owners of the sets forwhich they are members.</font></p></div><h4>Display command</h4><div style="margin-left: 2em"><p><font size="2">Displays the currency tables showing the recordtype and database addresses of the current record and, for eachset, the current owner and current member of that set. It alsoindicates whether automatic set connection is enabled.</font></p></div><h4>Timestamp command</h4><div style="margin-left: 2em"><p><font size="2">Invokes the <b>Timestamp Currency Functions</b>submenu, shown in Figure 8-18, for testing currency table timestamp
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?