Include Object (JOBI)
You can use Include objects to store identical script parts that you frequently need. You can then re-use them in various tasks.
Object Definition
Object class: Passive object
Object type/Short name: JOBI
This topic provides information on the following:
- Overview
- Defining Include Objects
- Inserting Include Object in a Script
- Configuring Include Objects for External Interpreter Calls
- Viewing and resolving Include objects in the Script Editor
Using Include objects ensures that your scripts are consistent, on the one hand, and saves you time, on the other, as they allow you to quickly and easily re-use code that you need often.
If your Include object also includes variables, ensure that these variables are also defined and initialized in the calling object. Otherwise, you cannot pass the variable from the Include object to the calling object.
You can also add the Include object in the calling object with the :INCLUDE
statement. The script of the Include object is then inserted in the script of the calling object when the calling object is activated.
You can add JCL lines (if it is used in Job objects) in an Include object's script. You can also nest Includes within Includes up to max. five levels.
Use the rights assignment for users (write access to Include objects) if you want to prevent unwanted modifications in Include objects.
An Include object definition is made up of the following pages:
- Standard pages that are always available, no matter what type of object you are defining:
- The Process Pagesdepicted here:
Inserting Include Object in a Script
Simply enter :INCLUDE followed by the name of the Include object.
Configuring Include Objects for External Interpreter Calls
The system client 0000 includes two objects that you can use in your scripts to define external interpreters and their scripts:
REGISTER_VARIABLE.WINDOWS
REGISTER_VARIABLE.UNIX
You can call these objects with the :REGISTER_VARIABLE
statement. This statement must be combined with the :BEGIN_EXT_INTERPRETERS
and :END_EXT_INTERPRETERS
statement in the Process page of the Job object (JOBS). Both statements are available on Windows and UNIX.
Contact your administrator to configure these two objects, as their settings are available system-wide.
Example: Default Script - Windows
Example: Perl as external interpreter on Windows
Viewing :INCLUDE Statements in the Script Editor
You can use the script editor to display and edit the contents of your Include objects.
You expand the Include object in a read-only dialog by clicking the plus symbol on the left edge.
To copy the contents from the Include object to the script editor, click Resolve Include.
A comment will denote that the code came from the contents of the Include object. Any future changes to the Include object will have no effect here. Any changes you make in the script editor will have no effect on the Include object.
See also: