Version 6.3.13 for Windows
 —  Tools and Utilities  —

General Information on the Object Handler

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:


Principles of Object Transfer

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.

Related Topic:

Natural Development Server documentation

This section covers the following topics:

Transfer Environment and File Security

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.

Objects Processed by 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.

Formatting Options

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.

Top of page

Invoking the Object Handler

To invoke the Object Handler you can either use 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.

Start of instruction set To invoke the Object Handler using menu functions

  1. 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:

  2. 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.

Start of instruction set To invoke the Object Handler in batch or direct command online mode

Top of page

Batch or Direct Command Calls

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:

Batch Mode

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.

Example (assuming ID is set to ,):

UNLOAD * LIB EXAMPLE, WHERE, WORK C:\TEMP\TEST.SAG
  STOP

Related Topics:

Online Mode

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.

Example:

SYSOBJH UNLOAD * LIB EXAMPLE WHERE WORK C:\TEMP\TEST.SAG
  STOP

Top of page

Issuing Object Handler Commands from a Natural Program

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.

Top of page

Text Members for Reports, Restarts and Traces

Only applies to remote environments located on mainframe platforms.

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.

Top of page

Natural Security

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:

Top of page

Using FDDM System Files

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:

Top of page