Previous | Contents | Index |
Example 6-5 Example of BREAK Command with POSITION Qualifier |
---|
OPEN DETAIL SORT BY PRODNBR SORT BY LINEID INCLUDE INVNBR < 10330 EXCLUDE INVNBR = 10320 BREAK ON PRODNBR DESCRIPTION 'Extended price sub-total:' POSITION 2 PRINT PRODNBR PRINT LINEID PRINT QTY PRINT PRICE PRINT EXTPRICE WITH TOTALS GO |
Example 6-6 Example of BREAK Command with POSITION Qualifier - Output |
---|
21-Jan-1999 Report on DETAIL Page 1 Line Prod Item Order Selling Extended Nbr ID# Qty Price Price ----- --------- ------ ---------- ---------- 20120 10304-002 2 1,495.00 2,990.00 20120 10323-004 1 1,495.00 1,495.00 ========== Extended price sub-total: 4,485.00 22600 10314-002 1 325.00 325.00 22600 10323-005 1 325.00 325.00 22600 10327-002 1 325.00 325.00 22600 10328-002 1 325.00 325.00 22600 10328-003 4 325.00 1,300.00 22600 10329-003 2 325.00 650.00 ========== Extended price sub-total: 3,250.00 22800 10301-002 2 375.00 750.00 22800 10301-004 1 375.00 375.00 22800 10301-006 2 375.00 750.00 22800 10304-003 1 375.00 375.00 22800 10313-001 2 375.00 750.00 22800 10321-002 1 375.00 375.00 22800 10324-001 4 375.00 1,500.00 22800 10325-003 10 375.00 3,750.00 ========== Extended price sub-total: 8,625.00 |
EDIT |
EDIT |
The EDIT command allows you to make changes to a GQL command file. When the EDIT command is executed, you are put into edit mode.
You can edit your commands to correct errors, insert comments, and/or resequence the commands. To EXIT the editor, press the [PF1] key and then the [F] key. GQL will close files, reset the command list and reload the commands from the edited command file.
If you want to save the changes, you must use the SAVE command or the changes will be lost.
EXCLUDE cond_expr |
EXCLUDE customer(days_past_due) < 15 |
EXCLUDE tells GQL which records to exclude from the report.
When GQL reads the EXCLUDE command, it evaluates the expression cond_expr. If the expression is TRUE, GQL will exclude the current record from the report.
When more than one EXCLUDE command is given, ANY command expression that is TRUE will cause the record to be excluded from the selected subset.
Example 6-7 Example of EXCLUDE Command |
---|
OPEN DETAIL INCLUDE INVNBR = 10301 EXCLUDE PRODNBR = 24200 SORT BY PRODNBR SORT BY LINEID PRINT INVNBR, PRODNBR, LINEID, QTY, PRICE, EXTPRICE GO |
The report will not include the product number "24200" because it has been excluded.
Example 6-8 Example of EXCLUDE Command - Output |
---|
21-Jan-1999 Report on DETAIL Page 1 Line Inv Prod Item Order Selling Extended Nbr Nbr ID# Qty Price Price ----- ----- --------- ------ ---------- ---------- 10301 22800 10301-002 2 375.00 750.00 10301 22800 10301-004 1 375.00 375.00 10301 22800 10301-006 2 375.00 750.00 10301 28800 10301-009 2 249.00 498.00 10301 31020 10301-005 1 595.00 595.00 10301 31150 10301-001 1 2,495.00 2,495.00 10301 31150 10301-008 8 2,495.00 19,960.00 10301 33090 10301-007 2 1,495.00 2,990.00 |
EXCLUDE FOUND structure_name |
EXCLUDE FOUND customer |
EXCLUDE FOUND tells GQL to exclude a record if it is found in the given structure.
EXCLUDE FOUND must be used AFTER the RELATE command. |
GO |
GO |
The GO command starts generation of the report. The nature and appearance of the report depends on all of the commands given prior to the GO command.
When you enter the GO command, GQL calls a template program and inserts INTOUCH code at various places to customize the program according to the commands given. If an error is detected at this point, a message is displayed. The modified template program runs, giving progress statistics as it selects data and formats the report. After the report is formatted, you can select where to print the report. Selecting EXIT from the report output options menu will take you back to the Guide prompt.
After returning from GO, your screen will be refreshed with the report title and column headings, and your commands will be as you left them.
HELP |
HELP |
The HELP command displays information about GQL and the commands. Pressing the [Help] key will also cause GQL information to be displayed.
IF cond_expr THEN command(s) ELSE command(s) ENDIF |
IF age > 50 THEN let x$ = 'yes' ELSE let x$ = 'no' ENDIF |
Use the IF THEN command when you want to execute a command or block of commands only under specific conditions.
Example 6-9 Example of IF THEN Command |
---|
OPEN VEND EXCLUDE CITY = "FALLBROOK" SORT BY NAME PRINT ID PRINT NAME PRINT BALANCE IF BALANCE > 7500 THEN LET A$ = 'Send notification' ELSE LET A$ = '' ENDIF PRINT A$ LENGTH 17 HEADING 'Necessary Action' GO |
Example 6-10 Example of IF THEN Command - Output |
---|
21-Jan-1999 Report on VEND Page 1 YTD Student ID Full name balance Necessary Action ---------- ------------------------------ ----------- ----------------- 0100137324 ARNETT, CHRISTINA M. $8,025.50 Send notification 0300137324 BECKWITH, JENNIFER $8,217.50 Send notification AK00000401 COX, SHEILA S. $7,607.00 Send notification 0400136501 EDGMON, JENNIFER L. $8,060.00 Send notification 0500000484 HAMPTON, AMY L. $7,418.00 0200000459 HAUSER, SHANE R. $7,890.00 Send notification 0400000546 HODSDON, ERIC $7,915.00 Send notification 0600000415 HOLLADAY, SCOTT T. $7,546.00 Send notification 0300137118 JENSEN, ALFRED G. $7,698.50 Send notification 0200137324 KLEMPLE, RANDAL M. $7,900.50 Send notification 0400137323 REYES, MARIO $7,421.50 0100137155 THORN, MELISSA R. $7,856.50 Send notification |
INCLUDE cond_expr |
INCLUDE customer(balance) > customer(min_balance) |
INCLUDE tells GQL which records to include on the report.
When GQL reads the INCLUDE command, it evaluates the expression cond_expr. If the expression is TRUE, GQL will include the current record on the report.
When more than one INCLUDE expression is given, ALL expressions must be TRUE in order for the data to be included.
INCLUDE also allows you to provide a range of values (e.g., low value to high value):
INCLUDE custnbr = 10000 TO 11000 |
Example 6-11 Example of INCLUDE Command |
---|
OPEN DETAIL INCLUDE PRODNBR = 31020 SORT BY PRODNBR PRINT PRODNBR, LINEID, QTY, PRICE, EXTPRICE GO |
Example 6-12 Example of INCLUDE Command - Output |
---|
22-Jan-1999 Report on DETAIL Page 1 Line Prod Item Order Selling Extended Nbr ID# Qty Price Price ----- --------- ------ ---------- ---------- 31020 10301-005 1 595.00 595.00 31020 10322-002 1 595.00 595.00 31020 10323-002 1 595.00 595.00 31020 10328-005 9 595.00 5,355.00 31020 10335-001 1 595.00 595.00 31020 10341-002 1 595.00 595.00 31020 10341-003 2 595.00 1,190.00 31020 10341-005 1 595.00 595.00 31020 10345-010 2 595.00 1,190.00 31020 10348-006 8 595.00 4,760.00 31020 10356-001 5 595.00 2,975.00 31020 10363-001 2 595.00 1,190.00 31020 10364-003 3 595.00 1,785.00 31020 10372-003 1 595.00 595.00 31020 10378-002 1 595.00 595.00 31020 10379-003 2 595.00 1,190.00 31020 10384-005 2 595.00 1,190.00 31020 10390-001 4 595.00 2,380.00 |
Previous | Next | Contents | Index |