ajscalutil
- Organization of this page
Format
ajscalutil [-F scheduler-service-name] -b year/month[/day] -e year/month[/day] [-o|-a|-x|-v| -s {db|da|be|af},shifted-open-days[,maximum-shiftable-open-days] | -t {be|af}[,maximum-shiftable-closed-days] ] [-cg job-group-name | -cf calendar-information-file-name] [-Xg job-group-name | -Xf calendar-information-file-name] {-g job-group-name | -f calendar-information-file-name}...
Format1 (merging open days with OR condition)
ajscalutil [-F scheduler-service-name] -b year/month[/day] -e year/month[/day] [-o] {-g job-group-name | -f calendar-information-file-name}...
Format2 (merging open days with AND condition)
ajscalutil [-F scheduler-service-name] -b year/month[/day] -e year/month[/day] -a {-g job-group-name | -f calendar-information-file-name}...
Format3 (excluding open days)
ajscalutil [-F scheduler-service-name] -b year/month[/day] -e year/month[/day] -x {-g job-group-name | -f calendar-information-file-name}... {-Xg job-group-name | -Xf calendar-information-file-name}
Format4 (reversing open days and closed days)
ajscalutil [-F scheduler-service-name] -b year/month[/day] -e year/month[/day] -v {-g job-group-name | -f calendar-information-file-name}...
Format5 (shifting open days)
ajscalutil [-F scheduler-service-name] -b year/month[/day] -e year/month[/day] -s {db|da|be|af},shifted-open-days[,maximum-shiftable-open-days] | [-cg job-group-name | -cf calendar-information-file-name] {-g job-group-name | -f calendar-information-file-name}...
Format6 (substituting the schedule for closed days)
ajscalutil [-F scheduler-service-name] -b year/month[/day] -e year/month[/day] -t {be|af}[,maximum-shiftable-closed-days] [-cg job-group-name | -cf calendar-information-file-name] {-g job-group-name | -f calendar-information-file-name}...
Format7 (extracting a period of calendar information)
ajscalutil [-F scheduler-service-name] -b year/month[/day] -e year/month[/day] {-g job-group-name | -f calendar-information-file-name}...
Description
The ajscalutil command calculates multiple sets of calendar information (this is called calendar calculation), and then outputs the results to the standard output file in the format of the calendar information file. You can define combined sets of calendar information for a job group by specifying the output results in the -df option of the ajscalendar command. For details on the ajscalendar command, see ajscalendar in 3. Commands Used for Normal Operations. You can also combine the results of multiple calendar calculations by specifying the output results in the -cf, -Xf, and -f options of the ajscalutil command.
Note that the output information indicates the unit definition parameters for open days and closed days. For details about the format of unit definition parameters that can be specified for the ajscalutil command, see the Notes.
Execution privileges
- If a job group name is specified:
-
This command can be executed by a user at the following JP1 permission level:
-
JP1_AJS_Admin
-
JP1_AJS_Manager
-
JP1_AJS_Editor
-
JP1_AJS_Operator
-
JP1_AJS_Guest
-
- If a job group name is not specified:
-
None
Arguments
-F scheduler-service-name
Specify the name of the target scheduler service.
You can specify a character string of 1 to 30 bytes.
-b year/month[/day]
Specify the start date of the period for which calendar information is output. You cannot omit this option.
-
year
You can specify a value between 1994 and 2036 for the year.
-
month
You can specify a value between 1 (or 01) and 12.
-
day
You can specify a value between 1 (or 01) and 31. If you omit this option, the system assumes 1.
-e year/month[/day]
Specify the end date of the period for which calendar information is output. You cannot omit this option.
-
year
You can specify a value between 1994 and 2036 for the year.
-
month
You can specify a value between 1 (or 01) and 12.
-
day
You can specify a value between 1 (or 01) and 31. If you omit this option, the system assumes the last date of the year and month specified for year and month.
-o
Merges the open days in the calendar information specified by the -g and -f options by using the OR condition.
If you specify this option, you can specify a maximum of eight sets of -g and-f options.
You cannot specify this option with the -a, -x, -v, -s, -t, -cg, -cf, -Xg, or -Xf option.
If none of the -o, -a, -x, -v, -s, and -t options is specified, the ajscalutil command assumes the -o option.
-a
Merges the open days in the calendar information specified by the -g and -f options by using the AND condition.
If you specify this option, you can specify a maximum of eight sets of -g and-f options.
You cannot specify this option with the -o, -x, -v, -s, -t, -cg, -cf, -Xg, or -Xf option.
-x
Applies the open days in the calendar information specified by the -Xg and -Xf options as closed days to the calendar information specified by the -g or -f option.
If you specify this option, you can specify either the -g or -f option only once.
You cannot specify this option with the -o, -a, -v, -s, -t, -cg or -cf option.
-v
Reverses the open days and closed days in the calendar information specified by the -g or -f option.
If you specify this option, you can specify either the -g or -f option only once.
You cannot specify this option with the -o, -a, -x, -s, -t, -cg, -cf, -Xg, or -Xf option.
-s {db|da|be|af},shifted-open-days[,maximum-shiftable-open-days]
Specify open day shifting conditions.
Open days (shift target) in the calendar information specified by the -g and -f options are shifted forward or backward according to the specified conditions.
-
db
Open days are shifted forward by the specified number of shifted open days.
-
da
Open days are shifted backward by the specified number of shifted open days.
-
be
Open days are shifted forward by the number of shifted open days in the calendar information specified by the cg and -cf options.
-
af
Open days are shifted backward by the number of shifted open days in the calendar information specified by the cg and -cf options.
-
shifted-open-days
Specify the number of days to be shifted. You can specify a value between 1 (or 01) and 31.
-
maximum-shiftable-open-days
Specify the period as the number of days by which to shift the date. You can specify a value between 1 (or 01) and 31. If you omit this option, the system assumes 31.
If be or af is specified and an open day after the shift falls outside the period specified by maximum-shiftable-open-days, the shift-target open day will be a closed day. The concept of shifting is the same as schedule by days from start in the schedule rules. For details, see 3.3.2(1)(g) Schedule by days from start in the manual JP1/Automatic Job Management System 3 Overview. Note that the value specified for shifted-open-days must be equal to or smaller than the value of maximum-shiftable-open-days.
If you specify db or da, the -cg and -cf options and maximum-shiftable-open-days are ignored if they are specified.
If you specify be or af, you need to specify the -cg or -cf option.
If you specify this option, you can specify either the -g option or the -f option only once.
You cannot specify this option with the -o, -a, -x, -v, -t, -Xg or -Xf option.
-t {be|af}[,maximum-shiftable-closed-days]
Specify the conditions for the substitute schedule for closed days.
As the target of the substitute schedule, open days in the calendar information specified by the -g and -f options are compared with closed days in the calendar information specified by the-cg and -cf options. If an open day falls on a closed day in the comparison-target calendar, the nearest open day before or after that closed day is used as the substitute date.
-
be
The closed day is shifted to the nearest open day before the closed day.
-
af
The closed day is shifted to the nearest open day after the closed day.
-
maximum-shiftable-closed-days
Specify the period (number of days) within which a substitute date can be determined. You can specify a value between 1 (or 01) and 31. If you omit this option, the system assumes 31.
If the substitute open day falls outside the period specified by maximum-shiftable-closed-days, that open day will be a closed day. For details about the concept of substitute schedule for closed days, see 3.3.2(1)(c) Substitute schedule of closed day job in the manual JP1/Automatic Job Management System 3 Overview.
If you specify this option, you need to specify the -cg or -cf option.
If you specify this option, you can specify either the -g option or the -f option only once.
You cannot specify this option with the -o, -a, -x, -v, -s, -Xg or -Xf option.
-cg job-group-name
Specify the name of the job group for which comparison-target calendar information is defined for shifting open days or a substitute schedule for closed days.
You can specify a character string of 1 to 930 bytes.
You must specify this option with the -s and -t option.
You cannot specify a scheduler service name, logical host name, execution ID, or wildcard characters for a job group name.
-cf calendar-information-file-name
Specify the calendar information file that defines comparison-target calendar information for shifting open days or a substitute schedule for closed days. By specifying the calendar information file output by the ajscalutil command, you can combine multiple calculation results.
You can specify a character string of 1 to 255 bytes.
If you specify stdin as the file name, calendar information will be input from the standard input.
You must specify this option with the -s and -t option.
-Xg job-group-name
Specify the name of the job group for which calendar information used for excluding open days is defined.
You can specify a character string of 1 to 930 bytes.
You must specify this option with the -x option.
You cannot specify a scheduler service name, logical host name, execution ID, or wildcard characters for a job group name.
-Xf calendar-information-file-name
Specify the calendar information file that defines calendar information used for excluding open days. By specifying the calendar information file output by the ajscalutil command, you can combine multiple calculation results.
You can specify a character string of 1 to 255 bytes.
If you specify stdin as the calendar information file name, the system inputs calendar information from the standard input.
You must specify this option with the -x option.
-g job-group-name
Specify the name of the job group for which calendar information used as the base for calendar calculation is defined.
You can specify a character string of 1 to 930 bytes.
If you specify the -o or -a option, you can specify a maximum of eight sets of -g and-f options.
You cannot specify a scheduler service name, logical host name, execution ID, or wildcard characters for a job group name.
-f calendar-information-file-name
Specify the calendar information file that defines calendar information used as the base for calendar calculations. By specifying the calendar information file output by the ajscalutil command, you can combine multiple calculation results.
You can specify a character string of 1 to 255 bytes.
If you specify stdin as the file name, calendar information will be input from the standard input.
If you specify the -o or -a option, you can specify a maximum of eight sets of -g and-f options.
Notes
-
If you specify the -s or -t option, calendar calculations use calendar information for the number of days specified in shifted-open-days, maximum-shiftable-open-days, and maximum-shiftable-closed-days, before and after the period specified by the -b and -e options. When you specify the -s or -t option, specify a sufficient period for the base calendar information used for calendar calculations.
Because maximum-shiftable-closed-days is set to 31 in this figure, the months before and after May (output period) are also subject to calendar calculations, in addition to May.
Therefore, if you want to execute this command divided into several operations, specify the period based on the consideration of shifting and substitute schedule for closed days. Then, if necessary, extract calendar information for the period to be used.
-
For the -cf, -Xf, and -f options, you can specify stdin as the calendar information file name only once in a single execution of the command.
-
If you specify the same date for unit definition parameters that can be specified in the calendar information file that is specified for the -cf, -Xf, or -f option, the definition specified last takes effect.
-
You can specify unit definition parameters in the calendar information file specified for the -cf, -Xf, and -f options. At this time, specify the parameter indicating a specific open day (op=yyyy/mm/dd;) or the parameter indicating a specific closed day (cl=yyyy/mm/dd;).
- yyyy: You can specify a value between 1994 and 2036 for the year.
- mm: You can specify a value between 1 (or 01) and 12 for the month.
- dd: You can specify a value between 1 (or 01) and 31 for the day of the month.
-
Specify no more than one unit definition parameter per line. If the calendar information file includes invalid characters such as halfwidth spaces or tab characters, or a unit definition parameter is specified in an invalid format, the ajscalutil command will ignore the applicable line as an invalid unit definition parameter, output the KAVS0603-E message, and continue processing.
-
Separate each line of the calendar information file by using a line break.
Example
op=2016/05/01;<line break> cl=2016/05/02;<line break> : cl=2016/05/30;<line break> op=2016/05/31;<line break>
Excluding the last line, if the calendar information file includes other lines that consist of only a line break, the system will ignore that line as an invalid unit definition parameter, output the KAVS0603-E message, and continue processing.
When the KAVS0603-E message is output for a line that contains only a line break, the message will not include a character string for option-character-string.
-
If the calendar information file specified by using the -cf, -Xf, or -f option includes an invalid unit definition parameter, the system will ignore the applicable line as an invalid unit definition parameter, output the KAVS0602-E or KAVS0603-E message, and continue processing. If a file specified for the -cf, -Xf, or -f option is a file that does not contain calendar information, such as a 0-byte file or a file without a valid unit definition parameter, the command terminates abnormally without calculating calendar information.
-
If a job group name is specified, either of the following users can output calendar information.
-
A user who have reference privileges for all job groups that are to be included in calendar information calculations. If the job group has higher job groups, the user must have the reference privilege for all of the groups.
-
A JP1 user mapped to the OS user who has Administrators or superuser privileges.
Note, however, that If yes is set after changing the ADMACLIMIT environment setting parameter from its default, even a JP1 user who was mapped to an OS user who has Administrators or superuser privileges must have the reference privilege and the update privilege.
-
Return values
0 |
Normal end |
Multiple of 4 within the range from 4 to 124 |
Abnormal end |
Additional information
-
If you specify the -cg, -Xg, or -g option, the command merges calendar information for the specified job group and calendar information for all higher-level job groups, and then performs a calendar calculation. As a result of the merge, dates that are not defined as open days or closed days are handled as open days.
-
In the calendar information file specified for the -cf, -Xf, or -f option, dates that are not specified as open days or closed days are handled as open days.
Example 1
The following command combines the calendar information for multiple job groups (/CAL/ApplicationA and /CAL/ApplicationB) with the OR condition, and then outputs the results to the standard output file:
ajscalutil -b 2016/4 -e 2017/3 -o -g /CAL/ApplicationA -g /CAL/ApplicationB
Example 2
The following command combines the calendar information for multiple job groups (/CAL/ApplicationC and /CAL/ApplicationD) with the AND condition, and then outputs the results to the standard output file:
ajscalutil -b 2016/4 -e 2017/3 -a -g /CAL/ApplicationC -g /CAL/ApplicationD
Example 3
The following command applies the open days for job group /CAL/ApplicationE to the calendar information for job group /CAL/ApplicationC as closed days, and then outputs the result to the standard output file:
ajscalutil -b 2016/5 -e 2016/5 -x -g /CAL/ApplicationC -Xg /CAL/ApplicationE
Example 4
The following command reverses the open days and closed days for job group /CAL/ApplicationA, and then outputs the result to the standard output file:
ajscalutil -b 2016/5 -e 2016/5 -v -g /CAL/ApplicationA
Example 5
The following command shifts the calendar information for /CAL/ApplicationA back by one day, and then outputs the result to the standard output file:
ajscalutil -b 2016/5 -e 2016/5 -s db,1 -g /CAL/ApplicationA
Example 6
The command below compares the calendar information for job group/CAL/ApplicationF with that for job group /CAL/ApplicationG. The command then shifts the calendar information for /CAL/ApplicationF forward by two open days in the calendar information for /CAL/ApplicationG, and then outputs the result to the standard output file.
ajscalutil -b 2016/5 -e 2016/5 -s af,2 -cg /CAL/ApplicationG -g /CAL/ApplicationF
Example 7
The command below compares the calendar information for job group/CAL/ApplicationH with that for job group /CAL/ApplicationG. Then, the command shifts the execution days to the next open days, and then outputs the result to the standard output file.
ajscalutil -b 2016/5 -e 2016/5 -t af -cg /CAL/ApplicationH -g /CAL/ApplicationG
Example 8
The example below combines, with the OR condition, calendar information for two business days after the cutoff date with the calendar information that defines system open days, and then outputs the result to the standard output file. This example assumes that calendar information is defined for the following job groups:
-
Job group /CAL/BusinessDays that defines business days
-
Job group /CAL/CutoffDates that defines cutoff dates
-
Job group /CAL/SystemOpenDays that defines system open days
In this case, the command compares calendar information for job group /CAL/CutoffDates with calendar information for job group /CAL/BusinessDays, and then shifts the information for /CAL/CutoffDates back by two open days. Then, the command outputs the result to calendar information file C:\temp\cal.txt.
Next, the command combines calendar information in calendar information file C:\temp\cal.txt with calendar information for job group /CAL/SystemOpenDays with the OR condition, and then outputs the result to the standard output file.
ajscalutil -b 2016/5 -e 2016/5 -s af,2 -cg /CAL/BusinessDays -g /CAL/CutoffDates > C:\temp\cal.txt ajscalutil -b 2016/5 -e 2016/5 -o -g /CAL/SystemOpenDays -f "C:\temp\cal.txt"
Output example
cl=2016/05/01; op=2016/05/02; cl=2016/05/03; : cl=2016/05/29; op=2016/05/30; op=2016/05/31;