Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Operator's Guide


12.3.54 JP1/AJS3 Command Entry dialog box

Use the JP1/AJS3 Command Entry dialog box to register JP1/AJS3 commands that can be executed on the connection-destination manager host.

The following figure shows the JP1/AJS3 Command Entry dialog box:

Figure 12‒89: JP1/AJS3 Command Entry dialog box

[Figure]

The displayed items are described below.

Entry name

Specify an entry name of no more than 50 bytes for the JP1/AJS3 command to be registered or for a JP1/AJS3 command that is already registered. The default value varies depending on the operation. If you are adding a new command, this field is blank by default. If you are changing the settings of a registered command, the previously-set entry name is displayed. If you are copying the settings of a registered command, the entry name of the copy-source command is displayed.

If you select the Add to pop-up menu check box, the entry name specified for this item will be displayed in the shortcut menu.

Add to pop-up menu

Use this check box to select whether to display the JP1/AJS3 command in the shortcut menu. The default setting of this check box varies depending on the operation. If you are adding a new command, by default, this check box is not selected. If you are changing the settings of a registered command, the previously-set setting for this check box is displayed. If you are copying the settings of a registered command, the setting for this check box is inherited from the copy-source settings. If this check box is selected, the entry name will be displayed as a subitem of the JP1/AJS3 Command item in the shortcut menu of each window. When you select an entry name in the shortcut menu, the corresponding JP1/AJS3 command is executed. The following figure shows an example of selecting an entry name in the shortcut menu.

Figure 12‒90: Example of selecting an entry name in the shortcut menu

[Figure]

Command

Specify the name of an executable JP1/AJS3 command. The following table lists the JP1/AJS3 command names that can be specified.

Table 12‒31: Specifiable JP1/AJS3 command names

No.

Command

Description

1

ajslogprint

Extracts and outputs scheduler log data.

2

ajsprint

Outputs unit definition information.

3

ajsshow

Outputs information about a unit, such as the execution history, the current status, and the next execution time.

4

ajsstatus

Outputs information about the operating environment of a scheduler service.

Note that only JP1/AJS3 commands for which the logged-in JP1 user has permission to execute are displayed.

Command argument

Specify the arguments of the command. The value displayed by default differs depending on the operation. If you are adding a new command, this field is blank by default. If you are changing the settings of a registered command, the previously-set arguments are displayed. If you are copying the settings of a registered command, the arguments of the copy-source command are displayed.

When specifying a full unit name for an argument, exclude the scheduler service name from the full unit name.

If you use parameters, make sure that the total length of the command argument string (after the parameters are replaced by their corresponding values) does not exceed 2,047 bytes.

