RUN JOB - USAP Command
Description
The RUN JOB command performs the following actions:
- Defines a new SAP, job based on either a job definition specification or an existing SAP job definition.
- Starts the defined job.
- Waits for the job to complete.
- Prints the job's joblog to standard error and the spoollists to standard output.
- Purges the job from the SAP system.
The exit code of USAP will indicate the completion status of the SAP job.
See WAIT for JOB Exit Codes in Universal Connector for SAP Exit Codes for a complete list of job status exit codes.
Command Line Syntax
The following figure illustrates the command line syntax of the RUN JOB command, using the command line, long form of its configuration options.
-run {filename/ddname | -jobname jobname [-jobid jobid]} [-target_jobname jobname] [-poll seconds] [-job_stat_check option] [-job_stat_check_interval seconds] [-model_status option] [-resolve_multi_model option] [-targetserver server] [-target_variant job step,variant name;job step,variant name;...] [-immediate] [-activeec exitcode] [-readyec exitcode] [-scheduledec exitcode] [-releasedec exitcode] [-terminatedec exitcode] [-finishedec exitcode] [-max_log_size size] [-max_spool_size size] [-maxspoolsizeexceededec exitcode] [-first_page page] [-last_page page] [-server_stop_conditions codes] [-spool_codepage codepage] [-spool_recv_buffer size] [-bdcwait [-bdcjobnameptrn pattern] [-bdcjobidptrn pattern] [-bdcqidptrn pattern] [-qtobecreatedec exitcode] [-qunprocessedec exitcode] [-qinbackgroundec exitcode] [-qfinishedec exitcode] [-qerrorec exitcode] ]
Command Argument
The RUN JOB command can be expressed as either:
- -R (Short form)
- -run (Long form)
The RUN JOB command argument, <i>filename</i>/ddname, specifies the name of the file that contains the job definition.
See Universal Connector for SAP Job Definition Files for additional information on the job definition file.
Configuration Options
The following table describes all RUN JOB configuration options and provides the command line, long form of each option illustrated in the RUN JOB command line syntax, above.
Configuration | Command Line | Description |
---|---|---|
-bdcwait | Causes USAP to perform batch input monitoring for the started job. | |
-job_stat_check | Specification to enable or disable calls to SAP function module BAPI_XBP_JOB_STATUS_CHECK, which are used to synchronize the actual job status with the R/3 stored status. | |
-activeec | USAP exit code for the SAP job active status. | |
-finishedec | USAP exit code for the SAP job finished status. | |
-readyec | USAP exit code for the SAP job ready status. | |
-releasedec | USAP exit code for the SAP job released status. | |
-scheduledec | USAP exit code for the SAP job scheduled status. | |
-terminatedec | USAP exit code for the SAP job terminated status. | |
-maxspoolsizeexceededec | Minimum exit code that will be set if an attempt is made to return a spool list that exceeds the maximum size for job logs as specified by the MAX_SPOOL_LIST_SIZE USAP configuration option. | |
-qinbackgroundec | USAP exit code for the SAP queue state S (in background). | |
-qtobecreatedec | USAP exit code for the SAP queue state C (to be created). | |
-qerrorec | USAP exit code for the SAP queue state E (error). | |
-qfinishedec | USAP exit code for the SAP queue state F (finished). | |
-qunprocessedec | USAP exit code for the SAP queue state [USAP: ] (unprocessed). | |
-first_page | Starting page from which a spool list will be returned. | |
-last_page | Last page of a spool list to be returned. | |
-immediate | Causes the job to be started immediately. | |
-jobid | Job ID of an existing SAP job to use as a model for the new job definition. | |
-bdcjobidptrn | Locates the header record and determines the offset of the job ID in the RSBDCSUB batch input processing report. | |
-jobname | Existing SAP job name to use as a model for the new job definition. | |
-bdcjobnameptrn | Locates the header record and determines the offset of the job name in the RSBDCSUB batch input processing report. | |
-max_log_size | Maximum size for job logs. | |
-max_spool_size | Maximum size for spool lists. | |
-model_status | For operations that work with model jobs without providing a job ID to explicitly target a specific job on the SAP system, restricts the model job candidates to the specified job status. | |
-bdcqidptrn | Locates the header record and determines the offset of the queue ID in the RSBDCSUB batch input processing report. | |
-resolve_multi_model | For operations that work with model jobs without providing a job ID to explicitly target a specific job on the SAP system, controls the behavior when multiple candidate jobs are found. | |
-server_stop_conditions | Exit code(s) of the executing Universal Connector process that should trigger the locally running Universal Broker to cancel the corresponding SAP job. | |
-spool_codepage | Codepage used for transferring spool lists from SAP system. | |
-spool_recv_buffer | Size of the blocks (number of pages) used when transferring spool lists. | |
-job_stat_check_interval | Length of time that can elapse, without a change in job status, before a call will be made to synchronize the actual job status with the SAP stored status. | |
-target_jobname | Name to give the newly created job. | |
-targetserver | Server on which the job will run. | |
-target_variant | One or more replacement variants for ABAP program job steps in an SAP job. | |
-poll | Length of time to wait between job status calls to the SAP system. |