_ | Index Level | ! (Unix) |
Syntax | |
Category | TCL |
Type | Introduction |
Description |
The Pick System Terminal Control Language (TCL) is a system-level command language with system-defined or user-defined statements that can be executed individually or sequentially. System-defined statements are called TCL verbs. User-defined statements are: macros, menus and cataloged FlashBASIC programs. The first word of a TCL statement must be either a system verb, macro, menu or cataloged FlashBASIC program.
TCL commands can be typed in when the TCL prompt colon (":") displays. The completed command is entered for processing by pressing <Ctrl>+m or <Return>. Because mistakes do occur, TCL editor and TCL stack facilities are provided. The TCL editor allows corrections to commands after they are entered, but before they are executed. The TCL stack each command entered at the TCL prompt and allows you to recall commands for correction and/or execution. Refer to the sections "Editing TCL Commands" and "TCL Stack" below and to the entries tcl stack and tcl edit commands for more information. TCL commands include the Access and Spooler commands. Access is a system-level information retrieval language that allows you to query your data base without writing complex programs. The Spooler commands allow you to control how information is output to the printer. Editing TCL Commands The TCL editor uses the Update processor (UP) to enter commands, so the TCL editor commands are similar to the UP commands. A TCL command may be created and edited as if it were a paragraph. Pressing a <Ctrl>+m or <Return> key within the TCL command processes the entry. The TCL editor is initially in the overtype mode. To toggle between overtype and insert mode, type <Ctrl>+r. The following commands function the same in the TCL editor as they do in UP. Refer to the keyboard template provided later in this section. <Ctrl>+ b Move cursor up one line. e Delete to end of sentence (command). g Move cursor to end of sentence (command). h Backspace and replaces character with space. i Go to next tab position on line. j Move cursor left. k Move cursor right. l Delete character. m Insert mode: processes the entry when the cursor is at the end of a line; inserts a carriage return/line feed when the cursor is within the line. n Move cursor down one line. o Delete from cursor to end of word. r Toggle between overtype and insert modes. t Move cursor to beginning of command. u Move cursor to next word. w Insert single space. x Exit TCL command and leaves just the TCL prompt. y Move cursor back one word. z z Undo last delete. TCL Stack When a command is entered at the TCL prompt, the system saves the command in the TCL-stack file of the dm account. In D3, your stack is not terminal dependent. If you leave a terminal without logging off, another user can use the terminal under your user id. This causes the new user to "step-on" the your stack. Changing any part of a TCL command in the stack, causes that stack entry to be moved to the top of the stack. This feature tends to keep the stack compact. However, the TCL stack does not have a maximum number of entries and can continue to grow indefinitely. Therefore, from time to time, the stack should be pruned either from TCL or by using the update command to modify the actual stack item (u dm,tcl-stack, user.name). The following commands are used to move through a stack and to retrieve and run previously entered commands: <Ctrl> + a Searches for the entered string. c p (cut and pop) Removes the current TCL command from its present position; places it at the top of the stack. d Goes back to the previous command in the stack. e If the cursor is on the first character, deletes the entry from the stack and displays the next command down the stack; otherwise deletes to the end of the command. f Goes forward to the next command up in the stack. p Moves a duplicate copy of the current TCL command at the current position in the stack to the top of the stack. x Clears the displayed command from the screen and moves the pointer back to the top of the stack. z Goes to the command at the top of the stack. z a Same as <Ctrl>+a but searches to the top of the stack. Pushing Levels The execution of any command or program can be interrupted by pressing the <break> key. When a command or program is interrupted, the system stops execution and saves all parameters so that execution can be resumed exactly where it was interrupted. When a process is interrupted at the normal system level, the system prompts with two colons (::). At this point the command or program is said to be "pushed one level". Up to 16 levels can be pushed. The number of colons in the prompt indicates the number of levels pushed. The normal system level is 1. To return to the previous level and continue execution of the process at that level, press <Ctrl>+m. To abort the process at the next lower level, use the end command. Refer to the entries level pushing and levels for more information. Macros A macro is a process that executes one or more TCL commands. Macros are stored in the master dictionary with the name of the macro as the item-id. The macro processor is provided for simple TCL procedures. In general, complex procedures should be written as FlashBASIC programs. When a macro name is entered at TCL, it may be followed by any number of parameters. These parameters are added to the end of the first TCL command in attribute 2 as additional language elements and then passed for processing. The first line of a macro must contain the character m (modify mode) or n (non-stop mode). Each subsequent line is considered a TCL command. If the m code is used in the first attribute of the macro, the TCL command is displayed so that changes can be made to it before it is executed. If n is used, the macro runs immediately. A macro may be created with the Update processor or the create-macro verb. The create-macro verb takes the last statement entered at TCL and converts it to a macro. Enter the TCL statement to store as a macro and press <Ctrl>+m. When the cursor returns to TCL, enter: create-macro macro.name Note that create-macro sets attribute 1 of the macro to m. As long as attribute 1 equals an m, the macro name must be enclosed in double quotes when entered at TCL. Use the Update processor to replace the m with an n if immediate execution is desired. To create a macro using the Update processor, enter: u md macro.name For more information about using macros, refer to the entries macro and create-macro. Menus A menu provides a selection of processing choices. Menus are items in the master dictionary. The menu processor automatically formats the menu on the screen and you can then select one of the menu options for processing by entering the option number. The format of the menu item in the md is: 001 me {comments} 002 title 003 option 1 help 1 statement 1 004 option 2 help 2 statement 2.1 statement 2.2 ... Refer to the entry menus for more detailed information. TCL Verbs TCL verbs which operate exclusively on files and items use a consistent format to specify the file and items: tcl-verb file.reference {item.list} { (options) } The format elements are explained in the Access section below. Access Verbs Access is a system-level information retrieval language that allows you to query your data base without writing complex programs. Access uses TCL commands as verbs and displays the results on terminals or printers. Access verbs operate on specified files and items based on optional criteria, specifications, modifiers, limiters, and options. Often described as an ad-hoc data query language, the greatly expanded dictionary capabilities of D3 offer the possibility of real nonprogrammer access to the data base. Access, used in conjunction with the Update processor (UP), makes D3 one of the most accessible data management system in existence. Additional D3 features enhance the already comprehensive query language. FlashBASIC calls from dictionaries are used for complex data calculations and output formatting. The ss (spread-sheet) connective allows the user to print out Access reports in spread-sheet format. This is achieved by adding the ss connective to the sort sentence and defining the desired range parameters. B-trees have increased the speed and performance of Access. Access commands are entered at TCL and thus can be recalled, modified, or executed through the TCL stack. Access sentences may also be stored and invoked through macros, menus, PROCs, and FlashBASIC. An Access statement has the following form: verb file.reference {item.list} {selection criteria} {sort criteria} {output specifications} {print limiters} {modifiers} { ( options ) } The verb and file.reference are required as operator and operand respectively. The verb must be the first word of the command. All other elements are optional and are used to modify either the operator, operand, or output. Selection criteria, sort criteria, output specifications, print limiters, and modifiers follow the item.list and may be in any order. Options, if used, must be placed last and must be preceded by a left parenthesis. The right parenthesis is optional. Relational operators can be used with any of the elements of Access sentences to allow exact specification of the conditions to be met. Refer to the entry relational operators for more information. file.reference Usually the name of a file in the md to which the user is currently logged. It can also be a synonym file name. The file name can be preceded by the literal dict to access the dictionary of the file instead of the data portion of the file. The default is data. In some cases, data may be specified to indicate only the data portion of the file. To reference a file in another account or md from TCL, pathnames are used. The pathname may be used in place of the file.name in any TCL or Access statement. A pathname may be entered in one of the following forms: account.name,dict.name,file.name account.name,file.name, dict.name,file.name item.list Specifies one or more item-ids in the file defined by the associated file.reference. The item.list may be one or more explicit item-ids, a series of items separated by relational operators, an asterisk (*) to represent all the items in the file, or null. If a select list is not active, a null item-id implies a new item for UP and all items for the other processors. Any command requiring a select list can obtain it from a previously selected list. (See the get-list, select, and sselect commands.) To cause a processor to use the select list, the item.list must be null. An item-id with the same name as a language element in either the md or the dictionary of the file must be enclosed in single quotes. selection criteria Limits the data by specifying criteria that must be met. Multiple criteria may be established to limit data selection to meeting a certain set of limitations. These sets are established by the logical relational connectives "and" or "or". sort criteria Connectives used to define the sort operation. output specifications Specifies the attributes to list. The selected attribute items or synonym labels are displayed in either a columnar or non-columnar format depending on the report width. The width of the report is the sum of the width of each attribute to be listed plus one blank separator between each attribute. If the width of the report does not exceed the page width as set by the term verb, a columnar format is generated. The attributes for each item are displayed one under the other. If the requested output exceeds the page width, the column headings are listed in a non-columnar format down the side of the output with their respective values immediately to the right. In the non-columnar format, the column headings are listed only if there is a corresponding value. Item-ids are always displayed unless it is suppressed using the id-supp connective. print limiters Suppresses the listing of attributes within an item that do not meet specified limits. modifiers Control listing parameters such as double-spacing, control breaks, column totals, and suppression of item-ids, automatic headings, and default messages. (options) Used to tell the processor about special handling and tend to be processor specific. The options are single alpha characters and/or a numeric range specification as required by the specific processor. They are usually preceded by a left parenthesis. The right parenthesis is optional. When used, options must be the last element on the command line. Wild Card Capability Wild card characters may be used to select item-ids and attributes based on common characters. Wild cards can be used in selection criteria or complex item-lists as follows: [ (left bracket) Matches characters following the bracket. Ignores characters to the left of the bracket. ] (right bracket) Matches characters from the beginning of the string to the bracket. Ignores the characters to the right of the bracket. ^ (caret) Matches any character in the position occupied by the caret. Retrieval of Items from Files The Access processor uses both the master dictionary and the file dictionary to determine the definition of the elements in the Access sentence. The file pointer to the file dictionary and the connectives used in the sentence, for example, are found in the master dictionary. The file pointer to the data file and file-specific attribute definitions are found in the file dictionary. If an element is defined in both the master dictionary and the file dictionary, the definition in the file dictionary is used. If the element is not found in either the master dictionary or the file dictionary, Access creates a new element by concatenating the unknown element to a blank and the next element in the string. The processor attempts to look up this new element in first the file dictionary and then the master dictionary. If the new item-id is not found, an error message displays. The Access processor does not look up terms in the string that are enclosed in quotes, single quotes, or backslashes. These are assumed to be literals. Default Output Specifications In addition to explicitly listing attribute names as part of the Access statement, there are three features that can be used to specify default output specifications. These specifications output the default attributes when attributes are not explicitly specified in the Access statement and are listed below: - The attribute names can be listed as a macro in the file-defining item. - Default attribute items can be created. - Temporary attribute items can be created. Default Attribute Items Default attribute items have numeric item-id starting with 1. These item-ids are used by Access verbs as output specifications if no other output specifications are given. The numeric item-ids must be consecutive; that is, in order to have the third attribute list by default, attribute items 1 and 2 must exist, even if they are not needed for the listing. The attribute items for attributes that are not needed for listings can be given a d/code of x . For more information about default attribute items, refer to the entries default attribute items (D3), default attribute items (R83), and default output specifications. Temporary Attribute Items Attribute items using special attribute names can be specified in an Access sentence without actually existing in either the file dictionary or the master dictionary. The attribute name is of the form "Aac", where 'ac' is the attribute number. Temporary attribute items are created with a justification code (attribute 9) of lx (left justify and expand display field to fill report). For example, even if neither the master dictionary nor the file dictionary for ent has an attribute-defining item a14, a statement such as "list inv a14" lists attribute 14 in the ent file where inv is the temporary attribute name. Spooler The Pick System Spooler controls all output that is sent to the printer. The term "Spooler" comes from the acronym SPOOL derived from Simultaneous Peripheral Output On-Line. Depending on the printer assignments and the status of the printer, the output may be printed immediately, sent to tape, placed in a queue, or placed in a hold file. Most Spooler commands allow options, which sometimes have numeric arguments. To keep these options clear for the options interpreter, it is recommended that numeric options be separated with blanks as in the following example that assigns for hold file output to formqueue 1 with 3 copies: :sp-assign 3 hsf1 Spooler options do not have to be enclosed in parentheses like options with other TCL commands. If numeric options are within parentheses, parameters outside of the parentheses will be ignored. Do not separate options with blanks. The Spooler directs the items in the queue to the printer as the printer becomes available. The Spooler formats items in a hold file as if they were being output to the printer, but does not actually output them. The Spooler can be directed to output hold file items to the printer, to tape, or to a specified file. The following TCL commands are available to control the Spooler activity: :startspooler assignfq list-ptr listabs listpeqs listptr sp-assign sp-close sp-edit sp-kill sp-open sp-status sp-tapeout startptr startspooler stopptr For more detailed information about these commands, refer to the individual entries for each command. TCL Commands The TCL commands are listed below. For a more detailed description of each command, refer to their individual entries. ! :absload :bootstrap :files :reset-async :scrub-ovf :shutdown :startspooler :swd :swe :swx :swz :taskinit = ? abs-dump abs.fid absdump account-maint account-restore account-save add add-font addbi addd addenda addendum addx after alarm b/list basic basic-prot beep bformat blist block-print bootstrap break-key brk-debug brk-level buf-map buffers bulletin.board buffers.g cal capt capture-off capture-on case case-file cat catalog cd cf charge-to charges check-account check-dx check-files check-sum check-ws checkfiles chg-device chksum choose.term cl clear-basic-locks cleanpibs clear-file clear-index clear-locks clock cls cmdu coldstart coldstart.log color comment compare-list compare compile compile-catalog config conv-case converse copy copy-list copydos count cp create create-abs create-account create-bfile create-file create-index create-macro create-nqptrs cross-index cs ct currency date db dcd debug decatalog define-terminal define-up del-acc delete delete-account delete-file delete-index detach-floppy delete-list detach-sct dev-att dev-det df diag dir dir.pick disc disk-usage diskcomp diskcopy display div divd divx dl dm dos dos.bridge dos.shell dos.video download dtr dtx dump ecc echo ed edit edit-list el end env environ epson esc-data esc-level esc-toggle exchange exec exit export f-resize fc fdisk fid file-save filecomp find fkeys fl flush font-parms format frame-fault free fuser get-list get.pick gl group halt-system hash-test help hush import import.pick indexer init-abs init-ovf initovf inputwait inter iselect isselect istat item k kill l ld ldf legend lerrs lf lfd lfs li link-pibdev link-ws list list-abs list-acc list-commands list-conn list-device list-dict list-errors list-file-stats list-files list-item list-jobs list-label list-lines list-lists list-lock-queue list-locks list-logoffs list-macros list-menus list-obj list-pibs list-system-errors list-procs list-ptr list-restore-error list-ports list-users list-verbs listacc listbi listc listconn listdict listf listfiles listfs listprocs listptr listu listusers listverbs ll lm load.mon lock-frame log-msg log-status logoff logon logto loop loop-on lp lq lre lu maxusers md-restore message mirror mlist mload mmvideo modem-off modem-on mono monitor-status move-file msg mul muld mulx mverify nframe-index node nselect off okidata op overflow ovf p pack password phantom-status pc pibstat pick pick-setup pid pitch-compile pitch-table poke povf power-off ppcp prime print-err print-error printronix prio prompt psh psr pverify pxpcmd qselect r83.setup reboot rebuild-ovf recover-fd recover-item reformat rename-file renumber reset-port reset-user restore-accounts ri rmbi rnf rtd run run-list s-dump save save-list search search-file search-system sel-restore select send-message set-8mm set-abs set-batch set-batchdly set-baud set-date-format set-cmem set-date set-date-eur set-break set-date-std set-device set-dptr set-esc set-file set-floppy set-flush set-func set-half set-imap set-iomap set-kbrd set-keys set-num-format set-lptr set-ovf-local set-ovf-reserve set-port set-runaway-limit set-sct set-sct-dma set-sym set-shutdown-delay set-sound set-tape-type set-term set-time set.lptr set.time setpib0 setport setup-printer setup.rtc setup.sio sh shell shl shp-kill shp-status shpstat shutdown si sl sleep slice sm sort sort-item sort-label sort-list sort-users sortc sortu speller sreformat sselect stack start.rtc start.ss startlog startsched startshp stat status-port steal-file stoplog stopsched strip-source sub subd subx sum system-coldstart t-att t-bck t-bsf t-bsr t-chk t-det t-dump t-eod t-erase t-fsf t-fsr t-fwd t-load t-rdlbl t-read t-ret t-reten t-rew t-select t-space t-stat t-status t-unld t-unload t-verify t-weof t-wtlbl ta tabs tandem tape-socket tcl tcl-hdr term term-type termp test-cursor time time-date timedate tlog-restore to touch trap txlog type type-ahead unix unlink-pibdev unlock-frame unlock-group unlock-item unpack update update-abs-stamp update-accounts update-logging update-md update-prot user-coldstart useralarm user-shutdown verify-index verify-abs verify-system vga.lcd video.demo what where which which-line who wlist wselect wsort wsselect x-ref xcs xonoff xref xtd z zh zhs Connectives Connectives are words in the master dictionary that are used to form the elements of Access statements. They include relational operators and modifiers and are used to form sort and selection criteria and limit data to be processed by the verb with which they are used. Relational operators are used to establish criteria based on the relationship of data to fixed values or other data. Relational operators would be used to select a range of zip code values within specified upper and lower limits. Refer to the entry relational operators for more information. Other modifiers and options are listed below. For more information on each of these connectives, refer to their individual entries. any before break-on by by-dsnd by-exp by-exp-dsnd col-hdr-supp dbl-spc data entry det-supp dict duplicate each every fill footing grand-total hdr-supp heading header id-prompt if {each|every} id-supp if{no} legend-supp lptr ni-supp no nopage only or roll-on sampling spread-sheet ss supp tape tcl-supp total total-on using with within without |
Options | |
See Also | |
Example | |
Warnings | |
Compatibility |
_ | Index Level | ! (Unix) |