General Information on the Object Handler

#### Search Results

Search

# 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

- Invoking the Object Handler

- Batch or Direct Command Calls

- Issuing Object Handler Commands from a Natural Program

- Text Objects for Reports, Restarts, and Traces

- Natural Security

- Standard PF Keys

## 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

- Objects Processed by the Object Handler

- Formatting Options

### 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 DDMs (data definition modules), Natural-related objects, and Adabas FDTs (Field Definition Tables).

### 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 (including DDMs), error messages, Natural command processor sources, Natural-related objects and Adabas FDTs.

Text format applies to source objects, Natural command processor sources, error messages, DDMs and Adabas FDTs. You can only transfer text data between mainframe and Linux/Windows platforms. You can transfer binary data between identical platforms.

## Invoking the Object Handler

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

To invoke the Object Handler online from any Natural library

1. Enter the following system command (online from any Natural library):

       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 they can be processed (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.

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

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

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

- Online Mode

### 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 `,`):

    SYSOBJH
    UNLOAD PROG* LIBRARY MYLIB1, OBJTYPE N,%
    WITH NEWLIBRARY MYLIB2%
    WHERE REPORT TRANSFER
    STOP

#### Related Topics:

- Direct Commands

- Natural in Batch Mode - Operations documentation

### 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

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

## Text Objects for Reports, Restarts, and Traces

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 objects that have not been explicitly specified in the Options window. The names generated are a combination of the weekday and the time. For example: an object with the name 21415568 was created on Tuesday (the second day of the week) at 14:15:56,8.

You can specify the Workplan library in which the text objects are stored by using the `Workplan-Library` profile option of the Object Handler described in Profile Settings. If your Natural session uses a read-only FNAT or FUSER system file as specified with the `ROSY=ON` profile parameter (see the Parameter Reference documentation), the text objects are stored in a scratch-pad file (see the Operations documentation) under one of the following conditions:

- The database ID and file number specified for the Workplan library is identical to the current FNAT or FUSER system file.

- No database ID and file number are specified for the Workplan library.

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

### On this page

- Principles of Object Transfer
- Invoking the Object Handler
- Batch or Direct Command Calls
- Issuing Object Handler Commands from a Natural Program
- Text Objects for Reports, Restarts, and Traces
- Natural Security
- Standard PF Keys