The Object Handler consists of the utility SYSOBJH which is located in the Natural system library SYSOBJH, and the direct command interface. Additionally, the Application Programming Interface OBJHAPI is provided for executing Object Handler functions from a Natural program.
This section covers the following topics:
The diagram below illustrates how the Object Handler transfers objects by unloading them from the source environment into work files and loading them from work files into the target environment. If required, an application protocol such as FTP can be used for transferring work files from source to target environments.
When connected to a Natural Development Server in a remote environment located on a Windows, mainframe, UNIX or an OpenVMS platform, the Object Handler can be used to directly unload or load objects from or into a work file that is located on the local Windows client.
Natural Development Server documentation
This section covers the following topics:
An old or a new environment is an FNAT, FUSER or FDIC system file contained in an Adabas database or a VSAM file system on a mainframe, or in the file system on a UNIX, an OpenVMS or a Windows platform. Natural objects on the FNAT or FUSER system file can be contained in libraries as indicated in the following section.
The file security (that is, passwords and cipher codes) relates to the security that has been defined for a system file in an Adabas or a VSAM environment. If file security has been defined for a system file, you need to specify a password, cipher code and/or VSAM name for the source and/or target system file required before you perform an Object Handler function. Otherwise, Adabas or VSAM will issue an appropriate error message. You do not have to provide security information for the default system files assigned to the Natural session at the start of the Object Handler.
The Object Handler transfers Natural source objects (also referred to as saved objects) and cataloged objects which are contained in Natural libraries, Natural error messages, Natural command processor sources, Natural-related objects, Adabas FDTs (Field Definition Tables) and external files.
You can transfer data of binary or text format, depending on the source and target environment where the objects are processed.
Binary format can be used for source objects and cataloged objects, error messages, Natural command processor sources, Natural-related objects and Adabas FDTs and external files.
Text format applies to source objects, Natural command processor sources, error messages and Adabas FDTs. You can only transfer text data between mainframe and UNIX/OpenVMS/Windows platforms. You can transfer binary data between identical platforms. Between UNIX or OpenVMS and Windows platforms, you can transfer binary data by using portable work files of internal format.
This section provides instructions for invoking the Object Handler by using either menu functions or direct commands:
If you start the Object Handler while a remote Natural Development Server environment is active, the Object Handler will be invoked for the remote environment currently mapped and will process only the objects contained in this environment. In Natural Studio, the current environment is indicated in the title of the SYSOBJH - Object Handler window, which appears when you invoke the Object Handler as described in the following section.
To invoke the Object Handler using menu functions
In the Natural Studio window, from the Tools menu, choose Development Tools and Object Handler.
Or:
In the Natural Studio window, from the View
menu, choose Command Line and enter the following system
command:
SYSOBJH
The Welcome to the Natural Object Handler window of the Object Handler appears with the following options:
Unload
Load
Administration
Select the Advanced user check box if you do not want to use the Object Handler wizards for function processing.
Select the function required either by choosing the corresponding command button or by selecting the corresponding function from the Actions menu.
In addition to the functions listed above, the Actions menu provides the following:
See the section Functions for descriptions of these functions, and how to process the functions in advanced-user mode or by using wizards.
To invoke the Object Handler in batch or direct command online mode
Enter the system command SYSOBJH
followed
by a direct command as described in
Batch or
Direct Command Calls and
Direct
Commands.
After execution of a direct command, you can enter either another direct command or a period (.) to exit the Object Handler.
Several commands can be issued to the Object Handler online or in batch
mode. The last command in the command sequence must be a period
(.
), STOP
,
END
, QUIT
or
FIN
, where FIN
ends the
Natural session.
The section covers the following topics:
If you invoke the Object Handler in batch mode, you must issue a direct command to execute an Object Handler function.
The commands to the Object Handler are read from standard input. Each
command can be separated into a maximum of 20 command parts/strings by entering
input delimiters (session parameter ID
) after any
keyword or keyword value. Each command part/string must not exceed 248
bytes.
If the command is longer than a single line, at the end of every line
except the last that belongs to the command, enter the character defined with
the session parameter CF
(default is %
)
This indicates continuation on the next line. However, this is only possible if
you specify the command SYSOBJH
in a line by itself.
That is, you cannot use CF
, if you enter
SYSOBJH
in the same line where a multi-line command
starts.
,
):
UNLOAD * LIB EXAMPLE, WHERE, WORK C:\TEMP\TEST.SAG STOP
Batch Processing in a Remote Environment in Examples of Using Direct Commands
Natural in Batch Mode - Operations documentation
The command to the Object Handler in the Command line can consist of up
to 20 command parts. Several commands can be issued to the
Object Handler. The last command in the command sequence must be a period (.),
STOP
, END
,
QUIT
or FIN
, where
FIN
ends the Natural session.
SYSOBJH UNLOAD * LIB EXAMPLE WHERE WORK C:\TEMP\TEST.SAG STOP
You can issue commands to the Object Handler with a Natural program by using the OBJHAPI Application Programming Interface, which is supplied as a subprogram in the Natural system library SYSOBJH. For the parameters required and examples, see the Natural program DOC-API supplied in the library SYSOBJH.
Report, restart and trace data created by the Object Handler are stored as Natural text members (Natural objects of the type Text) in the Workplan library. The Object Handler generates names for text members that have not been explicitly specified in the Options window. The names generated are a combination of the weekday and the time. For example: a member with the name 21415568 was created on Tuesday (the second day of the week) at 14:15:56,8.
The use of the Object Handler under Natural Security requires that utility profiles be defined for it in Natural Security. At least, a default profile must be defined. For information on utility profiles, see the section Protecting Utilities in the Natural Security documentation.
If Natural Security is installed, the Object Handler checks the SYSOBJH utility profiles in Natural Security to find out whether the requested function is allowed.
Should a Natural Security error occur during the load function, the following applies:
If the Write report option is set, in online mode, the error message is written to the report file and processing continues for the current load command.
If the Write report option is set, in batch mode, the error message is written to the report file and the Object Handler terminates after the load command where the error occurred has finished processing.
If the Write report option is not set, an error message is issued and the load command is terminated.
Natural DDMs (data definition modules) can be stored in libraries or the system file FDDM. See also: FDDM - Natural System File for DDMs in the Parameter Reference documentation).
To use the system file FDDM for processing DDMs with the load, unload or find function, the Object Handler provides the option Use FDDM file for processing DDMs. This option is set by selecting Use additional options (see the section Settings).
Consider the following when selecting Use FDDM file for processing DDMs:
This option is selected by default if FDDM has been activated in the NATPARM module.
You cannot process DDMs that are stored in libraries.
You need to specify the library SYSTEM and the Natural object type
V
(see Natural Library Object
Details in the section Object
Specification.
If used with the load function, all DDMs are loaded into the system
file FDDM. In this case, the parameter NEWLIBRARY
is
ignored.