Hitachi

JP1 Version 12 JP1/Client Process Automation Configuration and Administration Guide


cpareport

Organization of this page

Function

Sends information to standard output.

Format

cpareport [-c { system [-f {csv|xml}]
| job [-t all] [-b start-date] [-e end-date] [-f {csv|xml}] [-i job-name]
| job -t detail -i job-name [-o job-execution-ID] [-f {csv|xml}]
| job -t output -i job-name [-o job-execution-ID] -p action-name
[-q {stdout|stderr}]
| jds
| item
}]

Permission for execution

None

Arguments

-c system

Exports system operating information in CSV or XML format.

  • CSV format (when -f csv is specified)

    No.

    Row number

    Field name

    Value

    1

    1

    Header

    PRJNAME,STATUS,IESC

    2

    2 and later

    Project name

    PRJNAME

    The value of project name in the system settings file (config.xml)

    3

    Status of the job execution service

    STATUS

    UP (The job execution service is running.)

    DOWN (The job execution service is stopped.)

    4

    Status of the message communication service

    IESC

    UP (The message communication service is running.)

    DOWN (The message communication service is stopped.)

<Example output>
PRJNAME,STATUS,IESC
project,UP,DOWN
  • XML format (when -f xml is specified)

    No.

    Row number

    Element name

    Value

    1

    1

    xml

    The XML element

    2

    2

    PRJNAME

    The same as the value in CSV format

    3

    STATUS

    4

    IESC

<Example output>
<?xml version="1.0" encoding="utf-8"?>
<PRJNAME>project</PRJNAME><STATUS>UP</STATUS><IESC>DOWN</IESC>
-c job

When you execute the command with this option specified, you have to specify the -t option as well.

If you execute this command without the -t option specified, the states of the job execution units run on the day the command is executed are displayed in a list, in the order of priority described in the table below. This list is not displayed when there is no state.

Priority

State

Order of priorities among the job execution units having identical states

1

Wait for start time

--

2

Executing

--

3

Ended normally

Job execution unit with the latest start time (The unit that started last)

4

Ended with warning

Job execution unit with the latest start time (The unit that started last)

5

Ended abnormally, Terminating event monitoring

Job execution unit with the latest start time (The unit that started last)

6

Ended abnormally (Cancel)

Job execution unit with the latest start time (The unit that started last)

7

Monitoring for event

--

Legend:

-- : Not applicable

The following tables describe the output format when you omit the -t option.

  • CSV format (when -f csv is specified)

    No.

    Row number

    Field name

    Value

    1

    1

    Header

    JDSNAME,JCSID,STATUS,STARTTIME,ENDTIME

    2

    2 and later

    Job name

    JDSNAME

    The name of the existing job

    3

    Job execution ID

    JCSID

    nnnnnnnnnnnnnnnn (String consisting of 40 characters or less)

    An identifier assigned when a job execution schedule is generated.

    For details, see 1.3 Job execution unit and job execution ID.

    4

    Job status

    STATUS#

    • RUN (Executing)

    • WAIT (Wait for start time)

    • MONITORING (Monitoring for event, Overflowing events)

    • QUEUEING (Wait for start)

    • ENDN (Ended normally)

    • ENDW (Ended with warning)

    • ENDE (Ended abnormally, Ended abnormally (Cancel), Terminating event monitoring)

    • ENDK (Ended abnormally (Cancel))

    5

    Start time

    STARTTIME

    YYYY/MM/DD HH:MM:SS.sss

    Different values are included depending on the job status as follows:

    • WAIT: The scheduled time for the job to run next time.

    • MONITORING: The time when the system started monitoring whether execution conditions are met.

    • QUEUEING: The time when execution conditions are met and a new event is raised while the job is running.

    • Others: The start time of the job.

    6

    End time

    ENDTIME

    YYYY/MM/DD HH:MM:SS.sss

    Different values are included depending on the job status as follows:

    • ENDN, ENDE, ENDK: The end time of the job.

    • Others: Blank

    #: For details on job status, see 1.1.4 State management for jobs and actions.

  • XML format (when -f xml is specified)

    No.

    Row number

    Element name

    Attribute name

    Value

    1

    1

    xml

    The XML element

    2

    2 and later

    JDS

    NAME

    The same as the value in CSV format

    3

    JCSID

    4

    STATUS#

    5

    STARTTIME

    6

    ENDTIME

    #: For details on job status, see 1.1.4 State management for jobs and actions.

-t all

Lists all execution units of existing jobs with their status.

Execution units of a job are sorted in descending order of the start time or scheduled start time (STARTTIME in output information) of the execution units.

The output format is the same as when you omit the -t option. You can use the -b and -e options to specify a period of time to filter job execution units based on the start time. If you omit the options, the output includes job execution units that started on the date when you run the command. For details, see the description on the -b and -e options.

-i job-name

Displays a list of statuses of the job specified by job-name.

The output format is the same as when the -t all option is specified.

-t detail -i job-name

Lists the status of the specified job and its actions.

When the -o option is not specified, the job state and the action state are displayed for the last job execution ID (JCSID) assigned.

