You are on page 1of 10

New Features in Oracle Forms 6i

Author:
Sai Babu Bastati

Wipro Technologies
April 2003

TABLE OF CONTENTS
PURPOSE OF THE DOCUMENT...............................................................................................3
DOCUMENT USAGE....................................................................................................................3
NEW FEATURES...........................................................................................................................3
ARRAY DML PROCESSING.......................................................................................................3
HOW TO USE ARRAY DML PROCESSING.......................................................................................3
CALCULATION FIELDS.............................................................................................................4
FORMULA FIELD..............................................................................................................................4
SUMMARY FIELD.............................................................................................................................4
SMART TOOLBARS AND MENUS............................................................................................5
PROGRAM UNIT DEBUGGING.................................................................................................5
SPECIFICATION.................................................................................................................................5
REFERENCES....................................................................................................................................5
REFERENCED BY.............................................................................................................................6
READING AND WRITING TEXT FILES...................................................................................6
TEXT_IO........................................................................................................................................6
FORMS RUNTIME DIAGNOSTICS...........................................................................................6
PL/SQL EDITOR ENHANCEMENTS.........................................................................................7
FORMS PL/SQL SYNTAX PALETTE.........................................................................................7
LOV WIZARD................................................................................................................................8
PL/SQL 8 AND OBJECT SUPPORT..........................................................................................10

New Features in Oracle Forms 6i

Purpose of the document


This document cover the changes made in forms 6i with the prior versions.

Document Usage
This document will be useful for developers who are working on multiple versions. This
document will give the list of new futures incorporated in forms6i which are useful to
create applications with high runtime performance.

New Features
The New futures in forms 6i are.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.

Array DML Processing


Calculation Fields
Smart Toolbars and Menus
Program Unit Debugging
Reading and Writing Text Files
Forms Runtime Diagnostics
PL/SQL Editor Enhancements
Forms PL/SQL Syntax Palette
LOV Wizard
PL/SQL8 and Object Support

Array DML Processing


Array processing alters the way records are processed by Forms. As default, records are
processed one at a time. Using Array DML allows you process groups of records at a
time, which reduces network traffic therefore improving application performance. The only
tradeoff is that the client workstation would require additional memory to track the records
and their associated transactions. The rule of thumb is to set DML Array Size to the
number of records a user modifies in one transaction.
Prior to version 6i forms dont have any property to set the number of records to be
fetched from the database. This causes the network traffic which affects the application
performance.

How to Use Array DML Processing


1. Enable the Array Processing option in Runtime preferences (Default)

Wipro Technologies

Confidential

Page 3 of 10

New Features in Oracle Forms 6i

2. Set the DML Array Size block property to the number of records to be included in the
array.

Calculation Fields

Calculation items are items to which you assign values based on calculations. Any item
that can store a value may be used as a calculation item. Since calculation fields are
read-only, you should use Display Items.
There are two types of calculation items: formula and summary.

Formula Field
The formula calculation field can be used for a horizontal calculation utilizing global
variables, parameters, and items within a form.

Summary Field
The summary calculation field can be used for a vertical calculation utilizing a single item
from all of the rows in the block. Standard built-in functions are utilized. They include
AVG, COUNT, MAX, MIN, STDDEV, SUM, and VARIANCE.

Wipro Technologies

Confidential

Page 4 of 10

New Features in Oracle Forms 6i

Smart Toolbars and Menus


In version 5.0 and later of Oracle Forms, menu modules have the capability of
incorporating smart toolbars. Instead of having to create a toolbar with a block, canvas,
and items, we now have the ability to have menu options also display in the a toolbar
linked to the menu. And since menus are separate modules, associated with a form
Module, a change to the menu module can be seen throughout the application, without
having to recompile all of the forms modules.
Menus and Toolbars can be tied together by setting the Visible in Horizontal Menu
Toolbar property to YES. For every menu item that has the aforementioned property set
to YES, will appear in the toolbar. The same code will be executed if the user chooses the
menu option or the toolbar button. Also, a menu option can be marked as not visible
through the menu, but visible on the toolbar, allowing developers to have toolbars that
have different options than the menu itself.
In addition, the SET_MENU_ITEM_PROPERTY built-in function also changes the
property of the toolbar item corresponding to the menu item.

Program Unit Debugging


How many times have you needed to determine what form triggers call a particular
program unit or what form items does the program unit reference? Oracle Forms has a
little know feature that will help answer those questions. Under each program unit within
your form, you will find three nodes. They include specification, references, and
referenced by. In order to ensure that the information contained in these nodes is correct,
you should perform a Compile All. Once this is complete, you can then begin the
investigation of the values contained in the nodes.

Specification
This node shows the procedure specifications. If the program unit has parameters, the
parameters are displayed along with their respective data types.

