Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


4.13.40 Sorting character strings

Function

This plug-in sorts the specified character string and then outputs the sorting results to the output property.

The target character string is specified by the common.targetString property, and the elements in that character string are delimited by the separator specified by the common.delimiterChar property. The sorting results are output to the common.resultString property.

The elements are sorted in order of their character codes, and sorting is not case sensitive.

If a separator is not followed by another character (if no character exists between separators or if the target character string ends with a separator), sorting assumes that the separator is followed by a NULL string. When the separator is followed by a space character, the space character is treated as the character string. The following is an example of sorting a string where commas (,) are used as separators:

Before sorting: bb,,,cc, ,aa,

After sorting: ,,, ,aa,bb,cc

If the common.sortDescending property is set to "true", the elements are sorted in descending order. In other cases, the elements are sorted in ascending order.

For the common.delimiterChar property, specify a single ASCII alphanumeric character or symbol as the separator. To use a tab character as the separator, specify "TAB".

Use situation

This plug-in can be used to sort the property values output by another plug-in.

Prerequisites

For the most recent information about the prerequisite products in the system, the prerequisite products on the execution-target server, and the supported OSs on the execution-target server, see the Release Notes.

[Prerequisite products in the system]

JP1/Automatic Operation 11-00 or later

[Prerequisite products on the execution-target server]

None.

[Supported OSs on the execution-target server]

(1) Windows Server 2008 R2 Standard/Enterprise/Datacenter

(2) Windows Server 2012 Standard/Datacenter or Windows Server 2012 R2 Standard/Datacenter

(3) Windows Server 2016 Standard/Datacenter

(4) Windows Server 2019 Standard/Datacenter

(5) Red Hat Enterprise Linux Server 6 (32-bit x86) or Red Hat Enterprise Linux Server 6 (64-bit x86_64)

(6) Red Hat Enterprise Linux Server 7 (64-bit x86_64)

(7) Red Hat Enterprise Linux Server 8 (64-bit x86_64)

(8) CentOS 6 (64-bit x86_64)

(9) CentOS 7 (64-bit x86_64)

(10) CentOS 8 (64-bit x86_64)

(11) Oracle Linux 8 (64-bit x86_64)

[Conditions for using the execution-target server]

None.

Cautions

(1) For the properties of this plug-in, do not specify any strings that include double quotation marks (") or single quotation marks (').

Version

02.00.00

Plug-in tags

Control OS,Windows,Linux

Plug-in name displayed in the task log

osSortString

Return code

0: Normal

12: Error (Mistake by user) Invalid property

27: Error (Check with the task log about the error detail) Unidentified error

41: Error (An error has been detected in the plug-in) Property not entered (An error has been detected in the component script)

Property list

The following table lists the properties:

Property key

Property name

Description

Default value

I/O type

Required

plugin.destinationHost

Host name of the execution target server

Specify the host name or IP address of the server on which this plugin will be executed. IPv6 addresses are not supported.

--

Input

R

common.targetString

Target character strings

Specify the character strings that you want to sort by separating them with a one-byte ASCII character. (Example: aaa bbb ccc) We recommend that you specify a string of 1024 characters or less. If you specify a character string that exceeds the recommended value, part of the specified character string may be deleted depending on the OS of the execution target server.

--

Input

R

common.delimiterChar

Separator Character

Specify a character to be used as the delimiter for character strings by using single-byte alphanumeric characters. If not specified, a single-byte space will be used as the delimiter. To use a tab character as the delimiter, enter "TAB".

--

Input

O

common.sortDescending

Sorting in descending order

To sort in descending order, specify "true". If "true" is not specified, sorts will be performed in ascending order.

false

Input

O

common.returnValue

Return value for the plugin

The return value of this plugin stored.

--

Output

--

common.sortedString

Character strings after sorting

The results of the sorted character strings will be saved. The delimiter is specified in the common.delimiterChar property.

--

Output

--