The job type NET
(subnetwork) 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.
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.
You can also define specials for jobs of the type NET
by
pressing PF6 (Spec) on the job definition screen.
A subnetwork is activated together with the main network. The subnetwork is assigned its own run numbers.
If the calling job of the type NET
(subnetwork) becomes a temporary dummy job
due to any reason, no subnetwork activation will be 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 activated together with the calling network (i.e.,
with the job type NET
). It
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 will be shorter. Note,
however, that the active subnetwork including active JCLs will only exist from
a later time onwards.
The subnetwork activation mode can be defined as follows:
As a global default value (see Subnetwork Activation Mode in Default Setting (2) in the Administration documentation).
In the definition of the calling job of the type NET
(see Subnet
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 define a subnetwork
Press PF8 (Net) in the Job Definition window.
A Job: Subnetwork Definition window similar to the example below opens:
+----------------------------------------------------------------------------+ ! ! ! Job: Subnetwork Definition ! ! ! ! Owner SAGTEST Network SAGNET Job JOB-SUBNET Run ! ! ! ! Description ==> Subnetwork Job of Type NET ! ! JCL Node ==> _____ ! ! ! ! Subnetwork Owner ==> SAGTEST___ Use Subnetwork Time Frames ==> N ! ! Subnetwork Name ==> SAGNET2___ Subnet Activation Mode ==> D ! ! Subnetwork Version ==> __________ Append Mult. Suffix ==> N ! ! Subnetwork Run ==> ! ! ! ! Subnetwork Input Condition ==> NET-BEGIN ! ! Subnetwork Output Condition ==> NET-END ! ! ! ! Enter-PF1--------PF3--------PF5---------------------------------------- ! ! Help End Save ! +----------------------------------------------------------------------------+ ! Enter-PF1---PF2--PF3--PF4---PF5---PF6---PF7---PF8---PF9---------PF12- ! ! Help Add End Edit Save Spec Symb Net JCL Menu ! +------------------------------------------------------------------------+ Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help Add End Save Up Down Menu |
Enter the required values. The input fields provided in the window are described in Fields: Job Type Specific Execution Features.
When you are finished, press PF5.
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 will be invoked instead.
To list jobs of a subnetwork
On a Job
Maintenance, an
Active
Jobs or All Active
Jobs screen, type Z
(Subnet)
in the line command input field next to a job of the type NET
.
The name of the job owner and the subnetwork defined for the job are indicated in the File or Library column.
Press ENTER.
The jobs of the subnetwork defined for the selected NET
job (here: SAGNETSUB1
) are now listed on the Job
Maintenance screen, as shown in the following example:
17-12-12 ***** Entire Operations ***** 13:24:15 Job Maintenance Owner SAGTEST Network SAGNETSUB1 Version ------------------------------------------------------------------------------ Cmd C R PU Job Type Loc Description File or Library Member *--------- --- _ JOB-1 JOB NAT Where it all starts SYSEORU B60-M01 _ C1 SUBNETJOB2 NET Subnetwork Job for Su SAGTEST/SAGNETSUB (D) ******************************* Bottom of Data ******************************* A Dep. B Browse C Copy D Del. E Edit G Pregen. I Input Cond. J JCL L Resources M Mod. O EOJ Chk + Act P Prose R Activate S Sched.Parms U Ext.Log Z Subnet Command => ____________________________________________________________ Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help Add End Save Up Down Menu |
Note:
If you leave the subnetwork job list with PF3, you will
return to the calling network list.