access.reformat Verb: Access/Access: Verbs, access.sreformat Verb: Access/Access: Verbs, basic.array.references Definition/BASIC Program, file.reference Definition/General, op.preface Command/Output Processor: Commands, op.prefix.page Command/Output Processor: Commands, op.xpreface Command/Output Processor: Commands, op.xprefix.page Command/Output Processor: Commands, referential.integrity.b-tree Article/Article, system.debugger.drs Definition/System Debugger, tcl.x-ref Verb: Access/TCL, tcl.xref Verb: Access/TCL, vi Definition/Unix, ref Definition/General

access.reformat

Command access.reformat Verb: Access/Access: Verbs
Applicable release versions: AP, R83
Category Access: Verbs (152)
Description takes values from the attributes specified in the command and places them either in another file or to magnetic media in the order in which they are presented.

The specific items to be selected are included in the "itemlist".

If no "itemlist" is specified, all items in the file are selected in order by the group into which they hash, and within groups, in the order they were added to the file. The items are written to the new file or tape in the order in which they are selected.

The output specifications indicate those attributes that are to be selected.

The source item-id is selected first and becomes the destination item-id unless id-supp is specified. In that case, the first attribute value becomes the new item-id. Subsequent attributes are placed in the new item in the order they are specified.

"reformat" requests the destination file.reference. To send the output to a file, enter the file.reference. To send the output to magnetic tape, enter the word "tape". To write the output back onto the source file, press <return> or <enter>.

If the items are to be written back to the source file, an itemlist must be specified or a list must be active, otherwise, an infinite loop condition may result, in which items are continually added to the file!

When a file is reformatted to tape, the values are concatenated and either truncated or padded at the end with nulls (hexadecimal 00) to the record length specified by the most recently executed "t-att" verb. One tape record is written for each item.

item-ids are printed as items are dumped, unless the "id-supp" connective, or "i" option, is specified.

A tape label, which contains the file.reference, tape record length in hexadecimal, time, and date, is written on the tape first, unless the "hdr-supp" or "col-hdr-supp" connectives ("h" or "c" options) are specified. Two end-of-file (EOF) marks terminate the tape.

Any processing code that refers to a selected attribute is applied before the item is written to the new file or tape.
Syntax reformat file.reference {sellist} {itemlist} outlist {modlist}
filename:destination-file or tape<return>
Options see "options: Access (Access: Verbs)"
Example
reformat entity a0 name phone
File Name   :? entity-new

This takes all items from the "entity" file and writes them to the 
"entity-new" file, using the temporary attribute-defining item 
reference of "a0" to use the same item-id's in both files. The 
data in "entity-new" will contain the "name" in attribute 
one and the "phone" number in attribute two.
Purpose
Related access.options
access.itemlist
access.outlist
access.modifiers.modlist
access.sreformat
access.col-hdr-supp
tcl.t-att
access.verbs

access.sreformat

Command access.sreformat Verb: Access/Access: Verbs
Applicable release versions: AP, R83
Category Access: Verbs (152)
Description moves the sorted values from the attributes specified in the Access sentence and places them either in another file or to tape in the order of the specified sort key(s) (specified in "seqlist").

Each entry in the outlist becomes an attribute in the destination item, in the same order as in the outlist. The source item-id is selected first and becomes the destination item-id, unless "id-supp" (or an "i" option) is specified. In this case, the first attribute value becomes the new item-id.

Upon execution of this command, the prompt, "file name:", appears on the screen. Either a file.reference may be entered, which directs the output to the specified file.reference, or the literal, "tape", which directs the output to the attached magnetic tape.

The output specifications indicate those attributes that are to be selected.

The attributes are written to the new file or tape in the order they are selected.

To write the output back onto the source file, press <return> or <enter>. If the items are to be written back to the source file, an item list must be specified or a list must be active. Otherwise, an infinite loop condition may result, in which items are continually added to the file!

When a file is reformatted to tape, the values are concatenated and either truncated or padded at the end with nulls (hexadecimal 00) to the record length specified by the most recently executed "t-att" verb. One tape record is written for each item.

The item-ids are printed as items are not printed as the items are transferred.

A tape label, containing the file name, tape record length in hexadecimal, time, and date, is written first, unless the "hdr-supp" or "col-hdr-supp" connectives ("h" or "c" options) are specified. Two end-of-file (eof) marks terminate the tape.

