4.3.1 Creating unit definitions
This subsection explains how to create units for jobnets and jobs when performing export by entering unit definition information into the management template.
Define unit (job groups, jobnets, and jobs) information in the definition information management template, with one unit per line, starting with the upper unit. When you define the units below first, an error may occur during export.
When defining multiple units, make sure there are no empty lines between them.
The items to be input when defining units in the definition information management template are as follows:
-
Unit name
Enter the name of the unit to be defined. You must specify a name because processing will not be performed for the lines that follow this one if it is omitted.
-
Complete name of upper unit
Enter the complete name of the unit above that to be defined. The unit name and the complete name of the upper unit are necessary to identify the unit to be exported, so specify the complete name of the upper unit. You may leave this blank if the upper unit is a root jobnet.
-
Unit type
Specify a string indicating the unit type, in 1 to 4 characters. For details about the strings to be specified, see the comments for the definition information management template, or 5.1 List of definition items.
-
Other information
Here you can define information corresponding with the unit type specified above. For details about definition items, see 5.1 List of definition items. Depending on the unit type, there may be items that cannot be defined in JP1/AJS3 - Definition Assistant. For details about the items that cannot be defined, see 5.2 Support status of the definition items in JP1/AJS3 - View.
- Organization of this subsection
(1) Defining relations
To define a relation, enter the name of the previous unit in the Previous field. In the Relation type field, enter seq for a normal relation or con for a conditional relation.
For units at the start of a jobnet, leave the Previous field blank. For jobs with multiple previous units, such as job E in the following example, specify multiple units in the Previous field, separating each with a line break (Alt+Enter).
|
Section |
Unit name |
Complete name of upper unit |
Unit type |
Previous |
Relation type |
---|---|---|---|---|---|
Batch |
Jobnet |
n |
|||
Batch |
Job A |
/Jobnet |
pj |
||
Batch |
Job B |
/Jobnet |
pj |
Job A |
seq |
Batch |
Job C |
/Jobnet |
pj |
Job B |
seq |
Batch |
Job D |
/Jobnet |
pj |
Job B |
seq |
Batch |
Job E |
/Jobnet |
pj |
Job C Job D |
seq seq |
(2) Specifying levels
You can also define together units that span multiple levels, such as nested jobnets.
The following is an example of a nested jobnet definition. When defining a nested jobnet, first define the jobnet, and then define the jobs inside the nested jobnet.
|
Section |
Unit name |
Complete name of upper unit |
Unit type |
Previous |
Relation type |
---|---|---|---|---|---|
Batch |
Jobnet 1 |
n |
|||
Batch |
Job A |
/Jobnet 1 |
pj |
||
Batch |
Job B |
/Jobnet 1 |
pj |
Jobnet 2 |
seq |
Batch |
Jobnet 2 |
/Jobnet 1 |
n |
Job A |
seq |
Batch |
Job Y |
/Jobnet 1/Jobnet 2 |
pj |
||
Batch |
Job Z |
/Jobnet 1/Jobnet 2 |
pj |
Job Y |
seq |
(3) Defining icon positions
With batch definitions, you can define the position information for the units, specifying in the template where to place each icon on the map.
Icons positions are displayed in units of unit icon numbers. The upper left corner of the map is set as row 1, column 1, and each icon is displayed at its position. The following figure is an example of such a grid, in which the job A icon is displayed in row 3, column 5.
For individual definitions, any defined position information is disregarded, and the icons are displayed in random positions.
|
Section |
Unit name |
Complete name of upper unit |
Unit type |
Position information |
Size |
||
---|---|---|---|---|---|---|---|
Row |
Column |
Rows |
Columns |
||||
Batch |
Jobnet |
n |
8 |
10 |
|||
Batch |
JP1event |
/Jobnet |
evsj |
4 |
8 |
||
Batch |
Eventlog |
/Jobnet |
ntwj |
4 |
3 |
||
Batch |
JobA |
/Jobnet |
pj |
3 |
5 |
||
Batch |
JobB |
/Jobnet |
pj |
5 |
5 |
(4) Defining schedule rules
To specify multiple jobnet schedule rules, use a line break (Alt+Enter) to separate each one within the cell. The rule on the first line of each cell becomes rule #1, and the rule on the second line becomes rule #2.
To remove the schedule definition information defined, make the line in the cell corresponding to the rule number consist of only alt + Enter. To remove all the schedule information,, the lines which consist of only alt + Enter are required as many as the rule numbers
- Example 4: Multiple schedule rules
-
Rule #1: Execution start day = 2009/7/15 (absolute day) Start time = 09:00
Rule #2: Execution start day = 2009/7 Last open day Start time = 18:00
Table 4‒5: Example 4: Definition of multiple schedule rules Section
Unit name
Unit type
Start day
Start time
Type
Start year/month
Start day
Batch
Jobnet 1
n
Absolute day
Open day
2009/7
2009/7
15
Last
09:00
18:00
For details about how to define the schedule rule, see 4.5 Schedule rule in JP1/AJS3 - Definition Assistant.
(5) Defining passing information setting jobs
When you define a passing information setting job, enter cpj for Unit type in the Unit definition information section, and AJSVAR for Custom type.
In addition, how to define passing information differs depending on the value of the USESET-PASSINGINFO environment settings parameter. The following describes the definition method.
(a) When the value of the USESET-PASSINGINFO environment settings parameter is VIEW
In this case, specify passing information for Passing information in the Tool unit definition information section.
In the Input regular expression cell, specify with a regular expression the condition for cutting out the value in the standard output file of the previous job to be set as the output macro variable.
In the Output macro variable cell, specify the macro variable name in the ?AJS2xxxxx? format.
Tool Unit definition information |
|
---|---|
Passing information |
|
Input regular expression |
Output macro variable |
DATE1(.*) DATE2(.*) |
?AJS2FILEDATE1? ?AJS2FILEDATE2? |
- Supplement:
-
When the output macro variable includes a single-byte space, the space is removed for export and the definition created. Note that the output macro variable in the export execution results file still includes a single-byte space (the specified value has not changed). If you want to identify an output macro variable that uses a single-byte space, use the error-checking function.
The following are examples of the export result and error-checking result when the output macro variable includes a space.
- Examples of definition in JP1/AJS3 - Definition Assistant
-
Example 1: Regular expression = DATE1(.*) Output macro variable = ?AJS2FILEDATE1?
Example 2: Regular expression = ΔDATE2(.*) Output macro variable = Δ?AJS2FILEDATE2?
Example 3: Regular expression = Δ Output macro variable = ?AJS2FILEDATE3?Δ
Example 4: Regular expression = (No value) Output macro variable = ?AJS2FILEΔDATE4?
Example 5: Regular expression = DATE5(.*) Output macro variable = ?AJS2Δ?
Legend: Δ: Single-byte space
The following table shows the export result and error-checking result for each of the examples.
Table 4‒7: Examples of the export result and error-checking result #
Export result
(Output result of the ajsprint command in JP1/AJS3)
Error-checking result
Parameter (prm)
Environment variable (env)
Example 1
Δ-oΔFILEDATE1
env="AJS2SO_RE_FILEDATE1=DATE1(.*)";
No input errors occur. (KAVZ0250-I)
Example 2
Δ-oΔFILEDATE2
env="AJS2SO_RE_FILEDATE2=ΔDATE2(.*)";
Output macro variable error (KAVZ0259-E)
Error cause: Invalid character string
Example 3
Δ-oΔFILEDATE3
env="AJS2SO_RE_FILEDATE3=Δ";
Output macro variable error (KAVZ0259-E)
Error cause: Invalid character string
Example 4
Δ-oΔFILEDATE4
env="AJS2SO_RE_FILEDATE4=";
Regular expression error (KAVZ0259-E)
Error cause: Invalid value used
Output macro variable error (KAVZ0259-E)
Error cause: Invalid character string
Example 5
Not applicable
Not applicable
Output macro variable error (KAVZ0259-E)
Error cause: Invalid character string
Legend: Δ: Single-byte space
Although a space in the output macro variable is removed, the regular expression is defined without any change because a space can be specified for it.
(b) When the value of the USESET-PASSINGINFO environment settings parameter is COM
In this case, specify passing information in Execution file name, Parameters, and Environment variables in the Basic job definition information section.
In the Execution file name cell, specify the fixed value $JP1AJS2_JPOEXEPATH$/jpqpinfoset.
In the Parameters cell, specify the output variable in the format -oΔoutput-variable1Δ...Δ-oΔoutput-variablen (Δ is a single-byte space).
In the Environment variables cell, specify the fixed values AJS2SO_GLOBMACFILE=?AJS2SO_GLOBMACFILE? and AJS2SO_STDOUTFILE=?AJS2SO_STDOUTFILE? on the first and second lines. Also specify the regular expression and output variable in the format AJS2SO_RE_output-variable=regular-expression format on the third and subsequent lines.
Basic job definition information |
||
---|---|---|
Execution file name |
Parameters |
Environment variables |
$JP1AJS2_JPOEXEPATH$/jpqpinfoset |
-o FILEDATE1 -o FILEDATE2 |
AJS2SO_GLOBMACFILE=?AJS2SO_GLOBMACFILE? AJS2SO_STDOUTFILE=?AJS2SO_STDOUTFILE? AJS2SO_RE_FILEDATE1=DATE1(.*) AJS2SO_RE_FILEDATE2=DATE2(.*) |
(c) Notes
-
Do not specify the following definition items because they are invalid in passing information setting jobs. If you specify these definition items, an error is detected when the error-checking function is executed.
-
Exec-agent in the Unit common definition information section
-
Rule in the Basic job definition information section
-
-
We recommend that you run a check with the error-checking function before exporting the definition of passing information setting jobs.
-
A change export cannot be performed for Passing information (Regular expression and Output macro variable) in the Tool unit definition information section.
-
If, on the same line, the number of lines in the Regular expression cell and in the Output macro variable cell in the Tool unit definition information section is different, the information for the number of lines in the Output macro variable cell is processed.
(6) Definitions causing errors
Note that definitions such as those listed below will cause errors.
(a) When the Section column is specified as Batch or Individual:
-
The upper unit is not defined in the row above in the batch definition.
-
The units are not defined in order from the upper unit to the lower unit in the batch definition.
-
A higher level is specified than the unit specified in the first row of a batch definition.
-
The unit specified for Previous does not exist for unit definition with Individual specified.
-
The specification contains an invalid combination of items.
-
Definition information that must be specified concurrently is incomplete.
-
The maximum unit level has been exceeded.
-
The maximum number of definition units has been reached.
-
An attempt is made to create a job group, planning group, or manager unit, within a jobnet.
-
An attempt is made to create a unit within a job, manager unit, Hostlink jobnet, or start condition unit.
-
Definition information includes information that cannot be specified for a root jobnet.
-
An attempt is made to create more than 32 event jobs within a start condition.
-
An invalid combination of related definitions is specified.
-
An attempt is made to create a recovery attribute unit, or unit other than an event job, within a start condition.
-
A remote jobnet is specified in the upper path of a Hostlink jobnet.
-
When Waiting-target units in the Waiting condition definition information section is not specified, the other definition items in the Waiting condition definition information section are set.
-
An attempt is made to create a flexible job, without specifying Destination / Broadcast Agent in the Flexible job definition information section.
-
An attempt is made to create a flexible job, without specifying Execution file name in the Basic job definition information section.
-
An attempt is made to create a flexible job when either of mdf or exf is specified for End judgment - Rule in the Basic job definition information section and any value is not specified for End judgment - File name.
-
An attempt is made to create an HTTP connection job, without specifying any of the following items in the Http connection job definition information section:
-
Conn. configuration file name
-
Status file name
-
Received header file name
-
-
An attempt is made to create an HTTP connection job when Output header/body to another file is specified or nothing is specified for How to store received data in the Http connection job definition information section, and Received body file name is not specified.
-
An attempt was made to create the flexible job with a value greater than 10,240 byte set to the Environment variables of the Basic job definition information section.
-
An attempt was made to create an R/3 job in which the total number of characters configured in Environment variables of the R/3 job definition information section is greater than 20,479 bytes.
(b) When the Section column is specified as Change:
-
An attempt is made to specify Yes as Retry on abnormal end in the Basic job definition information section for a unit for which a value other than Judgment by threshold is specified as End judgment to mark the unit for change (marking is performed).
-
None of the settings when there is no Waiting-target units, Wait method, or No generations to wait for are marked for change (marking is not performed) for a unit for which a waiting condition is not set.
-
When Waiting-target units in the Waiting condition definition information section is set as :X so that it is deleted, the settings of the other definition items in the Waiting condition definition information section are not changed.
(c) When the Section column is specified as Delete:
-
The units below the unit to delete are defined in the rows below.
(7) Definitions consisting of multiple items
A single definition may consist of multiple items during export. Keep this in mind when defining the following definition items.
(a) When the Section column is specified as Batch or Individual:
-
Unit definition information: Rows and Columns for Position#1
-
Unit definition information: Rows and Columns for Size#1
-
Unit common definition information: Previous#2 and Relation type
-
Schedule definition information: Type#2, Year/Month, and Start day
-
Schedule definition information: Schedule by days from start#2 and Max. shiftable days
- #1
-
These are processed when all items are set.
- #2
-
These are standard definition items for the number of definitions.
The lines on which these items are defined are processed.
(b) When the Section column is specified as Change:
-
When you change one part of the following pairs, the other part is also changed:
-
Unit common definition information: Previous# and Relation type
-
Schedule definition information: Type#, Year/Month, and Start day
-
Schedule definition information: Times and Period for Start condition
- #
-
These are standard definition items for the number of definitions.
The lines on which these items are defined are processed.
-
-
If you specify ri, ro, vri, or vro for Condition in the Judgment job definition information section and the definition items in the Judgment job definition information section are subject to change, the following definition items also become subject to change (even when they are not marked for change).
-
When ri or ro is specified for Condition:
The contents of Return code (Lower limit), Judgment Condition (Lower limit), Return code (Upper limit), and Judgment Condition (Upper limit) also become subject to change.
-
When vri or vro is specified for Condition:
The contents of Variable (number) (Lower limit), Judgment Condition (Lower limit), Variable (number) (Upper limit), and Judgment Condition (Upper limit) also become subject to change.
-
-
When either of mdf or exf is specified for End judgment - Rule in the Basic job definition information section of the flexible job, the contents of End judgment - File name also become subject to change (even when it is not marked for change).
-
When Output header/body to another file is specified or nothing is specified for How to store received data in the Http connection job definition information section, the contents of Received body file name also become subject to change (even when it is not marked for change).