Hitachi

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


jr3bjsub

Organization of this page

Format 1

jr3bjsub  [R/3-destination-information]
          [R/3-logon-information]
          [redirection-information]
          -jn job-name
         [-class job-class]
          job-step-information...
          [{-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

jr3bjsub -help

Description

Creates a background job in an R/3 system.

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

When the job is successfully created, 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 job name specified at creation to viewing the status of a created job or to cancel job execution.

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

Arguments

R/3-destination-information

Specify the R/3 system in which the job is to be created. Created 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 created. 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 job-name

Specify the job name of the R/3 job to be created. 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.

-class job-class

Specify the job class (priority level of job execution) of the R/3 job to be created. The characters that can be specified and their meaning are shown below.

A: High

B: Middle

C: Low

Normally, specify C. To execute a job with priority, specify B. To execute a job immediately in an emergency, specify A. The default is C.

Note

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

job-step-information...

Specify a program (ABAP program or external program) as a job step in the job. If you specify two or more sets of job step information, you can assign two or more job steps to a job. Up to 99 sets of job step information can be specified. The job steps assigned to a job are executed in the order of assignment.

When setting up a job step, specify the -pa option (or -px option) and the options that follow (such as -auth) as a group. For an example of setting the job step, see the usage example.

The job step information format varies with the type of program specified as a job step. The job step information format of each program type is described below.

Job step information format (ABAP program)

-pa ABAP-program [-var variant]
                       [-auth authorized-user]
                       [-lang language]
                       [-armode archive-mode]
                       [-out output-device]
                       [-ln lines] [-col columns]
                       [-fmt format]
                       [-cc number-of-copies]
                       [-shwpwd authority]
                       [-ip][-dp]
                       [-rpd spool-retention-period]
                       [-title spool-request-title]
                       [-sapcvr SAP-cover]
                       [-selcvr]
                       [-receiver recipient]
                       [-dpt department]
                       [-objtyp object-type]
                       [-doctyp document-type]
                       [-info information-ID]
                       [-text information-text]
                       [temporary-variant-information]
-pa ABAP-program

Specify the name of the ABAP report program (ABAP program) to be added as a job step. A character string of 1 to 40 bytes can be entered in the ABAP program. Make sure that the ABAP program to be specified is preregistered in the R/3 system.

-var variant

When there is a variant for the ABAP program, specify its name. A character string of 1 to 14 bytes can be entered for the variant name specification. Variants that can be specified with the -var option are limited to those that have been registered in the R/3 system.

-auth authorized-user

Specify the name of the authorized user that is set when the ABAP program is executed. You can specify a character string of 1 to 12 bytes as the name of the authorized user. If you omit the -auth option, the user who logged on to the R/3 system (user specified in the R/3 logon information) is set as the authorized user when the ABAP program is executed.

-lang language

Enter a single-byte alphabetic character to specify the language to be used. You can use either Japanese or English. Specify the following language that can be used in the execution environment of the ABAP program.

  • For Japanese: J

  • For English: E

If the -lang option is omitted, the language used by the application server at the logon destination is used. The language specified by this option also affects the spool list output information.

-armode archive-mode

Specify a method for archiving the execution results of the ABAP program.

The characters that can be specified and their meaning are shown below. The default archive mode is P (print).

P: Print

A: Archive

PA (or AP): Print and archive

If you assign A or PA to armode, you must also specify -objtyp, -doctyp, and -info.

-out output-device

Specify the name of the output destination device set for the R/3 system as the print destination of the execution results of the specified ABAP program. Specify the abbreviation of the output device. A character string of between one and four bytes can be entered. If you omit the printer specification, the default output device defined for the R/3 system is selected automatically.

-ln lines

Specify the number of lines to set the output format for the execution results of the ABAP program. The specifiable values are 1 to 255. If you omit this option, the R/3 system will select an appropriate format.

You cannot specify the -ln option and the -fmt option together.

-col columns

Specify the number of columns to set the output format for the execution results of the ABAP program.

The specifiable values are 1 to 255. If you omit this option, the R/3 system will select an appropriate format.

You cannot specify the -col option and the -fmt option together.

-fmt format

Specify the name of the output format for the execution results of the ABAP program.

You can specify a character string of 1 to 16 bytes. If you omit this option, an applicable format is selected by the R/3 system.

You cannot specify the -fmt option and the -ln option or the -col option together.

Note

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

-cc number-of-copies

Specify the number of copies to be printed. A value of between 1 and 255 can be entered. If you omit the number of copies specification, it is automatically set to 1.

-shwpwd authorization

To prevent the illegal manipulation of print requests, you can specify an authorization character string. Users are allowed to manipulate print requests only when they have a spool action authorization object that matches the authorization character string entered here. A character string of between one and twelve bytes can be entered.

-ip

Immediately forwards print requests to the printer.

If this specification is omitted, instant output (instant printing) does not occur.

-dp

Deletes print requests after they have been sent to the printer.

If this specification is omitted, print requests are not deleted after they have been sent to the printer.

-rpd spool-retention-period

Specify how many days the print request should be retained.

The characters that can be specified and their meaning are shown below. If you omit this option, the print request will be retained for eight days (it will be deleted after eight days).

1 to 8: Number of days during which the print request will be retained

unlimited: The print request will be retained indefinitely.

-title spool-request-title

Specify the title of the spool request. You can specify a value of 1 to 68 bytes. If you omit this option, the title of the spool request is blank.

Note

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

-sapcvr SAP-cover

Specify this option to add a SAP cover, including the recipient name, section name, and other information, to the ABAP program execution results. The characters that can be specified and their meaning are shown below.

Y: A SAP cover will be added.

N: No SAP cover will be added.

D: A SAP cover may or may not be added depending on the setting of the printer.

If you omit the -sapcvr option, D is assumed for the SAP cover.

-selcvr

Specify this option to add a selected-report cover, containing the program execution condition, to the ABAP program execution results.

-receiver recipient

Specify this option to change the recipient of the print-out. If you specify this option, the receiver name printed on the SAP cover will also be changed. You can specify a character string of 1 to 12 bytes. If you do not specify a recipient, the user who is permitted to execute the ABAP program is assumed.

-dpt department

Enter the name of the department to be printed on the SAP cover.

You can specify a character string of 1 to 12 bytes. If you omit this option, the department specified in the profile of the user who is permitted to execute the ABAP program is assumed.

Note

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

-objtyp object-type

Specify an object type used to classify the archive of the report to be printed. You can specify a character string of 1 to 10 bytes. You must register the object type with the R/3 system in advance.

Note

This option is mandatory if you assign A (Archive) or PA (Print and archive) to -armode. If you assign P (print) or nothing to -armode, do not specify this option.

-doctyp document-type

Specify a document type used to classify the archive of the report to be printed. You can specify a character string of 1 to 10 bytes. You must register the document type with the R/3 system in advance.

Note

This option is mandatory if you assign A (Archive) or PA (Print and archive) to -armode. If you assign P (print) or nothing to -armode, do not specify this option.

-info information-ID

Specify an information ID that identifies the archive request. You can specify a character string of 1 to 3 bytes.

Note

This option is mandatory if you assign A (Archive) or PA (Print and archive) to -armode. If you assign P (print) or nothing to -armode, do not specify this option.

-text information-text

Enter an explanation that describes the contents of the archive request.

You can specify a character string of 1 to 40 bytes. You can specify this option when A (archive) or PA (print and archive) is set for -armode. You can omit this option.

Note

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

temporary-variant-information

Specify the value of the temporary variant set for the program (an ABAP program or an external program). If you specify more than one set of temporary variant information, you can assign multiple sets of temporary variant information to one program. Up to 32 sets of temporary variant information can be specified.

If you specify the -var option together, the items specified for the specified variant are read to overwrite the items specified for the -tv option, and then set for the temporary variant.

If the -var option is not specified together, only the items specified in the -tv option are set as the temporary variant.

Temporary variant information format

{-tv} {-selname item-name} [-sign I/E]
                         [-option option]
                         [-frm frm]
                         [-to to]
  • -selname item-name

    Specify the name of the temporary variant. A character string of 1 to 8 bytes can be entered for the item name.

    If you specify the -tv option, specify the -selname option.

  • -sign I/E

    Specify whether to select the temporary variant name specified for the item name. The specified value is passed to the SAP system as it is. Note that some items may not be set as a value of the temporary variant even if you specify them.

  • -option option-value

    Specify the option value# of the temporary variant name specified for the item name. A character string of 1 to 2 bytes can be entered for the option value. The specified value is passed to the SAP system as it is. Note that some items may not be set as a value of the temporary variant even if you specify them.

    #: The option value that is displayed in the Display a Variant window when you start the ABAP Editor on the SAP frontend software

  • -frm frm-value

    Specify the frm value# of the temporary variant name specified for the item name. A character string of 1 to 45 bytes can be entered for the frm value. The specified value is passed to the SAP system as it is. In addition, some items may not be set as a value of the temporary variant even if you specify them. Specify the value used in the SAP system. Note that the value displayed in the SAP frontend software may be different from the one used in the SAP system.

    #: The frm value that is displayed in the Display a Variant window when you start the ABAP Editor on the SAP frontend software

  • -to to-value

    Specify the to value# of the temporary variant name specified for the item name. A character string of 1 to 45 bytes can be entered for the to value. The specified value is passed to the SAP system as it is. In addition, some items may not be set as a value of the temporary variant even if you specify them. Specify the value used in the SAP system. Note that the value displayed in the SAP frontend software may be different from the one used in the SAP system.

    #: The to value that is displayed in the Display a Variant window when you start the ABAP Editor on the SAP frontend software

Note

If you specify the temporary variant information, the XBP 3.0 interface must be enabled on the connection destination R/3 system.

Job step information format (external program)

-px external-program -xpgtgh target-host
                     [-arg argument]
                     [-auth authorized-user]
-px external-program

Specify the name of the external program to be added as a job step. A character string of 1 to 128 bytes can be entered for the external program specification.

The specified external program must comply with the following requirement:

  • The external program must be executable by a SAP CPI-C user.

For information about SAP CPI-C users, see the R/3 manual or online help.

-xpgtgh target-host

Specify the name of the host that executes the external program. A character string of 1 to 32 bytes can be entered for the target host specification. Host names in the following formats can be used:

  • Host name defined in the hosts file

  • IP address

For this option, specify the name of the host on which the application server is running.

Note that the appropriateness of the target host specification (whether the specified host name or IP address is in the hosts file) will not be checked when the command is executed.

-arg argument

If the external program requires an argument, specify the name of the argument. You can specify a character string of 1 to 255 bytes.

-auth authorized-user

Specify the name of the authorized user that is to be specified when the external program is executed. A character string of 1 to 12 bytes can be entered for the authorized user specification. However, since the external program is executed via the SAP CPI-C user, the authorized user specified by the -auth option becomes invalid. Note that the external programs are executed by SAP CPI-C users.

If the -auth option specification is omitted, the user that logs on to the R/3 system (the user specified by the R/3 logon information) is set as the authorized user when the external program is executed.

-tgh target-host

Specify the host name of the application server that executes the registered 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 registered 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 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.

-ri

This argument releases the 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.

-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 jr3bjsub command will be ineffective:

In this event, no target host is assigned to the job registered 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