Form Command [F]. Robelle Suprtool 4.6.01, STExport, Suprlink
Publicité
Publicité
Form Command [F]
The Form command displays information about an Eloquence or SQL database, or the current Select command, or the fields in a self-describing file. The Form command is similar to the Form command of QUERY on the HP e3000.
FORM [ SETS | ITEMS | PATHS | dataset | data-item | filename ]
FORM [ SETS | ITEMS | PATHS
dataset | data-item | filename ]
(Default: depends)
The Form command displays the structure of a database, dataset, table or selfdescribing file.
When showing the form of an Eloquence dataset or a self-describing file, Suprtool shows the byte offset of each field after the subcount, type, and sublength. The first field always appears at offset one. If you have specified a date format or the number of implied decimal places with the Item command, these attributes appear as part of the form listing.
Dataset List
>ba sample
>form sets
Database: SAMPLE
Set Item Entry Load Entry
Sets: Num Type Count Capacity Count Factor Length B/F
CUSTOMERS 1 MDX 10 1355 1177 87 % 112 0
PARTS 2 MDX 10 524 182 35 % 53 0
ID 3 MDX 1 2259 47 2 % 2 0
ORDERS 4 DDX 7 1008 47 5 % 21 0
LINEITEMS 5 DDX 7 1008 272 27 % 22 0
Suprtool shows the type of each dataset (e.g., "M" for Manual master, "A" for
Automatic master, "D" for Detail). If you have enabled dynamic dataset expansion,
Suprtool adds "DX" to the type of the dataset (e.g., "MDX", "DDX").
Detail Datasets
If you request information about a specific detail dataset, Suprtool prints the path information in DBSCHEMA format. The path shows the related master dataset and the sort item-name. When displying the form of an Eloquence dataset, Suprtool shows the capacity in a format similar to the one in DBSCHEMA.
Suprtool 4.6 for HP-UX: Suprtool Suprtool Commands
• 97
98
• Suprtool Commands
>form orders
Database: SAMPLE
ORDERS Detail Set# 4
Entry: Offset
ORDERNO X16 1
ORDERID I2 17 (!ID)
ORDERDATE I2 21
CUSTNO X6 25 (CUSTOMERS)
ORDERSTAT I1 31
ORDERTYPE X2 33
ORDERVALUE E4 35
Capacity: 1008 (0), 0, 0, 0 Entries: 47 Highwater: 0 Bytes: 42
Master Datasets
The Form Sets command indicates which datasets have MDX enabled. A Form command on these datasets shows details of their expansion setting.
>form parts
Database: SAMPLE
PARTS Master Set# 2
Entry: Offset
PARTNO X16 1 <<Search Field>>
PARTLOOKUP X10 17
DESCRIPA X20 27
DESCRIPB X20 47
PARTUNIT X2 67
PROFITGROUP X4 69
MATNUMBER X16 73
PRICEUNIT X2 89
PRICE1 E4 91
PRICE2 E4 99
Capacity: 524 (0), 0, 0, 0 Entries: 182 Bytes: 106
SQL Select
When showing the form of an SQL select, Suprtool shows the column's name, the
SQL type and the Suprtool type. When showing the form of a self-describing file,
Suprtool shows the byte offset of each field after the subcount, type, and sublength.
The first field always appears at offset one.
>open oracle scott tiger
>select * from emp
>form
Column Name: Oracle Type: Nulls: Suprtool Type:
EMPNO Number (4) N Integer
ENAME Varchar2 (10) Y Byte
JOB Varchar2 (9) Y Byte
MGR Number (4) Y Integer
HIREDATE Date Y Oracle Date
SAL Number (7,2) Y Packed
COMM Number (7,2) Y Packed
DEPTNO Number (2) Y Integer
SQL Database
If an Allbase database is open and no input file has been specified, the default Form command shows all of the tables in the database. If a Select command has been specified, the default Form command shows the columns in the Select command.
The exact format of the Form command is different for each SQL database.
Suprtool 4.6 for HP-UX: Suprtool
Self-Describing Files
The Link output option produces an SD file with information about how the file was sorted, what fields are compound, and the date format or the number of implied decimal places for any fields. The Form command shows all of this information:
File: custfile (SD Version B.00.00) Has line feeds
Entry: Offset
CHAR_FIELD X5 1 <<Sort #1>>
REPEATED_I1 3I1 6 {compound field}
DATE_FIELD J2 12 <<YYYYMMDD>>
COST_FIELD J2 16 << .2 >>
Entry Length: 20 Blocking: 1
Default Form
If a Chain, Get, Select, or Input command of a self-describing file has been entered, a
Form command without parameters shows the fields in the current input source. If a
Base command has been specified, but no input source, a Form command without parameters does a Form Sets. If an Open command has been specified, but no input source, a Form command without parameters shows the tables in the SQL database.
Form Keywords
The Form command shows items, paths, and sets before it searches for a dataset or file with these names. Use a string (e.g., "sets") to display the form of a dataset or file that matches one of the Form keywords.
>form "paths" {paths is the name of a dataset}
Suprtool 4.6 for HP-UX: Suprtool Suprtool Commands
• 99
Télécharger
Publicité