Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle terminal

Status
Not open for further replies.

tyb

Technical User
Feb 10, 2004
137
IR

dear frends

can some1 plz let me know that where can i find the getting started information on oracle terminal as i dont hav even a novice level knowledge abt oracle terminal.

thanks.

 
Hi,
Here is a Document which Might Help you.

Regards
Himanshu

Oracle Terminal Tutorial for MS Windows Client-Server =======================================
Oracle Terminal is available on all platforms where Oracle Forms is installed. Some platforms have a character mode version of the product in addition to the GUI version. This tutorial applies to using Oracle Terminal to modify the Forms resource file on MS-Windows client-server only.

This article gives examples of using Oracle terminal to edit the Forms resource files, in order to:
o Define custom keyboard mappings (you can have any set of keypresses trigger a specific action in your forms applications),
o Add actions at any level (take specific actions, make them available in certain parts of Oracle Forms and map keypresses to them), and
o Change the screen attributes (including the colors and fonts being used) for various parts of your forms applications.
The information here is meant to supplement the generic "Oracle Terminal User's Guide", which is included with the Oracle Forms 4 kit.

This article is not intended to replace that manual.

ORACLE TERMINAL AND RESOURCE FILES
The Oracle Terminal application on Microsoft Windows is "ORAWIN\BIN\OT.EXE".

You can run it by double-clicking on the Oracle Terminal icon in the Program Manager, or using "Run" under the File menu to run "OT.EXE". The default Oracle Terminal resource file used by Forms 4.0.12 is "ORAWIN\FORMS40\FMRPC.RES".

For Oracle Forms 4.0.13, this filename has changed to "ORAWIN\FORMS40\FMRUSW.RES". During this tutorial, the Forms 4.0.12 filenname is referred to. If you are using Oracle Forms 4.0.13, please replace all references to FMRPC.RES with FMRUSW.RES.
Oracle Terminal will only edit screen attribute definitions and keyboard mapping definitions in a resource file, but resource files can contain other kinds of resources as well, and the CDE tools will use some resource files that do not have any screen attributes or keyboard mappings in them. That is why you can't edit some of the resource files you have on your system (they will give you "no product defined" or "cannot open/create" errors if you try to open them).
When you change a definition in a resource file, the change will apply anywhere this resource file is used.
For example, if you edit FMRPC.RES to change the color of the status line at the bottom of the screen, then whenever Oracle Forms uses that resource file it will use the new colors, no matter what form it's running. In other words, you do not modify a resource file in order to change the attributes of one object in one form. If you are reading this article to learn Oracle Terminal, then you might want to run it now and open the file "ORAWIN\FORMS40\FMRPC.RES", so you can follow along with this article and see the various things that it explains.

EDITING A RESOURCE FILE
Before you open a resource file to edit it, make sure that you do not have any other Oracle application running that might be using that resource file. When you open a resource file, a window appears with some fields and buttons on it. Here is what the fields are for:
o "File Description": This field lets you give a short description of what the resource file is for. You can put any text in here.
o "Product": A resource file can contain definitions for more than one Oracle tool. Currently, the resource files provided with each Oracle tool contain information for one product only.
o "Device": Each resource file can contain resource definitions for more than one kind of terminal device.

