Вы находитесь на странице: 1из 31

CHAPTER - 5

WORKING WITH SQL*MENU

STRUCTURE

5.1 INTRODUCTION.

5.2 VARIOUS MENU STYLES AVAILABLE.

5.3 USING PULL-DOWN AND BAR MENUS.

5.4 AUTHORIZATION TO USE SQL-MENU.

5.5 CREATING AN ORACLE MENU.

5.6 GRANTING ROLE ACCESS.

5.7 SUBSTITUTION PARAMETERS.

5.7.1 Defining A Substitution Parameter.

5.7.2 Using Substitution Parameters.

5.7.3 Standard Substitution Parameters.

5.7.4 Associating A Substitution Parameter With A Menu Item.

5.7.5 Associating A Substitution Parameter with a Menu.

5.8 SAVING AN APPLICATION.

5.9 GENERATING AN APPLICATION.

5.10 EXECUTING AN APPLICATION.

5.11 EXAMPLE.

5.12 EXERCISES.

5.13 ANSWERS.
5.1 INTRODUCTION

A menu is a list of choices, or menu items, that operators can select at a time to specify
their next action. Menu items can call other menus, execute commands or run programs.

A menu application is a set of interconnected menus from where operators can carry out
their data processing needs.

A menu tree has a root menu, or main menu, connected to other menus called submenus.
A submenu is a menu that is called by an item in another menu, which is the parent menu. Any
submenu can also be a parent menu if its items call other submenus.

5.2 VARIOUS MENU STYLES AVAILABLE

There are basically three types of display styles available in SQL*MENU. They are as
follows:-

• Pull-down menu : is the Oracle default standard style menu.


• Bar menu : displays the submenus in the menubar, overwriting the previous menubar.
• Full-screen menu : displays menu items in a vertical number list, with the identifying
text that would appear as hint.

5.3 USING PULL-DOWN AND BAR MENUS

The primary difference between the pull-down menu style and the bar menu style is the
representation of submenus. An application running in the bar style will display all submenus in
a horizontal menubar at the top of the screen while an application running in the pull-down style
keeps the main menu on display in the menubar and displays the submenus below their
corresponding items in the main menu.

Menu items are identified by their short-cut names, which can be single words or
multiple words. Item names in the menubar are separated by two spaces, and item names in pull-
down submenus are displayed as a vertical list.
If all the items cannot be displayed at one time on the screen, you can scroll to display
them. Items that are not available either do not appear in the menu or appear in a lighter shade
than those available. The cursor cannot move to an unavailable item.

In both the pull-down and bar styles, the message line displays a hint for the current
(highlighted) item.

5.4 AUTHORIZATION TO USE SQL*MENU

To use SQL*MENU, proper authorization has to be given to the users, which is achieved
via the following options :

System username and password :


If a multi-user system is being used, provide a valid username and password in order to
be recognized as a legitimate user.

Oracle username and password :


Even if a multi-user system is not being used, an Oracle username and password must be
provided.

SQL*MENU (Run Menu) enrollment :


To run menu applications, an Oracle username must be enrolled in SQL*MENU with
operator privileges. A role with access privileges must also be assigned to run the SQL*MENU
applications.

SQL *MENU (Design) enrollment :


To design menus, an Oracle username must be enrolled in SQL*MENU with design
privileges. A role that has access to an application must also be assigned to run the menu
application.
5.5 CREATING AN ORACLE MENU

At the Unix $ prompt, key in : sqlmenu50-c vt100 : vt100

NOTE : This assumes your terminal type is vt100.


(Ask the System Administrator for information about your terminal type)

Next enter the username and password.

NOTE : Each time an attempt is made to use any Oracle tool, the Oracle DBA will demand
a login and password.

Once you have been accepted as a legitimate user, the SQL*MENU main menu will
appear (screen 5.1). This will allow you to access the various tools for creating an Oracle menu.

Action Menu Procedure Help Options


SQL*MENU

App : Mnu : <Rep>

Screen 5.1 : SQL*MENU opening screen.

In screen 5.1, the opening screen, the cursor is on the menu option Action.

Before going onto create a menu, various options can be set via the Option selection
i.e. screen 5.2.
Action Menu Procedure Help Options
Option Selection

SQL*MENU (Design) Options

[ ] Use Forms as Default


