! GUIDE_03.SCRIPT - Tutorial 3: INCLUDE, EXCLUDE, REFRESH title 'GUIDE - INCLUDE, EXCLUDE, REFRESH' ! Written by Bob van Keuren ! Date 11 Apr 1989 ! Revised 20 Sep 1989 ! ! This tutorial covers INCLUDE, EXCLUDE, and REFRESH. script 'GUIDE' data 'guide !' do clear area box: 6, 32, 12, 76 print at 7, 34: 'GUIDE allows you to select which records' print at 8, 34: 'you want in your report. This tutorial ' print at 9, 34: 'explains how to use the INCLUDE and' print at 10, 34: 'EXCLUDE statements to pick out certain' print at 11, 34: 'records for a report.' delay clear area box: 6, 32, 12, 76 print at 7, 34: 'This tutorial also explains how to use the' print at 8, 34: 'REFRESH command to make the screen'; print at 9, 34: 'readable.'; delay clear area box: 6, 32, 12, 76 print at 7, 34: 'This report will print a list of detail' print at 8, 34: 'items from invoices. These items are in' print at 9, 34: 'the DETAIL structure. First, enter'; print at 10, 34, reverse: "open detail"; print ' to open the DETAIL file.'; input at 21, 1, prompt 'Guide> ' allow 'open detail,EXIT', & help 'Enter "open detail"': z$ select case z$ case 'EXIT' data 'exit' exit do case 'open detail' gosub detail case 'OPEN DETAIL' gosub detail end select end do stop ! DETAIL report ! detail: data 'open detail' clear area box 8, 33, 13, 77 print at 9, 35: 'To indicate which records you want, you' print at 10, 35: 'can use an INCLUDE command. You can'; print at 11, 35: 'use INCLUDE with any field in the data'; print at 12, 35: 'structure.'; delay clear area box 8, 33, 13, 77 print at 9, 35: 'This report will include records based'; print at 10, 35: 'on invoice number. Enter '; print at 11, 35, reverse: "include invnbr < 10320"; print ' to include all' print at 12, 35: 'invoice numbers less than 10320.' input at 21, 1 prompt 'Guide> ', allow "include invnbr < 10320" clear area box 8, 33, 13, 77 print at 9, 35: 'You can also skip records with the ' print at 10, 35: 'EXCLUDE command. Enter '; print at 11, 35, reverse: "exclude invnbr < 10000"; print ' to exclude all' print at 12, 35: 'invoice numbers less than 10000.' input at 21, 1 prompt 'Guide> ', allow "exclude invnbr < 10000" clear area box 8, 33, 13, 77 print at 9, 35: 'The report will sort the DETAIL records' print at 10, 35: 'by invoice number. Enter' print at 11, 35, reverse: 'sort by invnbr'; print ' to sort on the number.' input at 21, 1 prompt 'Guide> ', allow 'sort by invnbr' clear area box 8, 33, 13, 77 print at 9, 35: 'After sorting, indicate the fields to'; print at 10, 35: 'print. Enter '; print reverse: 'print invnbr,qty'; print ' to print'; print at 11, 35: 'the invoice number and quantity.' input at 21, 1 prompt 'Guide> ', & allow '"print invnbr,qty", "print invnbr, qty"' clear area box 8, 33, 13, 77 print at 9, 35: 'Next, print the selling price.' print at 10, 35: 'Enter '; print reverse: 'print price'; print ' to print the price.' input at 21, 1, prompt 'Guide> ', allow 'print price' clear area 8, 33, 10, 80 clear area box 9, 33, 15, 77 print at 10, 35: 'The final column will be the extended' print at 11, 35: 'price, with a total at the end. Enter'; print at 12, 35, reverse: 'print extprice with totals'; print '.' print at 13, 35: 'The word "with" is optional.' input at 21, 1, prompt 'Guide> ', & allow 'print extprice with totals,print extprice totals' clear area box 9, 33, 15, 77 print at 10, 35: 'Occasionally, phone noise and other'; print at 11, 35: 'problems may mess up your screen.'; print at 12, 35: 'At any time, if the screen display'; print at 13, 35: 'is not readable, you can enter '; print reverse: 'refresh'; print at 14, 35: 'to refresh the screen. Enter '; print reverse: 'refresh'; print '.' input at 21, 1, prompt 'Guide> ', allow 'refresh' clear area 15, 33, 15, 80 clear area box 9, 33, 14, 77 print at 10,35: 'GUIDE prints the report format again.' print at 11,35: 'To see what commands you have entered,'; print at 12,35: 'type '; print reverse: 'show commands'; print '. GUIDE prints a list'; print at 13,35: 'of all the commands for this report.' input at 21,1, prompt 'Guide> ', allow 'show commands' !clear area 12, 33, 14, 80 clear area box 9, 36, 13, 77 print at 10, 38: 'You have set up all the fields' print at 11, 38: 'for this report. Enter '; print reverse: 'go'; print at 12, 38: 'to produce the report.' input at 21, 1, prompt 'Guide> ', allow 'go,EXIT': z$ select case z$ case 'EXIT' data 'exit' return case 'go' data 'go' case 'GO' data 'go' end select clear area 18, 1, 21, 80 clear area box 7, 33, 11, 76 print at 8, 35: 'GUIDE asks where to print the report.' print at 9, 35: 'Enter '; print reverse: 'scr'; print ' to print the report at the' print at 10, 35: 'terminal.' input menu '%title " Output Options ", %at 18, 8, %items 2, "Screen"=SCR, "Printer Port"=pri, "System Printer"=sys, "Save to Disk"=sav, exit', allow 'scr' keyboard keyboard keyboard keyboard clear area 18, 1, 21, 80 clear area box 7, 33, 11, 76 print at 8, 35: 'After printing, GUIDE returns to the' print at 9, 35: 'print option menu. Enter' print at 9, 61, reverse: 'exit' print at 10, 35: 'to return to GUIDE.' input menu '%title " Output Options ", %at 18, 8, %items 2, "Screen"=SCR, "Printer Port"=pri, "System Printer"=sys, "Save to Disk"=sav, exit', allow 'exit' clear area box 8, 33, 13, 76 print at 9, 35: 'In this tutorial, you have used the new'; print at 10, 35: 'commands INCLUDE, EXCLUDE, and REFRESH.'; print at 11, 35: 'Now type '; print reverse: 'exit' print ' to exit from GUIDE.' input at 21, 1, prompt 'Guide> ', allow 'EXIT' return end script