This is most useful on (for example) large Unix or VMS systems, where users can log onto the system from many different kinds of terminals (such as vt100's or vt220 emulators. You can set up different terminal definitions in an Oracle tool's resource file to let it handle different types of terminals correctly.

Since you'll only be running your Windows tools from your Windows PC, you only need to be concerned with the "Windows" terminal type here.
o When you press one of the four buttons at the top of the screen, the field in the grey area explains what that button does. These four buttons are described below:
o The "K key" lets you edit keyboard bindings.
A "binding" is just a link between a specific keypress and an action in an Oracle tool; for example, if Control-Q triggers the "EXIT" action in Oracle Forms, then we say that Control-Q is "bound" to EXIT.
You can bind any keypress to any action in the Oracle tool you're making the resource file for. You could use Oracle Terminal to make the F3 key do an EXIT action as well, for example. o The "ABC paint palette" lets you edit "logical" (also known as "screen") attributes.
You can modify the look of any kind of object in an application this way (for example, you can easily change the foreground color for the Status Message line).
The changes you make here, however, are universal; they affect every relevant object in every form. If you do not want to make such a sweeping modification, then you would just edit the visual attributes of specific objects in specific forms.

o The "computer" lets you edit device definitions. This only applies to character-mode terminals, so it's not available in the Windows version of Oracle Terminal.

o The "meat grinder" lets you generate your new terminal definitions.
If you want to edit the terminal resources for an Oracle tool, it would be wise to take the resource file it uses by default as a starting point, but don't save your changes into that resource file (in case you ever need to go back to the original defaults); save your resource file under another filename and tell the Oracle tool to use your new resource file instead.
You do this by editing the Icon Properties of the icon that you double-click on to run the Oracle Forms tool; add "TERM=resourcefilename:WINDOWS" to the end of its "command line" entry. (However, there is a bug in Oracle Forms 4.0.12 whereby it will ignore any TERM option on its command line, so until that bug is fixed, you will have to make your changes to FMRPC.RES. Always make a backup copy of it first.)

KEY MAPPINGS
Key mappings are implemented hierarchically. It's easier to demonstrate what this means than to try to explain it. Open the Oracle Forms resource file "FMRPC.RES" in Oracle Terminal, click on the "key bindings" icon (the first one), and look at the diagram in the window this creates.
You should see a diagram with one circle on the left, many circles on the right, some more circles in between, and lines connecting them like a tree. (You might want to make the window larger so you can see more of the tree at a time.)

The "root" of the tree, on the left-hand side, represents the most general abstract "class" that Oracle Forms uses. This is called "windows-sqlforms" Double-click on the circle there, and a window will appear listing some actions and the keys that are bound to them; these are the "universal" key bindings that apply whenever you are running Oracle Forms, either the designer or the runtime, no matter where you are in a forms application.

Close that key bindings list, and look at the key bindings lists for "runform" and "designer". You'll see that they have no key bindings defined on themselves; this means that they inherit all of their bindings from the "windows-sqlforms" level. This means that whenever you're in the designer, some keys will have the same functions as they do when you're in the runtime. Double-click on the circle above "listvalues" on the "runform" part of the tree.

The information there tells you that when you are looking at a list- of-values in Oracle Forms Runtime, some additional keys are available for additional functions. These keys are available only when you're in a list- of-values; when you leave the list, they do not have those functions any more. If you want to change the key bindings at any level, click on a circle and press "Edit Key Bindings". (See below for more details on this.)
If you are looking at a list-of-values in Runform and you press a key, then Oracle Forms will look for that key's binding at the "listvalues" level of its resource file; and if it can't find the binding there it will search up through the tree for the binding until it reaches the top.

If it cannot find it there then Forms will give you an "invalid function key" error. Here is an example showing how to add a key mapping to Oracle Forms, so the F3 function key on your keyboard will do an EXIT (just like Control-Q already does):
1) If you have the Forms Designer, Generator, or Runtime running right now, then quit out of them, or else Oracle Terminal will not be able to open the Forms resource file.
2) We will be editing the FMRPC.RES file, so make a backup copy of it before we begin. (You could just edit that file and save your changes as a new .RES file, except that there is a bug in Forms 4.0.12 that prevents it from using any terminal file other than FMRPC.RES.)
This file is in ORAWIN\FORMS40.
3) Start up Oracle Terminal by double-clicking on its icon, or running "OT.EXE" from the "File Run" menu selection. When it asks you to open a file, navigate to ORAWIN\FORMS40 and choose "FMRPC.RES".
4) Open the key binding editor by either clicking on the "K key" icon, picking the "Functions Edit keys" menu selection, or pressing Control-M.
5) Double-click on the circle above "windows-sqlforms (at the left edge of the window), or click once on it and press "Edit Key Bindings". This brings up a window showing you the keys that are universally mapped across all of the Oracle Forms tools (since you are showing the key mappings list for the highest level of the hierarchy).
6) Click on the "Insert Row" button. This adds another line for you to put a new key binding on.
7) Enter the word "Exit" on your new row in the Action column (you must type it with a capital "E" and lower-case "xit"), and enter "F3" in the "Binding" column. 8) Click "OK" to return to the key binding editor.
9) Make sure that the F3 key is not mapped to something else lower in the hierarchy, by double-clicking on each of the circles to the right of "windows-sqlforms" and making sure that F3 is not shown in the list of key bindings. If you do find it in the key bindings for another level, then delete it with the "Delete Row" button.
10) Click "OK" to dismiss the key binding editor when you are finished with it.