A job name can include multibyte characters, alphanumeric characters, and underscores (_) and the length must be from 1 to 45 bytes.

The following tables describe the output format.

  • CSV format (when -f csv is specified)

    No.

    Row number

    Field name

    Value

    1

    1

    Header

    The same as when you omit the -t option

    2

    2

    Job name

    JDSNAME

    3

    Job execution ID

    JCSID

    4

    Job status

    STATUS

    5

    Start time

    STARTTIME

    6

    End time

    ENDTIME

    7

    3

    Header

    TYPE,ACTNAME,STATUS,STARTTIME,ENDTIME

    8

    4 and later

    Unit type

    • ACT: The unit is an action or event monitor.

    • FLW: The unit is an action flow, which is a group consisting of zero or more actions.

    9

    Action name

    ACTNAME

    The action name in the following format:

    [/action-flow-name]/action-name

    The action names are displayed in a random order.

    10

    Action status

    STATUS#

    • RUN (Executing)

    • WAIT (Wait for start)

    • ENDN (Ended normally)

    • ENDW (Ended with warning)

    • ENDE (Ended abnormally)

    • ENDK (Ended abnormally (Cancel))

    11

    Start time

    STARTTIME

    YYYY/MM/DD HH:MM:SS.sss

    • WAIT: Blank

    • Others: The start time of the action.

    12

    End time

    ENDTIME

    YYYY/MM/DD HH:MM:SS.sss

    • ENDN, ENDE, ENDK: The end time of the action.

    • Others: Blank

    #: For details on action status, see 1.1.4 State management for jobs and actions.

  • XML format (when -f xml is specified)

    No.

    Row number

    Element name

    Attribute name

    Value

    1

    1

    xml

    The XML element

    2

    2

    JDS

    NAME

    The same as the value in CSV format

    3

    JCSID

    4

    STATUS#

    5

    STARTTIME

    6

    ENDTIME

    7

    3 and later

    ACT

    NAME

    8

    TYPE

    9

    STATUS

    10

    STARTTIME

    11

    ENDTIME

    #: For details on action status, see 1.1.4 State management for jobs and actions.

Specifying this option causes the command to return a return code indicating the status of the specified job.

Table 9‒4: List of return codes

Return code

Description

0

Executing

2

Wait for start, Monitoring for event, Terminating event monitoring

3

Ended

-t output

Displays the standard output or standard error output of the action.

-o job-execution-ID

Specify the ID of the job execution unit you want.

Omitting this option causes the system to use the job execution ID of the last execution unit.

A job execution ID can include alphanumeric characters and hyphens (-) and the length must be from 1 to 40 bytes.

-p action-name

Specify the desired action in the job in the following format (which you can see in the output of the command with -t detail):

[/action-flow-name]/action-name

An action name can include multibyte characters, alphanumeric characters, and underscores (_) and the length must be from 1 to 256 bytes including the leading slash (/).

-q {stdout|stderr}

Specify which type of information to be included in the output.

Omitting this option causes the command to display the standard output followed by the standard error output.

Specify stdout to display only the standard output.

Specify stderr to display only the standard error output.

-b start-date -e end-date

Specify dates in YYYYMMDD format to indicate a period for the output list.

Acceptable values are from 19940101 to 20991231.

If you specify the start date and the end date, the output list includes job execution units that started between the start date and the end date.

If you omit the start date, the output list includes job execution units that started before or on the end date.

If you omit the end date, the output list includes job execution units that started on or after the start date.

If you omit the start date and the end date, the output list includes job execution units that started on the date when you run the command.

An argument error occurs when you specify both the start date and end date and the end date is earlier than the start date.

-f csv

Generates output in CSV format.

-f xml

Generates output in XML format.

-c jds

Lists existing jobs with their name and registration date.

-c item

Lists all existing items with their type, name, and registration date.

Return values

0

Succeeded

If -t detail was specified, this indicates that the job is in the Executing state.

2

If -t detail was specified, this indicates that the job is in the Wait for start, Monitoring for event, or Terminating event monitoring state.

3

If -t detail was specified, this indicates that the job is ended and the next execution is not scheduled.

40

Insufficient resources

50

Not allowed to access the system settings file (config.xml).

52

Could not access the file.

58

Syntax error in arguments

86

No record

(Nothing can be listed because no record has been generated for the specified job or job execution ID.)

94

The system settings file (config.xml) is invalid.

109

The system settings file (config.xml) does not exist.

111

File access error

121

A system limit is exceeded.

(The number of opened files reaches the maximum number allowed on the system.)

123

The execution environment is invalid.

(You need to delete the file or reinstall the program, for example, because a directory does not exist or a file is broken.)

124

I/O error (Cannot open the file due to a disk error.)

125

System error (The API of the operating system failed.)

126

Other error

Environment requirements

This command can run regardless of whether the job execution service is running or stopped.

Command stored in:

install-path\bin

Note that the command is stored in the following folder by default.

In a 32-bit operating system:

%ProgramFiles%\Hitachi\JP1CPA\bin

In a 64-bit operating system:

%ProgramFiles(x86)%\Hitachi\JP1CPA\bin