INTOUCH®
Guided Query Language


Previous Contents Index

EXAMPLE:


        SET GRANDTOTAL 'Extended price grand-total:' POSITION 5 

PURPOSE:

SET GRANDTOTAL allows the user to define description text to be displayed on the grand total line.

The POSITION nn qualifier allows users to position the grand total description text.

The NOTOTALS qualifier suppresses the printing of grand totals.

Example 6-27 Example of SET GRANDTOTAL Command


OPEN DETAIL 
SORT BY PRODNBR 
SORT BY LINEID 
INCLUDE INVNBR < 10330 
EXCLUDE INVNBR = 10320 
BREAK ON PRODNBR 
SET GRANDTOTAL 'Extended price grand-total:' POSITION 2 
PRINT PRODNBR GROUP 1 
PRINT LINEID 
PRINT QTY 
PRINT PRICE 
PRINT EXTPRICE WITH TOTALS 
GO 

Example 6-28 Example of SET GRANDTOTAL Command - Output


22-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 
      10323-004      1   1,495.00   1,495.00 
                                  ========== 
                                    4,485.00 
 
22600 10314-002      1     325.00     325.00 
      10323-005      1     325.00     325.00 
      10327-002      1     325.00     325.00 
      10328-002      1     325.00     325.00 
      10328-003      4     325.00   1,300.00 
      10329-003      2     325.00     650.00 
                                  ========== 
                                    3,250.00 
                        . 
                        . 
                        . 
 
33180 10304-001      1   2,095.00   2,095.00 
      10308-002      1   2,095.00   2,095.00 
      10315-001      2   2,095.00   4,190.00 
                                  ========== 
                                    8,380.00 
                                  ========== 
 Extended price grand-total:      135,900.00 

6.25.5 SET INPUT MESSAGE

FORMAT:


        SET INPUT MESSAGE text_str 

EXAMPLE:


        SET INPUT MESSAGE Enter the date in MMDDYYYY format. 

PURPOSE:

The SET INPUT MESSAGE command sets up a message to be used for the next input command entered into GQL. This message will be displayed by the report program generated by GQL. This message will be reset after the next input command.

6.25.6 SET INPUT ROUTINE

FORMAT:


        SET INPUT ROUTINE routine_name 

EXAMPLE:


        SET INPUT ROUTINE check_account 

PURPOSE:

The SET INPUT ROUTINE command allows the developer of a GQL procedure to specify that a user-written validation routine should be executed after the user responds to an input command.

The routine can perform sophisticated validations of the data that has been input.

The routine name specified in the SET INPUT ROUTINE command will be executed by the next input command entered.

The value that the user entered is contained in the variable U_REPLY$. The specified routine is called prior to loading the user's response into the target variable.

Upon completion of the routine, _ERROR is checked. If an error has been detected (_ERROR is TRUE), the input will be repeated. _ERROR can be set by either issuing a MESSAGE ERROR command or by SET ERROR ON.

If the variable U_REPLY$ is altered by the routine, the changed value will be stored into the target variable of the input command.

In the above example, the routine CHECK_ACCOUNT will be executed after the user inputs a value.

You can include user-written routines into your GQL report using the %INCLUDE command. Please refer to %INCLUDE for further information.

6.25.7 SET INTOUCH [ON | OFF]

FORMAT:


        SET INTOUCH ON | OFF 

EXAMPLE:


        SET INTOUCH ON 
 
        SET INTOUCH OFF 

PURPOSE:

Allows INTOUCH-like statements to be expressed in LET and PRINT commands. Words that GQL does not recognize as structure names, field names or keywords are used "as is" without generating error messages.

Note

This command should be used with caution.

6.25.8 SET LOOKUPERR

FORMAT:


        SET LOOKUPERR character 

PURPOSE:

When a file lookup is established with the RELATE command, there can be cases where the lookup is unsuccessful. In that case, a series of periods ('.') is used to fill the field to show that no matching record was found. You can use a different character with the SET LOOKUPERR option.

Examples:


        SET LOOKUPERR "_"                 <-- uses an underline 
 
        SET LOOKUPERR " "                 <-- leaves the column blank 

6.25.9 SET MENU [ON | OFF]

FORMAT:


        SET MENU ON | OFF 

EXAMPLE:


        SET MENU ON 
 
        SET MENU OFF 

PURPOSE:

The SET MENU command sets the GQL menu interface ON or OFF. GQL can be run with either a menu interface or a command line interface. The default setting is determined by translating the logical "GUIDE_MENU_INTERFACE".

During execution of GQL, the user can change interfaces by using the SET MENU command. The menu interface can either be ON or OFF.

Note

The [PF4] key can be used at anytime to ENTER or EXIT the GQL menu interface.

6.25.10 SET OUTPUT

FORMAT:


        SET OUTPUT filename 

EXAMPLE:


        MAKE an EXPORT file 
        SET OUTPUT oct_sales 

PURPOSE:

If you are making any kind of EXPORT file, you must use the SET OUTPUT command to specify the output file's name. The MAKE command is used to create export files.

SET OUTPUT can also be used to override the default report name.

6.25.11 SET PROCEED

FORMAT:


        SET PROCEED [TRUE | FALSE] 

EXAMPLE:


        SET PROCEED TRUE 
 
        SET PROCEED FALSE 

PURPOSE:

Determines whether or not a GQL program with input commands will prompt the user with the "Proceed (Y/N)?" question.

If you want the report program to "ask proceed" after all other inputs are asked, then SET PROCEED TRUE. This is the default state for GQL.

If SET PROCEED FALSE is entered, GQL will produce the report after the last input has been processed.

6.25.12 SET PROMPT

FORMAT:


        SET PROMPT 'prompt_text' 

EXAMPLE:


        SET PROMPT 'Command' 

PURPOSE:

Use the SET PROMPT command to change the "Guide>" prompt to whatever you want to use.

6.25.13 SET REPROMPT

FORMAT:


        SET REPROMPT [TRUE | FALSE] 

EXAMPLE:


        SET REPROMPT TRUE 
 
        SET REPROMPT FALSE 

PURPOSE:

Determines whether GQL will reprompt the input commands or return to the Guide prompt upon completion of a report.

Entering SET REPROMPT TRUE causes the report program to reprompt the user for all inputs upon completion of the report. This reprompting will continue until the user responds to a question with "EXIT". This is the default state for GQL.

Entering SET REPROMPT FALSE causes GQL to return to its command mode after the user has finished displaying the report.

6.25.14 SET SCREEN

FORMAT:


        SET SCREEN [80 | 132 | NARROW | WIDE] 

EXAMPLE:


       SET SCREEN 132 

PURPOSE:

The SET SCREEN command changes the number of columns displayed to either 80 (narrow) or 132 (wide).

6.25.15 SET SPACING

FORMAT:


        SET SPACING [SINGLE | DOUBLE | TRIPLE | nn] 


Previous Next Contents Index