Any processing code (or correlative) that refers to a selected attribute is applied before the item is written to the destination file or tape.
Syntax sreformat file.reference {sellist} {itemlist} {outlist} {seqlist} {modlist} {options}
filename:{destination-file | tape }
Options * see "options: Access"
Example
:sreformat sls by region region total amount (d
filename:temp-sales
Purpose
Related access.options
access.modifiers.modlist
access.sellist
access.selection.criteria
access.seqlist
access.col-hdr-supp
active.list
tcl.t-att
tape.label
access.reformat
access.outlist
access.verbs

basic.array.references

Command basic.array.references Definition/BASIC Program
Applicable release versions: AP, R83
Category BASIC Program (486)
Description dimensioned and dynamic arrays may be referenced in Pick/BASIC programs.

Dimensioned array references have the form:

array.variable(num.expression)

-or-

array.variable(num.expression, num.expression)

Dimensioned arrays have a maximum of two dimensions and must first be defined with a "dim" or "dimension" statement.

When used in conjunction with the "file" statement, dimensioned array elements may be referenced by the actual item-id of the attribute-defining item (adi) in the associated dictionary:

file entity
.
.
if fv.entity(name) = "" then

Dynamic (or "string") array references have the forms:

1) dynamic.array.variable<ac.expression>

This form references an entire attribute location of a dynamic array.

2) dynamic.array.variable<ac.expression, vc.expression>
This form references a value within an attribute.

3) dynamic.array.variable<ac.expression, vc.expression, sc.expression>

This form references a subvalue within a value.

Combining dimensioned and dynamic array elements:

A specific value or subvalue of a dimensioned array can be specified using the following forms:

array(ac.expression)<ac.expression, vc.expression>

This references the element of the dimensioned array derived from the current value of "ac.expression". Within this array element, the value count derived from "vc.expression" is referenced.

array(ac.expression)<ac.expression, vc.expression, sc.expression>

As in the previous case, with the additional reference to a subvalue location derived from "sc.expression".

Advanced Pick also allows every element within either type of array to be compared using an "*" as a wildcard character. The position of the "*" determines which element is searched.
Syntax array.variable(ac.expression)
array.variable(row.number,col.number)
array.variable(adi)
dynamic.array.variable<ac.expression>
dynamic.array.variable<ac.expression, vc.expression>
dynamic.array.variable<ac.expression, vc.expression, sc.expression>
Options
Example
customer.item(1) = name

This assigns the value of "name" to the first element of the 
dimensioned array "customer.item".

customer.item<2,2> = address2

This assigns the value of "address2" to the second value in the 
second attribute of dynamic array "customer.item".

if array(*) = "x" then...

This searches for any element in the dimensioned array "array" equal 
to the letter "x".

if customer.item<2,*> = "" then...

This searches for any value of attribute 2 in the dynamic array 
"customer.item" equal to null string ("").

if customer.item<*,*,*> = "" then...

This searches for any subvalue in any value in any attribute in the dynamic 
array "customer.item" that is equal to a null string ("").

if array<*,1,*> = "xxx" then...

This searches for any subvalue in value 1 in any attribute in the dynamic array 
"array" that is equal to "xxx".
Purpose
Related basic.ac.expression
basic.matwrite
basic.read
basic.matread
basic.dim
basic.lt
basic.replace
basic.>
basic.vc.expression
basic.num.expression
basic.<
basic.assignment
basic.array.dimensioned
basic.write
basic.array.dynamic
basic.sc.expression
basic.insert
basic.locate
basic.array.variable
basic.extract
basic.(
basic.)
basic.*.wildcard

file.reference

Command file.reference Definition/General
Applicable release versions: AP, R83
Category General (155)
Description a standardized mechanism for designating a particular file within Pick. This explains the forms that a file reference can take.

There are a number of ways to reference files within Pick. Any verb that requires or allows a file reference accepts any of the following references:

1) filename

This form of a file reference accesses the data section of a given file (see example 1).

2) dict filename
DICT filename

These forms access the dictionary level of the file (see example 2).

3) dict.filename,data.filename

This accesses a data section in the given dictionary, when the data section's name is different than the dictionary's name. This is the case when a file has multiple data sections (see example 3).

In all of the above cases, it does not matter to Pick if the file is "local", meaning that the "d-pointer" resides in the current md, or "remote", meaning that the file "d-pointer" exists elsewhere, yet this account has a "q-pointer" already present the current md.

AP File References and File Paths:

All of the following file reference formats are available only in Advanced Pick, and make use of the new feature called "file paths". Note that these forms are not available in R83.

4) account.name,,

This accesses another md (account), or any file-defining item found in the "mds" file (see example 4).

Alternately, the "fully-qualified" form is also valid for referencing another md:

mds,md.name

5) account.name,filename,

