Top
Systemwalker Runbook Automation Reference Guide
Systemwalker

3.4.20 Print file

Description

This operation component prints text files.

Options

Basic Options

(1) hostname

This is the host name or IP address of the server where the file exists.

To print a file on the Management Server, specify the following:

  • For IPv4: 'localhost' or '127.0.0.1'

  • For IPv6: 'localhost' or '::1'

An argument error occurs if the host name or IP address is omitted.

The maximum length of the host name or IP address is 1,024 characters. An argument error occurs if this is exceeded.

(2) filename

This is the name (absolute path) of the file to be printed.

An argument error occurs if the file name is omitted.

The maximum length of the file name is 1,024 characters. An argument error occurs if this is exceeded.

(3) printer

If the Management Server is running on Linux, this is the name of the printer that will print the file.

If the Management Server is running on Windows, this is the name of the device that will print the file.

  • If the device name is omitted, the file will be printed using the default device (LPT1).

  • If the device is a local printer, specify the port (example: "LPT3").

  • If the device is a shared printer on the network, set the device name to \\PrintServer\Sharename.
    (Example: If a printer with the name "printer" and host "192.0.2.0" is shared on the network, set the device name to "\\192.0.2.0\printer".)

An argument error occurs if the printer name or device name is omitted.

The maximum length of the printer name or device name for a printer is 1,024 characters. An argument error occurs if this is exceeded.

The file is printed using the print settings in the properties of the specified printer or device. If print settings in the properties are changed, this will affect printing.

Advanced Options

(1) ostype

This is the operating system of the host where the file to be printed is located.

Specify Windows, Linux or Solaris. This option is not case sensitive.

If the OS type is omitted, the Configuration Management Database (CMDB) will be searched based on the specified host name or IP address, and Systemwalker Runbook Automation automatically sets the acquired OS type as the value.

The maximum length of the OS type is 1,024 characters. An argument error occurs if this is exceeded.

(2) username

This is the name of the user using SSH to connect to the host where the file to be printed is located.

If the connected user name and password required for connection are not specified, the Configuration Management Database (CMDB) is searched based on the specified host name or IP address and Systemwalker Runbook Automation automatically sets the acquired connected user name as the value.

If the operation component connects with the file transfer infrastructure, the connected user name will be fixed at either of the following names and cannot be changed. In this case, the user name is ignored even if specified.

  • If the Business Server is running on Windows: SYSTEM user

  • If the Business Server is running on Linux or Solaris: root

The maximum length of the connected user name is 1,024 characters. An argument error occurs if this is exceeded.

(3) password

This is the password of the user using SSH to connect to the host where the file to be printed is located.

If the connected user name and password required for connection are not specified, the Configuration Management Database (CMDB) is searched based on the specified host name or IP address and Systemwalker Runbook Automation automatically sets the acquired connected user password as the value.

If it connects with the file transfer infrastructure, the connected user password is invalid.

The maximum length of the connected user password is 1,024 characters. An argument error occurs if this is exceeded.

(4) timeout

This is the completion timeout (seconds) for the execution of operation components.

Values between 300 and 86400 (1 day) can be specified.

Example) If the completion timeout is 10 minutes: 600

If the operation component has not finished executing even though the specified time has passed, the processing for the operation component will be interrupted with return value 201.

(5) retry

This is the retry count for the execution of operation components.

Specify the number of retry attempts to be used when operation components terminate with return value 161. Values between 0 and 5 can be specified.

If an operation component terminates with a return value other than "161" as a result of being re-executed from a retry, execution of the operation component will terminate even if the specified number of retries has not been reached. The return value for the operation component will be the value from the last time the operation component was executed.

Example) To retry the operation component twice: 2

(6) retry_interval

This is the retry interval (seconds) for operation components.

Specify the time to wait before a retry is attempted if operation components terminate with return value 161. Values between 1 and 14400 can be specified.

Example) To retry at 300 second intervals: 300


If the specification of the timeout, retry and retry_interval is omitted, and a value beyond the limits of the above-mentioned is input, the value specified with the operation components definition file becomes effective. Refer to "2.5 Definition File for Operation Components" for details.

Return Values

Icon

Name

Return value

Description

Success

0

The file has been printed successfully.

Failure

161

An attempt to print the file failed. If a retry count has been specified, retries will be attempted.

177

An attempt to access the file failed.

187

Authentication failed when an attempt was made to connect to the Business Server over the network (using SSH).

Alternatively, an error occurred during the processing of communications with the Business Server (file transfer infrastructure). In this case, the error code for the file transfer infrastructure is output to the execution results. Refer to "3.21 Detailed Code of File Transfer Infrastructure" for information on error codes.

188

When an operation component was performing an operation on a Business Server where an RBA Agent has not been installed, an SSH network connection with the Business Server was closed.

189

An attempt to connect to the Business Server over the network (using SSH) failed.

Alternatively, an error occurred during the processing of communications with the Business Server (file transfer infrastructure). In this case, the error code for the file transfer infrastructure is output to the execution results. Refer to "3.21 Detailed Code of File Transfer Infrastructure" for information on error codes.

197

There is an error with the input information.

198

There is an error with an option specification.

200

Printing the file terminated abnormally.

-

-

201

Execution of the operation component timed out.

202

The operation component has not been executed. There is a problem with the settings for executing the operation component.

203

The operation component has not been executed normally. There is a problem with the Management Server environment.

205

The operation component has not been executed. There is a problem with the input information specification of the operation component.

206

The operation component has not been executed normally. There is a problem with the output information specification of the operation component.

207

The operation component has not been executed. The operation component may not have been registered on the Management Server.

208

The Automated Operation Process has been canceled because the Automated Operation Process was recovered while the operation component was executing.

Output information

Variable

Description

Message

This variable will be set to the following message if the file is printed successfully.

The operation component was successful.

If printing the file fails, the content of the error will be output as a string.

returnCode

This variable is set to the return value.

Notes