In addition to extracting Textual Data from existing resource files, you can use the following utilities to create resource files that contain Textual Data.
RESPA60 |
Is a utility that generates a resource file ( |
RESPR60 |
Is a utility that converts a resource file ( |
These utilities are distributed with Oracle*Terminal and are installed automatically with this product. To display the supported command line syntax of these utilities on your platform, run the utilities without supplying any arguments.
In Microsoft Windows, you can invoke these executables from the Explorer or File Manager to display their command line syntax. To run the executables with arguments, use Run.
Use the following syntax when you create strings for the resource file:
Resourceresource_name"
Type string"
Content
table
{
string string 1 character_count
"content of string"
}
where:
|
Is a unique name that you can reference with |
|
Is the number of characters in the string contents. |
|
Is the actual string. |
The following Text file, HELLO.PRN
:
Resource "hello_world"
Type "string"
Content
table
{
string string 1 12
"Hello World!"
}
Resource "goodbye_world"
Type "string"
Content
table
{
string string 1 14
"Goodbye World!"
}
is generated into the resource file HELLO.RES
using the RESPA60
utility, and referenced by the following program unit:
PROCEDURE get_res IS
resfileh TOOL_RES.RFHANDLE;
hellor VARCHAR2(16);
goodbyer VARCHAR2(16);
BEGIN
/*Open the resource file we generated */
resfileh:=TOOL_RES.RFOPEN('hello.res');
/*Get the resource file strings*/
hellor:=TOOL_RES.RFREAD(resfileh, 'hello_world');
goodbyer:=TOOL_RES.RFREAD(resfileh, 'goodbye_world');
/*Close the resource file*/
TOOL_RES.RFCLOSE(resfileh);
/*Print the resource file strings*/
TEXT_IO.PUT_LINE(hellor);
TEXT_IO.PUT_LINE(goodbyer);
END;
About the TOOL_RES built-in package
Copyright © 1984, 2005, Oracle. All rights reserved.