[ ] Show List of Values
[ ] Generate before Executing Menu
[ ] Suppress Hints
[ ] Disable PL/SQL Compilation
[ ] Auto Restrict List of Values
[ ] Show Detailed Working Messages

( * ) Pull-down Menu Style


( ) Bar Menu Style
( ) Full-screen Menu Style

Should forms be used as default presentation rather than


spread tables?
App : Mnu : <Rep>

Screen 5.2 : Option Selection Screen.

The options with the square brackets are called checkboxes where on selection an ‘X’ is
placed within it. The options with the normal brackets are called radiobuttons where on selection
a black dot is placed within it, as displayed in diagram 5.2. For each checkbox or radiobutton,
press the select key sequence to change the setting as needed.

Following is an explanation of the various options in the Option Selection screen:

• Use Form as Default Selects forms, rather than spread tables, as default display
style in the design interface.
• Show List of Values automatically displays a list of values whenever one is
available in the current context of the design interface.
• Generate before automatically generates a new library file for a
Executing Menu menu application before executing the application.

• Suppress Hints conceals the hint messages that normally appear in the
message line. This does not suppress error messages
option.
• Disable PL/SQL turns off the automatic compilation of PL/SQL procedures
Compilation the design interface.
• Auto Restrict List automatically restricts a list of values to values that match a
Of Values search pattern based on the value in the corresponding field.
• Show Detailed displays detailed messages, instead of ‘working…’ messages,
Working Messages when SQL*MENU is processing command in the design
interface.

The last three options are a set of radio buttons that select the default Menu Display Style
used when running applications from the design interface.

On selecting Action, from the dropdown menu that appears, select New (screen 5.3).
A dialog box appears via which the menu application name can be passed.

Action Menu Procedure Help Options


SQL*MENU

New
Open
-------------
Copy
Rename
Delete
Admin
Print doc
------------
Generate
Execute
------------
Unload
Save
Quit

Create a new menu application…


App: Mnu: <Rep>
Screen 5.3: The many choices in the Action option.
Enter the name of the menu to be created (screen 5.4), and press the accept key sequence.
Once this is done, you are returned to the opening screen (screen 8.1), where you
are now ready to create a menu application.

Action Menu Procedure Help Options


SQL*MENU

New Menu Application

Name : PAY

Enter name of the new menu application.


App : Mnu : <List><Rep>

Screen 5.4 : Creating a new menu application.

Move to the Menu option and from the dropdown menu that appears (screen 5.5),
select Application.

Action Menu Procedure Help Options


SQL*MENU

Application
Menu
Item
Parameter

Enter application level information.


App : Mnu : <Rep>

Screen 5.5 : The various choices in the Menu option.

An Application Definition window appears (screen 5.6), which displays general


information about the application. These default values can be changed by keying in the
required information on the respective field and then press the accept key sequence for
these changes to take effect.
Action Menu Procedure Help Options
Application Definition

Short Name : PAY


File Name : PAY
Creation Date : 02-MAY-94
Creator : Scott
Version Number : 1
Last Release Date :
Directory :
Identification : PAY

File name used during library generation.


App : PAY Mnu : <Rep>

Screen 5.6 : The Application Definition Screen.

On selecting the Menu option from the dropdown menu displayed in screen 5.5, a Menu
Definition window appears, i.e. screen 5.7.
To handle one field at a time, press the change display key sequence. Screen 5.8 appears.

NOTE : To create another menu for the current application, press the insert record key
sequence to create a blank record.

Action Menu Procedure Help Options


Menu Definition

Menu Bottom
Name Title Subtitle Title

>
Enter the name of the menu.
App : PAY Mnu : <Rep>

Screen 5.7 : The Menu Definition screen.


Action Menu Procedure Help Options
Menu Definition

Menu Name : Pay


Title : Payroll System
Subtitle : M/s Spectrum Group
Bottom Title : Pay System for the year 1994

Purpose
This is a Payroll System for M/s Spectrum Group of
Companies. This is a sample menu system being
designed by Silicon Chip Technologies. It calls
various submenus : Masters, Transaction, Reports,
Help and Exit

Enter the name of the menu.


App : PAY Mnu : <Rep>

Screen 5.8 : The Menu Definition screen.

Following is an explanation of the various options in the Menu Definition screen :


