A script-enabled browser is required for this page to function properly.

Building resource files

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 (.RES) from a Text File (.PRN). The resulting resource file can be used with the TOOL_RES Package.

RESPR60

Is a utility that converts a resource file (.RES) to a Text File (.PRN).

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.

Resource file syntax 

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:

resource_name

Is a unique name that you can reference with TOOL_RES.RFREAD.

character_count

Is the number of characters in the string contents.

content of string

Is the actual string.

Example 

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;

See also

About the TOOL_RES built-in package

TOOL_RES built-in package