basic.debugger.up Command/BASIC: Debugger, tcl.up Verb: Access/TCL, up Introductory/Update Processor

basic.debugger.up

Command basic.debugger.up Command/BASIC: Debugger
Applicable release versions: AP 6.0 FlashBASIC
Category BASIC: Debugger (38)
Description used in the FlashBASIC debugger to move up the call stack.
Syntax
Options
Example
Purpose
Related basic.debugger.s
basic.debugger.r
basic.debugger.$!
basic.performance
flash.basic.differences
basic.debugger.?!
basic.debugger.overview
basic.debugger.down

tcl.up

Command tcl.up Verb: Access/TCL
Applicable release versions: AP
Category TCL (746)
Description
Syntax
Options
Example
Purpose
Related tcl.update

up

Command up Introductory/Update Processor
Applicable release versions:
Category Update Processor (113)
Description UP is a dictionary-driven, full-screen editor and data processor. Used with the Output processor (OP), it operates as a document processor.
UP can be used to view, create, and manipulate file items. UP facilitates editing of text, dictionaries and programs, as well as data files (remember, everything in Pick is an item in a file). When used as a data processor, attribute-defining items in the file’s dictionary are employed to verify and translate data as it is entered and retrieved.
Pick/BASIC subroutines can be called from dictionaries allowing absolute control of all data entry using the Update processor and dictionaries. Without any attribute-defining items specified, UP functions as a full-screen editor.
When invoked, UP copies the specified item to a workspace and displays as much of the item on the screen as it can. UP places the cursor at the upper left corner of the item (top) on the first character of the first value of the first attribute and waits for your input.
Once the item has been loaded, any character you type will overwrite whatever is on the screen. Control keys are used to perform editing functions, but as long as the control key is not down, all characters are entered as typed. An automatic word-wrap feature moves whole words to the next line as they are typed when you overrun the end of the current line. An optional spelling checker beeps and rejects your input when you type a character that does not lead to a legal word.
Text is normally entered in the insert mode (<Ctrl>+r is used to toggle between the insert and overtype mode). While in the input mode, the return/enter key (<Ctrl>+m) creates a new attribute/paragraph. When in the overtype mode, that same key does not create a new attribute but instead goes to the next attribute. The default mode is overtype.
UP commands begin with a control character formed by simultaneously pressing the <Ctrl> key and one of the alpha keys. Some UP commands require more command characters, while others require text input.
Until the item is saved, changes made using UP have no effect on the actual item in the file -- only UP workspace is changed. The item can be exited at any time without filing, by typing <Ctrl>+xe>, and the item in the file will not change.

Using UP as a Text Editor
In the absence of any attribute list, UP functions as a text editor. An attribute list generates a data entry screen with whatever audits and transformations are defined in the corresponding dictionary. The text edit form is to specify just the file name and item list (no attribute list) and if no macro is present on the file-defining item, the raw item will be presented. Refer to the entries update, up, and u for more niformation about the update commands.
update file.reference {item.list} { (options) }
up
u

Cursor Movement
The cursor is the underline or block which moves around the screen when characters are typed. Cursors can have various forms depending on the terminal: highlighted, blinking, reverse video, etc. In all cases, the cursor indicates where the next character typed is displayed on the screen.
Cursor movement commands are used to position the cursor anywhere in the item without altering the text. The cursor actually moves on the CRT screen. And, since the screen is only a window into the item, the cursor may be moved off the screen forcing a screen redisplay (scrolling).
<Ctrl> +

k Moves the cursor forward (right) one character.
j Moves the cursor back (left) one character.
n Moves the cursor down one line.
b Moves the cursor up one line.
i Moves the cursor forward to the next tab stop in the line.
u Moves the cursor forward (right) one word.
y Moves the cursor back (left) one word.
f Moves the cursor forward to the next sentence.
d Moves the cursor back to the beginning of the sentence.
g Moves the cursor to the end of the current paragraph.
m Moves the cursor to the beginning of the next paragraph(attribute) if in overtype mode. Creates a new attribute if in insert mode.
t Moves the cursor to the top of the current item.
z n Moves the cursor to the top of the next screen.
z y Moves the cursor to the top of the previous screen.
z h Moves the cursor to the first line of the next screen, then moves the display up 12 lines.
z q Moves the cursor to the first line of the next screen, then moves display up one quarter of a screen.
z e Move the cursor to the end of the current item.
z a Redisplay the screen with the current line at the top of the screen.
z b Redisplays the screen with the current line at the bottom of the screen.
z p Redisplays the screen.
z numeric Goes to the specified line number.