• Menu Name Enter a name of upto 30 characters for the menu. The menu name
appears in the status line and identifies the menu for navigation.
the menu name is mandatory.
• Title Enter a title of upto 40 characters. The title appears in the full
Screen display in the menubar. The title is mandatory.
• Subtitle Enter a subtitle of upto 40 characters. The subtitle is mandatory.
• Bottom Title Optionally enter a bottom title of upto 72 characters. This text
appears above the message line and status line.
• Purpose Describe the purpose of the menu and add design comments.

Press the accept key sequence to accept the changes made.


On selecting the Item option from the dropdown menu displayed in screen 5.5, an Item
Definition window appears, i.e. screen 5.9.
Action Menu Procedure Help Options
Item Definition

Item Command Grant Item Short Displ


Number Type Role Text Item Name No Pr

>

Enter the item number for this item.


App : PAY Mnu : PAY <Rep>

Screen 5.9 : The item Definition Screen.

To handle one field at a time, press the change display key sequence,
Screen 5.10 appears.
Note : The status line always shows the current menu.

Action Menu Procedure Help Options


Item Definition

Item : 1 Command Type : 1 (Grant Role Access)

Item Text:
Masters Menu
Short Item Name : MASTERS [ X ] Display without Privilege

-------------------------Command Line--------------------------------------
MASTERS

-------------------------------Help Text--------------------------------------

Enter the item number for this item.


App : PAY Mnu : PAY <Rep>

Screen 5.10 : The Item Definition screen.


Following is an explanation of the various options in the Item Definition screen :

• Item Enter an item number to specify the display order within the menu.
The default value is one greater than the previous item number.
• Command Type Enter a number for the type of command statement in the command
line.
1. Invoke a submenu.
2. Execute an operating system command.
3. Execute an operating system command then pause for
operator response.
4. Invoke SQL*FORMS (Run Form).
5. Invoke SQL*PLUS.
6. Execute an SQL*MENU macro command.
7. Execute a PL/SQL command.
• Grant Role Access Select this button to display the Item Role window then enter the
names of existing roles that need access to this menu item.
• Item Text Enter a description of upto 70 characters. This text appears in the
message line for the pull-down and bar style displays, or next to the
item number in the full-screen display.
• Short Item Name Enter a descriptive name of upto 15 characters. This name appears
as
the menu item in pull-down and bar style display.
• Display without Select this checkbox to display the item to users who do not have
Privilege access to use it. (Inaccessible items appear with no highlighting). The
default value is off (not displaying items to unauthorized users).
• Command line Enter a menu, macro or command statement that matches the
specified
command type.
• Help Text Enter the help text for this menu item. This help text appears if the
operator presses the help key sequence when the cursor is no this
item.

5.6 GRANTING ROLE ACCESS

Action Menu Procedure Help Options


Item Definition

Item : 1 Command Type : 2 (Grant Role Access)

Item Text : Item


Masters Menu Role
Short item Name : without privilege

MASTERS

Enter roles with access to this item.


App : PAY Mnu : PAY <Rep>
Screen 5.11 : The Item Role screen.

Screen 5.11 shows the Item Role window that appears when you select Grant Role Access
from the Item Definition window. To give a role access to the current menu item, enter the Role
Name in this window. To get a listing of all the group names that have access press the list key
sequence. On pressing the list key sequence, screen 5.12 appears.

Action Menu Procedure Help Options


Item Definition

Item : 1 Command Type : 2 Group Name


Find:
Item Text : Item
Masters Menu Role SCOTT
Short item Name : SYSTEM

--------------------------
MASTERS

--------------------------
Enter roles with access to this item.
App : PAY Mnu : PAY <Rep>

Screen : 5.12 : Screen showing list of item roles available.


NOTE : 1. Press the insert record key sequence to add a blank record for a new role name, or
press the delete record key sequence to revoke the current role’s access to the item.
2. If you do not explicitly assign any roles to a menu item, all roles that have access to
the application have access to the item.

After having defined all the items that you need for that item, press the accept key
sequence to commit the changes done. You will be returned back to the opening screen i.e.
screen 5.1.

5.7 SUBSTITUTION PARAMETERS

5.7.1 Defining a Substitution Parameter

A Substitution parameter is a variable that can be used to represent a value in the


command line of a menu item or in a PL/SQL procedure. SQL*MENU substitution parameters
have two character names preceded by an ampersand ( & ) or a colon ( : ) in PL/SQL.

5.7.2 Using Substitution Parameters

