Академический Документы
Профессиональный Документы
Культура Документы
STRUCTURE
5.1 INTRODUCTION.
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.
There are basically three types of display styles available in SQL*MENU. They are as
follows:-
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.
To use SQL*MENU, proper authorization has to be given to the users, which is achieved
via the following options :
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.
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
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.
• 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.
New
Open
-------------
Copy
Rename
Delete
Admin
Print doc
------------
Generate
Execute
------------
Unload
Save
Quit
Name : PAY
Move to the Menu option and from the dropdown menu that appears (screen 5.5),
select Application.
Application
Menu
Item
Parameter
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.
Menu Bottom
Name Title Subtitle Title
>
Enter the name of the menu.
App : PAY Mnu : <Rep>
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
>
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.
Item Text:
Masters Menu
Short Item Name : MASTERS [ X ] Display without Privilege
-------------------------Command Line--------------------------------------
MASTERS
-------------------------------Help Text--------------------------------------
• 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.
MASTERS
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.
--------------------------
MASTERS
--------------------------
Enter roles with access to this item.
App : PAY Mnu : PAY <Rep>
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.
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.
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.
Five pre-defined substitution parameters, which are always known to SQL*MENU, are
&UN, &PW, &AD, &SO and &TT. They contain the following values:
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] [ ] [ ]
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.
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 :
• 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.
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.
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.
Menu Name
Parameter cho
Size : ixed Length
Prompt : equired
(Select Me pper Case
Default :
Hint : Enter
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.
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.
Name : PAY
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.
Name : PAY
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.
Name : PAY
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
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.
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
Purpose
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
>
Enter the item number for this item.
App : INVOICE Mnu : INVOICE <Rep>
>
Enter the item number for this item.
App : INVOICE Mnu : INVOICE <Rep>
Menu Bottom
Name Title Subtitle Title
>
Enter the name of the menu.
App : INVOICE Mnu : Master <Rep>
>
Command:1Menu,2 OS,3 OS+pause,4 Form,5 SQL*Plus,6 Macro,7 PL/SQL
App : INVOICE Mnu : INVOICE <Rep>
>
Enter the item number for this item.
App : INVOICE Mnu : Master <Rep>
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).
Menu Bottom
Name Title Subtitle Title
Menu Bottom
Name Title Subtitle Title
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).
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.
Master menu which is the Master data-entry screen for the INVOICE package.
App : INVOICE Mnu : INVOICE <Rep>
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.
Customer
Item
Exit
Invoice Preparation
Exit
Invoice Information.
App : INVOICE Mnu : Transaction <List><Rep>
Screen 5.33 : Transaction menu.
REFERENCES:-
5.12 EXERCISES
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.
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
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.