Hitachi

JP1 Version 11 JP1/Advanced Shell Description, User's Guide, Reference, and Operator's Guide 


8.3.2 adshappexec command (GUI application execution command) [only for Windows execution environment]

Syntax

adshappexec [-m] [-d work-folder] [-v name-to-be-displayed]{-w executable-application-name | -n Executable-application-name} [-- argument-1 argument-2...]

Description

This command requests activation of the executable application to the application execution agent. You can activate this command by specifying the executable file name for the PC job definition of JP1/AJS.

This command outputs the return value of the executable application to the standard output and message (detailed results of JP1/AJS). When using this command in a succeeding job as the return value of the job, the command stores the value in the variable with command substitution.

Arguments

-m

This command suppresses the message output to the standard error output.

You can use this command in environments where the standard input/output cannot be used.

This command outputs an argument specification error of the command and license check error even if when the -m option has been specified.

-d work-folder ~ <path name>((1 to 247 bytes))

This command specifies the work folder for execution of the executable application.

When the work folder has not been specified, this command activates the executable application with the current path for execution of the adshappexec command.

If a work folder contains a space, specify the name including the space by enclosing the name with double quotation marks (") when executing the application from the job definition script.

-v name-to-be-displayed ~ <path name>((1 to 247 bytes))

You can specify the display name that will appear when you left-click on the [Application Execution Agent] icon.

If a space is included in the executable application name, specify the name including the space by enclosing the name with double quotation marks (") when you executing the application from the job definition script.

If the name to be displayed is omitted, the executable application name is output.

We recommend specifying this argument to distinguish applications when multiple executable applications are operated.

-w executable-application-name ~ <path name>((1 to 247 bytes))

The application execution agent will not finish until the executable application is finished.

Specifies the file name of the executable application for the executable application name.

If a space is included in the executable application name, specify the name including the space by enclosing the name with double quotation marks (") when executing the application from the job definition script.

-n executable-application-name ~ <path name>((1 to 247 bytes))

The application execution agent finishes without waiting for the executable application to finish.

When you use this argument, the executable application can be started without being affected by the restrictions applied to the number of simultaneous executions.

Specifies the file name of the executable application for the executable application name.

If a space is included in the executable application name, specify the name including the space by enclosing the name with double quotation marks (") when executing the application from the job definition script.

-- argument-1 argument-2... ~ <argument>((1 to 1023 bytes))

Specifies the parameter after -- that is specified when executing the executable application.

Do not specify an argument when specifying an associated executable application.

You can specify any number of arguments as long as the total length of the arguments is within 1,023 bytes.

Return codes

Return code

Meaning

0

Normal termination.

Other than 0

Termination with an error.

There are return codes for 3 processes in the adshappexec command. The return code for each process is handled as follows:

Figure 8‒1: Handling of the return code for each process

[Figure]

The output of the return value at the position where the error has occurred are as follows:

(a) Error when handling the adshappexec command

This command sets the return value of the command. This command outputs the message to the standard error output (detailed results when executed from JP1/AJS - View).

(b) Error when the application execution agent is processing requests from the adshappexec command

This command sets the return value of the command. This command outputs the message to the standard error output (detailed results when executed from JP1/AJS - View) by using the application execution agent.

(c) Return value of the executable application

This command outputs the return value to the standard output. In addition, the return value of the executable application is output to the standard error output (detailed results when executed from JP1/AJS - View).

Even if the executable application returns a return value other than 0, the adshappexec command will not be abnormally terminated.

To confirm the return value of the executable application, confirm the messages of the standard output.

(d) Error when the application execution agent is not processing requests from the adshappexec command

This command sets the return value of the adshappagent command as an error of the application execution agent.

This command outputs a message to the message box or the log of the application-execution agent functionality depending on the location where the error has occurred.

Notes

Examples