Cautionary notes:
  • You cannot specify an ordinary character string that is the same as a parameter.

  • If the unit name specified for an argument includes any of the following symbols, enclose the entire unit name in double quotation marks ("), and prefix each symbol with a backslash (\):

    Double quotation mark ("), ampersand (&), single quotation mark ('), asterisk (*), left angle bracket (<), right angle bracket (>), question mark (?), left square bracket ([), backslash (\), right square bracket (]), caret (^), left curly bracket ({), vertical bar (|), right curly bracket (}), tilde (~)

    Note that, if you use the symbol *, ?, [, or ] in regular expressions, you do not need to prefix it an escape character.

  • If, for the argument, you specify a value that includes single-byte spaces, make sure to enclose the value in double quotation marks (").

  • If you use a generic name or the -R option to specify target units, too many units are subject to processing. As a result, the increased load on the network or manager during command execution might affect JP1/AJS3 performance.

For examples of specifying arguments, see the description JP1/AJS3 command specification examples below.

The following table lists the arguments that can be specified in commands.

Table 12‒32: Arguments that can be specified in commands

No.

Command

Arguments

Required / Optional

1

ajslogprint#1

-b output-start-day

O

2

-e output-end-day

O

3

-k log-type

O

4

-F service-name

R

5

-u unit-name#2

O

6

-m message-ID

O

7

scheduler-log-file-name

R

8

ajsprint

-F service-name

R

9

-a

O

10

-c year[/month[/day]]

O

11

-d

O

12

-f format-indicator

O

13

-v

O

14

-s {yes|no}

O

15

-t format-indicator

O

16

-J

O

17

-N

O

18

-G

O

19

-R

O

20

-L

O

21

-E

O

22

-T

O

23

job-name or jobnet-name or job-group-name#2

R

24

ajsshow

-F service-name

R

25

-s

O

26

-p

O

27

-l

O

28

-xw

O

29

-xi {b|c}

O

30

-r

O

31

-f "format-indicator"

O

32

-i "two-byte-format-indicator"

O

33

-t "format-indicator"

O

34

-k

O

35

-g {number-of-generations|a}

O

36

-b year/month[/day]

O

37

-e year/month[/day]

O

38

-v year/month[/day]

O

39

-w year/month[/day]

O

40

-B execution-registration-number

O

41

-u user-name

O

42

-c

O

43

-R

O

44

-E

O

45

-T

O

46

-N

O

47

-J

O

48

-d [[year/]month/]day

O

49

-h hours[:minutes]

O

50

-X {yes|no|auto}

O

51

job-name or jobnet-name or job-group-name#2

R

52

ajsstatus

-F service-name

R

Legend:

R: Required

O: Optional

For details about command arguments, see 3. Commands Used for Normal Operations in the manual JP1/Automatic Job Management System 3 Command Reference.

#1

Because the -F option must be specified, you cannot output any log entries that do not include scheduler service names, even if you specify the log type (-k option) or the message ID (-m option).

#2

Specify the full name of the unit excluding the scheduler service name.

Specify a string that meets one of the following conditions:

  • A string that begins with / and does not include the parameter UNIT_FULL_NAME

  • A string that begins with "/ and does not include the parameter UNIT_FULL_NAME

  • A string that begins with the parameter UNIT_FULL_NAME

  • To use a parameter (EXEC_ID) to specify the unit name, use the following format: (UNIT_FULL_NAME): (EXEC_ID)

Replace and Insert button (Command argument)

You can insert a parameter at the cursor position in the Command argument text box by selecting the parameter from the Replace drop-down list box and then clicking the Insert button. When the command is executed, the inserted parameter will be replaced by the corresponding information, such as a scheduler service name.

The following table lists the items that can be selected from the Replace drop-down list box, and the corresponding character strings that are inserted in the Command argument text box when the Insert button is clicked.

Table 12‒33: Items that can be selected from the Replace drop-down list and the corresponding character strings that are inserted when the Insert button is clicked

Item

Character string to be inserted

Description

Service name

(SERVICE_NAME) #1, #2, #3

Scheduler service name of the unit selected in the window

Full unit name

(UNIT_FULL_NAME) #1, #2, #3, #4

Full unit name of the unit selected in the window (excluding the scheduler service name)

User name

(USER_NAME)#3

Name of the JP1 user who executed the JP1/AJS3 command

Exec ID

(EXEC_ID) #2, #3, #5, #6

Execution ID of the unit selected in the window

Year

(YEAR)

Year in the system date for the JP1/AJS3 - View machine that executed the JP1/AJS3 command

Month

(MONTH)

Month in the system date for the JP1/AJS3 - View machine that executed the JP1/AJS3 command

Day

(DAY)

Day in the system date for the JP1/AJS3 - View machine that executed the JP1/AJS3 command

#1

Even if the JP1/AJS3 Command Settings dialog box is opened from a window where no unit is selected in the list area or in map area, if a unit is selected in the tree area, the command assumes that this unit is the target unit.

#2

If the parameter is replaced by a character string that includes control characters such as line breaks and tabs, the KAVV3905-E message is output and the command fails.

#3

To execute this command from the JP1/AJS3 - View window (Summary Monitor window), select a unit whose icon is displayed in the Unit name column of the summary list. If you select a unit whose icon is not displayed, the KAVV2304-E message is output and the command fails.

#4

To execute the ajsprint command for a jobnet that is registered for release, if you select a unit definition whose release status is not Being applied, the KAVV2507-E message is output and the command fails.

#5
  • To execute the command from the JP1/AJS3 - View window (Main window):

    Select the target execution generation in the detailed information area. If the start mode is Normal, you can view the execution generation in the detailed information area by selecting Status Monitor in Function Menu.

    If you execute the command by selecting a unit that has generations under both the status and the result from the list area, the KAVV2301-E message is output and the command fails.

  • To execute the command from the JP1/AJS3 - View window (Summary Monitor window):

    Select the target execution generation in the unit detailed information list. If you execute the command by selecting a unit that has multiple generations from the summary list, the KAVV2301-E message is output and the command fails.

  • To execute the command from the Jobnet Editor window:

    The KAVV263-E message is output and the command fails, because generation information cannot be obtained.

  • To execute the command from a window other than the above:

    Make sure that the target execution generation is selected, and then execute the command.

#6

To use a parameter (EXEC_ID) to specify the unit name, use the following format: (UNIT_FULL_NAME): (EXEC_ID)

The following shows how parameters are replaced with entity names at runtime. In the following example, Δ indicates a single-byte space.

Specified string

ajsshowΔ-FΔ(SERVICE_NAME)Δ(UNIT_NAME)

String after parameters are replaced

ajsshowΔ-FΔAJSROOT1Δ/group/net/job

You might be unable to execute a command that includes parameters, depending on the number of units selected in the source window of the JP1/AJS3 Command Settings dialog box.

The following table shows whether each command can be executed based on the number of units selected in the source window.

Table 12‒34: Whether each command can be executed based on the number of units selected in the source window (for [Command argument])

Parameter

Units selected in the source window

No unit selected

One unit selected

Multiple units selected

(SERVICE_NAME)

N

Y

N

(UNIT_FULL_NAME)

N

Y

N

(USER_NAME)

Y

Y

Y

(EXEC_ID)

N

Y

N

(YEAR)

Y

Y

Y

(MONTH)

Y

Y

Y

(DAY)

Y

Y

Y

Legend:

Y: The command can be executed.

N: The command cannot be executed.

Notes:
  • You cannot specify an ordinary character string that is the same as a parameter.

  • If the full unit name (after parameters are replaced) ends with a backslash (\), the command will not be executed normally.

Output

Specify the name of the file to which JP1/AJS3 command execution results are output. The maximum character string length you can specify is 255 bytes. The default file name changes according to the operation. If you are adding a new command, this field is blank by default. If you are changing the settings of a registered command, the previously set file name is displayed by default. If you are copying the settings of a registered command, the name of the output file for the copy-source command is displayed by default.

You cannot use an asterisk (*), question mark (?), double quotation mark ("), left angle bracket (<), right angle bracket (>), or vertical bar (|).

You can click the ... button to open a dialog box from which to select a file.

You can specify either an absolute path or a relative path. If you specify a relative path, the following folder is used as the base of the relative path.

%ALLUSERSPROFILE%\Hitachi\JP1\JP1_DEFAULT\JP1AJS2V\command\JP1-user-name

The default value for %ALLUSERSPROFILE% is system-drive\ProgramData.

In any one of the following cases, the folder name JP1-user-name is enclosed in parentheses:

  • When an MS-DOS device name (NUL, CON, AUX, CLOCK$, COM1 to COM9, LPT1 to LPT9, or PRN) is specified

  • When a character string that begins with MS-DOS-device-name. is specified

  • When a character string that begins with a period (.) is specified

Cautionary notes:
  • If a communication failure or a text recognition error occurs during command execution, file output might fail. To avoid this failure or error, we recommend that you do not specify the any of the following output files:

    - A file located on a network drive (including a subfolder of the network drive).

    - UNC (that begins with \\).

    - A file whose name is in short file name format (such as C:\PROGRA~1).

  • You cannot specify the following character strings:

    - URI (path beginning with file://)

    - The file name or the folder name is the device name for MS-DOS (NUL, CON, AUX, CLOCK$, COM1 to COM9, LPT1 to LPT9, PRN)

    - The file name or the folder name begins with the following character string (period included): device-name-for-MS-DOS.

    - File name that ends with a backslash (\) or forward slash (/)

    - File or folder name that begins with a period (.)

    - File or folder name that includes a colon (:)

  • You cannot specify an ordinary character string that is the same as a parameter.

  • Even if you specify a path that contains the environment variable (%variable-name%) as the output destination, the path will not be converted to the path specified in the environment variable. For example, suppose that C:\TEMP is set for the environment variable TEMP and you specify %TEMP%\output.txt as the output destination. Then, when the command is executed, output.txt will be output to the following path:

    %ALLUSERSPROFILE%\Hitachi\JP1\JP1_DEFAULT\JP1AJS2V\command\JP1-user-name\%TEMP%\output.txt

    The default value for %ALLUSERSPROFILE% is system-drive\ProgramData.

    To prevent unintentional overwriting of a path, do not specify a path that contains the environment variable (%variable-name%) as the destination for saving command execution results. Note that, if you click the Open File or Open Folder buttons in the JP1/AJS3 Command Execution Result dialog box, the path will be converted to the path specified in the environment variable, and the file or folder will be opened.

  • This note applies when the User Account Control (UAC) feature is enabled. If the command execution results are output from JP1/AJS3 - View that was started by an administrator or by the standard user, the UAC feature might sometimes redirect the output file to a user-specific virtual folder.

    The output file is redirected if a specific path is specified as the output destination. The following table shows the output destination path and the redirect destination.

    Table 12‒35: Output destination path and the redirect destination

    No.

    Output destination path

    Redirect destination

    1

    Path that includes %ProgramFiles%

    %ProgramFiles% is redirected to the following location:

    %LocalAppData%#

    2

    Path that includes %WINDIR%

    %WINDIR% is redirected to the following location:

    %LocalAppData%#\VirtualStore\Windows

    3

    Path that includes %SYSTEMROOT%

    %SYSTEMROOT% is redirected to the following location:

    %LocalAppData%#\VirtualStore\Windows

    4

    Root folder of the system drive

    The output file is redirected to the following location:

    %LocalAppData%#\VirtualStore

    #: The default %LocalAppData% value is system-drive\Users\OS-user-name\AppData\Local.

    If you click the Open File or Open Folder button in the JP1/AJS3 Command Execution Result dialog box, the path specified for the output destination (before it is redirected) opens. For this reason, when specifying where to save command execution result files, do not specify a path that might be redirected. If you specify such a path and the files are redirected, unexpected files or folders might be displayed when you click the Open File or Open Folder button.

Append

If you select the Append check box, new execution results are appended to the existing output file without overwriting the contents of the file.

Replace and Insert button (Output)

You can insert a parameter at the cursor position in the Output text field, by selecting the parameter from the Replace drop-down list, and then clicking the Insert button. If you specify a parameter, it is replaced by the corresponding information, such as a scheduler service name, when the command is executed.

The following table lists the items that can be selected from the Replace drop-down list, and the character strings inserted in the Output text field when the Insert button is clicked.

Table 12‒36: Character string that can be inserted in the Output text field

Item

Character string to be inserted

Description

Service name

(SERVICE_NAME) #1, #2, #3

Scheduler service name of the unit selected in the window

Unit name

(UNIT_NAME) #1, #2, #3

Unit name of the unit selected in the window

Character code

(CHAR_CODE)#3

Character code set for the scheduler service to which the unit selected in the window belongs

User name

(USER_NAME)#3

Name of the JP1 user who executed the JP1/AJS3 command

Exec ID

(EXEC_ID) #2, #3, #4

Execution ID of the unit selected in the window

Year

(YEAR)

JP1/AJS3 - View system year that the JP1/AJS3 command was executed

Month

(MONTH)

JP1/AJS3 - View system month that the JP1/AJS3 command was executed

Day

(DAY)

JP1/AJS3 - View system day that the JP1/AJS3 command was executed

Time

(TIME)

JP1/AJS3 - View system time that the JP1/AJS3 command was executed

#1

Even if the JP1/AJS3 Command Settings dialog box is opened from a window where no unit is selected in the list area or in map area, if a unit is selected in the tree area, the command assumes that this unit is the target unit.

#2

If the parameter is replaced by a character string that includes control characters such as line breaks and tabs, the KAVV3905-E message is output and the command fails.

#3

To execute this command from the JP1/AJS3 - View window (Summary Monitor window), select a unit whose icon is displayed in the Unit name column of the summary list. If you select a unit whose icon is not displayed, the KAVV2304-E message is output and the command fails.

#4
  • To execute the command from the JP1/AJS3 - View window (Main window):

    Select the target execution generation in the detailed information area. If the start mode is Normal, you can view the execution generation in the detailed information area by selecting Status Monitor in Function Menu.

    If you execute the command by selecting a unit that has generations under both the status and the result from the list area, the KAVV2301-E message is output and the command fails.

  • To execute the command from the JP1/AJS3 - View window (Summary Monitor window):

    Select the target execution generation in the unit detailed information list. If you execute the command by selecting a unit that has multiple generations from the summary list, the KAVV2301-E message is output and the command fails.

  • To execute the command from the Jobnet Editor window:

    The KAVV263-E message is output and the command fails, because generation information cannot be obtained.

  • To execute the command from a window other than the above:

    Make sure that the target execution generation is selected, and then execute the command.

The following shows how parameters are replaced with entity names at runtime.

Specified string

C:\TMP\(SERVICE_NAME)_(UNIT_NAME).txt

String after parameters are replaced

C:\TMP\AJSROOT1_NET1.txt

You might be unable to execute a command that includes parameters, depending on the number of units selected in the source window of the JP1/AJS3 Command Settings dialog box.

The following table shows whether each command can be executed based on the number of units selected in the source window.

Table 12‒37: Whether each command can be executed based on the number of units selected in the source window(for [Output])

Parameter

Units selected in the source window

No unit selected

One unit selected

Multiple units selected

(SERVICE_NAME)

N

Y

N

(UNIT_NAME)

N

Y

N

(CHAR_CODE)

N

Y

N

(USER_NAME)

Y

Y

Y

(EXEC_ID)

N

Y

N

(YEAR)

Y

Y

Y

(MONTH)

Y

Y

Y

(DAY)

Y

Y

Y

(TIME)

Y

Y

Y

Legend:

Y: The command can be executed.

N: The command cannot be executed.

JP1/AJS3 command specification examples:
  • The command in the following example extracts log records about jobnet re-execution (C105) of the AJSROOT1 scheduler service from the scheduler log of connection-destination JP1/AJS3 - Manager:

    Command: ajslogprint

    Arguments: -F AJSROOT1 -k C105 "C:\ProgramData\Hitachi\jp1\jp1_default\JP1AJS2\log\schedule\AJSROOT1\ajs-log1.log"

  • The command in the following example outputs the definition information about the unit selected in JP1/AJS3 - View:

    Command: ajsprint

    Arguments: -F (SERVICE_NAME) -a (UNIT_FULL_NAME)

  • The command in the following example outputs the definition information about all units managed by the AJSROOT1 scheduler service:

    Command: ajsprint

    Arguments: -F AJSROOT1 -a /*

  • The command in the following example outputs the same information as that of the unit selected in JP1/AJS3 - View displayed in the Monthly Scheduler window of JP1/AJS3 - View:

    Command: ajsshow

    Arguments: -F (SERVICE_NAME) -i "%Jm,%BB,%OO,%CC,%TT,%cm,%KK,%ii,%qq,%mm,%aa,%ds,%de,%##,%MM,%RC,%RY" -R (UNIT_FULL_NAME)

  • The command in the following example outputs the current operating environment of the AJSROOT1 scheduler service:

    Command: ajsstatus

    Arguments: -F AJSROOT1