jr3bjrel
- Organization of this page
Format 1
jr3bjrel [R/3-destination-information] [R/3-logon-information] [redirection-information] -jn job-name [-jc job-count [-wait [-time monitoring-time [-cancel]] [-ival monitoring-interval] [-jo R/3-job-log-filename] [-mt [-mts message-type-character-string]]] [-with_child]]] [{-tgh target-host|-tgs target-server}] [{-rs|-ri}] [-user SAP-user-name]
- Note
-
If the character string for the argument specification contains a space, enclose the argument with double quotation marks (").
Format 2
jr3bjrel -help
Description
Releases a job created in the R/3 system.
If the -rs and -ri option specifications are omitted, the created job will be released as soon as possible. When the jr3bjrel command ends normally, the job status in the R/3 system changes to the released state. If a job is released just after system resources needed to execute the job are allocated, the job is said to be released as soon as possible.
The following jobs can be released by the jr3bjrel command:
-
Jobs that are created for the R/3 system without using the -rs or -ri option of the jr3bjsub command
-
Jobs registered as scheduled within the R/3 system
Arguments
R/3-destination-information
Specify the R/3 system where the job to be released exists. 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 where the job to be released exists. 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 job-name
Specify the job name of the job to be released. A character string of 1 to 32 bytes can be entered for the job name specification. If there are duplicate job names in the specified R/3 system, enter the job count with the -jc option to specify the job.
Note that the -jn option specification cannot be omitted.
-jc job-count
To differentiate jobs having the same name, specify the job count. If the job count specification is omitted, all the jobs having the same name are released. When using the -wait option for monitoring job completion, be sure to specify the job count.
-wait
This argument performs job monitoring until execution of the released job ends (until job execution ends, commands cannot be executed from the command line). 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, the completion of all jobs, including the child jobs, is monitored during this time.
If the job does not end within the specified monitoring time, a job monitoring timeout 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, 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 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 destination of the R/3 job log output. 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 name of 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 acquisition file name, do not specify a device file, such as /dev/null. If the R/3 job log acquisition file is not needed, delete the file that is created.
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.
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 -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.
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 time out errors).
If the -jo option specification is omitted, the R/3 job log is not 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 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 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.
-tgh target-host
Specify the host name of the application server that executes the registered job. You can specify a target host name with a length from 1 to 32 bytes. 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 later 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 registered job. You can specify a character string of 1 to 20 bytes. When you use an application server, you can specify one of the names (upper-case and lower-case characters are differentiated) that are assigned to the application servers for providing background processing services. These application server names are listed 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 server on which the job will run. You cannot specify the tgs and -tgh options at the same time.
-rs
This argument releases a job as soon as possible after its creation.
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.
The -rs option is the default when the -rs and -ri options are not specified.
-ri
This argument releases a job immediately after its creation.
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.
-user SAP-user-name
This argument cancels only the jobs that are specified by the -jn option and are owned by the specified SAP user. A character string of 1 to 12 bytes can be entered for the SAP user name specification.
Note that the -user option cannot be used together with the -wait option.
-help
This argument provides information on using the command.
Return values
-
When the -wait or -cancel option is not specified
- 0
-
All the specified jobs were successfully released.
- Integer of 1 or more
-
The specified jobs were not successfully released.
-
When the -wait option is specified
- 0
-
The job ended normally.
All the jobs ended normally (when the -with_child option is specified).
- 1
-
The job was canceled.
One or more jobs were canceled or the result of at least one job could not be checked because the number of jobs to be monitored exceeded the maximum limit or the target job was deleted (when the -with_child option is specified).
- 2
-
The job completion monitoring resulted in a timeout error.
- Integer of 3 or more
-
The command ended abnormally (a job release or monitoring operation failed).
-
When the -cancel option is specified
- 0
-
The job ended normally.
All the jobs ended normally (when the -with_child option is specified).
- 1
-
The job was canceled.
One or more jobs were canceled or the result of at least one job could not be checked because the number of jobs to be monitored exceeded the maximum limit or the target job was deleted (when the -with_child option is specified).
- 2
-
All the jobs were successfully canceled when the job completion monitoring resulted in a timeout error.
- 3
-
At least one job was not successfully canceled when the job completion monitoring resulted in a timeout error.
- Integer of 4 or more
-
The command ended abnormally (a job release or monitoring operation failed).
-
When the -mts option is specified
- 0
-
The job ended normally.
All the jobs are finished and the message type specified in the -mts option is not output to the job log.
- 1
-
The job was canceled.
One or more jobs were canceled or the result of at least one job could not be checked because the number of jobs to be monitored exceeded the maximum limit or the target job was deleted.
- 2
-
All the jobs were successfully canceled when the job completion monitoring resulted in a timeout error.
- 3
-
At least one job failed to be canceled when the job completion monitoring resulted in a timeout error.
- 4
-
The job was finished and the message type specified in the -mts option is output to the job log.
- Integer of 5 or more
-
The command ended abnormally (a job release or monitoring operation failed).
Supplement
-
When the -wait option is specified and the -rs or -ri option has been specified, job monitoring will be performed until the execution of a released job ends (until job execution ends, commands cannot be executed from the command line). Specifying the -wait option adds job execution result (ended normally or canceled) information to the command end code.
It should be remembered that jobs can also be released by the jr3bjsub command.
Usage examples
-
Releasing job R3JOB1 of user R3USER1
The conditions are as follows:
-
The sapnwrfc.ini file will be used (-d R3SERV1).
-
R/3 logon information will be specified (-c 001 -u R3USER1 -p2 HT0110).
-
The job count will be specified (-jc 11204501).
-
The job will be released as soon as possible (-rs).
-
The released job will be subject to job completion monitoring at 10-second intervals for a period of 10 minutes (-wait -time 10 -ival 10).
-
The job completion monitoring operation will be canceled in 10 minutes (-cancel).
-
The standard output file and standard error output file will be created in the directory specified by the environment setup file (-so STDOUT1 -se STDERR1).
To release job R3JOB1 of user R3USER1 under the above conditions, make sure that the jr3bjrel command line is specified as follows:
jr3bjrel -d R3SERV1 -c 001 -u R3USER1 -p2 HT0110 -jn R3JOB1 -jc 11204501 -rs -wait -time 10 -ival 10 cancel -so STDOUT1 -se STDERR1
-