The job type Subnetwork
(NET
) allows you to define a whole network as a job. The
subnetwork must already be defined. It must have an input condition
NET-BEGIN
and an output condition NET-END
as
illustrated in the following example:
The same subnetwork can be defined in different jobs of the main network.
The subnetwork can be activated together with the calling network (or
job of the type NET
) or at the moment the job of the type
NET
is started.
On activation, each active subnetwork is assigned a unique run number.
This document covers the following topics:
The following reserved conditions are used to link a subnetwork to
a main network and control the connection between the calling NET
job and the subnetwork called.
Reserved Condition | Description |
---|---|
NET-BEGIN
|
You must specify NET-BEGIN to start the
subnetwork and run the first job of the subnetwork.
|
NET-END
|
You must specify NET-END to run the last
job of the subnetwork and indicate the end of the subnetwork.
|
NET-END-NOTOK
|
This condition is optional. If specified and fulfilled during subnetwork termination,
the job is treated as ended If If |
NET-END-OK |
This condition is optional.
If specified at least once in your subnetwork and
fulfilled during subnetwork termination, the This has an impact on the release of resources, which are allocated on the network level. You can force the resource release by setting this condition. See also the deallocation mode set in the prerequisite resource definition. |
If the condition NET-END-NOTOK
is found together
with NET-END
, the calling job is set to the status not
ok
.
Jobs of the type NET
can use all kinds of
prerequisite checks and can have all kinds of
End-of-Job actions.
The scheduling parameters of a job of the type
NET
are passed on to the subnetwork. See the section
Scheduling a
Job.
The calling job of a subnetwork (job of type NET
)
should have an own symbol table definition.
A subnetwork is activated together with the main network. The subnetwork is assigned its own run numbers.
If the calling job of the type Subnetwork (NET
) becomes a temporary dummy job
due to any reason, no subnetwork activation is performed (if the subnetwork was
not activated already).
Reserved symbols pass information to the jobs of the subnetwork about which job invoked the subnetwork. These symbols are described in Predefined Symbols for Subnetworks and Recovery Jobs in the section Symbol Table and Symbol Maintenance.
If the subnetwork has a standard symbol table, these values are entered as symbols in the active copy of this table.
This enables you to trace, even through several steps, from where the subnetwork was invoked.
If the job of the type NET
can be activated (satisfies
all input conditions), the condition NET-BEGIN
of the subnetwork
is set and the subnetwork starts to work: the NET
job is then
executing. It remains in this status until the subnetwork has set the condition
NET-END
. Only at this point are the
End-of-Job checking and
actions performed which are defined in the invoking network.
If an execution error occurs in the subnetwork, the execution of the
invoking network is also blocked. If the subnetwork sets the condition
NET-END
before its actual termination (or at its very start), the
invoking network continues to run, and a parallel asynchronous execution of the
networks is possible. However, the user him/herself then becomes responsible
for later synchronizing the subnetwork with the invoking network.
This section covers the following topics:
Subnetworks can be activated at two different times:
The subnetwork is always activated (i.e., with the job type
NET
) after the calling network has been activated. The time
discrepancy depends on the Monitor activation cycle. The subnetwork will be
available from this point in time with run
number and active JCL. This is the default.
The subnetwork is only activated if the calling job of the
type NET
is really started. This can prevent a subnetwork from
even being activated if the calling job is not executed at all later on.
Moreover, the effort for job activations and loading the JCL is thus
compensated for, and the waiting-time for prerequisites within the subnetwork
is shorter.
The subnetwork activation mode can be defined as follows:
As a global default value (see Subnetwork activation mode in Defaults for Network Options in the Administration documentation).
In the definition of the calling job of the type
NET
(see Activation
mode).
The order of symbol table activation for subnetworks is:
Set caller info into the active table (P-C-
...
symbols).
Activate symbol table(s).
Perform symbol modification exit.
The order of symbol table activation for subnetworks is the same as for main networks.
This section covers the following topics:
Subnetworks can in turn be invoked within subnetworks; however, a subnetwork cannot invoke itself, because this can cause an infinite recursion.
The definition of a network as its own subnetwork is prohibited.
If this is attempted, the error message Recursive Subnetwork
Definition prohibited
is issued.
The maximal supported nesting level for subnetworks is 5.
To display or modify a subnetwork definition
From a Job Master node in the object
workspace, select a job of the type Subnetwork
(NET
), and choose Display or
Open from the context menu.
Or:
From the table in a
Job Master
List window, select a job of the
Type NET
, and choose
Display or Open from the context
menu.
A Maintenance Job Master window opens.
Open the tabbed page .
The fields on the page are described in Fields: Job Type Specific Execution Features.
To add a subnetwork definition
From the Job Master window, select Subnetwork from the Job type drop-down list box.
The tab Subnet appears.
Make your definitions. The input fields available on the page are described in Fields: Job Type Specific Execution Features.
Choose
when you are finished.If a master or active job has the type NET
, and if the subnetwork is defined
properly, you can invoke the master or active job list of the defined
subnetwork directly.
If the subnetwork was not defined yet, the subnetwork definition screen is invoked instead.
To list the jobs of a subnetwork
From a Job Master or Job
Active node, select a job of the type
Subnetwork (NET
), and choose Zoom
Subnetwork from the context menu.
Or:
From the table in a
Job Master
List or an Active Job List window,
select a job of the Type NET
, and choose
Zoom Subnetwork from the context menu.
The jobs of the subnetwork defined for the selected
NET
job are listed in a (separate)
Job Master
List or Active Job List window, as
shown in the following example: