Using the ASYNC Jobs (MBJC) | Contents | SCVs | Search | Glossary | Reports | Solutions | XML | Index | Resetting the Async Jobs (RBJC) |
Working with the CNTL_ASYNC Job
The controlling ASYNC job (CNTL_ASYNC) is used to start and end each of the background ASYNC jobs. When you start the CNTL_ASYNC job, all of the background ASYNC jobs start; when you end the CNTL_ASYNC job, all of the background ASYNC jobs end. You cannot start or end an individual background ASYNC job.
You should end the CNTL_ASYNC job each day, when your operations for the day are complete. When you end the CNTL_ASYNC job:
• Records that were processed successfully for each background ASYNC job are deleted from the data queue tables.
• An error list is produced for each background ASYNC job.
Ending the background ASYNC jobs allows you to delete unnecessary records from the system, and enables you to correct any processing errors in a timely manner.
In this topic:
• Work with Background Jobs Screen
• Display Asynchronous Job Screen (Displaying the CNTL_ASYNC Job)
• Starting the Background ASYNC Jobs
• Starting the Background ASYNC jobs
• Ending the Background ASYNC Jobs
• Display Active Procedure Window
• Changing the Status of the ASYNC Jobs
• Reorganizing the ASYNC Job Data Queues
• Troubleshooting the Async Jobs
• Determining the Status of the Async Jobs
• Verifying the Status of the Async Jobs
For more information: See Resetting the Async Jobs (RBJC).
Work with Background Jobs Screen
Purpose: This screen displays the current status of each background ASYNC job. This screen is used to start or end the ASYNC jobs, to display the records in the data queue associated with each job, to reorganize the data queues, or to change the status of a particular background job if necessary.
All of the options on this screen can be used with the Controlling ASYNC (CNTL_ASYNC) job.
How to display this screen: Enter MBJC in the Fast path field at the top of any menu or select Background Job Control from a menu.
Field |
Description |
Job name |
The name of the ASYNC job. The ASYNC jobs are: • BILL_ASYNC = Billing background job • CNTL_ASYNC = Controlling background job • EBO_ASYNC = Evaluate backorders background job • ORDR_ASYNC = Order processing background job • OTHR_ASYNC = Other background job purchase orders) Alphanumeric, 10 positions; optional. |
Description |
The description of the data queue associated with the ASYNC function. Alphanumeric, 40 positions; optional. |
Status |
The status of the ASYNC job. Valid status codes are: • *ACTIVE = the ASYNC function is running • *INACTIVE = the ASYNC function has ended • *JOBQ = the ASYNC function has been submitted to the job queue for startup • *Endpend = the ASYNC function is in the process of ending • *Reorg = the data queue associated with the ASYNC function is being reorganized Alphanumeric, 10 positions; display-only. |
Control |
A code indicating whether the ASYNC function is a controlling function. The controlling function is used to start, end, and reorganize the data queues for the ASYNC functions it controls. Currently, the CNTL_ASYNC function is the only controlling function. Valid codes are: • Y = the ASYNC function is a controlling function • N = the ASYNC function is not a controlling function. |
Note: In order to perform certain options at the Work with Background Jobs screen, such as change the status of a process, you need to have the Security administrator flag for the user selected. See the User Configuration guide for more information.
Screen Option |
Procedure |
Display the attributes of an ASYNC job |
Select Display for an ASYNC job to advance to the Display Asynchronous Job Screen (Displaying the CNTL_ASYNC Job). |
Start the background ASYNC jobs |
Select Start for the CNTL_ ASYNC job to start all of the ASYNC jobs. See Starting the Background ASYNC Jobs. |
End the background ASYNC jobs |
Select End for the CNTL_ ASYNC job to end all of the ASYNC jobs. See Ending the Background ASYNC Jobs. |
Reorganize the data queue for a background ASYNC job |
Select Reorganize queue for the CNTL_ ASYNC job to reorganize the data queues associated with each ASYNC job. See Reorganizing the ASYNC Job Data Queues. |
Display the data queue for an ASYNC job |
Select Display Data queue for an ASYNC job. Display Data queue cannot be used with the CNTL_ASYNC. |
Change the status of the CNTL_ ASYNC job |
Select Change Status for an ASYNC job that requires a status change. See Changing the Status of the ASYNC Jobs. |
Work with e-commerce jobs |
Select E-Commerce Jobs to advance to the Work with E-Commerce Job Control Screen. |
Work with Drop Ship background jobs |
Select Drop Ship Jobs to advance to the Work with Drop Ship Background Jobs Screen. |
Work with integration layer jobs |
Select Integration Layer to advance to the Work with Integration Layer Process Screen. |
Display Asynchronous Job Screen (Displaying the CNTL_ASYNC Job)
Purpose: Use this screen to display descriptive information about an ASYNC job such as the CNTL_ASYNC job.
How to display this screen: Select Display for a job at the Work with Background Jobs Screen.
Field |
Description |
Process name |
The name of the process for this ASYNC job. Listed as the Workstation for the ASYNC job at the screen in Purge Active Procedures Across Users (MACX). The data queues are: • CNTL_ASYNC = CNTRLDATAQ • BILL_ASYNC = BILLDATAQ • EBO_ASYNC = EVLBODATAQ • ORDR_ASYNC = ORDERDATAQ • OTHR_ASYNC = OTHERDATAQ Alphanumeric, 10 positions; display-only. |
Job name |
The name of the ASYNC job. The ASYNC jobs are: • BILL_ASYNC = Billing background job • CNTL_ASYNC = Controlling background job • EBO_ASYNC = Evaluate backorders background job • ORDR_ASYNC = Order processing background job • OTHR_ASYNC = Other background job purchase orders) Each ASYNC job is discussed separately in this part. Alphanumeric, 10 positions; optional. |
Description |
The description of the ASYNC job. Alphanumeric, 40 positions; display-only |
Start |
The date and time the ASYNC job was last started and the User ID of the person who started it. (Date): Numeric, 6 positions; display-only. (Time): Numeric, 6 positions; display-only. (User ID): Alphanumeric, 10 positions; display-only. |
End |
The date and time the ASYNC job was last ended and the User iD of the person who ended it. (Date): Numeric, 6 positions; display-only. (Time): Numeric, 6 positions; display-only. (User ID): Alphanumeric, 10 positions; display-only. |
Controlling job |
A flag indicating whether this function controls other ASYNC functions. The controlling ASYNC function starts and ends other ASYNC functions. Valid values are: • Selected = This is a controlling ASYNC function. • Unselected = This is not a controlling ASYNC function. The CNTL_ASYNC job is the only controlling ASYNC job. |
System Option |
A flag indicating whether this function is a system function that cannot be deleted by the user. Valid values are: • Selected = This function cannot be deleted by the user. • Unselected = This function can be deleted by the user. |
Status |
The current status of the function. Valid status codes are: • *ACTIVE • *INACTIVE • *ENDPEND • *JOBQ • *REORG Display-only. |
Starting the Background ASYNC Jobs
Purpose: The CNTL_ASYNC job is used to start and end all of the other background ASYNC jobs. The background jobs must be active for the records in the data queues to be processed. If the background ASYNC jobs are not active, records will be held in the data queue until you start the background ASYNC jobs.
Starting the Background ASYNC jobs
You can start the background ASYNC jobs manually at the Work with Background Jobs Screen, or create a periodic process to schedule the ASYNC jobs to start at a specified time.
When you start the background ASYNC jobs, the system removes any terminator records that may exist in the data queues. The system creates a terminator record in the data queues when you end the background async jobs to determine which records to process before the asyncs are brought down and which records to process when the asyncs are restarted. Multiple terminator records may exist in the data queues if you run the ENDASYN periodic function to end the asyncs when the asyncs are already inactive. Because you are now starting the background async jobs, the system no longer needs the terminator records to determine when to reprocess the records in the data queue and instead will process all records that may exist in the data queues.
Before you start the background ASYNC jobs: To start the background ASYNC jobs, the status of each job must be *INACTIVE and each job must not be running. You can use the Display Active Batch Jobs (DABJ) menu option to verify that the jobs are not running.
• If the status of the ASYNC jobs is *ACTIVE and the jobs are not running, you must change the status of each ASYNC job to *INACTIVE before you start the CNTL_ASYNC job to start the background jobs. See Changing the Status of the ASYNC Jobs.
• If the status of the ASYNC jobs is *INACTIVE and the jobs are running, you must change the status of each ASYNC job that is actively running to *ACTIVE. See Changing the Status of the ASYNC Jobs.
To manually start the ASYNC jobs:
1. At the Work with Background Jobs Screen, review the status of the background jobs. The jobs must be started if the status is *INACTIVE.
2. Select Start for the CNTL_ASYNC job.
3. The status of the ASYNC jobs should be *ACTIVE.
To schedule the ASYNC jobs to start at a specified time:
Create a schedule for a periodic process that contains the STRASYN periodic function to start asyncs.
Function |
Description |
Program |
Summary |
STRASYN |
Start asyncs |
MSSTRASYNC |
If the asyncs are currently Inactive, this periodic function calls the Controlling Data Queue (CNTL_ASYNC) in Background Job Control (MBJC) and starts the background jobs. This periodic function performs the same updates as selecting Start for the CNTL_ASYNC to start the background jobs. |
For more information: • See Working with Periodic Processes (WPPR) for information on how to assign each function to a periodic process. • See Executing Periodic Processes (EPRO) for more information on scheduling a periodic process to run at a specified time. • See Resetting the Async Jobs (RBJC) for more information on how to reset the async jobs when they are out of sync. |
Ending the Background ASYNC Jobs
Purpose: You can end the background ASYNC jobs manually at the Work with Background Jobs Screen, or create a periodic process to schedule the ASYNC jobs to end at a specified time.
Use the CNTL_ASYNC job to end all of the other background ASYNC jobs. You should bring down the background jobs at the end of your processing day.
When you bring down the background ASYNC jobs:
• If you manually end asyncs, a terminator record is sent to each data queue to identify the last record to be processed. Records sent to the data queue before the terminator record will be processed; records sent to the data queue after the terminator record was sent will be processed when the background ASYNC jobs are restarted.
• If you use the ENDASYN periodic function to end asyncs, any records in the data queue will be processed when the background ASYNC jobs are restarted.
• The data queues are reorganized. All completed records are deleted from the data queue tables. Records that have not been fully processed will be reloaded to the data queue when the background ASYNC jobs are restarted.
• An error list prints for each background ASYNC job, listing the records that could not be fully processed and the reason for the error.
When the jobs end: The status of each background job will change from *ACTIVE to *INACTIVE. (You may see *ENDPEND or *REORG before you see *INACTIVE, depending upon how long it takes to end each job.)
Note: You must end the background ASYNC jobs before the ASYNC subsystem is brought down. If you bring down the ASYNC subsystem while the background ASYNC jobs are running, the jobs will be ended but will remain in an *ACTIVE status. See Changing the Status of the ASYNC Jobs.
To manually end the ASYNC jobs:
1. Select End for the CNTL_ASYNC job at the Work with Background Jobs Screen.
2. The status of the ASYNC jobs changes to ENDING and then to INACTIVE.
3. When you end the ASYNC jobs, the Display Active Procedure window displays if there are any active procedures for the Order Entry/Maintenance, Purchase Order Entry/Maintenance, Receiving, or Confirmation functions. The system creates these records to prevent possible conflicts when users are engaged in these activities. See Display Active Procedure Window.
Display Active Procedure Window
This window displays when you end the ASYNC jobs if there are any active procedures for the Order Entry/Maintenance, Purchase Order Entry/Maintenance, Receiving, or Confirmation functions. The system creates these records to prevent possible conflicts when users are engaged in these activities.
If a user is active in a function:
• the user can exit the function before the ASYNC jobs end. Depending on the activity, the user might need to exit CWSerenade and then reenter, if needed, to clear the active procedure record.
• you can select Delete next to each active procedure record to delete the active procedure, or select Delete all to delete them all. Deleting the active procedure does not force the user out of the activity; there is no signal of the deletion to the user and the user can continue entering updates to the record. However, this allows more than one user to access the same record, such as an order or a customer and possibly overwrite each other’s updates.
If neither of these steps clears the active procedure record, you will need to purge the Active Procedures table. See Purging Active Procedures (MACP).
Field |
Description |
Job # |
The system job number assigned to the active procedure. Numeric, 6 positions; display-only |
Program description |
The description of the program associated with the Active Procedures record. Alphanumeric, 3 positions; display-only. |
User |
The User ID of the person engaged in the activity that created the Active Procedures record. Alphanumeric, 10 positions; display-only. |
Workstation |
The Workstation ID where the user is working. Alphanumeric, 10 positions, display-only. |
Start date |
The date when the Active Procedures record was created. This is the date the user entered the application. Numeric, 6 positions; display-only. |
Time |
The time when the Active Procedure record was created. This is the time the user entered the application. Numeric, 6 positions; display-only. |
To remove active procedures:
1. Have each person whose name appears in the window exit the application so that you can end the ASYNC jobs. It may be necessary to exit CWSerenade temporarily to delete the active procedure record, or
2. Select Delete next to each active procedure record to delete the active procedure. Deleting the active procedure does not force the user out of the activity; there is no signal of the deletion to the user and the user can continue entering updates to the record. However, this allows more than one user to access the same record, such as an order or a customer and possibly overwrite each other’s updates.
3. Use Purging Active Procedures (MACP) to delete any stranded Active Procedure records, if necessary. You can also purge active procedures for interactive jobs that are older than a specified number of hours using the DLTACPR Delete Stranded Active Procedures periodic function.
4. Select Refresh to refresh the Active Procedure Window to monitor whether the users have exited.
5. Select Exit to exit the window and return to the Work with Background Jobs Screen.
Deleting active procedure records: You can delete the Active Procedure records at this window by selecting Delete for each record in the window. Deleting the active procedure does not force the user out of the activity, such as order entry; there is no signal of the deletion to the user and the user can continue entering updates to the record. However, it is not recommended to delete Active Procedure records in this way, because it removes the safeguard against two users potentially accessing the same record, such as an order or customer, at the same time.
To schedule the ASYNC jobs to end at a specified time:
Create a schedule for a periodic process that contains the ENDASYN periodic function to end asyncs.
Function |
Description |
Program |
Summary |
ENDASYN |
End asyncs |
MSENDASYNC |
If the asyncs are currently Active, this periodic function calls the Controlling Data Queue (CNTL_ASYNC) in Background Job Control (MBJC) and ends the background jobs. This periodic function performs the same updates as selecting End for the controlling data queue to end the background jobs; however, any records in the data queue will be processed when the background ASYNC jobs are restarted. |
Note: When you end the ASYNC jobs using the job scheduler, the system does not look for active procedures, and instead, ends the asyncs immediately.
For more information:
• See Working with Periodic Processes (WPPR) for information on how to assign each function to a periodic process.
• See Executing Periodic Processes (EPRO) for more information on scheduling a periodic process to run at a specified time.
Changing the Status of the ASYNC Jobs
Purpose: Use the Change Status option to change the status of the ASYNC jobs.
Before you change the status of the async jobs: Before you change the status of the async jobs, you should first determine if the async jobs are actively running; see Determining the Status of the Async Jobs.
How to change ASYNC job status: Select Change Status for a job at the Work with Background Jobs Screen.
A pop-up window displays from which you can select the status you want to assign to the async job. Select a status.
• If the async job is running: Select *ACTIVE if the async job is running and the status is currently *INACTIVE.
• If the async job is not running: Select *INACTIVE if the async job is not running and the status is currently *ACTIVE. This situation occurs if the ASYNC subsystem is brought down while the background ASYNC jobs are still active; the background ASYNC jobs have really ended, but the status indicates that they are still *ACTIVE.
Note: You must change the status of each async job separately. Changing the status of the CNTL_ASYNC job will not change the status of the individual background ASYNC jobs.
For more information: See Troubleshooting the Async Jobs for more information on the steps you should take if you suspect the async jobs are not running correctly.
Reorganizing the ASYNC Job Data Queues
Purpose: The data queues associated with the ASYNC jobs are reorganized when the ASYNC jobs are ended. Use the Reorganize queue option as a recovery tool only when the ASYNC jobs end abnormally before the data queues have been reorganized. This option allows you to reorganize the data queues before the next ASYNC job end is processed.
To determine if the data queues were reorganized: Display the data queue for an ASYNC job. If the entry date for a record is earlier than the date you last ended the ASYNC jobs, or if records are in a *BLANK status, the data queues were not reorganized. If you do not use the Reorganize queue option, the data queues will be reorganized the next time you end the ASYNC jobs.
When you use the Reorganize queue option, the system deletes completed records from the data queue tables associated with the ASYNC jobs. Records that have not been fully processed will be reloaded to the data queues when the background ASYNC jobs are restarted.
The Reorganize queue option is available only with the CNTL_ASYNC job. All of the ASYNC jobs must be in a *INACTIVE status, and there can be no Active Procedures records for Order Entry, Order Maintenance, Purchase Order Entry/Maintenance, Receiving, Confirmation, and PC Manifest functions.
Before you reorganize the data queues: Before you attempt to reorganize the data queues, you should make sure that the status of each ASYNC job is *INACTIVE.
How to reorganize the data queues: Select Reorganize queue for the CNTL_ASYNC job at the Work with Background Jobs Screen.
Active procedures window: A pop-up window opens if there are any users in the Order Entry/Maintenance, Purchase Order Entry/Maintenance, Receiving, Confirmation, or PC Manifesting functions. The data queues cannot be reorganized if there are any users in these functions. See Ending the Background ASYNC Jobs.
For more information: See Troubleshooting the Async Jobs for more information on the steps you should take if you suspect the async jobs are not running correctly.
Troubleshooting the Async Jobs
Use the following steps if you suspect that the async jobs are not running correctly.
• Determining the Status of the Async Jobs
• Verifying the Status of the Async Jobs
• Resetting the Async Jobs (RBJC)
Determining the Status of the Async Jobs
Use the Display Active Batch Jobs Screen to determine if the async jobs are running.
Note: The Display Active Batch Jobs Screen displays batch jobs that are running for the specific CWSerenade application server that you are currently logged into. In order to review all batch jobs that are currently running, you will need to log in to CWSerenade using each application server and review the Display Active Batch Jobs screen.
• If the async job is listed on the Display Active Batch Jobs Screen, the job is running. Review the My Jobs field for the async job to determine if the status of the async job on the Job Management Screen is accurate. See Verifying the Status of the Async Jobs.
• If the async job does not display on the Display Active Batch Jobs screen, the job is not running, regardless of the status of the job on the Job Management Screen or the status of each async job on the Work with Background Jobs Screen. Use the Resetting the Async Jobs (RBJC) menu option to run the async reset. Once the reset async job completes, you can restart the background async jobs; see Starting the Background ASYNC Jobs.
Verifying the Status of the Async Jobs
The batch jobs that display on the Display Active Batch Jobs Screen are the jobs that are currently running on the CWSerenade application server that you are currently logged into. The My Jobs field on this screen indicates if the status of the batch job on the Job Management Screen is accurate. The table below indicates the action to take, based on the status of the async job on the Display Active Batch Jobs screen.
Async Status in My Jobs Field: |
Indicates: |
Action to Take: |
RUN |
The async job is running and the status of the job on the Job Management Screen is accurate. |
Verify that the status of each of the async jobs that is running displays as *ACTIVE on the Work with Background Jobs Screen. See Changing the Status of the ASYNC Jobs if you need to change the status of a job to *ACTIVE. What if the async job is active but no records are being processed? If this situation occurs, it is possible that the controlling async data queue table has been cleared. To correct, end the async jobs and then use the Reorganize queue option. |
MSG |
The async job is running, but the status on the Job Management Screen is not accurate. |
When the Async jobs in the Background Job Control (MBJC) menu option are active, the system checks the status of each async job on the Job Management screen. If the async job is active and the job status is not RUN, the next time the system checks the status of the async jobs, the system automatically updates the job status to RUN. For example, if the Order Async is Active and you change the ORDR_ASYNC job to END, the system will automatically change the status of the ORDR_ASYNC job back to RUN. 1. If an async job displays on the Display Active Batch Jobs Screen and its My Jobs status is not RUN, wait a few minutes to see if the system will automatically update the status to RUN. 2. Once the status updates to RUN, verify that the status of the async jobs displays as *ACTIVE on the Work with Background Jobs Screen. See Changing the Status of the ASYNC Jobs if you need to change the status of the job to *ACTIVE. If the async job does not auto-update to a RUN status, you will need to determine if an error occurred. See Reviewing the Async Job Log. Important: Never try to end an actively running async job by manually ending it on the Job Management Screen. This does not actually end the async job. |
ERR |
The async job is running, but a user has manually ended the job on the Job Management Screen while its status was MSG. |
|
END |
The async job is running, but a user has manually ended the job on the Job Management Screen. |
|
*RMV* |
The async job is running, but a user has removed the job from the Job Management Screen. |
End the CNTL_ASYNC that submitted the job. See Ending the Background ASYNC Jobs for instructions. Once you end the CNTL_ASYNC, the system ends the async job and removes the async job from the Display Active Batch Jobs Screen since it is no longer running. You will need to restart the CNTL_ASYNC in order to resubmit the job and run it again. Important: Never remove an actively running async job from the Job Management Screen. If you do this, the system removes all traces of the job from the system, even though the job is still actively running. |
If the async job remains in a MSG status without being auto-corrected by the system, review the async job log to determine if an error occurred.
To review the async job log: Click the logFile link for the async job on the Job Management Screen to advance to the Log file screen. Note: If the logFile is not a link, the async job was submitted from a different application server; you must log on to the other application server to review the async job log.
If an error occurred during async processing, the system writes an entry similar to the following in the async job log:
2009-04-18 22:09:10,161 ERROR [ JENASYS] execute(): status change to [MSG]:334547java.lang.RuntimeException: java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: The result set has no current row. (JenasysJob.java:297)
2009-04-18 22:09:10,177 ERROR [ JENASYS] run(): Job status change to [MSG]. In 'invokeHandler' EXCEPTION occured while calling processServiceRequest. java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: The result set has no current row. (JenasysJob.java:701)
If an error exists in the async job log, copy the error and the log so that the problem can be researched if needed.
If an error occurred for one async job: If an error occurred for one async job and all of the other async job are running correctly, use the following steps to correct the asyncs:
1. Use the Display Active Batch Jobs Screen to verify that the async job is not running. If the async job is not running, it will not display on this screen.
2. At the Job Management Screen, select End for the async job in error. The system updates the status of the job from MSG to ERR.
3. At the Work with Background Jobs Screen, change the status of the async job in error to Inactive. See Changing the Status of the ASYNC Jobs for instructions.
The next time the system processes a transaction for the async that was in error, the system will launch a new async job and the job will continue processing where it left off before the error occurred. If transaction volume is slow and you want to verify that the issue is resolved, use a test company to force a transaction through the async. For example, if the error occurred with the Order Async, use a test company to create a test order to send through the Order Async.
If an error occurred for all of the async jobs: If an error occurred for all of the async jobs, and none of the async jobs are running correctly, use the following steps to correct the asyncs:
1. Use the Display Active Batch Jobs Screen to verify that none of the async jobs are running. If the async jobs are not running, they will not display on this screen.
2. Use the Resetting the Async Jobs (RBJC) menu option to run the async reset. Once the reset async job completes, you can restart the background async jobs; see Starting the Background ASYNC Jobs.
If an error occurred for one or more of the async jobs and they are still running: If an error occurred for one or more of the async jobs, and the jobs are still running on the Display Active Batch Jobs Screen, use the following steps to correct the asyncs.
Note: You should perform these steps only if there is no other way to resolve the problem with asyncs.
1. Reboot all of the CWSerenade application servers to clear up all of the asyncs. When you reboot the application servers or restart the CWSerenade service, the system ends all running jobs.
2. Use the Resetting the Async Jobs (RBJC) menu option to run the async reset. Once the async reset job completes, you can restart the background async jobs; see Starting the Background ASYNC Jobs.
Using the ASYNC Jobs (MBJC) | Contents | SCVs | Search | Glossary | Reports | Solutions | XML | Index | Resetting the Async Jobs (RBJC) |
SO01_02 OROMS 5.0 2018 OTN