Skip Headers

Oracle9i OLAP Developer's Guide to the OLAP DML
Release 2 (9.2)

Part Number A95298-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

Developing Programs, 2 of 12


Introduction to OLAP DML Programs

An OLAP DML program is written in the OLAP DML. It acts on data in the analytic workspace and helps you accomplish some workspace management or analysis task. You can write OLAP DML programs to perform tasks that you must do repeatedly in the analytic workspace, or you can write them as part of an application that you are developing.

There are two main types of OLAP DML programs: programs that do not return values, and programs that return values. A program that returns a value is called a user-defined function.

You can use an OLAP DML program that does not return a value as a standalone program or as the main program or subprogram of a multiprogram application. These programs behave like OLAP DML commands.

You can use a user-defined function in commands and expressions in the same way that you use built-in OLAP DML functions.

In contrast to the form of a program, the content is related to the job it was created to do, and it is the individual lines of a program that provide its content. Program lines that accomplish specific purposes are discussed in other chapters in this guide.

Executing Programs

You can invoke a program that does not return a value by using the CALL command. You enclose arguments in parentheses, and they are passed by value.

For example, suppose you create a simple program named addit to add two integers. You can use the CALL command in the main program of your application to invoke the program.

CALL addit (3, 4)

The syntax for using the CALL command to invoke a program is shown below.

CALL program-name [(arg1 [arg2 ...])]

The program-name argument is the name of the program to be called.

The arg1... arguments are optional and specify any arguments that are expected by the called program. Specify the arguments so that they match the order in which they are defined in the program.

Executing User-Defined Functions

A user-defined function is a program that returns a value. You invoke user-defined functions in the same way as you use built-in functions. You merely use the program's name in an expression and enclose the program's arguments, if any, in parentheses.

For example:


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 2001, 2002 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