Overtype and Insert Modes
When UP is first entered, it is in overtype mode. This means that characters typed overwrite the characters on the screen. Insert mode is used to insert new text just in front of the text beginning at the cursor. When text is entered in the insert mode, the following text is "opened" and shown on the next line until insert mode is exited or a cursor movement command is typed.
The letter "O" is displayed at the top right corner of the screen when in overtype mode; the letter "I" is displayed when in insert mode. As text is entered in either mode, UP word-wraps the text as necessary. That is, if a character string is longer than the remaining space on the current line, the entire string is moved to the next line. This means you can type continuously within a paragraph (attribute) without pressing the <Ctrl>+m.
<Ctrl>+r Toggle between overtype and insert modes.

Paragraphs
To create a new paragraph in the middle of existing text, enter the insert mode and type <Ctrl>+m. This terminates the current paragraph and prompts with the next attribute number. If the cursor is at the end of an item, <Ctrl>+m creates a new paragraph whether or not in input mode. In the absence of a dictionary definition, this is how UP is used as a word processor; each attribute is a paragraph.
<Ctrl>+m Same as <Return>. Always moves the cursor to the beginning of the next attribute. If in insert mode or at the end of an item, <Ctrl>+m creates a new paragraph. If UP is being controlled by a dictionary, <Ctrl>+m does not create a new attribute mark, rather the cursor moves to the next attribute.

Inputting Text Using the Spelling Checker
UP uses a spelling checker to verify text as it is entered. The spelling checker looks at each character to see if those typed so far make a legal word or may become a legal word. The words used by the spelling checker are kept in the words file in the dm account.
In order to activate the spelling checker, a q-pointer must be present on the current account and an index must be generated on attribute 0 of the words file. If an error is detected, the terminal beeps and does not display the last character typed. If an incorrect letter is typed, type the correct one and continue entering data.
To view the words immediately adjacent to the misspelled word in the words file, use <Ctrl>+u to get the next legal word or <Ctrl>+y to get the previous word. Otherwise, press one of the following:
<Ctrl> +
a Override spell checker and accept the characters.
a a Insert the word into the words file and continue.
a a a Turn off spelling checker.
z s Toggle the spelling checker on and off from any point in the item. If the spelling checker is on, <Ctrl>+zs toggles it off; if the spelling checker is off, <Ctrl>+zs toggles it on.


Deleting and Undeleting Text
As text is deleted, the remaining characters in the paragraph are moved to the left. The Cut and Paste commands also delete text.
<Ctrl >+
l Deletes the character under the cursor and moves the text left.
o Deletes characters from the cursor position to the end of the word including the character under the cursor.
e Deletes from the character under the cursor to the end of the sentence.
z o Deletes the characters from the cursor to the end of the paragraph (attribute).
z d Deletes the characters from the cursor to the end of the item.
z z Undo the last delete or data change if the change was made by using one of the control delete keys.


Exiting Items
The <Ctrl>+x commands offer different methods for exiting an item. <Ctrl>+x signals to exit this item and perform one of a series of options. For example, an item can be exited and the information filed (saved), or the item can be exited without the information being filed.
If an item is exited without being filed, the changes made during the editing session are not saved. To save the changes, the item must be filed. Several of the options that exit an item do not file it. If changes have been made to an item during the current editing session and an option is selected that exits the item without filing it, the system double-checks with the user to make sure that the changed information is not to be saved.
All UP exit commands are made up of a minimum of two characters. When the <Ctrl>+x is pressed, the current size of the item, file name, and item-id are displayed on the top line of the CRT. UP waits for an additional command.
<Ctrl>+x+
b Exits the item and goes back to the previous item in the item list. If there is no previous item, the terminal beeps and remains in the current item.
c Files the current item then compiles and catalogs it. This option is used with Pick/BASIC programs.
e Exits the item without filing it.
f Files the item, then exit it.
i {(file.reference}{item.id}
Renames and files the new item. This command prompts for a standard file item specification where the item is copied. After the file item specification is entered, the system asks if the old item from which the new item was created, is to be deleted. Enter <Ctrl>+y to remove the old item; otherwise, the item is unchanged.
k Exits the item and returns to calling process. If editing with a select list, the select list is terminated.
n Exits current item and creates a new null item. If a name is not entered when the new item is filed, it can be named using the <Ctrl>+xi> command. If there is no id processing code, UP uses the current date concatenated with a system-wide sequence number as the item-id.
o Exits and deletes the item.
p Files the item and prints it using the Output processor (OP).
r Files the item, then compiles and runs it if compilation was successful.
s Files (save) the item and remains in UP with the current item.
x Exits the item without filing it.


Searching and Replacing Text
The search commands in UP offer the capability to search for text, search for text and replace the text, and search for text and, once the text is found, determine whether or not to replace it.
<Ctrl >+
a string <Ctrl>+m
Search for the first occurrence of the specified string. If a match is found, the cursor is displayed on the first character of the matched string; otherwise, the cursor remains at the current location. When <Ctrl>+a is pressed, UP prompts for the search string at the top of the screen.
The search string is not case sensitive. To search for letters that are case specific, enclose the string in single- or double-quotation marks. If the string itself contains quotation marks, enclose those quotes in quotes.
a Search again for the string specified by the last search command. If a search string is not specified, the terminal beeps and displays a message.
a string1 <Ctrl>+r string2 <Ctrl>+n
Search for and replace every occurrence of string1 with the string2 from the current cursor position to the end of the item. When <Ctrl>+r is pressed, UP prompts for the replacing string. After entering the new text press <Ctrl>+n to indicate all occurrences.
The text is replaced as entered. If the replacement is at the beginning of a sentence, the initial letter is replaced as an upper-case letter. To specify an exact replacement of upper- and lower-case letters, enclose the text in single or double quotation marks.
a string1 <Ctrl>+r string2 <Ctrl>+m
Search for the first occurrence of string1. If a match is found, the cursor is positioned on the first character of the match and UP waits for one of the following commands:
Ctrl +
a Do not replace string1. Search again for next occurrence.
n Replace string1 with string2. Replace all further matches.
r Replace string1 with string2. Search again for string1.
x Stop search. Return to edit mode.

Cutting and Pasting Text
Cut commands are used to move or copy data from one place in an item to another place in an item. Text can be cut and deleted or cut with the original left in place (copied). After the text is cut, it is placed in the cut buffer replacing the previous contents of the cut buffer. The cut text in the cut buffer can be pasted in the current document or it can be pasted in a specified item in a file. Text can also be pasted from a specified item and file.
<Ctrl >+
c d Mark the beginning location of the text to be cut and deleted.
c l Mark the beginning of text to cut and leave (i.e., does not remove the cut from the current location in the text and makes a copy for the cut buffer).
c c Mark end of text to cut or copy from the beginning cut and puts the text in the cut buffer.
c p Paste contents of cut buffer at current cursor position. Once text has been put in the cut buffer it remains there for the duration of the current update session in the UP workspace.
c r {(file.reference}item.id {n{-m}} <Ctrl>+m
Read contents of specified item and paste at current cursor location. The optional n parameter is an integer that specifies the first attribute to copy; the optional m parameter is an integer that specifies the last attribute to copy. If a range is not specified, all attributes from beginning to the end of the item are copied.
c w {(file.reference }item.id <Ctrl>+m
Write the contents of the current item cut buffer to the item specified by item.id.


Prestore Commands
Prestore commands are used to store and execute a sequence of UP commands. These commands can be used during the current update session or saved as an item in a file and recalled for use in subsequent update sessions. Prestore commands can contain both UP commands and text. To specify a UP command, enter the letter portion of the editing command without pressing the <Ctrl> key. To specify text, enter the text enclosed within single/double quotation marks.
Prestores can be created in the prestore buffer or they can be created as an item in a file. Prestore items can exist in any file and must have a p in the first attribute. The following attribute values will contain prestore commands and text.
<Ctrl > +
p Execute the current command in the prestore buffer. If the prestore buffer is empty, displays the next screen of the item being edited (default).
z l Create or edit a prestore command in the prestore buffer. Most UP commands are available to input and edit the prestore buffer.
z r {(file.reference}item.id <Ctrl>+m
Load specified item into the prestore buffer but do not execute it. The first attribute must be the character p.
z r {(file.reference}item.id <Ctrl>+p
Load the specified item into the prestore buffer and execute it. The first attribute in the item must be a p. The default file is the master dictionary.
z w {(file.reference}item.id <Ctrl>+m
Write the prestore buffer into the specified item. The character p is written as the first attribute of the item. The default file is the master dictionary.


Using UP as a Data Processor
update file.reference item.id attribute.list (options
up
u
When UP is called with an attribute list it functions as a data processor. Each attribute name in the UP statement becomes a data entry location on the screen identified by the named attribute. The attribute names are listed along the left of the screen in half-intensity. Dependent attribute names are displayed horizontally across the screen with the controlling attribute. Each attribute-defining item creates a cell on the screen through which data may be accessed and modified under the control of dictionary processing codes. Since a Pick/BASIC program may be called using a processing code, complete application flexibility is provided.
The cursor can be moved, using the previously defined cursor movement commands, from attribute name to attribute name. (Some of the commands function in a different manner. These are defined below.) Data entered or changed next to an attribute name is filed in that attribute when the edited item is saved.
Stored data is subject to output conversions defined in attribute-defining items in the file dictionary prior to display. Data entered using UP is subject to input conversions defined prior to storage on disk. By invoking a single UP command, an entire data access and update screen can be defined. When that command is saved as a macro, it can be recalled any time for file access.UP can be used to scan data using file indexes. When attributes are indexed using the create-index verb, UP can be used to cruise on the index.
The key to cruising is understanding the Balanced Tree (b-tree) indexing feature of Advanced Pick. A b-tree is a structure used to keep an ordered list, such as names, and provides the ability to search through the list very quickly with a minimal number of disk I/Os. Any attribute in a file can contain an index. Indexes are defined using a-correlatives. Once the b-tree has been defined, the system automatically maintains the index.
b-trees allow access to data in ways not before possible. The new access capabilities are cruising (using the file index), cruising (using the file related index), zooming, and double clutching.
Cruising using the file index (local file) is the ability to move from item to item in the current file. You can move forward (with <Ctrl>+f or backward (with <Ctrl>+d through the items on any indexed attribute.
Cruising using the related file index (remote file) provides the ability to view valid data from another file. For example, a sales order file could have an attribute called name which points to the entity file. From the orders file one could view the valid names in the entity file and select the one desired.
Double-clutching means the combined abilities of searching the remote file for valid values and also searching the local file for specific items. For example, in an order file the name attribute could have an index pointing to the entity file allowing for searching of valid people. A local index on the name attribute would allow for searching for all of the orders already on file for that person.
Zooming refers to moving through a defined door to another file. Once in the other file, the user has the option to cruise from item to item in the new file, return to the original file or zoom through a door into yet another file. <Ctrl>+g is the command to zoom to another file.
When the cursor is positioned in a cell belonging to an indexed attribute, the commands <Ctrl>+d and <Ctrl>+f can be used to display the data associated with the item containing an adjacent value in the indexed attribute. The command <Ctrl>+f causes the data associated with the next value in the index to be displayed. The command <Ctrl>+d causes the data associated with the previous value in the index to be displayed.
For example, if an item containing customer name and order number indexed attributes is being displayed on the screen and the cursor is at the order number prompt, the <Ctrl>+f command will display the data associated with the next order number in the order number index. If the cursor is residing adjacent to customer name, <Ctrl>+f causes the data associated with the next customer name in the index to be displayed and customer name is the key. All of the data in the new item associated with the attribute names displayed on the screen is displayed.
When the input conversion attribute in an attribute-defining item specifies an index pointing to another file, that file can be accessed (zoomed to) by using the <Ctrl>+g command. This command pushes the current process one level and accesses the item-id in the pointed to file that matches the current value in the cell where the cursor resides. Attributes to be displayed with that item-id must be specified in attribute 15 of the original attribute-defining item. Several logical views may be defined as macros in Attribute 15 of the d-pointer.
A FlashBASIC or Pick/BASIC program may be called to specify the actual logical view to use for the current data item. It does this by assigning the logical view number into the pseudo-variable "Access (18)." If no attributes are specified, the entire item is displayed. After viewing the new item the original item can be returned to the screen by a file exit command such as <Ctrl>+xe>.
When the input conversion attribute in an attribute-defining item specifies a second index as well as one pointing to another file, the commands <Ctrl>+u and <Ctrl>+y allow the user to cruise on indexes in the pointed to file. The attribute pointed to in the second file must have been previously indexed by the create-index verb. <Ctrl>+u shows the next attribute value in the pointed to file. Only this value is updated and it is shown in the cell where the cursor is residing. What is displayed is subject to the conversions specified in the dictionary of the first file. The command <Ctrl>+y shows the preceding item-id in the pointed to file. In order for UP to function in this manner, the attribute-defining items must contain the proper index processing codes. The input conversion attribute (att 14) of the attribute-defining item in the file dictionary is where they are specified.

Overloaded UP Commands for Data Files
Most UP commands work the same whether or not dictionary attributes are in control. Certain commands function differently when certain conditions are met. These commands provide the functionality for browsing on indexes. The cruising commands can be used in a double-clutching fashion by specifying the index for the current file and a second index for another file. <Ctrl>+u and <Ctrl>+y cruise on legal instances in the pointed to file staying in the same item. <Ctrl>+f and <Ctrl>+d cruise on other items in the same file using the index for the attribute as a guide.
<Ctrl> +
g When in an attribute which indexes to another file or has a translate code in the input processing code, this command pushes the current process one level and calls UP again with the item pointed to in the new file as the argument. If the macro attribute (attribute 15) in the primary file attribute definition item is used, this list is appended to the update statement. This is known as "zooming".
f On an indexed attribute, the sentence forward command goes to the next sequential index and gets the corresponding item into the UP workspace.
d On an attribute with an index, the sentence backward command goes to the previous sequential index and gets the corresponding item into the UP workspace.
u If the attribute indexes to another file, the word forward command gets the next sequential item from the pointed to file as the value for this attribute.
y If the attribute indexes to another file, the word backward command gets the previous sequential item from the pointed to file as the value for this attribute.
Syntax
Options
Example
Purpose
Related up.a
up.sc.a
up.sc.aa
up.sc.aaa
up.arm
up.arn
up.b
up.c
up.options.c
up.cc
up.cd
up.cl
tcl.compile-run
up.correlative
up.correlative.adi
up.cp
up.cr
cruising
up.cut.paste
up.cw
up.d
up.data-entry
up.delete.text
double.clutching
up.e
up.exit.item
up.f
up.g
up.h
hotkeys
up.i
up.options.i
access.id-prompt
up.input-conversion.adi
up.input-conversion.fdi
up.insert.mode
up.j
up.k
up.l
up.options.l
up.m
up.n
up.o
up.only
up.options
up.output-conversion.adi
up.overtype.mode
up.p
up.prestore
processing.codes
up.r
up.options.s
up.search.replace
tcl.spelling.checker
up.t
up.u
up.commands
update.processor
up.v
up.w
up.x
up.x0
up.x1
up.x2
up.x3
up.x4
up.x5
up.x6
up.x7
up.x8
up.x9
up.xb
up.xc
up.xe
up.xf
up.xi
up.xk
up.xl
up.xn
up.xo
up.xp
up.xr
up.xs
up.xx
up.y
up.z
up.znumber
up.za
up.zb
up.zc
up.zd
up.ze
up.zg
up.zh
up.zl
up.zn
up.zo
zooming
up.zp
up.zq
up.zr
up.zs
up.zt
up.zw
up.zy
up.zz
up.zx
up.macro
updte.processor