References
This node shows all of the objects the program unit references. Objects that are displayed
include other procedures and block items.

Wipro Technologies

Confidential

Page 5 of 10

New Features in Oracle Forms 6i

Referenced By
This node shows which procedure or program unit calls this program unit. This
information is helpful in determining program logic.

Reading and Writing Text Files


Many applications need to read the ability to read and write text files. These files may
include and initialization files (.ini) or an error log. Both can be accomplished with the
TEXT_IO package.

TEXT_IO
This package includes many procedures and functions associated with the reading and
writing of text files. This package is very similar to the server-side UTL_FILE package.
Example
Below is an example of a procedure that reads the contents of one file and writes it out to
another. One important thing to know is that the no_data_found exception is raised when
an attempt to read past the end of file. When this occurs, it is a common practice to close
the files being processed.
PROCEDURE Read_Write_File IS
ifile TEXT_IO.FILE_TYPE;
ofile TEXT_IO.FILE_TYPE;
inline VARCHAR2(100);
BEGIN
ifile := TEXT_IO.FOPEN(tscin.txt, r);
ofile := TEXT_IO.FOPEN(tscout.txt, w);
LOOP
TEXT_IO.GET_LINE (ifile,inline);
TEXT_IO.PUT_LINE (ofile,inline);
TEXT_IO.NEW_LINE (ofile, 2);
END LOOP;
EXCEPTION
WHEN no_data_found THEN
TEXT_IO.FCLOSE (ifile);
TEXT_IO.FCLOSE (ofile);
MESSAGE(Contents written and files closed);
END;

Forms Runtime Diagnostics


Often as a Oracle Forms developer, the available debugging techniques become
cumbersome. Placing message or alerts into trigger logic, etc. In version 6.0, Oracle has
provided the Forms Runtime Diagnostics (FRD), which allows events to be logged into a
file during a Forms Runtime session. Information, such as triggers firing, messages,
exceptions, and user events are written to a file.
In order to use the FDR, the runtime session must be called with the record=collect
parameter. This will write to a file in the current working directory, with a name beginning

Wipro Technologies

Confidential

Page 6 of 10

New Features in Oracle Forms 6i

with collect. In addition, one may also specify the name of the file by implementing the log
parameter and providing a file name.
Example
ifrun60.EXE module=test_frd userid=scott/tiger record=collect log=test_frd.log

PL/SQL Editor Enhancements


The PL/SQL Editor has gone through little change until version 6.0 of Oracle Forms. From
a first glance, there seems to be no difference, until one begins typing. Now, they have
incorporated color-coding of Oracle reserved words and PL/SQL constructs indentation
and alignment. This is a great new feature that nearly forces good code formatting.

In addition, the related Find and Replace functionality has been vastly improved,
incorporating expression-based searching across all of your client-side program units.

Forms PL/SQL Syntax Palette


With version 6.0 of Oracle Forms, they have incorporated a Syntax Palette, similar to
those in other application development tools. The Syntax Palette allows developers to
quickly insert either a version of the PL/SQL block structure or the correct syntax for an
Oracle Forms built-in. This is another feature that will assist both new and experienced
Forms developers in constructing syntactically correct PL/SQL code.

Wipro Technologies

Confidential

Page 7 of 10

New Features in Oracle Forms 6i

LOV Wizard
Another new feature of version 6.0 is the incorporation of a List of Values (LOV) wizard.
The wizard takes one through some quick and easy steps for creating an LOV. Many of
the properties that were commonly modified on the LOV and accompanying record group
can be specified through the wizard.
Here, the wizard begins as one chooses to create a new LOV.

One of the first steps is to enter the associated query statement. Here, one can type in a
statement, or go to the query builder for some help.

Wipro Technologies

Confidential

Page 8 of 10

New Features in Oracle Forms 6i

After entering a query and choosing the columns for the LOV, one can choose to modify
the column headings, specify and return items and choose to automatically size columns.

Finally, there are a few more steps, which allow for many of the properties to be set. This
includes the ability for one to specify the LOV title, size, and position. Also, includes the
ability for one to specify the number of rows to query at one time, whether or not to
refresh the record group on every reference, and whether or not to provide an initial filter
for the LOV to the users.

Wipro Technologies

Confidential

Page 9 of 10

New Features in Oracle Forms 6i

PL/SQL 8 and Object Support


In every previous release of Oracle Forms up to version 6.0, the version of PL/SQL was
always lagging behind. PL/SQL8 is now incorporated in this latest release, finally bringing
it up to speed. This will allow for the newest features of PL/SQL8 to be implemented
within your Oracle Forms applications.
And since Forms 6.0 is to provide nearly all of the functionality necessary for building an
application against an Oracle8 database, object support has been included. For example,
the block wizard now supports nested tables.

Wipro Technologies

Confidential

Page 10 of 10

You might also like