PICK 1 - An Introduction for TUG U2U 205

Download Report

Transcript PICK 1 - An Introduction for TUG U2U 205

PICK 1 - An Introduction
Course 409
PICK 1 - An Introduction
Ken R. Hall, Ph.D.
Hyland Technology Group, Inc.
Portland, Oregon
www.hylandtech.com
[email protected]
503-702-7841
Speaker’s Qualifications
• Ken Hall has over 25 years experience
developing applications in PICK, Universe,
and Unidata.
• Ken developed applications for mail order,
manufacturing, leasing, publishing, and
distribution businesses.
• Ken was the I.T. Manager & software
developer for a major wholesale distributor
which used customized SHIMS.
Learning Objectives
• As a result of this presentation, you will:
– Increase your understanding of PICK and its
architecture
– Understand PICK multi-dimensional data storage
– Be able to use Universe built-in HELP
– Be introduced to tools used to display and edit data
– Be able to display dictionaries of data files
– See the power of data retrieval using LIST or SORT
Presentation Agenda
• The Multi-Dimensional Structure of PICK
– Accounts, VOC, FILEs, DICTs, records, fields, and
multi-values
•
•
•
•
•
•
PICK programming environment
Universe HELP command
Displaying PICK data by record ID
DICT and DATA records
Formatting data output using DICT items
Introducing tools to display or modify records
– CT, ED, LIST, SORT
View of PICK Database
XYZ Distributors System
UV
XYZ
ACCUTERM
Universe Master Account
Shims Application Account
Accuterm Application Account
Files =>
CUSTOMER
FTBP
Data File
Program File
D_CUSTOMER
DICT =>
Dictionary
Field Definitions for Customer
Records =>
Fields =>
1000
1001
Ace Plumbing Co.
ABC Plumbing Co.
NAME
ADDRESS
Customer's Name
Street Address Line(s)
LINE1
Address Line 1
Multiple Values =>
LINE2
Address Line 2
City
What is unusual about PICK data
storage?
• Data are stored in a hierarchy of elements
– Accounts, Files, Records, Fields, Values, etc.
• PICK is multi-dimensional
– Each Value may contain one or more subvalues
– Associated fields can store related multivalues
– Each of the multi-values can store multiple
sub-values
A multi-dimensional Order
Order No.
5001
Fields
Customer No.
1001
Sets of
Multiple
Values
1
Products Ordered
a Multi-valued Set
Order Date
9/01/2006
Product No.
1002
Description
1/4 " bolt
Ordered
100
Shipped
85
Date Shipped
9/8/2006
Back Ordered
15
Date Required
9/25/2006
Product No.
1005
Description
1/2" bolt
Ordered
500
2
Shipped
200
Date Shipped
9/8/2006
Back Ordered
300
1
Shipped
200
Date Shipped
9/14/2006
Back Ordered
100
2
Shipped
100
Date Shipped
9/20/2006
Back Ordered
0
3
Multiple
Sub-Values
The multi-dimensional structure of
PICK and UniVerse
• PICK’s Hierarchical data structure
–
–
–
–
A PICK Database contains Accounts
An Account contains Files
A File contains Records
A Record contains Fields or Attributes
• An SQL data base contains one value per field per record
– A Field contains one or more values (multi-values)
– Each Value may contain one or more sub-values
PICK Programming Environment
• TCL – the command line
• Procedure Files – PROC and Paragraphs
– Scripts that store repeated procedures and
menus
• BASIC programs – BP and BP.O files
– Database aware programming language
– Used for Screen display and data entry
– Batch processing
Files - Dictionaries and Data
• Files consist of 2 related elements
– A data file - e.g. CUSTOMER
• Stores individual records for each customer
– A dictionary file e.g D_CUSTOMER
• Stores DICT items that define the fields of the CUSTOMER
records
• Both DICT and DATA files have records stored
by unique keys or IDs
• DICT items are used to display and format data
records
TCL – command line processing
• To begin TCL processing, type END at menu
prompt and password
• The Universe TCL prompt character “>” appears
>
Enter “HELP” and hit Enter key to display Universe built
in HELP.
>HELP
Universe HELP
>HELP
+ List of entries from SYS.HELP,SYS.HELP +
| ( ... )
|
| *
|
| -CANCEL
|
| -L
|
| -LIST
|
| -SPOOL
|
| -XREF
|
| .A
|
| .C
|
| .D
|
| .I
|
| .L
|
| .R
|
| .S
|
| .U
|
| .X
|
| <<...>>
|
| ?
|
| @ASSOC_ROW
|
| A
|
+-----------+
Page Down
+----------+
|?
|
+------------------------------------------+
Using Help
• “HELP” by itself yields list of commands
– Use Arrow keys to scroll through the list to find
command
– Use “ESC” key to escape from HELP
– “Page UP” or “Page Down” moves through
HELP screens
– Hit <Enter> to select highlighted command
• HELP <command> displays help for that
command (as if selected above)
Displaying PICK data
• Use LIST command to list records in File
– LIST <filename>
– Lists records in file in stored order showing ID
• Use SORT command to list records in sorted
order
– SORT <filename> BY <fieldname>
– List records in file sorted by <fieldname> by ID
• How do you find a <fieldname>?
Listing Files in an Account
• Use command LISTF to list files in this account
– Displays listing to the screen by default
>LISTF
FILES in your vocabulary
03:27:31pm
01 Oct 2006 Page
1
Filename........................... Pathname...................... Type Modulo
DICT &SAVEDLISTS&
DATA &SAVEDLISTS&
D_&SAVEDLISTS&
&SAVEDLISTS&
3
1
1
DICT ACCUTERMCTRL
DATA ACCUTERMCTRL
D_ACCUTERMCTRL
ACCUTERMCTRL
18
18
3
3
DICT CUST.SAMPLE
DATA CUST.SAMPLE
D_CUST.SAMPLE
CUST.SAMPLE
18
18
1
3
DICT CUST.SAMPLE.CTRL
DATA CUST.SAMPLE.CTRL
D_CUST.SAMP001
CUST.SAMP001
18
18
3
3
DICT CUST.SAMPLE.XREF
DATA CUST.SAMPLE.XREF
Press any key to continue...
D_CUST.SAMP000
CUST.SAMP000
18
18
3
3
End of screen Prompt
• Responding to:
Press any key to continue…
– Hit <Enter> key to go to next screen of data
– Hit “Q” key to quit display and go to TCL
• NOTE: “Q” at TCL logs you OFF the system
Field Definitions stored in
DICTionary of File
• LIST DICT <filename> to display listing of
field definitions for a file
• LIST DICT <filename> (P) sends listing to
the default printer
List Customer Dictionary
>LIST DICT CUSTOMER
DICT CUSTOMER
02:44:54pm
01 Oct 2006
Page
1
Field......... Type & Field........ Conversion.. Column......... Output Depth &
Name.......... Field. Definition... Code........ Heading........ Format Assoc..
Number
CUST.NO
A
@ID
D
CITY.STATE.ZIP S
0
SERVICE.DATE
A
0
0 A;N(CITY):",
":N(STATE):"
":N(ZIP)
1
NAME
ADDRESS.1
A
A
2
3
ADDRESS.2
A
4
CITY
STATE
ZIP
A
A
A
5
6
7
Press any key to continue...
D2/
CUSTOMER
NUMBER
CUST.SAMPLE
CITY/STATE/ZIP
6R
M
10L
30L
S
M
SERVICE
DATE
8L
M
ADDRESS
LINE ONE
ADDRESS
LINE TWO
25L
25L
M
M
25L
M
15L
2L
10L
M
M
M
ZIP
CODE
Displaying field data
• By using field names in LIST or SORT, you can
display data in columnar format
– LIST CUSTOMER NAME CITY STATE
>LIST CUSTOMER NAME CITY STATE
LIST CUSTOMER NAME CITY STATE 02:46:58pm 01 Oct 2006 PAGE
CUST.SAMPLE NAME..................... CITY........... STATE
1002
Alfreds Futterkiste
Berlin
1005
1008
1017
1011
1014
Around the Horn
Blondel pere et fils
Consolidated Holdings
Bottom-Dollar Markets
Centro comercial Moctezum
a
Du monde entier
Island Trading
Familia Arquibaldo
Franchi S.p.A.
London
Strasbourg
1020
1041
1023
1029
Press any key to continue...
Tsawassen
Mexico D.F.
GERMA
NY
BC
Nantes
Sao Paulo
Torino
SP
1
Displaying Sorted Data
>SORT CUSTOMER WITH COUNTRY "Mexico" "France" BY COUNTRY BY NAME NAME CITY COUNTRY
SORT CUSTOMER WITH COUNTRY "Mexico" "France" BY COUNTRY BY NAME NAME CITY COUNTR
Y 03:14:37pm 01 Oct 2006 PAGE
1
CUST.SAMPLE NAME..................... CITY........... COUNTRY...
1008
1010
1020
1025
1028
1044
1081
1092
1093
1003
1004
1014
1065
1088
Blondel pere et fils
Bon app'
Du monde entier
Folies gourmandes
France restauration
La corne d'abondance
Specialites du monde
Victuailles en stock
Vins et alcools Chevalier
Ana Trujillo Emparedados
y helados
Antonio Moreno Taqueria
Centro comercial Moctezum
a
Pericles Comidas clasicas
Tortuga Restaurante
Press any key to continue...
Strasbourg
Marseille
Nantes
Lille
Nantes
Versailles
Paris
Lyon
Reims
Mexico D.F.
France
France
France
France
France
France
France
France
France
Mexico
Mexico D.F.
Mexico D.F.
Mexico
Mexico
Mexico D.F.
Mexico D.F.
Mexico
Mexico
Use “CT” to Display Raw Data
• CT <filename> <recordid> displays raw data as
it is stored
>CT CUSTOMER 1008
1008
0001 12290
0002 Blondel pere et fils
0003 24, place Kleber
0004
0005 Strasbourg
0006
0007 67000
0008 88.60.15.31
0009 Frederique Citeaux
0010
0011
0012
0013 France
0014 88.60.15.32
>
Use “ED” to Edit Raw Data
• ED <filename> <recordid> starts the editor
that modifies a record in a file
– Be very careful using the editor
– You can use it to change or delete records
– Misuse can corrupt your data or the
system
– Use “HELP ED” to get preliminary help
– In ED use “HELP” to get help
– USE “EX” to exit help without filing record
Summary
• You were introduced to PICK, a Multidimensional database
• PICK is made up of Accounts with Files
with Records with Fields with Multi-Values
• TCL, the command line, lets you do ad
hoc reports with LIST or SORT
• Dictionaries define the Fields in a File
• CT can be used to display raw data
• ED is available to modify raw data
Q&A
Thank You!
Ken R. Hall, Ph.D.
Hyland Technology Group, Inc.
www.hylandtech.com
[email protected]
503-702-7841