This section describes the Natural object of type resource.
Note:
In contrast to Natural for Open Systems, where shared and
private resources are available, currently only shared resources are available
with Natural for Mainframes.
This document covers the following topics:
Resources are non-Natural objects, like HTML pages, GIFs, etc. They
are stored in libraries on the system file FNAT
or
FUSER
for being accessible from within Natural applications.
Resources in their technical meaning are large data objects in binary or character format, which are processed either in a transient way or stored persistent as input to or result of a utility or user application run.
Objects of type resource are used by the XML Toolkit as containers for DTDs, XML schemas, style sheets, etc. The Natural Web Interface makes use of resources, such as GIFs or JPEGs. In addition, objects of type resource can be used to store XLIFF translation files.
The following topics are covered below:
Objects of type resource have a long name and a short name.
For each object of type resource an 8-byte object short name exists. This short name is in uppercase.
It can be specified in system commands, such as
LIST
,
DELETE
and
RENAME
, as well as in the
Object
Handler and the utilities
INPL
and
SYSMAIN
.
A resource long name is stored in the third directory records of the resource using the following structure:
Bytes | Format | Content |
---|---|---|
1 - 2 | B2 | Line number
H'0000' |
3 - 6 | A4 | Resource type, usually the extension of the resource name |
7 | A1 | Resource format, where A = alphanumeric, B = binary, U = Unicode |
8 - 252 | A245 | Resource name |
The long name of a resource can be displayed using the system
command LIST
. It is shown in the
List of Objects when you issue the
function code
LN
.
Objects of type resource are stored in libraries in the same way as the other Natural object sources.
They can be handled with the utilities
SYSMAIN
and
INPL
and with the
Object
Handler.
They cannot be edited with the Natural editors.
In the library
SYSEXT
, the following application
programming interface (API) exists, which gives user applications access to
resources' unique user exit routines:
API | Purpose |
---|---|
USR4208N |
Write, read, delete a resource by using short or long name. |