This accesses the data section of the specified file in the designated account. The account name must exist as a "d-pointer" in the "mds" file and the filename must exist as a "d-pointer" in the given account (see example 5). Note the "," at the end of the reference; the file reference is invalid without it.

The data level reference is not required, but the trailing comma must be included:

list dm,bp,

This is the same as:

list dm,bp,bp

6) dict account.name,filename,

This accesses the dictionary section of the specified file in the designated account. The account name must exist as a "d-pointer" in the "mds" file and the filename must exist as a "d-pointer" in the given account (see example 6). Note the "," at the end of the reference; the file reference is invalid without it.

Specfiying Alternate File Names:

File references within certain processes, such as "copy" and "filing" operations, require a leading "(" (left parenthesis) in cases where an alternate file reference is to be designated. (see examples 7 and 8).

A variety of commands allow or require the "(" character, including: "copy" (TCL), "me" ("merge", in line editor), "<ctrl>+cr" (UP), "<ctrl>+cw" (UP), "<ctrl>+zr" (UP), "<ctrl>+zw" (UP), "sreformat" (Access), "reformat" (Access), "fi" (editor), and "fs" (editor).
Syntax
Options
Example
list entity

list dict entity

list invoices,archive

list dm,,

list dm,bp,

list dict dm,entity,