SQL*MENU lets you construct flexible, general-purpose menus through the use of
substitution parameters. For example, you can create a menu item that invokes SQL*FORMS,
using a substitution parameter that prompts for the name of the form to be executed.
You can associate substitution with any menu in an application, making a menu
parameter. When an operator selects that menu in the full-screen display style, the Enter
Parameter Values dialog box prompts the operator to enter the exact value.

NOTE: Menu parameters are only useful for full-screen menus.

You can also associate a substitution parameter with a menu item, making an item
parameter. When an operator selects that item, the Enter Parameter Values dialog box prompts
for the exact value.

The Parameter Definition window or spread table can be used to create customized
substitution parameters for menu application. SQL*MENU also provides several substitution
parameters.

5.7.3 Standard Substitution Parameters

Five pre-defined substitution parameters, which are always known to SQL*MENU, are
&UN, &PW, &AD, &SO and &TT. They contain the following values:

• &UN the current username


• &PW the current password
• &AD the directory where the current application library file is stored
• &SO the current menu item (selected option)
• &TT the terminal type you used to log in to SQL*MENU

You can define your parameter for your current application via the Parameter option. On
selecting the Parameter option from the dropdown menu displayed in screen 5.5, a Parameter
Definition window appears, i.e. screen 5.13.
Action Menu Procedure Help Options
Parameter Definition

Select Fixed
Parameter Size Prompt Menus Echo Length Reqd

(*) [X] [ ] [ ]

Enter parameter text string (2 characters).


App : PAY Mnu : PAY <Rep>

Screen 5.13 : The Parameter Definition Screen.

Action Menu Procedure Help Options


Parameter Definition

Parameter : ps [ ] Echo
Size : 10 [ ] Fixed Length
Promps : Enter Password : [ ] Required
( Select Menus ) [ X ] Upper Case

Default :
Hint : Enter The Password to enter the PAY Application.

Enter the parameter text string (2 characters).


App : PAY Mnu : PAY <Rep>

Screen 5.14 : The Parameter Definition screen.

To handle one field at a time, press the change display key sequence. Screen 5.14
appears.

NOTE : Press the insert record key sequence to add a blank record for a new parameter name, or
press the delete recordkey sequence to revoke the current role’s access to the item.
Following is an explanation of the various options in the Parameter Definition screen :

• Parameter Enter a two character abbreviation for the substitution parameter.


• Size Specify the maximum number of characters the user can enter for the
value of the parameter.
• Prompt Enter text to prompt the user to give a value for the substitution
parameter.
• Select Menus Press the select key sequence to display the Menu Name window,
and enter the names of the menus to be associated with the
parameter in the full-screen display style.
• Echo Type X to display the substitution parameter as you type it in.

• Fixed Length Type X to indicate that the user must always fill the parameter by
entering the maximum number of characters allowed.
• Required Type X to specify that a value must always be supplied for the
parameter.
• Upper Case Type X to specify that the value entered for the substitution
parameter should be in uppercase.
• Default Specify the parameter’s default value.
• Hint Describe the type of parameter value that should be entered and list
some possible values.

5.7.4 Associating A Substitution Parameter With A Menu Item

To associate a substitution parameter with a menu item, use the parameter in that item’s
command line when you define the item in the Item Definition window. When the user selects a
menu item associated with a substitution parameter, the Enter Parameter Values dialog box
appears and prompts for the parameter value.
An ampersand (&) must precede the two-character parameter name in the command
string. However in PL/SQL blocks, a colon ( : ) precedes the parameter name instead of an
ampersand.

5.7.5 Associating a Substitution Parameter with a Menu

In the full-screen display style, a substitution parameter can be associated with an entire
menu. When the user navigates to that menu, the Enter Parameter Values dialog box appears,
prompting for the parameter value. The value entered is then available to all items in that menu.
From screen 5.14, Select Menus and the Menu Name window appears i.e. screen 5.15.

Action Menu Procedure Help Options


Parameter Definition

