Oracle9i OLAP Services Developer's Guide to the OLAP DML
Release 1 (9.0.1)

Part Number A86720-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Designing Programs, 4 of 13


Defining and Editing Programs

Defining a program

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.

Editing programs

OLAP DML programs can be editing using a program editor or using commands in the OLAP DML.

Using an editor

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.

Procedure: Using OLAP Worksheet to edit a program

If you want to edit the program using OLAP Worksheet, then follow the procedure outlined below.

  1. Start OLAP Worksheet.

  2. Connect to an analytic workspace.

    Refer to the OLAP Worksheet Help system for details.

  3. If necessary, define the program.

    For example, to define a program named SALESREP, enter the following command in the Command Input window in OLAP Worksheet.

    define salesrep program
    
  4. To use the Edit Window in OLAP Worksheet, enter the EDIT command and the program name in the Command Input window.

    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.

    • Enter one line of code at a time in the Command Input window. For example, enter PROGRAM, enter each line of code, and then enter END to stop adding contents to the program. (Default mode)

    • Choose Preferences from the Options menu in OLAP Worksheet. In the Preferences dialog box, deselect Execute on Enter. You can now enter the entire contents of the program in the Command Input window. To save the program contents, choose the play button or Ctrl-Enter on the keyboard.

Using OLAP DML commands

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.

Formatting guidelines for editing programs

Use the following formatting guidelines as you add lines to your program:

Example: Defining and add contents to a simple program

The following program named HELLO produces the phrase "Hello World."

DEFINE HELLO PROGRAM
PROGRAM
show 'Hello World'
END

Related information

For more information, see the following table.

IF you want documentation about . . .  THEN see . . . 

escape sequences, 

"Text data types" 

individual OLAP DML commands, 

the topic for the command in OLAP DML Reference 


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback