Coding a SET Command

How to:

The following guidelines apply to SET command syntax:

For the specific syntax of a parameter with its valid values, see SET Parameter Syntax.


Top of page

x
Syntax: How to Set Parameters
SET parameter = option[, parameter = option,...]

where:

parameter

Is the setting you wish to change.

option

Is a valid value for the parameter.



Example: Setting a Single Parameter

In the following example, the PAGE-NUM parameter suppresses default page numbering.

SET PAGE-NUM = OFF
TABLE FILE EMPLOYEE
PRINT LAST_NAME FIRST_NAME
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF,$
END

The output is:

LAST_NAME 
FIRST_NAME
STEVENS
SMITH
JONES
SMITH
BANNING
IRVING
ROMANS
MCCOY
BLACKWOOD
MCKNIGHT
GREENSPAN
CROSS
ALFRED
MARY
DIANE
RICHARD
JOHN
JOAN
ANTHONY
JOHN
ROSEMARIE
ROGER
MARY
BARBARA

Note: In this example, the output was formatted to eliminate grids. For information on formatting your output, see the Creating Reports With WebFOCUS Language manual.



Example: Setting Multiple Parameters

The following example sets two parameters in one command in a stored procedure. The first parameter, NODATA, changes the default character for missing data from a period to the word NONE. The second parameter, PAGE-NUM, suppresses default page numbering.

SET NODATA = NONE, PAGE-NUM = OFF
TABLE FILE EMPLOYEE
PRINT CURR_SAL BY EMP_ID
ACROSS DEPARTMENT
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF,$
END

In the output, NONE appears when there is no salary information for a specific employee because that employee does not work in the department that is referenced. There is no page number at the top of the output.

The output is:

                      DEPARTMENT  EMP_ID          MIS              PRODUCTION071382660             NONE       $11,000.00
112847612       $13,200.00             NONE
117593129       $18,480.00             NONE
119265415             NONE        $9,500.00
119329144             NONE       $29,700.00
123764317             NONE       $26,862.00
126724188             NONE       $21,120.00
219984371       $18,480.00             NONE
326179357       $21,780.00             NONE
451123478             NONE       $16,100.00
543729165        $9,000.00             NONE
818692173       $27,062.00             NONE

Note: In this example, the output was formatted to eliminate grids. For information on formatting your output, see the Creating Reports With WebFOCUS Language manual.


Top of page

x
Syntax: How to Set Parameters in a Report Request
ON TABLE SET parametervalue [AND parametervalue ...]

where:

parameter

Is the setting you wish to change.

value

Is a valid value for the parameter.



Example: Setting Parameters in a Report Request

In the following example, the command ON TABLE SET changes the default character for missing data from a period to the word NONE and suppresses default page numbering.

TABLE FILE EMPLOYEE
PRINT CURR_SAL BY EMP_ID
ACROSS DEPARTMENT
ON TABLE SET NODATA NONE AND PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF,$
END

In the output, NONE appears when there is no salary information for a specific employee. There is no page number at the top of the output.

The output is:

                      DEPARTMENT  EMP_ID          MIS              PRODUCTION071382660             NONE       $11,000.00
112847612       $13,200.00             NONE
117593129       $18,480.00             NONE
119265415             NONE        $9,500.00
119329144             NONE       $29,700.00
123764317             NONE       $26,862.00
126724188             NONE       $21,120.00
219984371       $18,480.00             NONE
326179357       $21,780.00             NONE
451123478             NONE       $16,100.00
543729165        $9,000.00             NONE
818692173       $27,062.00             NONE

Note: In this example, the output was formatted to eliminate grids. For information on formatting your output, see the Creating Reports With WebFOCUS Language manual.


Top of page

x
Syntax: How to Set Parameters in a Graph Request
ON GRAPH SET parametervalue [AND parametervalue ...]

where:

parameter

Is the setting you wish to change.

value

Is a valid value for the parameter.



Example: Setting Parameters in a Graph Request

In the following example, the command ON GRAPH SET changes the default setting for the 3D parameter to OFF.

GRAPH FILE GGORDER
SUM QUANTITY
ACROSS PRODUCT_DESC
ON GRAPH SET 3D OFF
END

The output is:

Parameter graph


WebFOCUS