copy entity '100'
to:(customer 120

The "(" (left parenthesis) is vital in this operation. It indicates 
that the string immediately following it ("customer", in this case) 
is to be treated as an alternate file name. Without the "(" 
character, "customer" is treated as an item-id and item-id 
"100" would subsequently be copied to "customer" in the 
data section of the "entity" file.

copy entity '100'
to:(production.account,entity, '120'

As in example 7, the "(" parenthesis character indicates that the 
copy is to be directed to a different file.
Purpose
Related file.defining.items
tcl.catalog
access.hash-test
access.istat
tcl.set-file
tcl.compare
up.options.c
access.footing
tcl.exchange
up.options.i
tcl.compile-run
access.list-label
access.id-prompt
access.count
access.list-item
access.list
pc.b
access.verbs
tcl.lfd
tcl.import.dos
tcl.listdict
access.check-sum
tcl.list-verbs
md.name
up.c
basic.file
tcl.account-maint
tcl.compile-catalog
tcl.import.r83
tcl.export.r83
tcl.copydos.r83
synonym.defining.items
access.introduction
file.name
paths
file.paths
basic.root

op.preface

Command op.preface Command/Output Processor: Commands
Applicable release versions: AP
Category Output Processor: Commands (183)
Description sets automatic preface formatting.

Heading text is centered at the top of the next page and begins a separate page numbering scheme.

If a ".preface" command has already been issued, the page numbers resume where the last ".preface" command ended.

Preface sections appear in the Table of Contents with Roman numeral page numbers. To set the page numbers in the Preface header/footer to Roman numerals, specify "r" in the ".footing" command.

Preface mode continues until an ".xpreface" command is encountered.

The ".pf" command is equivalent to the ".preface" command.
Syntax .preface text
.pf text
Options
Example
Purpose
Related op.commands
op.pf
op.xpreface
op.footing
op

op.prefix.page

Command op.prefix.page Command/Output Processor: Commands
Applicable release versions: AP
Category Output Processor: Commands (183)
Description turns on the prefix page numbering mode, which starts numbering each chapter at page 1.

The current chapter number is used as a prefix for the page number.

For example, the fourth page of the third chapter would print as "3-4".

The command ".xprefix page" turns off ".prefix page".
Syntax .prefix page
.pp
Options
Example
.pp
.chapter 1
.footing "page 'p'"
This is page one of chapter 1.
.bp 
2nd page of chapter 1.
.chapter 2
1st page of chapter 2.
.bp 
2nd page chapter 2.
Purpose
Related op.commands
op.xprefix.page
op.pp
op.print.toc
op

op.xpreface

Command op.xpreface Command/Output Processor: Commands
Applicable release versions: AP
Category Output Processor: Commands (183)
Description turns off preface mode.
Syntax .xpreface
.xpf
Options
Example
Purpose
Related op.xpf
op.preface
op.commands
op

op.xprefix.page

Command op.xprefix.page Command/Output Processor: Commands
Applicable release versions: AP
Category Output Processor: Commands (183)
Description turns off the prefix page mode.
Syntax .xprefix page
.xpp
Options
Example
Purpose
Related op.prefix.page
op.commands
op.xpp
op

referential.integrity.b-tree

Command referential.integrity.b-tree Article/Article
Applicable release versions: AP
Category Article (24)
Description discusses the bridge processing code.

Contributed by Chris Alvarez. Original article ran in PickWorld Magazine.

One common problem in the management of a database is the ability to provide referential integrity. The postrelational database model, upon which Pick is based, allows the developer to develop relationships between files, thus eliminating the need for duplicate data.

This relationship in the Pick world is known as the translation processing code. This is what provides the automatic join capability in Pick. Using this processing code, the order file needs only to hold the customer item-id in order to build dictionaries that translate and retrieve any piece of information on that customer's item.

While this relationship is one of the major reasons for choosing Pick, it can also lead to problems in the area of referential integrity when the customer item that is used in 200 orders needs to be changed to a different item-id because of duplicate customer item for the same customer. Hence the Bridge processing code was added to Advanced Pick to insure referential integrity.
Referential integrity has been defined in many ways, but basically it is the ability for the system to maintain these parent/child relationships automatically. The bridge processing code makes it possible for the system to automatically handle the above situation.

When the customer's item-id is changed to a new item-id, every order with a reference to the old number is automatically changed to the new number. For our first example, create a CUSTOMER and an ORDER file using the following commands at TCL:

CREATE-FILE CUSTOMER 1 1

CREATE-FILE ORDER 1 1

The next step is to add the bridge processing code in the d-pointer of the file's data section. First, use the following command to add the processing code into the CUSTOMER file:

UD CUSTOMER

This command is a macro that uses the Update processor to edit the data section d-pointer. The following is an example of the screen:

DICT customer 'customer' size = 55

dictionary-code D
base 611207
modulo 1
structure
retrieval-lock
update-lock
output-conversion
correlative
attribute-type L
column-width 10
input-conversion
macro
output-macro
description
reallocation
hotkey.all
hotkey1
.
.
.
hotkey0

Use the return key and move the cursor down to the correlative attribute and add the following bridge processing code:

border;10;1

This processing code tells the system that each time an item is filed into the CUSTOMER file, use the order item-id in attribute 10 to add the customer item-id to attribute 1 of the ORDER file. This is an example of a single threaded bridge. The bridge may be made double threaded by adding the following line to the d-pointer for the data section of the ORDER file:

bcustomer;1;10

This processing code instructs the system to do just the opposite. Each time an item is filed into the ORDER file, use the item-id in attribute one to verify that the order item-id is in attribute 10 of the CUSTOMER file.

Bridges, just like b-tree indexes, are updated regardless of the method used to update the file. To see the processing code work, add a few customers to the CUSTOMER file. Next, enter an order into the ORDER file, using one of the customer item-ids on attribute 1.

Each time an order is filed, the order number will appear on attribute 10 of the customer's item. Try copying one of the used customer items to a new item-id. All of the items in the ORDER file that referenced that customer item- id will be changed to the new one.

This feature is also available from Pick/BASIC with one simple statement. The "replace" statement replaces all occurrences of one item-id with a new one. This comes in handy when writing software that removes duplicate items. Whenever duplicates are found in the CUSTOMER file, one item can be deleted from the file and the replace command can be used to change all of the references in the ORDER file to the new customer.

The bridge processing code can be used one step further to actually make updates to the database. The Updating Bridge processing code can be used to make inventory adjustments, keep running totals on chart of accounts, etc. Addition and subtraction can be performed on an attribute in another file using a value from the current item. To continue our example, create an INVENTORY file and place the following processing code on the d-pointer for the data section of the ORDER file:

binventory;2;1;3;+

This processing code will update the quantity available held in attrib ute 1 of the INVENTORY file. Each time an order is filed, the system will use the value held in attribute 2 of the ORDER file as the item-id in the INVENTORY file, the value held in attribute 3 of the ORDER file will be added to attribute 1 in the INVENTORY file.
Syntax
Options
Example
Purpose
Related

system.debugger.drs

Command system.debugger.drs Definition/System Debugger
Applicable release versions: AP, R83
Category System Debugger (42)
Description references a disk location or Pick Virtual Address. The data format and window specifications, if unspecified, are dictated by previous settings.

The "data reference specification" is one of the three elements used in referencing disk locations within the system debugger; it specifies either a "direct" or an "indirect" address.

Address specifications are represented by the character preceding the address, as follows:

".address"

Indicates the address is a hexadecimal number.

",address"

Indicates the address is a decimal number.

The formats illustrated use the default hexadecimal representations.

Direct reference :

!fidaddr.dataaddr
-or-
!dataaddr

"fidaddr" is the frame-id (fid) of the virtual frame, and "dataaddr" is the offset into the virtual frame specified by "fidaddr". If "fidaddr" is not specified, the current process' pcb is the referenced frame. Either of these parameters may be preceded by a period (.), indicating that the address is a hexadecimal value, or a comma (,), which indicates that the address is a decimal value.

Indirect (and symbolic) references :

!symbolname
-or-
!/symbolname
-or-
!*symbolname

Where "symbolname" is the name of the symbol, as defined in either the "psym", "gsym" or "tsym" files. This displays the register number, displacement, format type, and window of the symbol. The symbol table must be "set" prior to using the indirect reference to a symbol name. See "set-sym".

The content, rather than the definition, of the virtual memory area defined by the symbol is displayed in the window equal to the size specified in the symbol definition or by a window specification.

Indirect references:

/symbolname

This displays the contents of the given symbolname.

!*symbolname

This references the data pointed to by the address contained in the symbol.

!*fidaddr.dataaddr
-or-
!*dataaddr

This treats the specified location as a storage register which is used to reference data. The displacement, "dataaddr", is added to the frame address to get the address of the storage register.

Double Indirect References:

!**symbolname
-or-
!**fidaddr.dataaddr
-or-
!**dataaddr

This is one more level of indirection from the single "*" addressing. The specified location is assumed to contain a storage register which is pointing to another storage register which is pointing to the displayed data.

For "*" and "**" addressing, if the first byte of the medial storage register is a x'82', the element is interpreted as a basic indirect string element and the storage register is taken from two bytes beyond this location. If any of the data fields are invalid as storage registers, the message "addr" (or "err!" in R83) appears.
Syntax
Options
Example
Purpose
Related system.debugger.y
system.debugger.dws
system.debugger.dfs
system.debugger.functions
system.debugger.overview
system.debugger.r
system.debugger.x
system.debugger.z
system.debugger.a
system.debugger.c
system.debugger.i
system.debugger.k
system.debugger.l
system.debugger.w

tcl.x-ref

Command tcl.x-ref Verb: Access/TCL
Applicable release versions: R83
Category TCL (746)
Description produces a cross-reference of assembler source listings.
Syntax
Options
Example
Purpose
Related tcl.xref

tcl.xref

Command tcl.xref Verb: Access/TCL
Applicable release versions: R83
Category TCL (746)
Description used as a front-end to the "x-ref" command and is used to produce a cross-reference listing in the xsym file of the most current csym file.
Syntax
Options
Example
Purpose
Related tcl.x-ref

vi

Command vi Definition/Unix
Applicable release versions: AP/Unix
Category Unix (24)
Description lists the most commonly used vi commands.

Please note: vi is a case sensitive editor. The command "A" is different from the command "a".

Invoking vi:

vi filename

Insert Mode

In insert mode, the keyboard behaves like a typewriter. Keystrokes appear as screen text after typing any of the following commands.

i Insert text at the cursor
A Append text at the end of the line
a Append text after the cursor
O Open a new line of text above the cursor
o Open a new line of text below the cursor
<ESC> Exit insert mode & invoke command mode)

Command Mode

In command mode, keystrokes perform functions such as moving the cursor, searching for patterns, or quitting from the document. All commands are referenced from the current cursor position.

Cursor Movement

Arrow Keys Move one space in any direction
G Go to the last line in the file
nG Go to line "n"
w Move forward to the next word
b Move backwards to the previous word
$ Move to the end of the line
0 Move to the beginning of the line
<ctrl>+d Scroll down 1/2 screen
<ctrl>+u Scroll up 1/2 screen
<ctrl>+b Scroll up Full
<ctrl>+f Scroll down Full

Searching

/string Search for a "string" (pattern) of characters
n Search for the next occurrence of the "string"
:%s/str1/str2/g Replace all occurrances of str1 with str2

Deleting Text

x Delete a single character
dw Delete a word
dd Delete an entire line
ndd Delete an "n" number of lines
d$ or
D Delete from the cursor to the end of the line

Copying Text
yy Copy (yank) a line to the buffer
nyy Copy (yank) an "n" number of lines to the buffer
P Paste text from the buffer

Changing Text
r Mark a single character for replacement
cw Mark a word for changing
cc Mark a line for changing

Miscellaneous Commands
j Join a line with the one below it
!cmd Execute a Unix command
:r file Read a file into vi
. Repeat the last command
u Undo the last command

Saving and Exiting
u Write (save) the file
:q! Quit the file without saving changes
ZZ Write (save) the file and quit vi
Syntax
Options
Example
Purpose
Related tcl.vi

ref

Command ref Definition/General
Applicable release versions: AP
Category General (155)
Description the on-line form of the "Advanced Pick Reference Manual", provided as an account-save from Pick Systems.

Previously known as EPick.
Syntax
Options
Example
Purpose
Related