Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Command Reference


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

Return values

0

Normal end

Multiple of 4 within the range from 4 to 124

Abnormal end

Additional information

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

[Figure]

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

[Figure]

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

[Figure]

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

[Figure]

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

[Figure]

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

[Figure]

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

[Figure]

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:

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;