Oracle9i OLAP Services Developer's Guide to the OLAP DML Release 1 (9.0.1) Part Number A86720-01 |
|
Designing Programs, 4 of 13
A program, like a dimension or a variable, is an OLAP DML object. You can define it using the DEFINE command. The following example defines a program named HELLO using the DEFINE command.
define hello program
Once you have defined a program object, you need to add command lines to it using an editor.
OLAP DML programs can be editing using a program editor or using commands in the OLAP DML.
OLAP Worksheet provides an editor that you can use to edit programs and formulas. To access the program editor from within OLAP Worksheet, type the EDIT command followed by the program name.
To save the program, choose Save from the File menu in OLAP Worksheet.
If you want to edit the program using OLAP Worksheet, then follow the procedure outlined below.
Refer to the OLAP Worksheet Help system for details.
For example, to define a program named SALESREP, enter the following command in the Command Input window in OLAP Worksheet.
define salesrep program
For example, to edit the SALESREP program, enter the following command.
edit salesrep
If you do not want to use the Edit Window, you can enter the program contents in the Command Input window. You can use one of the following modes.
The OLAP DML allows you to edit the contents of a program from the OLAP Worksheet command line or using an OLAP DML program. You may edit the contents of a program immediately after it has been defined, or immediately after using the CONSIDER command.
Use the following formatting guidelines as you add lines to your program:
-
) at the end of the line to be broken. The hyphen is called a continuation character.
Note: You cannot use a continuation character in the middle of a text literal.
;
).
'
). To include a single quotation mark within literal text, precede it with a backslash (\
).
"
). You can place a comment, preceded by double quotation marks, either at the beginning of a line or at the end of a line, after some commands.
The following program named HELLO produces the phrase "Hello World."
DEFINE HELLO PROGRAM PROGRAM show 'Hello World' END
For more information, see the following table.
IF you want documentation about . . . | THEN see . . . |
---|---|
escape sequences, |
|
individual OLAP DML commands, |
the topic for the command in OLAP DML Reference |
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|