Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 for Enterprise Applications Description, User's Guide and Reference


jr3bjcpy

Organization of this page

Format 1

jr3bjcpy  [R/3-destination-information]
          [R/3-logon-information]
          [redirection-information]
          -jn name-of-the-source-job
          -jc job-count-of-the-source-job
          [-js number-of-the-first-step-to-start-copying-job]
          [-djn new-name-of-the-copied-job]
          [{-tgh target-host|-tgs target-server}]
          [{-rs|-ri}]
          [-wait [-time monitoring-time [-cancel]]
                 [-ival monitoring-interval]
                 [-jo R/3-job-log-filename]
                 [-mt [-mts message-type-character-string]]]
                 [-with_child]]
Note

If the character string for the argument specification contains a space, enclose the argument with double quotation marks (").

Format 2

jr3bjcpy -help

Description

Copies a background job in an R/3 system.

The background jobs that can be copied on the R/3 system are those that can be defined and executed using transaction code SM36.

When the job is successfully copied, the R/3 system assigns a job count to it to identify it. This job count is transferred to the standard output as part of a message.

The user can use the job count and the new name of the copied job specified in the -djn option (the name of the source job if the new name of the copied job is not specified) to view the status of a copied job or to cancel job execution.

Use the jr3bjdel command to delete jobs copied on the R/3 system.

Arguments

R/3-destination-information

Specify the R/3 system in which the job is to be copied. Copied jobs are usually executed with the load distributed among application servers that are capable of executing the jobs. With the -tgh option, however, it is possible to specify the system that will execute the jobs. For details about the format of R/3 destination information, see (1) Common argument format for job control function commands.

R/3-logon-information

Specify logon information that is valid in the R/3 system in which the job is to be copied. Usually, a valid user for job execution is an R/3 user who is specified in the R/3 logon information. With the -auth option in the job step information, however, it is possible to specify a valid R/3 user for job execution.

The language specified for the -l option in the R/3 logon information affects the language for the R/3 job log. It also affects the language for the error details that are returned by the SAP system and inserted into a message, such as KAJM0802-E and KAJM0813-E.

To change the language type of the ABAP program defined as a job step from the default of the R/3 system when you execute the job, use the -lang option in the job step information. For details about the format of R/3 logon information, see (1) Common argument format for job control function commands.

redirection-information

Specify standard output and standard error output files for command execution. For details about the format of redirection information, see (1) Common argument format for job control function commands.

-jn name-of-the-source-job

Specify the job name of the R/3 job to be copied. A character string of 1 to 32 bytes can be entered for the job name specification.

Note that the -jn option specification cannot be omitted.

-jc job-count-of-the-source-job

Specify the job count of the R/3 job name to be copied. A character string of 1 to 8 bytes can be entered for the job count of the source job. If the specified character string is shorter than 8 bytes, it is padded with leading zeros to be 8 bytes and then copied.

Note that the -jc option specification cannot be omitted.

-js number-of-the-first-step-to-start-copying-job

Specify the job count of the R/3 job name from which the copying is started. A character string of 1 to 2 bytes can be entered for the number of the first step to start copying job. If the specified character string is shorter than 2 bytes, it is padded with leading zeros to be 2 bytes and then copied. If 0 or 1 is specified, all job steps are copied.

-djn new-name-of-the-copied-job

Specify the name of the copied R/3 job. A character string of 1 to 32 bytes can be entered for the job name. If the new name of the copied job is omitted, the job is copied with the same name as the source job.

-tgh target-host

Specify the host name of the application server that executes the copied job. As the target host designation, a character string of between 1 and 32 bytes can be entered. From the list of host names displayed by the transaction SM51, you can also select the host name assigned to the application server that offers a background processing service.

If you specify this option, the command will select one of the application servers that are running on the specified host and designate it as the target system.

If you omit this option and the -tgs option, the R/3 system will dynamically select the target system on which the job will run. You cannot specify the tgh and -tgs options at the same time.

Note

This option is the job definition compatible parameter created for Release 4.0 and earlier R/3 systems. To define jobs for Release 4.5 or later R/3 systems, use the -tgs option.

-tgs target-server

Specify the name of the application server or the job server group that executes the copied job. You can specify a character string of 1 to 20 bytes for the target server. When you use an application server, you can specify one of the names that are assigned to the application servers for providing background processing services (upper-case and lower-case characters are differentiated). These application server names are listed as host names by transaction SM51. When you use a job server group, you can specify one of the names (upper-case and lower-case characters are differentiated) of the job server groups containing the application servers that provide background processing services. These job server group names are listed by transaction SM61.

If you omit this option and the -tgh option, the R/3 system will dynamically select the target system on which the job will run. You cannot specify the tgs and -tgh options at the same time.

-rs

This argument releases the job as soon as possible after its copy.

To release a job as soon as possible means that the job will be released when the system resources necessary for executing the job are allocated.

If the necessary resources cannot be allocated because another job is exclusively using the R/3 system resources, release of the job is suspended until the necessary resources are allocated.

-ri

This argument releases the job immediately after its copy.

The job is released immediately after the command is entered, regardless of whether the system resources necessary for executing the job are allocated. Therefore, release of a job fails if another job is exclusively using the R/3 system resources.

-wait

This argument performs job monitoring until the execution of the released job ends (until job execution ends, commands cannot be executed from the command line).

If the job being monitored for its completion is interrupted by the R/3 system, the completion monitoring may not end. In such a case, a KAJM1836-W message appears. Follow the instructions in the message.

The -wait option is valid when the -rs or -ri option is specified.

-time monitoring-time

Specify the duration of job completion monitoring in minutes. Job completion will be monitored for the specified period of time. Make sure that this monitoring time setting is greater than the monitoring interval value that is specified by the -ival option. The specifiable range for monitoring time is from 1 to 65,535. If the -time option specification is omitted, there is no limit on the monitoring time.

When the -with_child option is specified, all jobs, including the child jobs, are monitored for their completion during this time.

If the job does not end within the specified monitoring time, that terminates the command without regard to the job status occurs.

The -time option is valid when the -wait option is specified.

-cancel

This argument cancels a job having the job count specified by the -jc option if it does not end within the time specified by the -time option. Note that this argument works only on an active job (job currently being executed). It does not cancel jobs under the following conditions:

  • The job whose completion is being monitored is not active.

  • An external program job step is being executed while the job whose completion is being monitored is active.

When the -with_child option is specified, all jobs, including the child jobs, are canceled.

If the -cancel option is not specified, the job execution continues as is in the R/3 system.

The -cancel option is valid when the -time option is specified.

-ival monitoring-interval

Specify the interval in seconds at which a job is to be monitored. Job monitoring can be performed at the specified monitoring interval until the job ends (job polling monitoring). The specifiable monitoring interval range is from 1 to 65,535. If a monitoring interval is omitted when the -ival option is specified, the monitoring interval is 5 seconds.

The default monitoring interval setting of 5 seconds can be changed in the environment setup file.

The -ival option is valid when the -wait option is specified.

-jo R/3-job-log-filename

Specify the R/3 job log output destination. The R/3 job log is acquired when job execution ends (when the return value is 0 or 1 and the -wait option is specified). The length of the character string for the R/3 job log filename varies depending on whether Windows or Linux is used.

  • When Windows is used

    A character string of 1 to 259 bytes can be entered for the R/3 job log filename.

  • When Linux is used

    A character string of 1 to 255 bytes can be entered for the R/3 job log filename.

If you do not use the full path to specify the R/3 job log file, the file is created in the work directory of JP1/AJS3 for EAP. (If the JP1/AJS3 for EAP work directory is not defined, the file will be created in the current directory.)

For the R/3 job log file name, do not specify a device file, such as /dev/null. If the R/3 job log file is not needed, delete the file that is created.

The R/3 job log output is in write-date write-time message-code (message class and message number) message-text format.

You can also write the R/3 job log to this file.

  • When the -se option is specified

    You can output R/3 job logs to the standard error output file specified in the -se option.

  • When you do not specify the -se option, but specify a standard error output file name in the Define Details - [Custom Job] dialog box of JP1/AJS - View

    You can view the content of the R/3 job log in the Execution Result Details dialog box in the Jobnet Monitor window of JP1/AJS - View.

If you specify YES for the JoblogAddToStderr key of the Command section of the environment settings file, you can output the R/3 job log to the specified file and to the standard error output at the same time. Therefore, when the -se option is not specified, you can use JP1/AJS - View to view the contents of the R/3 job log as described above.

When the -with_child option is specified, the log of all jobs that are finished or terminated is acquired when the completion monitoring of all jobs, including the child jobs, ends (includes timeout errors).

If the -jo option specification is omitted, the R/3 job log will not be output to the JP1/AJS3 for EAP system.

-mt

Specify this option if the message type is output to the R/3 job log.

If the -jo option is not specified, this option cannot be specified.

-mts message-type-character-string

Specify this option if the message type in the R/3 job log is searched.

A character string of 1 to 8 bytes can be entered for the message type character string. The characters that can be specified and their meaning are shown below. If you specify more than one character, enter a character followed by the other characters.

A: Abnormal termination
E: Error
S: Successful end
I: Information
W: Warning

You must specify it if you search the message types. If the -mt option is not specified, this option cannot be specified. The command terminates abnormally with the return value 4 if the message type of the output job log contains the character string specified in the message-type-character-string.

-with_child

This argument monitors the completion of all jobs, including the child jobs, that are generated during the execution of the target job (completion monitoring of parent and child jobs). The target child jobs are those that are detected when the job being monitored for its completion is finished or terminated. A maximum of 100 jobs can be monitored for their completion regardless of the generation numbers of the child jobs.

If the number of jobs to be monitored for their completion exceeds the maximum limit, a KAJM1872-W message appears. The completion monitoring then continues for the jobs that can be monitored for their completion and the system returns 1, indicating that the result of at least one job cannot be checked.

If a job being monitored for its completion is deleted, a KAJM1837-W message or a KAJM1871-W message appears. The completion monitoring then continues for other target jobs and the system returns 1, indicating that the result of at least one job cannot be checked.

If the system detects a child job that is not released, the completion monitoring may not end. In such a case, a KAJM1838-W message appears. Follow the instructions in the message.

The -with_child option is valid when the -wait option is specified.

Note

To specify the -with_child option, JP1/AJS2 for EAP 07-50 or later must be installed on the execution destination host, and the XBP 2.0 interface and the parent and child function must be enabled in the connection destination R/3 system.

-help

This argument provides information on using the command.

Return values

Precautions

If one of the following conditions is satisfied, the job execution target option (-tgh or -tgs) specified in the jr3bjcpy command will be ineffective:

In this event, no target host is assigned to the job copied on the R/3 system.

To execute the job on a particular target host or server, release the job by specifying the target host or server using the -tgh or -tgs option in the jr3bjrel command. If you use the jr3bjrel command to release the job without specifying a target host or server, the R/3 system will dynamically select the target host or server on which the job will be executed.

Supplement

Usage examples