/*1*/ OUTPUT TO "tut-temp.txt".
FOR EACH Customer NO-LOCK WHERE Customer.Balance >= (Customer.CreditLimit * .85) WITH STREAM-IO: DISPLAY Customer.Name FORMAT "x(20)" Customer.Contact FORMAT "x(15)" Customer.Balance Customer.CreditLimit WITH NO-BOX STREAM-IO. FOR EACH Order NO-LOCK WHERE Order.CustNum = Customer.CustNum WITH STREAM-IO: DISPLAY Order.OrderNum Order.OrderDate Order.ShipDate Order.PromiseDate SKIP(1) WITH 2 COLUMNS STREAM-IO. FOR EACH OrderLine NO-LOCK WHERE OrderLine.OrderNum = Order.OrderNum WITH STREAM-IO: FIND Item NO-LOCK WHERE Item.ItemNum = OrderLine.ItemNum. DISPLAY OrderLine.Qty OrderLine.ItemNum Item.ItemName FORMAT "x(13)" Item.Price LABEL "Unit Price" Item.Price * Qty (TOTAL) LABEL "Price" FORMAT "$zzz,zz9.99 CR" WITH NO-BOX STREAM-IO. END. /* FOR EACH OrderLine */ END. /* FOR EACH Order */ END. /* FOR EACH Customer */ /*2*/ OUTPUT CLOSE. |