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.

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 Linux 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 (external objects).

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 (external objects).

Text format applies to source objects, Natural command processor sources, error messages and Adabas FDTs. You can only transfer text data between mainframe and Linux/Windows platforms. You can transfer binary data between identical platforms. Between Linux and Windows platforms, you can transfer binary data by using portable work files of internal format.

Invoking the Object Handler

To invoke the Object Handler you can either use menu functions or direct commands.

Start of instruction set To invoke the Object Handler online from any Natural library

  1. Enter the following system command:

    SYSOBJH

    Depending on the input mode, either the Object Handler Main Menu or the Object Handler Compact Menu is displayed. See Compact Mode. You can change the input mode either by the SET INPUT command (described in Direct Commands) or by changing the INPUT-MODE parameter (described in Profile Settings). The Main Menu of the Object Handler provides the following options:

    • Unload

    • Load

    • Scan

    • View

    • Administration

    See the section Functions for descriptions of these functions, and how to process the functions in advanced-user mode or by using wizards.

  2. Select a function by choosing one of the following methods:

    Enter any character in the input field next to the item that corresponds to the function required.

    Or:
    Choose the PF key that corresponds to the function required.

    Or:
    In the Command line, enter the Object Handler command that corresponds to the function required. For information on the commands provided, see the section Direct Commands.

Start of instruction set 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 in Direct Commands.

    After execution of a direct command, you can enter either another direct command or a period (.) to exit the Object Handler.

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

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. In addition, we recommend that you set the LS profile parameter to 250.

Example (assuming ID is set to ,):

UNLOAD * LIB EXAMPLE, WHERE, WORK $HOME\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.

Example:

SYSOBJH UNLOAD * LIB EXAMPLE WHERE TRANSFER WORK $HOME/TEST.DAT

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.

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 and the parameter settings are 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.

Standard PF Keys

The following PF keys are available on all full-screen maps:

PF Key Explanation
PF1 Invokes the help function for the field at which the cursor is positioned.

If positioned at the fields Work file, External path, Ext. Path, Object name, Report file or Restart file: invokes an extra window where you can enter a long work file name of up to 253 characters.

PF3 Exits the current screen and returns to the previous screen.
PF6 Goes to the top of a list.
PF7 Scrolls up one page in a list.

On wizard screens: goes back one screen/step.

PF8 Scrolls down one page in a list.

On wizard screens: goes to the next screen/step.

PF9 Goes to the bottom of a list.
PF10 Invokes the Commands menu to select commands for navigation purpose and to assign special settings. See also Commands for Navigation and Special Functions in Direct Commands.
PF12 Cancels the current function.
PF20 Lists all active programs of the Object Handler. This can be helpful information for reporting technical problems to Software AG.

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 using Set 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 parameter file.

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