Example. Robelle Suprtool 4.6.01, STExport, Suprlink
Werbung
Werbung
Example Suprlink Output
Example
The Form command displays the fields in a self-describing file. This information is stored in a file with an extension of ".sd" and is not accessible with other tools. Use the Form command to obtain the record layout of Suprlink output files.
The following example shows the Form command listing for an input file, a Link file, and the resulting output file. We start with an input file of invoices.
+form invoices
File: invoices (SD Version B.00.00) Has Linefeeds
Entry: Offset
CUSTNUM X8 1 <<Sort #1 >>
DELIVERED I2 9
PRODUCTNUM Z8 13
PRICE I2 21
PURCHASED I2 25
QTY I1 29
TAX I2 31
TOTAL I2 35
Entry Length: 38 Blocking: 1
Suprtool produced both the invoice and the customer file by using the Select,
Extract, and Sort commands. The invoice file was produced with Suprtool's Output
Link option. If you had used Suprtool's Output Query option, the Form command would not have printed any information about the key fields. The next listing is the customer file.
+form cust
File:cust (SD Version B.00.00) Has Linefeeds
Entry: Offset
CITY X12 1
RATING I2 13
CUSTNUM X8 17 <<Sort #1 >>
STATUS X2 25
FIRSTNAME X10 27
LASTNAME X16 37
STATE X2 53
ADDRESS 2X25 55
ZIPCODE X6 105
Entry Length: 110 Blocking: 1
The street address is a compound-field. If you had used Suprtool's Output Query option, the field would have appeared with a question mark for the data-type. In that case, you cannot use the field as a key-field in Suprlink, but the actual data in the field will be processed and linked correctly. Your final report should be able to read
Suprtool 4.6.01 for HP-UX User Manual Example Suprlink Output
• 281
this data just as if it came from the database. We use Suprlink to combine the invoice and cust files into one Output-file:
/opt/robelle/bin/suprlink
+i invoices by custnum
+l cust
+o invcust
+e
The final Form command shows the record layout of the Output-file. You would use this file as input to your report program.
+form invcust
File: invcust (SD Version B.00.00) Has Linefeeds
Entry: Offset
CUSTNUM X8 1 <<Sort #1 >>
DELIVERED I2 9
PRODUCTNUM Z8 13
PRICE I2 21
PURCHASED I2 25
QTY I1 29
TAX I2 31
TOTAL I2 35
CITY X12 39
RATING I2 51
STATUS X2 55
FIRSTNAME X10 57
LASTNAME X16 67
STATE X2 83
ADDRESS 2X25 85
ZIPCODE X6 135
Entry Length: 140 Blocking: 1
282
• Example Suprlink Output
Suprtool 4.6.01 for HP-UX User Manual
Herunterladen
Werbung