HPlogo ALLBASE/SQL Reference Manual: HP 9000 Computer Systems > Appendix C Sample DBEnvironment

LOADTABS Command File

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

   /* This file loads each of the two tables in the ManufDB    */
   /*   database, the six tables in the PurchDB database,      */
   /*   and the three tables in the RecDB database with data.  */
   
   LOAD FROM EXTERNAL sampledb/SupplyBa TO ManufDB.SupplyBatches
   VENDPARTNUMBER      1    16
   BATCHSTAMP         18    23
   MINPASSRATE        43     8   ?
   END
   N;
   COMMIT WORK;
   !echo Table SupplyBatches successfully loaded!;
 
   LOAD FROM EXTERNAL sampledb/TestData TO ManufDB.TestData
   BATCHSTAMP          1    23
   TESTDATE           25    10   ?
   TESTSTART          36     8   ?
   TESTEND            45     8   ?
   LABTIME            54    20   ?
   PASSQTY            75     2   ?
   TESTQTY            78     2   ?
   ENDATA
   N;
   COMMIT WORK;
   !echo Table TestData successfully loaded!;
 
   LOAD FROM EXTERNAL sampledb/Parts TO PurchDB.Parts
   PartNumber          1    16
   PartName           17    30   ?
   SalesPrice         47    12   ?
   END
   N;
   COMMIT WORK;
   !echo Table Parts successfully loaded!;
   
   LOAD FROM EXTERNAL sampledb/Inventor TO PurchDB.Inventory
   PartNumber          1    16
   BinNumber          17     5
   QtyOnHand          22     5   ?
   LastCountDate      27     8   ?
   CountCycle         35     5   ?
   AdjustmentQty      40     5   ?
   ReorderQty         45     5   ?
   ReorderPoint       50     5   ?
   END
   N;
   COMMIT WORK;
   !echo Table Inventory successfully loaded!;
 
   LOAD FROM EXTERNAL sampledb/SupplyPr TO PurchDB.SupplyPrice
   PartNumber          1    16
   VendorNumber       17    10
   VendPartNumber     27    16
   UnitPrice          43    12   ?
   DeliveryDays       55     5   ?
   DiscountQty        60     5   ?
   END
   N;
   COMMIT WORK;
   !echo Table SupplyPrice successfully loaded!;
 
   LOAD FROM EXTERNAL sampledb/Orders TO PurchDB.Orders
   OrderNumber         1    10
   VendorNumber       11    10   ?
   OrderDate          21     8   ?
   END
   N;
   COMMIT WORK;
   !echo Table Orders successfully loaded!;
 
   LOAD FROM EXTERNAL sampledb/OrderIte TO PurchDB.OrderItems
   OrderNumber         1    10
   ItemNumber         11    10
   VendPartNumber     21    16   ?
   PurchasePrice      37    12
   OrderQty           49     5   ?
   ItemDueDate        54     8   ?
   ReceivedQty        62     5   ?
   END
   N;
   COMMIT WORK;
   !echo Table OrderItems successfully loaded!;
 
   LOAD FROM EXTERNAL sampledb/Vendors TO PurchDB.Vendors
   VendorNumber        3     4
   VendorName          7    30
   ContactName        39    30   ?
   PhoneNumber        71    12   ?
   VendorStreet       88    30
   VendorCity        120    20
   VendorState       142     2
   VendorZipCode     146     5
   VendorRemarks     152    60   ?
   END
   N;
   COMMIT WORK;
   !echo Table Vendors successfully loaded!;
   
   LOAD FROM EXTERNAL sampledb/Clubs TO RecDB.Clubs
   ClubName            1    15
   ClubPhone          25     4   ?
   Activity           35    18   ?
   END
   N;
   COMMIT WORK;
   !echo Table Clubs successfully loaded!;
 
   LOAD FROM EXTERNAL sampledb/Members TO RecDB.Members
   MemberName          1    20
   Club               25    15
   MemberPhone        45     4   ?
   END
   N;
   COMMIT WORK;
   !echo Table Members successfully loaded!;
 
   LOAD FROM EXTERNAL sampledb/Events TO RecDB.Events
   SponsorClub         1    15   ?
   Event              20    30   ?
   Date               50    10   ?
   Time               62     8   ?
   Coordinator        71    20   ?
   END
   N;
   COMMIT WORK;
   !echo Table Events successfully loaded!;
 
   INSERT INTO PURCHDB.REPORTS VALUES ('Report1', 'FREE',
   '< sampledb/Report1>! Report1');
   COMMIT WORK;
   !echo Table Reports successfully loaded!;
 
   !echo Loading of databases is now done!;
Feedback to webmaster