Now that you've added a new key binding, you need to generate and save it before you can use it:
1) Click on the "generate" button (the meat grinder, the rightmost icon), pick the "Functions Generate" menu selection, or press Control-G. If it asks you if you want to save your changes before you generate, then choose "yes". After it generates, it should display a dialog box telling you that the generate completed successfully.
2) Save your changes by picking the "File Save" menu selection, and exit Oracle Terminal by picking "File Exit". Note: Both of the save actions mentioned above (before the generate and after the generate) are necessary; the first action saves the structire changes which are necessary to perform the generate successfully, and the second save saves the fully generated, complete file. Now try starting up Forms Runtime, and pressing F3 to see if it successfully exits the application. F3 should also appear when you tell Forms to "Show Keys". You can map many keystrokes all to the same action, but you cannot map one specific keystroke to more than one action.

PRODUCT ACTIONS
You can only bind a keypress to an action that's available at a given level of Oracle Forms. Sometimes you will want to define a key for an action that does not already exist at that level, so you will have to add the action. A list at the end of this bulletin shows many of the actions that Oracle Forms recognizes and can respond to. You can add these actions to any level of the Oracle Forms tools and bind keys to them to make them useable. Here is an example of how to define the "User Defined Key 2" action in Oracle Forms Runtime, and bind it to the F2 key:
1) Close any Oracle Forms tools (Designer, Generate, Runtime) that you might have running, so you can modify their resource file without getting any "file already open" errors.
2) You will be editing ORAWIN\FORMS40\FMRPC.RES, so make a backup copy of it for safekeeping.
3) Run Oracle Terminal, and open FMRPC.RES.
4) Go into the key binding editor, and click on the "Product Actions" button. This brings up the Product Actions Editor, which looks like the Key Bindings Editor.
5) Double-click on the circle above the word "runform". This brings you to the Product Action definition screen.
6) Insert a new row by clicking on the "Insert Row" button.
7) Put the phrase "User Defined Key 2" in the Action column, and put 84 in the Code column.
8) Click "OK" to dismiss the Product Action dialog, then click "OK" in the Product Action Editor to dismiss it too.
Now you have made that action available for the level you are editing. All that remains is to bind a key to it, to make it useful.

Here's a summary of the instructions given above for how to add a key binding:
1) In the Key Binding Editor, double-click on the "runform" circle.
2) Press the "Insert Row" button, and define a new binding with action "User Defined Key 2" and binding "F2". Click "OK" to close the Key Binding Definition window. 3) Make sure that the "F2" key is not bound at any other level below "runform" by checking the Key Binding Definition entries for all circles connected to "runform" to the right of it.
4) Press the "OK" button to dismiss the Key Binding Editor, and generate the new key bindings by clicking on the Generate icon in the FMRPC.RES window. Save your new bindings by selecting "Save" from the File menu.
5) Exit Oracle Terminal, and test this new action by putting a KEY-F2 trigger in a form and using Runform to make sure that it works.

