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 
 
MIS
PRODUCTION
 
EMP_ID
 
----------------------------------------
 
071382660
112847612
117593129
119265415
119329144
123764317
126724188
219984371
326179357
451123478
543729165
818692173
NONE
$13,200.00
$18,480.00
NONE
NONE
NONE
NONE
$18,480.00
$21,780.00
NONE
$9,000.00
$27,062.00
$11,000.00
NONE
NONE
$9,500.00
$29,700.00
$26,862.00
$21,120.00
NONE
NONE
$16,100.00
NONE
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.



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
PRODUCTION
 
071382660
112847612
117593129
119265415
119329144
123764317
126724188
219984371
326179357
451123478
543729165
818692173
NONE
$13,200.00
$18,480.00
NONE
NONE
NONE
NONE
$18,480.00
$21,780.00
NONE
$9,000.00
$27,062.00
$11,000.00
NONE
NONE
$9,500.00
$29,700.00
$26,862.00
$21,120.00
NONE
NONE
$16,100.00
NONE
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.



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