Menu Name
Parameter cho
Size : ixed Length
Prompt : equired
(Select Me pper Case

Default :
Hint : Enter

Enter the menu in which this parameter occurs.


App : PAY Mnu : PAY <Rep>

Screen 5.15 : The Menu Name window.

Enter the name of the menu you want to associate with the parameter. To use the
parameter with more than one menu, you must list the name of each menu to which it applies.

NOTE : 1. Press the insert record key sequence to add another menu with the current parameter,
or press the delete record key sequence to delete the menu from the Menu Name
window.
2. In pull-down and bar style menus, a menu parameter is treated as an item parameter
where the Enter Parameter Values dialog box appears when an operator selects an
item associated with that parameter.

5.8 SAVING AN APPLICATION

The object definition that you can create or modify in the design interface must be saved
in the database before you exit from SQL*MENU.

From the opening menu (screen 5.1), select the Action option. From the dropdown menu
that appears (screen 5.3), select the Save option. A dialog box appears (screen 5.16), where you
type in the name of the screen to be saved and press the accept key sequence.

Action Menu Procedure Help Options


SQL*MENU

Save Menu Application

Name : PAY

Enter name of the menu application to be saved on the database.


App : PAY Mnu : PAY <Rep>

Screen 5.16 : The Save Menu Application screen.

5.9 GENERATING AN APPLICATION

Before you can run a menu application, you must generate it. When you generate a menu
application, a library file is created with a .DMM file extension, using the file name and the
directory path specified in the Application Definition Form.

NOTE : Generating an application does not save it in the database. Remember to save the
application before you exit SQL*MENU.
From the opening menu (screen 5.1), select the Action option. From the dropdown menu
that appears (screen 5.3), select the Generate option. A dialog box appears (screen 5.17), where
you type in the name of the screen to be generated and press the accept key sequence.

Action Menu Procedure Help Options


SQL*MENU

Generate Menu Application

Name : PAY

Enter name of the menu application to be generated.


App : PAY Mnu : PAY <Rep>
Screen 5.17 : The Generate Menu Application screen.

5.10 EXECUTING AN APPLICATION

From the opening menu (screen 5.1), select the Action option. From the dropdown menu
that appears (screen 5.3), select the Execute option. A dialog box appears (screen 5.18), where
you type in the name of the screen to be executed and press the accept key sequence.

Action Menu Procedure Help Options


SQL*MENU

Execute Menu Application

Name : PAY

Enter name of the menu application to be executed.


App : PAY Mnu : PAY <Rep>

Screen 5.18 : The Execute Menu Application screen.

5.11 EXAMPLE
Lets take a sample application say INVOICE, used as an example to understand the
various concepts explained so far. Diagram 5.1 shows the menu tree for the sample application
INVOICE which explains the relationship among the various menus and menu items.

INVOICE

Masters Transactions Reports Exit

Customer Item Exit Invoice Exit Invoice Exit


Master Master Preparation

Diagram 5.1 : Menu Tree.


The menu application INVOICE, has four menu items (i.e. Masters, Transaction, Reports
and Exit). Three of these (i.e. Masters, Transactions and Reports) call submenus (i.e. pull-down
menus) and the fourth item exits the application.

The Masters menu, has three menu items (i.e. Customer Master, Item Master and Exit).
Two of the menu items call forms and the third item exits to the calling menu. The Transaction
menu, has two menu items (i.e. Invoice Preparation and Exit). The first calls a form and the
second returns to the calling menu. The Reports menu, has two menu items (i.e. Invoice Printing
and Exit). The first runs the report and the second returns to the calling menu.

Steps on how to create the application :-

Create a new application named INVOICE. Select the Menu option from the opening
screen and from the pull-down menu that appears select Menu. Enter the necessary details for
the Menu Definition screen that appears i.e. screen 5.19.
Action Menu Procedure Help Options
Menu Definition

Menu Name : INVOICE


Title : Invoice System
Subtitle : M/s Spectrum Group
Bottom Title : Invoice System for the year 1994

Purpose

This is an Invoice System for M/s Spectrum Group of


Companies. This a Menu system being designed by Silicon
Chip Technologies. It calls various submenus : Masters,
Transaction, Reports, Help and Exit.

Enter name of the menu.


App : PAY Mnu : <Rep>

Screen 5.19 : The Menu Definition screen.

Zoom In and Zoom Out :-

When the show keys key sequence is pressed (^K), the help on all keys is displayed. Use
the up/down arrow keys to look for Zoom In and Zoom Out. If the user presses the Zoom Out
key then the Application Definition form, which is a stage higher than the Menu Definition form,
will be displayed. And if the Zoom In key is pressed then it will take you to the sub-option
below the current option.

From the Application Definition form, the Zoom Out key will not be listed in the help
screen, and from the Item Definition form it is just the reverse.

To get to the Item Definition form, there are two ways of going about it. One way is by
directly pressing the Zoom In key sequence or the other way would be to go back to the main
menu and select Item from the pull-down menu of the Menu option.

Enter all the item details as displayed in screen 5.20 and 5.21.
Action Menu Procedure Help Options
Item Definition

Item Command Grant Item Short Displ


Number Type Role Text Item Name No Pr

1 1 (*) Master menu Masters [X]


2 1 (*) Transaction Transaction [X]
3 1 (*) Report Menu Report [X]
4 7 (*) Exit Menu Exit [X]

>
Enter the item number for this item.
App : INVOICE Mnu : INVOICE <Rep>

Screen 5.20 : The Item Definition screen.

Action Menu Procedure Help Options


Item Definition

Item Short Displ Command Line Help Text


Number Item Name No Pri

1 Masters [X] Masters


2 Transaction [X] Transaction
3 Report [X] Report
4 Exit [X] exit_menu;

>
Enter the item number for this item.
App : INVOICE Mnu : INVOICE <Rep>

Screen 5.21 : The Item Definition Screen.


To call a menu, specify the menu name at the command line. So when the user chooses a
particular option, a pull-down menu is called.
To create a Master menu, press the zoom out key sequence to go one step higher in the
hierarchy i.e. to the Menu Definition form (screen 5.22). Add another menu by pressing the
insert record key sequence. And follow the same procedure as done earlier.
After entering all the details about the Master menu, press the zoom in key sequence to
enter the details about the items in the Master menu (screen 5.23 and 5.24).

Action Menu Procedure Help Options


Menu Definition

Menu Bottom
Name Title Subtitle Title

INVOICE M/s Spectrum Lt Invoice System For the Year 199


MASTER master masters

>
Enter the name of the menu.
App : INVOICE Mnu : Master <Rep>

Screen 5.22 : The Menu Definition Screen.

Action Menu Procedure Help Options


Item Definition

Item Command Grant Item Short Displ


Number Type Role Text Item Name No Pr

1 2 (*) Customer Master [X]


2 2 (*) Item Master [X]
4 7 (*) Exit to the mai [X]

>
Command:1Menu,2 OS,3 OS+pause,4 Form,5 SQL*Plus,6 Macro,7 PL/SQL
App : INVOICE Mnu : INVOICE <Rep>

Screen 5.23 : The Item Definition Screen.


Action Menu Procedure Help Options
Item Definition

Item Short Displ Command Line Help Text


Number Item Name No Pri

1 Customer [X] runforms/u/stud


2 Item [X] runforms/u/stud
3 Exit [X] exit_menu;

>
Enter the item number for this item.
App : INVOICE Mnu : Master <Rep>

Screen 5.24 : The Item Definition screen.

Similarly create the Transaction menu, press the zoom out key sequence to go one step
higher in the hierarchy i.e. to the Menu Definition form. Add another menu by pressing the
insert record key sequence (screen 5.25). And follow the same procedure as was done for the
Master menu.

After entering all the details about the Transaction menu press the zoom in key
sequence to enter the details about the items in the Transaction menu
(screens 5.26 and 5.27).

Action Menu Procedure Help Options


Menu Definition

Menu Bottom
Name Title Subtitle Title

INVOICE M/s Spectrum Invoice System For the Year 199


MASTER mast masters
TRANSACTION transaction transaction

Enter the name of the menu.


App : INVOICE Mnu : Transaction <Rep>
Screen 5.25 : The Menu Definition screen.

Action Menu Procedure Help Options


Item Definition

Item Command Grant Item Short Displ


Number Type Role Text Item Name No Pr

1 2 (*) Invoice Prepar Invoice [X]


3 7 (*) Exit to the mai Exit [X]

Command:1Menu,2 OS,3 OS+pause,4 Form,5 SQL*Plus,6 Macro,7 PL/SQL


App : INVOICE Mnu : Transaction <Rep>

Screen 5.26 : The Item Definition screen.

Action Menu Procedure Help Options


Item Definition

Item Short Displ Command Line Help Text


Number Item Name No Pri

1 Invoice Preparat [ X ] runforms/u/stud


2 Exit [X] exit_menu;

Enter the item number for this item.


App : INVOICE Mnu : Transaction <Rep>

Screen 5.27 : The Item Definition screen.

Similarly create the Report menu as displayed in screens 5.28 to 5.30.


Action Menu Procedure Help Options
Menu Definition

Menu Bottom
Name Title Subtitle Title

INVOICE M/s Spectrum Lt Invoice System For the Year 199


MASTER master masters
TRANSACTION transaction transaction name
REPORTS reports menu reports menu

Enter the name of the menu.


App : INVOICE Mnu : Report <Rep>

Screen 5.28 : The Menu Definition screen.

After entering all the details about the Report menu press the zoom in key sequence to
enter the details about the items of the Report menu (screen 5.29 and 5.30).

Action Menu Procedure Help Options


Item Definition

Item Command Grant Item Short Displ


Number Type Role Text Item Name No Pr

1 2 (*) Invoice Invoice [X]


2 7 (*) Exit to the mai Exit [X]

Command:1Menu,2 OS,3 OS+pause,4 Form,5 SQL*Plus,6 Macro,7 PL/SQL


App : INVOICE Mnu :Report <Rep>

Screen 5.29 : The Item Definition screen.


Action Menu Procedure Help Options
Item Definition

Item Short Displ Command Line Help Text


Number Item Name No Pri

1 Invoice [X] runrep TERM=orb


2 Exit [X] exit_menu;

Enter the item number for this item.


App : INVOICE Mnu : Report <Rep>

Screen 5.30 : The Item Definition screen.

After having done all this, press the accept key sequence to accept the changes that have been
made. Save the application created. Then Generate and Execute the application.

On executing the application, screen 5.31 comes up.

Masters Transaction Reports Exit


INVOICE

Master menu which is the Master data-entry screen for the INVOICE package.
App : INVOICE Mnu : INVOICE <Rep>

Screen : 5.31 : Main menu.

When the Master option is selected the submenus or the items that were created in menu
Masters comes as a pull-down menu as displayed in screen 5.32.
When the Transaction option is selected, the submenus or the items that were created in
menu Transaction comes up as a pull-down menu as displayed in screen 5.33.

When the Report option is selected, the submenus or the items that were created in menu
Report comes up as a pull-down menu as displayed in screen 5.34.

Masters Transaction Reports Exit


INVOICE

Customer
Item
Exit

Customer data-entry screen to enter Customer Details.


App : INVOICE Mnu : Masters <Rep>

Screen 5.32 : Masters pull-down menu.

Masters Transaction Reports Exit


INVOICE

Invoice Preparation
Exit

Invoice Information.
App : INVOICE Mnu : Transaction <List><Rep>
Screen 5.33 : Transaction menu.

Masters Transaction Reports Exit


INVOICE
Invoice Preparation
Exit

Invoice Report Generation.


App : INVOICE Mnu : Reports <Rep>

Screen 5.34 : Reports menu.

REFERENCES:-

1. ORACLE - Oracle press book.

2. ORACLE –7 - Ivan Bayross.

5.12 EXERCISES

A. Fill in the blanks :-

1. __________ is a menu that is called by an item in another menu which is the parent
menu.
2. The primary difference between the pull down menu style and the bar menu style is
the _______________________.
3. In menus, the ______________ displays a hint for the current item.
4. To get start with ORACLE menu, at the $ prompt, you need to type _____________.
5. ____________________________ window displays general information about the
application.
6. When we generate a menu application, a library file is created with a _________ file
extenstion.

B. Answer the following :-

1. What is menu? Explain Application and Tree with respect to menu.


2. Explain briefly the various menu styles.
3. Explain the various options in Menu definition Screen.
4. What is Substitution Parameter? What are its uses. Explain the Standard Substitution
Parameters.

C. Practical Assignment :-

Create a Menu Application SJCE. The following menu tree for the application SJCE
explains the relationship among the various menus and menu items.

SJCE

Under-graduate Post-graduate Evening Others Exit

CIVIL MTECH CS&E PHD


CS & E MCA E&C IGNO
E&E MBA E&E KSOU
E&C EXIT EXIT EXIT
ENV
ISE
IT
IP
MECH
PST
EXIT

5.14 ANSWERS

A. 1. Submenu.
2. Representation of Submenus.
3. Message line.
4. SQL menu 50 – c vt 100 : vt 100.
5. An Application definition.
6. .DMM.

=================== ****** ====================

Вам также может понравиться