SCREEN ATTRIBUTES
Here is an example showing how to change the attributes for the "status line" at the bottom of the Forms window:
1) Close any Oracle Forms tools (Designer, Generate, Runtime) that you might have running, so you can modify their resource file without getting any "file already open" errors.
2) You will be editing ORAWIN\FORMS40\FMRPC.RES, so make a backup copy of it for safe keeping.
3) Run Oracle Terminal, and open FMRPC.RES.
4) Go into the Attributes Editor by clicking on the "ABC palette" icon.
5) There are two values you can select in the "Attribute List" field: "cm_logicals" and "forms_logicals". The former is only relevant to Oracle Forms running in character mode, so you can ignore it here because Oracle Forms for Windows only runs in graphics mode. Select "forms_logicals" in that field.
6) The entries in the "Attributes" list show the attributes in Oracle Forms that you can modify. Note that any changes you make here will be seen in any forms you run with this resource file! Double-click on the "Status-Message" attribute to enter the Logical Attribute editor. 7) You should see a diagram similar to the one you saw earlier in the key bindings editor, except with only three circles this time. The circle on the left is labelled "Status-Message"; any attributes you define there will apply to the Status Message line on any platform. One of the other circles is labelled "charmode", and anything you define there will apply to the Status message line on character-based terminals. You should also see a circle labelled "windows", but in Oracle Forms 4.0.12.1.10 and earlier there was a bug in the resource file whereby the "windows" entry was omitted and an "x" entry existed instead. If you do not see a circle labelled "windows", then click on the circle labelled "Status-Message", type "windows" into the Name field at the bottom of the window, and click the Add button; now a "windows" circle should appear.
8) Double-click on the "windows" circle. Change any attributes you would like to change; the font, for example, or the foreground and background colors. When you are satisfied with your settings, press the "OK" button.
9) Press the "OK" button in the Logical Attribute Editor window to dismiss it, then press "OK" in the "OT Attributes" window to dismiss it also.
10) Select "Save" from the File menu, then exit Oracle Terminal. Try running a form to see that your changes to the status line took effect.

VALID ACTION CODES
Here is a list of the numeric "action codes" that correspond to various product actions that are available in Oracle Forms. This list might not be complete nor current in respect to the latest version of Oracle Forms available, but it should be useful as a reference.
1 Next Field
2 Previous Field
3 Clear Field
4 Left Arrow
5 Right Arrow
6 Up Arrow
7 Down Arrow
8 Goto Beginning Of Line
9 Goto End Of Line
10 Goto Extreme Vertical Up
11 Goto Extreme Vertical Down
12 Scroll Up
13 Scroll Down
14 Scroll Left
15 Scroll Right
16 Delete Character To Left
17 Delete Char On/Right
18 Delete Line
18 Terminate Input On Form
19 Move Cursor Left
20 Move Cursor Right
21 Scroll-Up
22 Invoke Editor For Field
23 Delete Character
23 Insert Line
24 Search
25 Toggle Insert/Replace Mode
26 Select Item
27 Return
28 Invoke Menu
29 List Of Values
30 Invoke Context-Sensitive Help
31 Redraw Screen
35 Show Keys
36 Accept
61 Next Key
62 Clear Record
63 Delete Record
64 Duplicate Record
65 Insert Record
66 Next Set
67 Next Record
68 Previous Record
69 Clear Block
70 Ask Block
71 Next Block
72 Previous Block
73 Duplicate Field
74 Clear Form
75 Enter
76 Enter Query
77 Execute Query
78 Error
79 Print
80 Clear Query
81 Update Record
82 User Defined Key 0
83 User Defined Key 1
84 User Defined Key 2
85 User Defined Key 3
86 User Defined Key 4
87 User Defined Key 5
88 User Defined Key 6
89 User Defined Key 7
90 User Defined Key 8
91 User Defined Key 9
92 Clear Eol
11004 Return To Application Menu
11005 Previous Menu
11006 Return To Main Menu
11007 Enter > 1 Os Commands
11008 Enter 1 Os Command
11009 Show Background Menu
11010 Background Menu Option 1
11011 Background Menu Option 2
11012 Background Menu Option 3
11013 Background Menu Option 4
11014 Background Menu Option 5
11015 Background Menu Option 6
11016 Background Menu Option 7
11017 Background Menu Option 8
11018 Background Menu Option 9
11019 Background Menu Option 10
11020 Re-Enter Application Parameters
11021 Re-Enter Menu Parameters
11022 Accelerator Key 1
11023 Accelerator Key 2
11024 Accelerator Key 3
11025 Accelerator Key 4
11026 Accelerator Key 5
11027 Accelerator Key 6
11028 Accelerator Key 7
11029 Accelerator Key 8
11030 Accelerator Key 9
11031 Accelerator Key 10
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top